Qué es Volatility?
Volatility framework es una completa colección de herramientas open, escrita en Python bajo licencia GNU, para el análisis de la memoria volátil (RAM). Tiene como objetivo introducir a las personas en las complejas técnicas de extracción de artefactos digitales de imágenes de memoria volátil (RAM), y proveer una plataforma para futuro trabajo dentro del área de la investigación.
¿Por que Volatility? – Es un framework único, y coherente, que analiza volcados de memoria RAM de 32 y 64 bits para los sistemas Windows, Linux, Mac, y el android. El diseño modular de Volatility le permite soportar fácilmente nuevos sistemas operativos y arquitecturas tan pronto son publicadas. Todos los dispositivos son objetivos de ataques, por eso no debe limitarse solo a computadoras «Windows».
Pagina principal del proyecto: «http://code.google.com/p/volatility/».
A continuación veremos como instalar esta herramienta en Debian, y un breve ejemplo de uso.
Índice:
1.1 Como instalar Volatility en Debian
2.1 Ejemplos de Uso
3.1 Páginas Man
1.1 Como instalar Volatility
1) Debemos tener instalado Python en nuestro sistema operativo. De no ser así instalamos Python:
– apg-get install python
y resolvemos la siguiente dependencia:
– apt-get install python-crypto
Podemos ejecutar ambas instalaciones en en un solo comando
– apt-get install python python-crypto
2) Descargamos el código fuente del siguiente link: «volatility.googlecode.com/files/volatility-2.2.tar.gz».
3) Descomprimimos e instalamos volatility:
– gunzip volatility-2.2.tar.gz
– tar -xvf volatility-2.2.tar
– mv volatility-2.2 /opt/
– cd /opt/volatility-2.2/
– make
– make install
2.1 Ejemplos de Uso
El sigueinte es un ejemplo de como podemos ejecutar el comando «vol.py» reemplazando el texto «opción» por alguno de los plugins más comunes: connscan, files, hibinfo, procdump, pslist, regobjkeys, sockets, sockscan:
– volatility “opción” –f memory.img
Para probar esta herramienta en nuestro propio equipo (Linux) podemos hacer un volcado de nuestra memoria RAM a un archivo usando la herramienta «memdump» y luego analizando la imagen con volatility. En caso de querer analizar la memoria de uns SO Windows, podemos usar la herramienta «wind32dd.exe» para 32bit, y «win64dd.exe» para 64 bit, la cual generará una imágen forense de nuestra memoria RAM.
Nota: En el caso de SO Windows, también podemos usar la herramienta «Memoryze» para la adquisición y análisis de la memoria volátil: «https://www.mandiant.com/resources/download/memoryze».
Si no tenemos instalada la herramienta «memdump», sensillamente la instalamos mediante APT:
– apt-get install memdump
– Descargamos Win32/64dd del siguiente link: «http://72.52.208.92/~gbpprorg/2600/win32dd-v1.2.1.20090106.zip«.
1) Hacemos un volcado de moemoria a un archivo:
– Linux: memdump > ram_image.img
– Windows: win32dd.exe /s 2 /f E:\ram_image.img
Analizamos la imagen de la memoria RAM con volatility:
– vol.py pslist -f ram_image.img
Si volatility no reconoce el formato de nuestra imagen nos devolverá el error «No suitable address space mapping found». Para solucionar esto primero ejecutamos volatility con el plugin «imageinfo»:
– vol.py imageinfo -f ram_image.img
Luego de determinar el formato de nuestra imagen, volvemos a ejecutar volatility agregando el formato de nuestra imagen así:
– vol.py pslist -f ram_image.img –profile=WinXPSP2x86 (si fuera ese el resultado del plugin «imageinfo).
3.1 Páginas Man
Usage: Volatility – A memory forensics analysis platform.
Options:
-h, –help list all available options and their default values.
Default values may be set in the configuration file
(/etc/volatilityrc)
–conf-file=/root/.volatilityrc
User based configuration file
-d, –debug Debug volatility
–plugins=PLUGINS Additional plugin directories to use (colon separated)
–info Print information about all registered objects
–cache-directory=/root/.cache/volatility
Directory where cache files are stored
–cache Use caching
–tz=TZ Sets the timezone for displaying timestamps
-f FILENAME, –filename=FILENAME
Filename to use when opening an image
–profile=WinXPSP2x86
Name of the profile to load
-l LOCATION, –location=LOCATION
A URN location from which to load an address space
-w, –write Enable write support
–dtb=DTB DTB Address
–cache-dtb Cache virtual to physical mappings
–use-old-as Use the legacy address spaces
–output=text Output in this format (format support is module
specific)
–output-file=OUTPUT_FILE
write output in this file
-v, –verbose Verbose information
-g KDBG, –kdbg=KDBG Specify a specific KDBG virtual address
-k KPCR, –kpcr=KPCR Specify a specific KPCR address
Supported Plugin Commands:
apihooks Detect API hooks in process and kernel memory
atoms Print session and window station atom tables
atomscan Pool scanner for _RTL_ATOM_TABLE
bioskbd Reads the keyboard buffer from Real Mode memory
callbacks Print system-wide notification routines
clipboard Extract the contents of the windows clipboard
cmdscan Extract command history by scanning for _COMMAND_HISTORY
connections Print list of open connections [Windows XP and 2003 Only]
connscan Scan Physical memory for _TCPT_OBJECT objects (tcp connections)
consoles Extract command history by scanning for _CONSOLE_INFORMATION
crashinfo Dump crash-dump information
deskscan Poolscaner for tagDESKTOP (desktops)
devicetree Show device tree
dlldump Dump DLLs from a process address space
dlllist Print list of loaded dlls for each process
driverirp Driver IRP hook detection
driverscan Scan for driver objects _DRIVER_OBJECT
envars Display process environment variables
eventhooks Print details on windows event hooks
evtlogs Extract Windows Event Logs (XP/2003 only)
filescan Scan Physical memory for _FILE_OBJECT pool allocations
gahti Dump the USER handle type information
gditimers Print installed GDI timers and callbacks
gdt Display Global Descriptor Table
getservicesids Get the names of services in the Registry and return Calculated SID
getsids Print the SIDs owning each process
handles Print list of open handles for each process
hashdump Dumps passwords hashes (LM/NTLM) from memory
hibinfo Dump hibernation file information
hivedump Prints out a hive
hivelist Print list of registry hives.
hivescan Scan Physical memory for _CMHIVE objects (registry hives)
idt Display Interrupt Descriptor Table
imagecopy Copies a physical address space out as a raw DD image
imageinfo Identify information for the image
impscan Scan for calls to imported functions
kdbgscan Search for and dump potential KDBG values
kpcrscan Search for and dump potential KPCR values
ldrmodules Detect unlinked DLLs
lsadump Dump (decrypted) LSA secrets from the registry
malfind Find hidden and injected code
memdump Dump the addressable memory for a process
memmap Print the memory map
messagehooks List desktop and thread window message hooks
moddump Dump a kernel driver to an executable file sample
modscan Scan Physical memory for _LDR_DATA_TABLE_ENTRY objects
modules Print list of loaded modules
mutantscan Scan for mutant objects _KMUTANT
patcher Patches memory based on page scans
printkey Print a registry key, and its subkeys and values
procexedump Dump a process to an executable file sample
procmemdump Dump a process to an executable memory sample
pslist Print all running processes by following the EPROCESS lists
psscan Scan Physical memory for _EPROCESS pool allocations
pstree Print process list as a tree
psxview Find hidden processes with various process listings
raw2dmp Converts a physical memory sample to a windbg crash dump
screenshot Save a pseudo-screenshot based on GDI windows
sessions List details on _MM_SESSION_SPACE (user logon sessions)
shimcache Parses the Application Compatibility Shim Cache registry key
sockets Print list of open sockets
sockscan Scan Physical memory for _ADDRESS_OBJECT objects (tcp sockets)
ssdt Display SSDT entries
strings Match physical offsets to virtual addresses (may take a while, VERY verbose)
svcscan Scan for Windows services
symlinkscan Scan for symbolic link objects
thrdscan Scan physical memory for _ETHREAD objects
threads Investigate _ETHREAD and _KTHREADs
timers Print kernel timers and associated module DPCs
userassist Print userassist registry keys and information
userhandles Dump the USER handle tables
vaddump Dumps out the vad sections to a file
vadinfo Dump the VAD info
vadtree Walk the VAD tree and display in tree format
vadwalk Walk the VAD tree
volshell Shell in the memory image
windows Print Desktop Windows (verbose details)
wintree Print Z-Order Desktop Windows Tree
wndscan Pool scanner for tagWINDOWSTATION (window stations)
yarascan Scan process or kernel memory with Yara signatures
Nota: Más inforamción en: «https://www.volatilesystems.com/default/volatility».