Module 8
Sample-based detection and determination
Last updated on: 26 July 2024
Edit this page on GitHubModule 8
Last updated on: 26 July 2024
Edit this page on GitHubYou have a sample of a file and need to determine if it is malicious. This may have been sent to the target by email, social media, or instant messenger, or transferred over removable media or otherwise. The file itself may be a binary, a compressed archive, a captured web page, or other file formats. The primary objective is to determine whether the file is malicious. In addition, you may be able to determine some additional useful characterizing information about the file, however for more guidance see the Malware Analysis Learning Path.
After completing this subtopic, practitioners should be able to do the following:
If you require more in-depth evaluation of a few specific files, there are online services that will scan a specific file or set of files for malware. If you have a file that you suspect to be malicious, you can upload the file to the scanning service. Note that these services do not keep confidential the contents of the files you upload. You should not upload any files that contain sensitive information. These files may come from email attachments, or be recently downloaded files on the victim’s device. Note that in many cases, the initial download may be a dropper (executable that installs the actual malware, often easier to customize than the “real” malware), and may not be known to anti-malware software. If possible, analyze file creation/modification/download dates to identify files that might have been downloaded by the initial dropper.
If you would prefer not to share a full file with an online service but still want to check if it has ever been submitted, you can simply upload a hash of the file. A hash is like a short fingerprint of a file—it can be used to identify a unique file without revealing its contents. For more information on hashes, go through the “Hashes” section in Chapter 7 of the Field Guide to Incident Response for Civil Society and Media. The guide activity assumes the user is learning on a Linux operating system, so you will need to look up the command line utility to use to obtain a SHA sum on your chosen platform, for instance using _shasum _or _openssl _on MacOS or using Get-FileHash or certutil in PowerShell.
A popular malware intelligence service is Google’s VirusTotal. VirusTotal will scan a file with a number of antimalware scanners, and report the results back. It can also scan for file hashes or URLs. VirusTotal is free to use, subject to volume constraints. For a detailed description and activity, complete the “Using VirusTotal” section in Chapter 7 of Internews’ Field Guide to Incident Response for Civil Society and Media.
‼️ After reading the above chapter, you should be able to:
Sandboxes provide a virtual environment simulating an ordinary computer which captures detailed logs of activities which occur in memory and on disk. This generally allows a safe and automated way to bootstrap malware analysis and understand the actions and intentions of a file.
Several freely available commercial sandbox services include Hybrid Analysis, Any.Run, Joe Sandbox, and Triage. These services run files that you send it and perform dynamic analysis. This has great advantages in being able to heuristically detect new malware, and also being able to evaluate multiple malware stages. Note that samples submitted will be collected and become available to paying customers and analysts.
Cuckoo Sandbox is a free and open source malware analysis sandbox tool which you can self-host. CERT-EE in Estonia offers a free hosted version online: Cuckoo V2, Cuckoo V3 (Beta).
To learn more about using Sandboxes for detection of samples, complete the “Sandboxes” section in Chapter 10 of Internews’ Field Guide to Incident Response for Civil Society and Media, which uses the Triage sandbox as an example
After completing the activity, you should be able to:
You can find a deeper dive on Sandboxes in the Infuse Malware Analysis learning path.
Note that advanced malware may initiate checks to discover if it is in a virtualized/sandboxed environment thus may behave differently depending on the environment, therefore no sandbox environment will be 100% reliable.
To learn more about the kinds of techniques that Hybrid Analysis uses, you can learn to do your own hybrid (static and dynamic) malware analysis in the Malware Analysis learning path.
Independently (or with a mentor)
With a Peer or a Mentor
Verify SHA256 checksum
FreeQuick guide on using the command line to verify sha256 checksums for files.
VirusTotal
Free, with rate limitsWeb service to check files or hashes against known malware using multiple detection engines.
Hybrid Analysis
Free, with premium featuresService similar to VirusTotal, offering dynamic analysis capabilities.
Any.run
Free for non-commercial useCommercial sandbox service for analyzing malware behavior.
Joe Sandbox
Free for public accounts (results published)Commercial sandbox service for analyzing malware.
Cuckoo Sandbox
FreeSandbox service provided by the Estonian CERT for malware analysis.
Windows Sandbox
FreeBuilt-in sandbox tool in Windows for safely running applications.
Congratulations on finishing Module 8!
Mark the checkbox to confirm your completion and continue to the next module.
Marks the current module as completed and saves the progress for the user.
You've completed all modules in this learning path.