Updated on: 2024-10-10
What is Dynamic Analysis?
Dynamic analysis refers to the process of analyzing a software program or system while it is running. This allows security analysts to detect potential vulnerabilities in the program, flag malicious behavior, and identify other potential issues. Indicators of malicious behavior that can be observed using dynamic analysis include unexpected network connections, file system modifications, registry changes, process creation and termination patterns, and memory anomalies.
Dynamic analysis is also referred to as “dynamic code analysis” and “dynamic program analysis”. It is one of the two major malware analysis methods used by security experts to analyze potentially harmful malware.
Static Analysis vs Dynamic Analysis
Static analysis methodically examines the contents of files and programs from the inside out for signs of potentially malicious intent, looking specifically for known malware signatures. Static malware analysis does not require program execution, which helps in identifying vulnerabilities like code injection points.
Dynamic analysis, on the other hand, involves executing or “detonating” a suspicious program within a virtual sandbox environment and closely monitoring its behavior, interactions with the system, and response to various inputs.
Dynamic vs. Static Analysis
Why is Dynamic Analysis Necessary?
Dynamic analysis allows security analysts to safely analyze potentially harmful malware without putting the target system at risk. This method is also crucial in uncovering novel threats that the security community has not yet identified by exposing the software to real-world conditions, inputs, and scenarios. These novel threats which don’t match previously recognized malware signatures are referred to as zero-day (or zero-hour) threats and are impossible for the more traditional, simple static analysis method to detect.
How Dynamic Analysis Works
A dynamic analysis method begins after suspicious files are flagged and sequestered within a sandbox environment . At this point, they are executed (or “detonated”), and the dynamic analysis begins its behavior-based approach, observing and logging the program’s actions from outside the sandbox environment.
The dynamic analysis tracks the program’s behavior looking for any signs of potentially malicious intent. This process may include analysis of any changes it makes within the registry, any writes it makes to memory, and any calls it makes to servers using APIs. Supplementary network analysis can also uncover useful data concerning the type and quantity of data the suspicious program leaks, and potentially, the specifics of its remote command and control structure.
While employing a dynamic analysis approach generally results in a higher detection rate than simple static analysis, increasingly sophisticated malware authors have developed malware that is purpose-built to defeat dynamic analysis methods.
These more advanced malware include context-aware malware that can delay its attacks, malware that can detect sandbox artifacts and hide its true functionality, and malware that exploits innate weakness in the sandbox environment.
How Dynamic Analysis Works
Dynamic Analysis Tools
Manual malware triage can be a time-consuming task and may take up to 1-3 hours per sample using many different, disparate tools. The evidence is then painstakingly pieced together, identifying most, but perhaps not all IOCs needed to mitigate a threat. Not only that, but the skillset necessary to perform successful triage is highly advanced.
Malware sandboxes are the tool of choice for dynamic analysis for several reasons. The different available architectures can affect the speed of analysis, requirements for scalability, performance for full automation, integration into existing solutions, and importantly, the many ways modern malware families can evade sandbox detection.
Importance of Successful Dynamic Analysis Execution
There are significant differences in implementation, impact on scalability, overall malware detection, and performance factors which must be considered when deciding upon a solution. Traditional sandbox technologies such as hooking, or emulation-based sandboxes do not work well when detecting evasive threats. To counter this, the only way to ensure malware detonation is to provide an environment free and patched of any indicators that would tip the malware off that it is being executed in a sandbox environment.
By running in the hypervisor and not the detonation environment, malware is unable to identify any indicators that would signal a monitoring environment, fooling the malware into payload detonation. This is important for accurate analysis and full payload deployment.
The Art of Allowing Full Payload Deployment
To counter the threat that sandboxes pose in stopping the proliferation of malware in its tracks, the authors of advanced modern malware families have engineered pre-payload deployment checks to assess if the malware is being detonated in a monitored sandbox environment or not.
If the malware sandbox can run an image copied from actual production endpoints, then the risk of detection falls dramatically. Combined with a unique randomization of the detonation environment helps to ensure that there are no tell-tale signs for malware to identify the target environment as ‘fake’.
VMRay’s technology ensures that there is a minimal attack surface for malware to detect when running in the sandbox. By not modifying the target environment, not relying on emulation, and allowing real-world images to run as the target environment, VMRay gives no indicators for malware to flag it as a sandbox environment.
Comparing Dynamic Analysis Tools and Limitations
In the case of sandbox technology, the triage time is reduced to mere minutes per sample. Different sandbox solutions often provide different results with differing depths of analysis – partly due to the underlying technology each sandbox vendor employs. This may lead to malicious samples incorrectly analyzed and not flagged as malicious.
When dealing with highly evasive malware that is “sandbox aware,” evasive samples analyzed in hooking or emulation sandboxes for example, will delay payload detonation and pass through after being deemed “clean.” Once that “clean” malware sample hits a real user’s operating environment, it quickly turns into another surprising, unwanted incident.
Dynamic Analysis Tools & Limitations
Specific Features Aiding Dynamic Analysis
Advanced malware requires certain conditions prior to activation and payload deployment. If these conditions are not met, the malware lays dormant until all the predefined conditions are in place. VMRay’s Hypervisor-based sandbox technology provides untainted visibility into the malware or phishing sample’s payload behavior during and after detonation. The collected observations of sample behavior are then passed to the automated analysis process for extensive evaluation using 30+ different analysis technologies to identify malicious intent.
When evaluating a sandbox technology for full automation in the SOC, Anti-Sandbox evasion resistance is perhaps one of most important aspects to consider. By minimizing the chances of evasion check failures by monitoring from the hypervisor, there are no submission queue stalls, no malicious samples miscategorized as benign, and a significantly reduced need for Tier 3 manual triage if the sandbox is ever evaded.
Ease of Use, Automation and Integration
The modernization of security automation has become an essential requirement for organizations with the goal of reducing human intervention from an increasingly high number of security incidents. Cloud infrastructure has allowed organizations to streamline modernized SOC operations with automation tightly integrated into a data-centric security architecture. VMRay’s sandbox technology really helps to lower the need for highly skilled and scarce human resources needed to analyze suspicious binaries or malicious URL’s.
With integrations into EDR/XDR, SIEM, SOAR, and TIP solutions, the inclusion of sandbox technology into an organization’s SOC or DFIR process helps to significantly alleviate the burden of manual investigations.
By automating the tasks required to mitigate threats using workflows or playbooks, malicious malware can automatically be quarantined from the user, the SOC Manager informed, and the threat data exported to a central platform. This integration quickly provides the central SOC intelligence repository with a stream of high-quality, auto-generated IOCs, automatically fed into established processes to help SOC Analysts mitigate threats faster. When implemented effectively, the most repetitive and menial tasks are automatically addressed, allowing skilled security practitioners to concentrate on higher-value risks and responsibilities.