Volatility 2: Windows commands (Full List with Examples)
Note: --profile=X is mandatory. Example base: sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64
0views
Note: --profile=X is mandatory.
Example base: sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64
1. Identification
Sección titulada «1. Identificación»imageinfo
Sección titulada «imageinfo»- Description: We identify the OS profile.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw imageinfo - Why: To know which
-profilewe must use for the rest of the analysis.
kdbgscan
Sección titulada «kdbgscan»- Description: We look for the KDBG block.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw kdbgscan - Why: If
imageinfofails, this gives us the correct profile with greater precision.
kpcrscan
Sección titulada «kpcrscan»- Description: We look for KPCR (Processor Control Region) blocks.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 kpcrscan - Why: To analyze the state of each CPU/Core in multicore systems.
hibinfo
Sección titulada «hibinfo»- Description: Hibernation file information.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 hibinfo - Why: If we analyze a
hiberfil.sys, we need to know its structure to convert it.
crashinfo
Sección titulada «crashinfo»- Description: Crash Dump information.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 crashinfo - Why: If we analyze a Blue Screen of Death (BSOD), it tells us the error and the causing driver.
raw2dmp
Sección titulada «raw2dmp»- Description: We convert raw memory to DMP format.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 raw2dmp --output-file=out.dmp - Why: To be able to open the image with Microsoft tools like WinDbg.
We must execute these commands to obtain the necessary information about the operating system and its state at the time of the memory dump. We will use imageinfo to determine the OS profile, kdbgscan and kpcrscan to obtain additional information about the system state, and hibinfo, crashinfo and raw2dmp to analyze hibernation files, crash dumps, and convert raw memory to DMP format, respectively.
2. Processes and DLLs
Sección titulada «2. Procesos y DLLs»- Description: We list active processes (EPROCESS).
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 pslist - Why: To quickly see what is running. If malware unlinks itself, it will not appear here.
- Description: Process tree.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 pstree - Why: To detect anomalies in the hierarchy (for example,
notepad.exelaunchingcmd.exe).
- Description: We scan memory to find processes (Pool scanning).
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 psscan - Why: To find hidden processes (Rootkits) or processes that have already finished (closed).
psxview
Sección titulada «psxview»- Description: We compare process lists.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 psxview - Why: If
pslistis False butpsscanis True, then a Rootkit has been detected.
dlllist
Sección titulada «dlllist»- Description: We list DLLs of a process.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 dlllist -p 1234 - Why: To see if a legitimate process loads malicious DLLs or from temporary folders.
dlldump
Sección titulada «dlldump»- Description: We extract a DLL from memory.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 dlldump -p 1234 --dump-dir /dumps/ - Why: To analyze the suspicious DLL with an antivirus or reverse engineering.
ldrmodules
Sección titulada «ldrmodules»- Description: We detect unlinked DLLs.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 ldrmodules -p 1234 - Why: If a DLL is in memory but not in the load list (InLoad=False), it is a stealth injection.
cmdline
Sección titulada «cmdline»- Description: Execution arguments.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 cmdline - Why: To see if a legitimate process is being used maliciously (e.g.,
svchost.exe -k malware).
- Description: Environment variables.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 envars -p 1234 - Why: To see if malware has defined specific paths or configurations for its session.
getsids
Sección titulada «getsids»- Description: Shows SIDs (users).
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 getsids -p 1234 - Why: To determine if the process is running as SYSTEM, Admin, or a compromised user.
- Description: Process privileges.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 privs -p 1234 - Why: To see if malware has enabled
SeDebugPrivilegeto inject itself elsewhere.
memdump
Sección titulada «memdump»- Description: Dumping process memory.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 memdump -p 1234 -D /dumps/ - Why: To analyze all the content of a process's memory (strings, encryption keys).
procdump
Sección titulada «procdump»- Description: Extracting the executable.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 procdump -p 1234 -D /dumps/ - Why: To obtain the original
.exeof the malware.
3. Injection and VAD
Sección titulada «3. Inyección y VAD»malfind
Sección titulada «malfind»- Description: Searching for code injections (RWX).
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 malfind -p 1234 - Why: It is the #1 tool for finding fileless malware or injected code.
vadinfo
Sección titulada «vadinfo»- Description: VAD (Virtual Address Descriptor) information.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 vadinfo -p 1234 - Why: For in-depth analysis of how a process uses memory.
yarascan
Sección titulada «yarascan»- Description: Scanning with Yara rules.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 yarascan --yara-rules="cadena" - Why: To search for known malware signatures throughout memory.
4. Network
Sección titulada «4. Red»netscan
Sección titulada «netscan»- Description: We scan connections (Win7+).
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 netscan - Why: To find malicious remote IPs (C2) and open ports.
connscan
Sección titulada «connscan»- Description: We scan TCP connections (XP).
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=WinXPSP2x86 connscan - Why: Equivalent to netscan for legacy systems.
sockets
Sección titulada «sockets»- Description: We list sockets (XP).
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=WinXPSP2x86 sockets - Why: To view listening open ports on legacy systems.
5. Registry
Sección titulada «5. Registro»hivelist
Sección titulada «hivelist»- Description: We list registry keys.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 hivelist - Why: To obtain the memory addresses of SAM, SYSTEM, and SOFTWARE for other commands.
printkey
Sección titulada «printkey»- Description: We print the registry key.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 printkey -K "Run" - Why: To check for persistence (programs that start automatically).
hashdump
Sección titulada «hashdump»- Description: We extract NTLM hashes.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 hashdump - Why: To obtain user passwords for cracking.
userassist
Sección titulada «userassist»- Description: We analyze UserAssist keys.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 userassist - Why: To see which programs the user has executed (even if they have been deleted).
shutdowntime
Sección titulada «shutdowntime»- Description: Shutdown time.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 shutdowntime - Why: To know when the machine was shut down.
shimcache
Sección titulada «shimcache»- Description: We analyze ShimCache.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 shimcache - Why: To see traces of old application execution (very useful for the timeline).
6. File System
Sección titulada «6. Sistema de Archivos»filescan
Sección titulada «filescan»- Description: We scan open files.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 filescan | grep "flag" - Why: To find file paths of interest in memory.
dumpfiles
Sección titulada «dumpfiles»- Description: We extract files.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 dumpfiles -Q 0x12345 -D /dumps/ - Why: To recover documents or executables from RAM.
mftparser
Sección titulada «mftparser»- Description: We analyze the MFT.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 mftparser > mft.txt - Why: To find deleted files and file timestamps (creation, access).
shellbags
Sección titulada «shellbags»- Description: Folder history.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 shellbags - Why: To know which folders the user has visited (evidence of data access).
7. Drivers and System
Sección titulada «7. Controladores y Sistema»driverscan
Sección titulada «driverscan»- Description: We scan drivers.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 driverscan - Why: To find malicious drivers (Rootkits).
svcscan
Sección titulada «svcscan»- Description: We scan services.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 svcscan - Why: To see services installed by malware for persistence.
apihooks
Sección titulada «apihooks»- Description: We detect API hooks.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 apihooks - Why: To see if someone is intercepting system functions (Keyloggers, Rootkits).
8. GUI and Others
Sección titulada «8. GUI y Otros»screenshot
Sección titulada «screenshot»- Description: Screenshot.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 screenshot -D /dumps/ - Why: To visually see what the user was doing.
clipboard
Sección titulada «clipboard»- Description: Clipboard.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 clipboard - Why: To recover passwords or copied/pasted text.
cmdscan
Sección titulada «cmdscan»- Description: CMD History (XP/Win7).
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 cmdscan - Why: To recover commands typed in the console.
consoles
Sección titulada «consoles»- Description: Console history.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 consoles - Why: To view command console input and output.
truecryptpassphrase
Sección titulada «truecryptpassphrase»- Description: Searching for TrueCrypt passwords.
- Example:
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 truecryptpassphrase - Why: To decrypt encrypted volumes if the key was in memory.

