Ir al contenido

Volatility 2 Index: Malware, Registry, and Extraction

This document focuses on threat detection, Windows registry analysis, and extraction of evidence (artifacts) from memory.

0views

This document focuses on threat detection, Windows registry analysis, and the extraction of evidence (artifacts) from memory.

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:

Ventana de terminal
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 malfind

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):

Ventana de terminal
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ó

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:

Ventana de terminal
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 svcscan

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:

Ventana de terminal
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 hivelist

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:

Ventana de terminal
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 hashdump

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):

Ventana de terminal
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 printkey -K "ShutdownTime"

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:

Ventana de terminal
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 shellbags

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:

Ventana de terminal
# -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=/dumps

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:

Ventana de terminal
sudo docker run --rm -v $PWD:/dumps vol2 -f /dumps/victim.raw --profile=Win7SP1x64 procdump -p 1234 --dump-dir=/dumps

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:

Ventana de terminal
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 filescan