When you want to know what it is and where it came from, you've got a range of choices

Dark Reading Staff, Dark Reading

February 15, 2008

4 Min Read

No matter how you measure it, malware is proliferating at unprecedented levels.

Last month, PandaLabs and AV-Test each joined the lists of vendors and researchers reporting massive malware growth in 2007. PandaLabs says it now receives an average of over 3,000 new strains of malware every day. AV-Test saw an increase from 973,000 unique malware samples in 2006 to almost 5.5 million in 2007. (See Malware Quietly Reaching 'Epidemic' Levels.)

If generic malware weren’t enough of a concern, determined attackers will create -- or pay someone to create -- custom malware written specifically to target financial institutions, government agencies, and other enterprises rich with sensitive information. The sensitive nature of these targets may prevent them from using online antivirus scanners like VirusTotal and malware sandboxes like Anubis and CWSandbox.

And to make matters worse, there are easy-to-use remote-access Trojan creation tools like Shark that can "hide" from virtual machines and sandboxes, making analysis next to impossible.

How can your organization analyze new malware or unknown binaries? The easiest option is to outsource the analysis to a company like Mandiant or HBGary. But such services can be expensive, and the turnaround time may not be quick enough to assist with internal investigations.

Another approach is to do the analysis in-house, using static or dynamic analysis. Static analysis involves using tools to analyze the actual file without ever executing it. Dynamic analysis, often called behavioral analysis, involves running the malware and observing its behavior.

During static analysis, simple utilities such as “strings” on Unix-based systems or BinText from Foundstone for Windows, can be used to view text within the file to help determine its intent. Detailed analysis of malware can reveal URLs, IP addresses, and locations within the Microsoft Registry, which may help you get a clue as to the file’s purpose.

Unfortunately, the majority of today’s malware is run through packers (compression) and crypters (encryption). You may end up with virtually no extractable text to analyze, leaving you with no clues except perhaps which packer and crypter were used.

Dynamic analysis requires at least one computer (either physical or virtual) that can run the malware, allowing it to be observed both at the system level and the network layer. System utilities such as Sysinternal’s Process Monitor and TCPView can be used to monitor file activity, registry changes, network port usage, and changes in running processes.

To obtain the same level of information, static analysis requires the use of advanced tools like IDA Pro or HBGary Inspector to examine and disassemble the file, tracing the flow of the executable to determine what it does. While extremely powerful, static analysis can be very time consuming and requires specialized knowledge of reverse engineering that most IT shops don't have.

Static analysis techniques don’t suffer from virtual environment (sandbox) checks within the malware, but dynamic analysis efforts may be affected to the point that the malware will change its behavior to appear benign or simply not run. Realizing this problem, Joe Stewart, senior security researcher for SecureWorks, came up with the idea of a sandnet and created The Reusable Unknown Malware Analysis Network (TRUMAN) for analyzing malware in a closed environment using physical machines.

In TRUMAN, one host is used as the controller that records and responds to all network traffic, essentially emulating the Internet and any services the malware expects to see. For more information about sandnets, check out the video of Stewart's presentation at Shmoocon 2006 as well as KoreLogic's Tyler Hudack's "Burying Your Head in the Sandnet" session at the recent Computer Forensics Show in Washington, D.C.

Both static and dynamic analysis can be very effective at determining the features and intent of malware. Which one you use will depend on how you view each technique's pros and cons, as well as the situation in which the malware was discovered. When time is of the essence, use dynamic analysis as part of the triage process to determine what needs to be done first. Then proceed with static analysis to be sure that nothing was missed.

Have a comment on this story? Please click "Discuss" below. If you'd like to contact Dark Reading's editors directly, send us a message.

About the Author(s)

Dark Reading Staff

Dark Reading

Dark Reading is a leading cybersecurity media site.

Keep up with the latest cybersecurity threats, newly discovered vulnerabilities, data breach information, and emerging trends. Delivered daily or weekly right to your email inbox.

You May Also Like


More Insights