In this post, we explore the world of memory forensics through the lens of the Volatility framework. We delve into
the differences between Volatility2 and Volatility3, providing insights into their unique features and capabilities.
Setting up Volatility on Linux systems is detailed, covering both versions. The article also touches on the process of
memory dumping, highlighting common tools used in this practice. We dive into the analysis of memory images with an emphasis
on MemLabs, and discuss additional plugins that extend Volatility’s functionality.
Volatility is an open-source memory forensics framework for incident response and malware analysis. It is used for the
extraction of digital artifacts from volatile memory (RAM) samples. Volatility supports memory dumps from all major
operating systems, including Windows, Linux, and MacOS. Known for its versatility, it allows investigators to analyze
RAM images to uncover significant details about system state, processes, network connections, and more, which are crucial
in digital investigations, especially in scenarios where malware attempts to hide its presence on disk storage.
The comparison between Volatility 2 and Volatility 3 reveals some significant differences and improvements in the
functionality and user-friendliness of these forensic tools.
Custom profiles and kernel support: A major issue with Volatility 2 was the need to create a custom profile for each custom kernel version.
custom kernel version. This was not only time-consuming, but also
problematic if the target computer did not have the necessary packages to create these profiles. Volatility 3
on the other hand, no longer uses fixed profiles and has an extensive library of symbol tables, which makes it
automatically generate new symbol tables for most Windows memory images. This makes the
identification of structures within an operating system.
Library and context: Volatility 3 was designed from the ground up as a library. Components are independent, and the context
required for the operation of a particular plugin at a particular time is contained in a state derived from a context interface.
object derived from a context interface.
Object model changes: The object model in Volatility 3 has also changed. Objects inherit directly from their
Python counterparts, which means that an integer object is actually a Python integer. In contrast to this
Volatility 2 constructed complex proxy objects that were not compatible in all situations.
Performance improvements: Volatility 3 offers significant speed improvements. While Volatility 2 allowed access to
access to live memory images, Volatility 3 reads the data once when the object is created and keeps it static
static, even if the underlying layer changes. This significantly increases efficiency.
Layers and layer dependencies: The address spaces in Volatility 2 are designed as translation layers in Volatility 3,
which can have multiple “dependencies”. This enables the integration of functions such as swap space.
Automagic functions: Volatility 3 defines automagic processes more clearly and allows them to be activated or deactivated as required for each run.
activate or deactivate for each run. This improves usability and efficiency.
Scanning and output rendering: Scanning remains very similar to Volatility 2, with the use of scanner objects.
Output is via a TreeGrid object, which allows the library to be used independently of the interface.
Windows and Linux support: For Windows memory images, Volatility 3 provides automatic download of symbol tables, while
symbol tables, while a specific symbol table is still required for Linux.
Plugins in Volatility 2 vs. Volatility 3
Plugin development
Volatility 2: The development of new plugins requires a deeper understanding of the internal architecture of Volatility 2. Plugins are often specific to certain operating system versions or configurations.
Volatility 3: Provides a more modern and flexible API for plugin development. It allows developers to implement more functionality with less code, simplifying development and maintenance.
Community contribution
Volatility 2: Has an extensive collection of community-contributed plugins that cover a wide range of use cases.
Volatility 3: Is still relatively new and therefore has a smaller but growing collection of community-contributed plugins. The move from Volatility 2 to 3 also means that some popular plugins from Volatility 2 are not yet available or have been rewritten for Volatility 3.
Specific plugin features
Volatility 2: Includes some specific plugins that are still missing in Volatility 3. This includes certain forensic analysis functions that may be important for specific investigations.
Volatility 3: Focuses on extending the plugin architecture to facilitate future development and customisation, which means that some specialised features of Volatility 2 are still under development or planned.
Plugin compatibility
Volatility 2 and 3: Due to structural changes in Volatility 3, plugins from Volatility 2 are not directly compatible with Volatility 3. Developers will need to rewrite or adapt plugins for the new architecture.
Efficiency and speed of the plugins
Volatility 3: Benefits from overall improvements in memory management and efficiency, which has a positive impact on plugin execution speed.
Scope and flexibility
Volatility 3: Offers greater flexibility in terms of plugin scope and customisability through its new design. It enables more complex and versatile analysis options compared to Volatility 2.
Symbol tables are essential for memory analysis in Volatility3, and specific packs for different operating systems are
available for download. After downloading, the symbol table zip files should be placed in the volatility3/symbols directory.
Windows symbols not found in the pack will be downloaded and cached automatically, while Mac and Linux symbols need manual
generation. The first use of new symbol files in Volatility will require cache updating, which might take some time but
is a one-time process. Comprehensive symbol tables for Linux are hard to supply due to the variability in kernel compilation.
For verification of the symbol packs, SHA256, SHA1, and MD5 hashes are provided.
The Volatility 3 documentation on symbol tables explains their role in memory forensics and provides guidance on obtaining
and utilizing them. It highlights the need for specific symbol tables for different operating systems and offers detailed
steps for downloading these symbol packs. For situations where new symbol tables are required, especially for Linux,
the documentation recommends using the tool dwarf2json. This tool aids in manually generating symbol tables, addressing
the challenge of diverse Linux kernel versions. More information can be found on the Volatility 3 Documentation page.
The process of memory dumps is an important technique in computer forensics and software debugging. Various tools offer
specific functions and methods for creating and analysing memory dumps. Here is more detailed information on the tools
mentioned:
LiME (Linux Memory Extractor): LiME is a tool specifically for Linux systems that makes it possible to capture the contents of the RAM of a running Linux system. It is particularly valuable for forensic purposes as it extracts the memory contents in a way that enables forensic analyses.
memdump: This tool is a classic instrument for memory extraction. It is often used in computer forensics to extract the contents of working memory and make them available for further analyses.
pcileech: pcileech is a tool that focuses on direct memory access (DMA) attack software. It enables the capture of memory via PCIe DMA with specialised hardware such as FPGA and USB3380. It is available for both Windows and Linux and can handle different types of memory images, including Raw, Full Microsoft CrashDump and others.
Creating a complete memory image under Windows 10: Windows 10 offers built-in functions for creating memory images. These functions can be configured to automatically create memory images in the event of system crashes or other critical events, which is useful for error analysis and system diagnostics.
ProcDump: ProcDump, part of Microsoft’s Sysinternals Suite, is an advanced command line utility for Windows. It enables the creation of memory dumps of processes based on various criteria such as CPU utilisation, memory usage or process end. ProcDump offers a variety of options to control the dump process, making it an important tool for developers and system administrators.
These tools play an important role in various areas such as IT security, system administration and forensic investigations. Each tool offers specific functions and methods to create and analyse memory images, making them valuable resources in their respective application areas.
MemLabs is an excellent resource for anyone interested in computer forensics and, in particular, analysing memory dumps.
Designed as a training environment for Capture The Flag (CTF) challenges, MemLabs provides a collection of memory dumps
specifically designed for education and training in digital forensics.
Each lab in MemLabs presents unique challenges based on real-world scenarios. These labs are designed to be suitable for
both beginners and advanced users by covering basic concepts as well as complex forensic techniques. Participants can
improve their memory analysis skills by solving various tasks ranging from identifying malware to reconstructing user activity.
In addition to MemLabs, the Volatility Foundation stands
as another crucial resource for memory samples in digital forensics and malware analysis. Their repository offers a diverse
collection of memory dumps, ideal for understanding the intricacies of Volatility, a leading memory analysis framework.
These samples encompass a variety of scenarios, including malware infections and system anomalies, making them invaluable
for practitioners in cybersecurity and forensic research.
The command vol -f MemoryDump_Lab1.raw windows.info is used to extract basic information about the Windows system from
the memory dump MemoryDump_Lab1.raw. This is a typical step in forensic analysis to get an overview of the analysed system.
However, problems occur here because Volatility 3 cannot write necessary symbol files due to authorisation problems.
These symbol files are essential for the analysis as they contain the necessary information about the structure of the
operating system.
vol -f MemoryDump_Lab1.raw windows.info
Volatility 3 Framework 2.4.1
WARNING volatility3.framework.symbols.windows.pdbutil: Cannot write necessary symbol file, please check permissions on /usr/local/lib/python3.11/dist-packages/volatility3-2.4.1-py3.11.egg/volatility3/symbols/windows/ntkrnlmp.pdb/3844DBB920174967BE7AA4A2C20430FA-2.json.xz
WARNING volatility3.framework.symbols.windows.pdbutil: Cannot write necessary symbol file, please check permissions on /usr/local/lib/python3.11/dist-packages/volatility3-2.4.1-py3.11.egg/volatility3/framework/symbols/windows/ntkrnlmp.pdb/3844DBB920174967BE7AA4A2C20430FA-2.json.xz
WARNING volatility3.framework.symbols.windows.pdbutil: Cannot write downloaded symbols, please add the appropriate symbols or add/modify a symbols directory that is writable
Progress: 100.00 PDB scanning finished
Unsatisfied requirement plugins.Info.kernel.symbol_table_name:
A symbol table requirement was not fulfilled. Please verify that:
The associated translation layer requirement was fulfilled
You have the correct symbol file for the requirement
The symbol file is under the correct directory or zip file
The symbol file is named appropriately or contains the correct banner
Unable to validate the plugin requirements: ['plugins.Info.kernel.symbol_table_name']
The command vol -v -f MemoryDump_Lab1.raw windows.info repeats the first step, but with verbose mode (-v) activated to
obtain more detailed information about the process. This step serves to better understand the cause of the problems.
Despite the verbose mode, the problem with the symbol files remains.
vol -v -f MemoryDump_Lab1.raw windows.info
Volatility 3 Framework 2.4.1
INFO volatility3.cli: Volatility plugins path: ['/usr/local/lib/python3.11/dist-packages/volatility3-2.4.1-py3.11.egg/volatility3/plugins', '/usr/local/lib/python3.11/dist-packages/volatility3-2.4.1-py3.11.egg/volatility3/framework/plugins']INFO volatility3.cli: Volatility symbols path: ['/usr/local/lib/python3.11/dist-packages/volatility3-2.4.1-py3.11.egg/volatility3/symbols', '/usr/local/lib/python3.11/dist-packages/volatility3-2.4.1-py3.11.egg/volatility3/framework/symbols']INFO volatility3.framework.automagic: Detected a windows category plugin
INFO volatility3.framework.automagic: Running automagic: ConstructionMagic
INFO volatility3.framework.automagic: Running automagic: SymbolCacheMagic
INFO volatility3.framework.automagic: Running automagic: LayerStacker
INFO volatility3.framework.automagic: Running automagic: WinSwapLayers
INFO volatility3.framework.automagic: Running automagic: KernelPDBScanner
WARNING volatility3.framework.symbols.windows.pdbutil: Cannot write necessary symbol file, please check permissions on /usr/local/lib/python3.11/dist-packages/volatility3-2.4.1-py3.11.egg/volatility3/symbols/windows/ntkrnlmp.pdb/3844DBB920174967BE7AA4A2C20430FA-2.json.xz
WARNING volatility3.framework.symbols.windows.pdbutil: Cannot write necessary symbol file, please check permissions on /usr/local/lib/python3.11/dist-packages/volatility3-2.4.1-py3.11.egg/volatility3/framework/symbols/windows/ntkrnlmp.pdb/3844DBB920174967BE7AA4A2C20430FA-2.json.xz
WARNING volatility3.framework.symbols.windows.pdbutil: Cannot write downloaded symbols, please add the appropriate symbols or add/modify a symbols directory that is writable
INFO volatility3.framework.symbols.windows.pdbutil: The symbols can be downloaded later using pdbconv.py -p ntkrnlmp.pdb -g 3844DBB920174967BE7AA4A2C20430FA2
INFO volatility3.framework.automagic: Running automagic: SymbolFinder
INFO volatility3.framework.automagic: Running automagic: KernelModule
Unsatisfied requirement plugins.Info.kernel.symbol_table_name:
A symbol table requirement was not fulfilled. Please verify that:
The associated translation layer requirement was fulfilled
You have the correct symbol file for the requirement
The symbol file is under the correct directory or zip file
The symbol file is named appropriately or contains the correct banner
Unable to validate the plugin requirements: ['plugins.Info.kernel.symbol_table_name']
The problems with the symbol files are solved by running the following command. This command uses Volatility’s pdbconv.py
script to generate the required symbol file ntkrnlmp.pdb based on the GUID 3844DBB920174967BE7AA4A2C20430FA2.
After the correct symbol files have been generated and the authorisation issues have been resolved, the command
vol -f MemoryDump_Lab1.raw -s /opt/volatility3/volatility3/framework/symbols/windows/ windows.info is successfully executed.
This command specifies the path to the correct symbol files and enables Volatility 3 to successfully analyse the memory
dump and provide detailed information about the Windows system.
We could have gone into every single process, but for the purposes of this article we will only focus on three processes
that are necessary for the CTF game. Analysing the memory dump with the aforementioned command in Volatility reveals that
cmd, mspaint and WinRAR were active processes at the time of the memory dump. The presence of cmd indicates the
use of the command line, possibly for system administration or specific tasks. mspaint as an active process indicates
image editing or graphical activities, while WinRAR indicates use for file compression or archiving.
After identifying the active processes in the memory image, the next step is to analyse the command line parameters of
these processes. This provides a deeper insight into the exact actions or commands that were executed in the command line.
Such an analysis can be informative in order to understand the specific activities within the cmd process. It also
provides information about any parameters or file paths used in mspaint or WinRAR. These additional details are
particularly valuable for forensic analyses as they help to paint a more accurate picture of user interactions and system
usage at the time of the memory dump.
HINT: To obtain a functional command prompt analysis, Volatility2 was employed due to the absence of this feature in the current
version, Volatility3. This limitation in Volatility3 was addressed in an issue opened in 2022. For practical application,
the standalone version of Volatility2, specifically designed for Linux, was utilized and renamed to vol2 for convenience.
Further details about this specific issue in Volatility3 can be found at Volatility3 Issue #816.
To get possible hints about what happened in the command line, we can use the consoles-plugin:
In the given output we see an analysis of the console activity on a Windows system. Of particular interest is the section
relating to the process conhost.exe with process ID 2692, which is attached to cmd.exe (PID 1984). In this console session,
the command St4G3$1 was executed, which could indicate a specific user interaction or script. The title of the console
shows “C:\Windows\system32\cmd.exe - St4G3$1”, which indicates that the command St4G3$1 was executed directly in the
command line.
If you come across a string that consists of a mixture of upper and lower case letters and numbers, this could be an
indication of base64 encoding. An additional feature is often the presence of one or two ‘=’ characters at the end,
which act as padding to bring the length to a multiple of 4. This combination of characters and the characteristic
length are strong indicators of a base64 encoding, especially if it appears in a context where data transfers or the
storage of binary data as text are common.
Therefore, let’s try to decode the string with the following command:
The string was successfully decoded with the command base64 -d, and the result is: flag{th1s_1s_th3_1st_st4g3!!!}.
This confirms that it was indeed a base64-encoded message and the decoding resulted in the plain text
flag{th1s_1s_th3_1st_st4g3!!!}.
After a memory image has been created for the process with the PID 2424, we rename the file 2424.dmp
to 2424.data and try to open it in GIMP. We succeed in obtaining a distorted graphic that is displayed with RGB-Alpha,
height, width and offset. This can be seen in the following screenshot:
If the graphic is rotated and inverted, the following message can be recognised:
flag{G00d_Boy_good_girL}
Now the last process we want to look at is WinRAR.exe. We had previously determined that there was an Important
archive that was created, where we want to find out what is contained in this archive:
We see the same archive Important.rar with three different memory addresses in the filescan plugin. Choosing the last
storage address makes sense, as it usually represents the latest, unchanged version and enables efficient analysis.
However, this decision depends on the analysis requirements.
Now we rename the dump that was created to Important.rar:
mv file.None.0xfffffa8001034450.dat Important.rar
Then we want to unpack the isolated archive to find out what is contained and how we can see it, the archive is password
protected and has a comment. The password is expected as an NTLM hash (in capital letters) of the password for Alissa’s
user account.
unrar e Important.rar
UNRAR 7.00 beta 3 freeware Copyright (c) 1993-2023 Alexander Roshal
Archive comment:
Password is NTLM hash(in uppercase) of Alissa's account passwd.
Extracting from Important.rar
Enter password (will not be echoed)for flag3.png:
With the hashdump-plugin we try to get password hashes from the memory dump.
We have seen in advance that an NTLM hash is searched for that belongs to a specific user account.
The line following line contains information about the user account
about the user account Alissa Simpson on the system. The 1003 is the user ID that uniquely identifies the account.
The section aad3b435b51404eeaad3b435b51404ee represents the NTLMv2 hash, which is the encrypted password of the user.
user’s encrypted password. It is worth noting that the LM hash (LAN Manager hash) is not used, as indicated by the empty
field “:::”. The LM hash is an outdated and less secure form of password representation, while the
NTLMv2 hash is favoured in modern Windows systems to increase security.
As the password is expected to be an NTLM hash in capital letters, we still need to modify the hash:
F4FF64C8BAAC57D22F22EDC681055BA6
We can now use this hash as the password for the extraction:
unrar e Important.rar
UNRAR 7.00 beta 3 freeware Copyright (c) 1993-2023 Alexander Roshal
Archive comment:
Password is NTLM hash(in uppercase) of Alissa's account passwd.
Extracting from Important.rar
Enter password (will not be echoed)for flag3.png:
After decompressing the file, we get an image with the flag.
For extended analysis options in the area of memory forensics, the Volatility Framework offers a series of
plugins. The Community3 page of the Volatility Foundation and the Community page for Volatility 2 provide a variety of plugins developed by the user community.
of plugins that have been developed by the user community. The Criminalip-Volatility3-Plugins are a special addition that
special addition that combines Volatility 3 with the Criminal IP CTI search engine to analyse suspicious IPs and domains in memory dumps.
IPs and domains in memory dumps. These plugins open up new dimensions of forensic analysis.
Mastering volatility as a programme is just the beginning. The art of analysing memory for forensic investigations lies
in the interpretation of the extracted data. It requires a deep understanding of operating system internals, knowledge
of malware behaviours and anomaly detection skills. Experts must not only collect data, but also make connections between
them to identify potential threats, evidence of unauthorised activity or malware artefacts. The ability to draw the right
conclusions from the data obtained is critical.
[1] Volatility2: The Volatility Foundation - A comprehensive open-source framework for memory forensics, specializing in the analysis of Windows, Linux, and MacOS memory images. It offers a wide range of features for detailed examination of memory images. https://github.com/volatilityfoundation/volatility
[2] Volatility3: The Volatility Foundation - The newer version of the Volatility framework, featuring improved architecture and performance. Specifically designed for more efficient analysis of memory images. https://github.com/volatilityfoundation/volatility3
[4] MemLabs: P. Abhiram Kumar, Ritam Dey - Educational labs styled like Capture The Flag challenges for individuals interested in Memory Forensics. https://github.com/stuxnet999/MemLabs
[5] Volatility2 Framework Wiki: The Volatility Foundation - A Wiki page for the Volatility memory forensics framework, offering guides, plugin information, and case studies. https://github.com/volatilityfoundation/volatility/wiki
[7] Volatility Foundation Community3: A collection of additional plugins for Volatility 3, developed by the community to enhance memory forensics. Available at: https://github.com/volatilityfoundation/community3
[8] Volatility Foundation Community: Offers community-contributed plugins for Volatility 2, expanding its forensic analysis capabilities. Available at: https://github.com/volatilityfoundation/community
[9] Criminalip Volatility3 Plugins: Integrates Volatility 3 with the Criminal IP CTI search engine for analyzing potential malicious IPs and domains in memory dumps. Available at: https://github.com/criminalip/Criminalip-Volatility3-Plugins
[10] The Art of Memory Forensics: M. Hale Ligh, A. Case, J. Levy, A. Walters - Detecting Malware and Threats in Windows, Linux, and Mac Memory. (2014) Download book
[11] LiME - Linux Memory Extractor: A tool for memory dump extraction in Linux environments. Available on GitHub. Access Source
[12] memdump: A tool for memory dump extraction, included in Kali Linux. Access Source
[13] pcileech - Direct Memory Access (DMA) Attack Software: A tool for DMA attacks and memory extraction, developed by Ulf Frisk. Available on GitHub. Access Source
[14] Generating a Complete Memory Dump in Windows 10: A guide by Bitdefender on how to create a full memory dump on a Windows 10 system. Access Source
[15] ProcDump - Creating Dump Files in Windows 10: A guide by Windows Central on using the ProcDump tool to create memory dumps in Windows 10. Access Source
With this licence, you may use, modify and share the work as long as you credit the original author. However, you may
not use it for commercial purposes, i.e. you may not make money from it. And if you make changes and share the new work,
it must be shared under the same conditions.