Skip to content

Memory Dump Files

The first time I was given a memory dump file to look at, it was a bit of a schlog figuring out how to use volatility to look at the data. But I did! And I documented it. And when I was faced with another memory dump file, you'd better believe I went back to my notes! It was quite the rude awakening to realize that none of my volatility commands worked! After some troubleshooting, I realized the first one I'd looked at was a .dmp file and the second was a .mem file. With this newfound understanding of the dumps from different OSs, I added to my documentation and felt confident that I'd be prepared the next time. I was wrong. There are many nuances to the different types of RAM dump files and the types of tools that are best for each. In this post, I wanted to include some of the nuances of the file types, the tools, and also some considerations regarding the types/versions of OS that impact the functionality of Volatility.

File Extensions and Context Clues

Common File Extensions

  • .core: A user-space core dump of a process. This is commonly generated when a program crashes. It can be analyzed using debuggers like gdb or lldb, or for more comprehensive memory analysis, tools like Volatility can be used.

  • .dmp: A general memory dump extension used by various operating systems (commonly Windows). It can represent full or partial memory dumps. Windows memory dumps are typically .dmp files, and they can be opened using tools like WinDbg, Volatility, or other Windows debugging tools.

  • .vmcore: A Linux kernel crash dump. This type of file is generated during a kernel panic or crash. It contains a snapshot of the kernel’s memory at the time of the crash. You would typically use crash or Volatility for analysis.

  • .lime: A memory dump generated by the LiME (Linux Memory Extractor) tool. This is a raw memory dump and can be used for forensic analysis using tools like Volatility or LiME’s own tools.

  • .mem: This is a general memory dump file extension used by various forensic and debugging tools. It is commonly used in both Linux and macOS for full or partial memory dumps. For instance, Volatility can analyze .mem files by specifying the right profile, and for macOS, you might encounter .mem files that are the result of live memory capture or a memory image.

  • .vmss: This is a VMware snapshot file. These files are generated during the suspension of a virtual machine. It contains the in-memory state of the virtual machine at that point in time and can be analyzed using tools that support VMware memory images like Volatility (with VMware profiles) or Volatility’s VM-specific plugins.

Contextual Clues in the Filename

In addition to the file extension, the filename itself can sometimes offer clues about the type of dump or its source. Here are some examples of filenames and what they might indicate:

  • vmcore or vmcore-[timestamp]: This is commonly associated with a kernel crash dump on Linux. If the file is named vmcore or contains the timestamp vmcore-<timestamp>, you are likely dealing with a kernel panic dump.

  • memory.dmp: This could be a Windows memory dump file (a full memory dump of the system). This is a standard Windows memory dump file and can be analyzed using tools like WinDbg or Volatility.

  • core.[pid] or core.[pid].dump: Indicates a core dump file for a specific process on a UNIX-based system (macOS, Linux). This is the memory image of a single process that crashed. The [pid] is the process ID of the crashed process.

  • [vmname].vmss: This is a VMware snapshot file, as mentioned earlier. It contains the suspended memory state of a virtual machine. If you see this, you'll need VMware-specific tools or Volatility with VMware profiles to analyze it.

  • [hostname].mem: This could indicate a memory dump of a Linux or macOS system. It's a more generic file name but could provide enough context when coupled with the appropriate file extension.

  • [hostname]-[timestamp].dmp: Often seen on Windows systems, this file could be a full or minidump of the system memory. The timestamp helps determine when the dump was generated (e.g., after a crash or system event).

Directory Context

If the memory dump is in a system's crash or logs directory, it can provide valuable context: - Linux: A vmcore file might be found in /var/crash/ or /proc/vmcore/. - Windows: A .dmp file might be located in C:\Windows\Minidump\ or C:\Windows\MEMORY.DMP. - macOS: Memory dumps and crash reports might be located in ~/Library/Logs/DiagnosticReports/.


File Type Detection

Once you have a memory dump file, the next step is to determine its type. This can be done by inspecting the file with tools to gather more information about the file's structure and format.

Check File Type with file Command

file /path/to/memory_dump
- For a vmcore dump, it may indicate something like "Linux kernel core dump." - For a core file, it will describe it as "ELF 64-bit LSB core file." - For a Windows .dmp file, it might say "MS Windows crash dump."

Examine the First Few Bytes (Hex Dump)

For a more detailed analysis of the file's structure, you can use a hex editor or command-line tools like xxd to view the first few bytes of the file. The first few bytes of some memory dump files can indicate the file format (for example, ELF headers for Linux core dumps).

xxd /path/to/memory_dump | head

Determining If Conversion Is Needed

Once you've determined the file type, you need to assess whether any conversion is required.

Common Scenarios Where Conversion is Needed

  1. Linux vmcore: If you receive a vmcore file (a Linux kernel dump), it doesn’t need to be converted, but it does need to be analyzed using tools like crash or Volatility. You'll also need the kernel symbols (vmlinux) to properly analyze the dump.

  2. LiME (.lime) Dumps: LiME dumps are raw memory dumps and need to be analyzed with either LiME’s tools or Volatility. There is no need for conversion, but you may need to specify the right profile for the OS in Volatility.

  3. VMware Snapshots (.vmss): VMware memory snapshots don’t need conversion, but you will need VMware-compatible tools for analysis. Volatility has specific profiles and plugins for VMware memory images, or you can use VMware’s own debugging tools.

  4. Windows .dmp Files: Windows memory dumps typically don’t need conversion. Tools like WinDbg, Volatility, or even DumpChk can be used to analyze these files directly.

  5. macOS Crash Files (.crash): These files don’t need conversion, but you’ll need to use lldb or similar debugging tools to analyze them.


Using the Tools to View and Analyze the Memory Dump

After determining whether the file needs conversion, and choosing the right tool, here’s how you can analyze the dump file.

Linux Kernel Dump (vmcore)

You can analyze a Linux kernel crash dump (vmcore) using the crash tool.

crash /var/crash/vmcore /usr/lib/debug/boot/vmlinux-<version>

This will load the crash dump and allow you to interact with kernel memory, view processes, and trace the state of the system during the crash. More details about using crash on Red Hat's documentation site.

LiME Dump (.lime)

For a LiME memory dump, you can use Volatility to analyze it.

volatility -f /path/to/lime_dump.lime --profile=LinuxUbuntu_3_13_0_32_64 pslist

This command uses the correct profile to extract information about processes from the raw memory dump.

Windows .dmp Files

To analyze a Windows memory dump, use WinDbg or Volatility.

  • Using Volatility:

    volatility -f memory.dmp --profile=Win7SP1x64 pslist
    

  • Using WinDbg:

    windbg -z memory.dmp
    
    More detailed info about using WinDbg can be found on Microsoft's website here.

VMware Snapshot (.vmss)

If you have a VMware snapshot file, you can analyze it with Volatility using VMware-specific profiles.

volatility -f /path/to/vmss-file --profile=Win7SP1x64 pslist

This allows you to extract process and system data from the snapshot.

macOS Crash Report (.crash)

For a .crash file, you can load it into lldb for in-depth analysis of the process at the time of the crash.

lldb -c /path/to/crashfile.crash

Then you can debug the crash, view stack traces, and investigate potential causes.