MALWARE-EDUCATION
There are many ways to analyze malware, but most of them fall into two categories based on how they approach the file: static and dynamic. What are the differences between these methods? When would you use one over the other? Let's find out.
By Ryan Victory
Mar 3rd, 2023 · 5 minute read
Art via DALL-E
If you’ve read about malware analysis techniques, you may have heard references to “static” and “dynamic” analysis methods. What do these terms mean? Why would you choose one over the other? In this article, let’s examine these terms and look at why they are both important in our fight against malware.
In static analysis, we are concerned with understanding what a file is. Static analysis treats files as sequences of bytes and generally doesn’t try to execute the file in any way. By looking at the file contents in a static manner, we can try to avoid inadvertently executing the malware. Static analysis is also passive - the file isn’t executing so it doesn’t have any chance to try to avoid being analyzed. These analysis methods are also generally faster and more efficient since the resources required to look at the file’s contents are much lower than the resources required to run the file in a sandbox environment.
Common static analysis techniques include:
In dynamic analysis, we are concerned with what a file does. This is generally accomplished by executing the file in a controlled environment (often referred to as a “sandbox” environment). The sandbox needs to be “instrumented,” meaning that it has systems in place to measure what happens when a file is executed within it. Sandbox environments generally monitor:
Dynamic analysis can be interactive or non-interactive. In interactive analysis, an analyst is executing and working with the file in real time. Interactive analysis is useful when the file may require specific actions to be taken that are hard to automate, such as clicking on a specific button or looking for a specific form field within a user interface. Interactive analysis is also used when using a debugger to analyze and step through an executable file.
In non-interactive dynamic analysis, the malware is executed in a sandbox environment without human interaction. The execution may follow a scripted flow, or use robotic process automation techniques to try to approximate how a human would interact with the file.
Common dynamic analysis techniques include:
Talk about the tradeoffs between the two, and when you’d want to use one over the other. Focus on static analysis being fast and efficient but incomplete, and dynamic analysis being more thorough but slower, and prone to interference by the malware or external C2
Talk about techniques that involve extracting portions of a file statically and then executing them dynamically. This can be extremely helpful to deobfuscate code or to understand how a small portion of the file operates.
Summarize the key points, provide a few external resources
Mar 11th, 2023
thehackernews.com
Mar 10th, 2023
www.darkreading.com
Mar 10th, 2023
grahamcluley.com
Mar 10th, 2023
www.bleepingcomputer.com
Mar 10th, 2023
thehackernews.com