New tool could help computer forensics move off the disk and into memory
Connecting state and local government leaders
More stealthy malicious payloads are making it more difficult to detect malware and are making memory the new frontier of computer forensics.
LAS VEGAS — Tools such as Metasploit’s meterpreter for the automated delivery of stealthy payloads are making it more difficult for researchers to find out after the fact exactly what happened to an exploited computer.
More news from the Black Hat Briefings:
Microsoft calls for united front in war against malware, hackers
Microsoft progam to help quantify costs, risks, returns of patch management
Exploiting routers can be a high value, and a high effort, activity
New weapon revealed for defense against zero-day attacks
Meterpreter can let an attacker upload malware files to a computer that do not touch the disk, which is where traditional forensics tools look to find evidence of malicious activity.
“Meterpreter breaks all disk forensics,” said Peter Silberman, an engineer at Mandiant Inc. So researchers now are looking into memory for evidence of wrongdoing. “This is a new frontier in forensics analysis.”
Silberman and Stephen Davis, a Mandiant security consultant, demonstrated a new memory analysis tool Wednesday at the Black Hat Briefings security conference. By examining traces of memory that can remain resident on a computer for surprisingly long times, they can find evidence of malicious activity that is not visible elsewhere.
“What this allows us to do is to determine what meterpreter did while it was resident on the system,” Davis said.
The tool, which works with Mandiant’s Memoryze memory analysis software, is not yet a full production product. “It’s a proof-of-concept that hopefully other people will latch onto,” Davis said. The first target of the tool is Metasploit because that is the de facto standard for creating exploits against security vulnerabilities in computers.
The Metasploit Project is a computer security project that developed and maintains the Metasploit Framework for creating and executing exploit code. Ostensibly a tool for penetration testing by good guys, it can be used for either good or evil and also is used for attacking computers. Meterpreter is a plug-in defining an interface for attackers to help automate post-exploit activity, such as delivering a malicious payload to a computer that has been compromised. The interface makes it easy to interact with processes, networking and the file system, and to write quick scripts to run against them.
“It has gone through many revisions,” Davis said. “It has become more stealthy,” enabling it to bypass steps that leave evidence for traditional forensics analysis. But commands leave traces in memory, and by being able to find those traces and knowing what to look for, malicious activity can be reconstructed. “Running our tool, we can see that in memory,” and reconstruct a meterpreter session.
This is done by accessing physical memory in order to acquire a process’s address space. This includes DLLs, EXEs, stacks and heaps. The data is written to disk by Memoryze and then analyzed for evidence of meterpreter scripts and commands having been executed. The fly in the ointment is that once a process is completed and the memory has been freed up it is available for reuse and the evidence can be overwritten. But memory reuse is random, and Davis and Silberman have found that evidence can remain available for analysis for hours after the activity.
“There is no default answer to how long a memory remains,” Silberman said. “It doesn’t work 100 percent of the time. But we can usually get something.”
Finding the commands gives researchers a way to determine what an attacker did inside a computer and what bad stuff might have been done to it. Although forensics provides after-the-fact analysis rather than real time detection or prevention, the data is valuable.
“Having that knowledge is incredible,” Silberman said. “It adds another tool to the toolbox."