Volatility 2 Index: Malware, Registry, and Extraction
This document focuses on threat detection, Windows registry analysis, and extraction of evidence (artifacts) from memory.
This document focuses on threat detection, Windows registry analysis, and the extraction of evidence (artifacts) from memory.
1. Malware Detection
Sección titulada «1. Detección de Malware»malfind
Sección titulada «malfind»Description:
We will search for injected code in memory (DLL injection, code hollowing) based on page permissions (PAGE_EXECUTE_READWRITE) and headers (VAD tags).
Purpose:
It is the primary tool for finding malware that does not have a file on disk. We will show a small hexadecimal and assembly dump. If we see MZ at the beginning of the dump, it is an injected executable.
Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 malfindyarascan
Sección titulada «yarascan»Description: We will allow searching for text strings, hexadecimal patterns, or YARA rules within the memory (process or kernel).
Purpose: To classify malware if we already know a signature, or to search for a specific IP, domain, or keyword throughout the entire memory.
Example (searching for a string):
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 yarascan --yara-rules="/bin/sh"# O simplement buscar una cadena si el plugin ho permet directament segons versiósvcscan
Sección titulada «svcscan»Description: We will scan memory for Windows service structures.
Purpose: Many types of malware create services to persist. This will allow us to see the service name, status, and associated binary.
Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 svcscan2. Windows Registry and Users
Sección titulada «2. Registro de Windows y Usuarios»hivelist
Sección titulada «hivelist»Description: We will list the memory addresses of the loaded registry hives.
Purpose:
To obtain the virtual offset necessary to use other commands such as printkey or hashdump. We will identify which users have the registry loaded.
Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 hivelisthashdump
Sección titulada «hashdump»Description: We will extract password hashes (LM and NTLM) from local user accounts in memory.
Purpose: To obtain credentials that can be cracked (using John the Ripper or Hashcat) or used in Pass-the-Hash attacks.
Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 hashdumpprintkey
Sección titulada «printkey»Description: We will show the subkeys and values of a specific registry key.
Purpose:
To query persistence keys such as Run, RunOnce, or system information such as ShutdownTime.
Example (ShutdownTime):
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 printkey -K "ShutdownTime"shellbags
Sección titulada «shellbags»Description: We will analyze "Shellbags" artifacts, which store information about the size and position of file explorer windows.
Purpose: It will reveal which folders the user has visited, even if they no longer exist. It is critical for reconstructing user activity.
Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 shellbags3. Data Extraction (Dumps)
Sección titulada «3. Extracción de Datos (Dumps)»memdump
Sección titulada «memdump»Description:
We will dump the entire addressable memory space of a specific process to a .dmp file on disk.
Purpose:
To analyze a suspicious process in depth (using strings or a disassembler) outside of Volatility.
Example:
# -p [PID] --dump-dir [Directori destí DINS del docker]sudo docker run --rm -v $PWD:/dumps vol2 -f /dumps/victim.raw --profile=Win7SP1x64 memdump -p 1234 --dump-dir=/dumpsprocdump
Sección titulada «procdump»Description:
We will attempt to reconstruct and extract the original executable (.exe) of a process from memory.
Purpose: To obtain the malware binary and send it to VirusTotal or perform reverse engineering.
Example:
sudo docker run --rm -v $PWD:/dumps vol2 -f /dumps/victim.raw --profile=Win7SP1x64 procdump -p 1234 --dump-dir=/dumpsfilescan
Sección titulada «filescan»Description:
We will scan memory for FILE_OBJECT objects (open or closed files).
Purpose: To find file paths that were in use, including documents, images, or hidden executables.
Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 filescan
