SlideShare a Scribd company logo
Session ID:
Session Classification:
Andrew Case
The Volatility Project
HTA-W22
Advanced
Memory Forensics:
Defeating Disk Encryption,
Skilled Attackers, and
Advanced Malware
► Showcase the power of memory forensics
► Distinguish memory forensics from disk forensics
► Show why live forensics is futile and should be replaced
with offline memory forensics
Purpose of This Presentation
► Memory forensics is the analysis of captures (samples)
of physical memory (RAM) for artifacts relevant to an
investigation
► Requires modeling of the operating system’s data
structures and algorithms offline in order to recreate
state at the time of the capture
What is Memory Forensics?
► Traditional forensics only looks at disk images
► This misses information never written to disk
► Network connections, memory allocations, running processes,
open file lists, and much more
► Skilled attackers know to avoid the disk and securely
clean up any on-disk artifacts
Why We *Need* Memory Forensics
► Malware can trivially defeat live analysis
► Live analysis is running tools built into the OS to gather volatile
data (the general sysadmin/IR response)
► Malware can lie to any and all userland and even in-kernel tools
► Advanced malware only operates in memory
► Never touches the disk, all network traffic encrypted
► Good luck without memory forensics!
Why Cont.
Volatility
► Most popular memory analysis framework
► Open source, written in Python
► Supports Windows {XP, Vista, 7, 2003, 2008} x86/x64
► Supports Linux on Intel and ARM (Android)
► Supports Mac 10.5.x-10.8.x x86/x64
► Allows for analysis plugins to be easily written
► Used daily in real forensics investigations
Volatility
► A profile is set of vtypes and (optionally) symbol
addresses that are used to model a particular OS
version
► This is what allows Volatility plugins to be generic to all
the different versions of Windows, Linux, Mac, etc
Volatility Terminology - Profiles
► Address spaces are used to translate virtual addresses
into physical offsets
► Intel x86, x86 PAE, x86-64
► ARM
► They also prevent the need to convert all memory
captures to a linear format
► Crash dumps
► Hibernation files
► VMware vmss
► Lime
► Mac Memory Reader
► More…
Volatility Terminology – Address Spaces
► List and recover processes, network connections,
drivers, file systems, and much more
► Detect malware in both userland and the kernel
► We will be using Volatility to recover artifacts throughout
the presentation
Volatility Capabilities
Investigating
Advanced
Malware
► Determine system effects
► Uncover processes, network connections, drivers, etc
that are “hidden” by malware
► Acquire the unpacked/unencrypted malware in memory
Malware Analysis Capabilities
► A running system builds a process list by using APIs that
eventually traverse the PsActiveProcessHead list
► This logic is performed by the pslist plugin
► Rootkits break processes from this list to hide themselves
► Pool scanning for EPROCESS structures can find these
hidden processes
► This is performed in the psscan plugin
► POC rootkits exist to defeat this by pool header tampering
Finding (Hidden) Processes
► Volatility’s psxview plugin can detect all known process
hiding techniques by enumerating from many sources
► A number of these sources are not documented except for in
Volatility
Finding (Hidden) Processes Cont.
$ python vol.py -f ds_fuzz_hidden_proc.img psxview
Volatile Systems Volatility Framework 2.3_alpha
Offset(P) Name PID pslist psscan thrdproc pspcdid csrss session deskthrd
---------- ---------------- ------ ------ ------ -------- ------- ----- ------- -------
0x01a2b100 winlogon.exe 620 True True True True True True True
0x01a3d360 svchost.exe 932 True True True True True True True
0x018a13c0 VMwareService.e 1756 True True True True True True True
0x018e75e8 spoolsv.exe 1648 True True True True True True True
0x019dbc30 lsass.exe 684 True True True True True True True
0x0184e3a8 wscntfy.exe 560 True True True True True True True
0x018af860 VMwareTray.exe 1896 True True True True True True True
0x01a4bc20 network_listene 1696 False False True True True True True
0x01843b28 wuauclt.exe 1372 True True True True True True True
0x01a59d70 svchost.exe 844 True True True True True True True
[snip]
psxview Output
► Each process has three lists that track its loaded DLLs
► Process explorer and other live tools focus on one of the
lists (load order)
► Malware commonly breaks this list to avoid detection
► Flame is a popular and high-profile example [2]
► ldrmodules cross references the three lists with VAD
information for mapped files
Hiding Loaded DLLs
$ python vol.py -f flame.raw -p 912 ldrmodules
Volatile Systems Volatility Framework 2.1_alpha
Pid Process Base InLoad InInit InMem MappedPath
-------- -------------------- ---------- ------ ------ ----- ----------
912 services.exe 0x7c900000 True True True WINDOWSsystem32ntdll.dll
912 services.exe 0x7c9c0000 False False False WINDOWSsystem32shell32.dll
[snip]
ldrmodules Detecting Flame
► malfind looks for pages with suspicious protection bits
set (e.g. RWX)
► The following code injection/hiding techniques are all
detected by malfind:
► Remote Library Injection
► Remote Shellcode Injection
► Reflective DLL loading
Detecting Common Code Hiding Techniques
$ python vol.py -f stuxnet.vmem malfind
Process: lsass.exe Pid: 868 Address: 0x80000
Vad Tag: Vad Protection: PAGE_EXECUTE_READWRITE
Flags: Protection: 6
0x00080000 4d 5a 90 00 03 00 00 00 04 00 00 00 ff ff 00 00 MZ..............
0x00080010 b8 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 ........@.......
0x00080020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x00080030 00 00 00 00 00 00 00 00 00 00 00 00 08 01 00 00 ................
Malfind Detecting Stuxnet
Metasploit’s Reflective VNC Loader
► Technique:
► Overwrite the beginning of API functions in order to redirect
control flow
► Allows the malware to hide virtually any data from userland tools
and even some in-kernel monitors
► The apihooks plugin detects API hooks
► Performs static analysis on the beginning instructions of
functions
API Hooking
Hook mode: Usermode
Hook type: Inline/Trampoline
Process: 1176 (lsass.exe)
Victim module: ntdll.dll (0x7c900000 - 0x7c9af000)
Function: ntdll.dll!ZwQuerySection at 0x7c90d8b0
Hook address: 0x980a02
Hooking module: <unknown>
Disassembly(0):
0x7c90d8b0 b8020a9800 MOV EAX, 0x980a02
0x7c90d8b5 ffe0 JMP EAX
0x7c90d8b7 03fe ADD EDI, ESI
0x7c90d8b9 7fff JG 0x7c90d8ba
0x7c90d8bb 12c2 ADC AL, DL
0x7c90d8bd 1400 ADC AL, 0x0
0x7c90d8bf 90 NOP
0x7c90d8c0 b8a8000000 MOV EAX, 0xa8
0x7c90d8c5 ba DB 0xba
0x7c90d8c6 0003 ADD [EBX], AL
apihooks - Duqu
► The binaries (.exe, .dll, .sys, etc) involved with malicious
processes and drivers can be dumped to disk for
analysis
► Volatility can also be used to acquire the unpacked
version of malware samples from memory
► Run sample, take memory capture, acquire executable
Dumping Processes to Disk
► Instead of actively hooking functions in the kernel to
determine when certain events occur, there is a much
safer, passive option
► You can "register" a function to be called by the system
► Every time the event occurs, your function is called
Kernel Callbacks
► Process related
► Activated on process/thread creation, executable loading, etc
► Used to inject DLL into processes on startup and to stop
processes from starting
► Used by Mebroot, BlackEnergy, Rustock, TDL
► File system
► Activated on new file system registration
► TDL3 infects MBR and uses callback to know when FS is
mounted
► Stuxnet uses to attach to device stack to hide its files
Malware Targeted Callbacks
► Bugcheck
► Activated when machine is crashing (BSOD, crash dumping
being written)
► Rustock.C cleans itself from memory before a crash dump is
written
► Sinowal ensures the MBR is still infected before shutting down
after a BSOD
► Registry
► Activated on modifications to the registry, the callback can
monitor, block, or modify the operation
► Malware uses to prevent persistence methods inside the registry
(run keys, etc) from being modified/deleted
Targeted Callbacks Cont.
Skilled Attackers
► Besides malware, we also want to recover actions
performed directly by attackers
► Most of the artifacts used to recover this data are not written to
disk
► Volatility has many capabilities for this purpose that span
across its supported operating systems
► We will discuss capabilities not covered in the malware
section
Skilled Attackers
► cmdscan/consoles
► Plugins that can recover both the input and output of cmd.exe
sessions
► bash_history/bash_hash
► Plugins that can recover commands entered on a system and
when they were entered as well as the number of times each
binary was executed
Attacker Keyboard Input/Interaction
► List files/handles opened by each process on a system
► Determine which files, processes, registry keys, IPC
data, etc were being interacted with by a process
► On Linux socket handles are just file descriptors
Opened Handles/Files
► Can recover loaded kernel drivers
► Can uncover “hidden” drivers through a combination of
memory scanning and cross-referencing
► Windows
► modules & modscan
► Linux
► linux_lsmod & linux_check_modules
Kernel Drivers/Modules
► Can list both active connections (e.g. recreate netstat
output) as well locate previously terminated network
connection structures
► On Linux we can also recover previously sent and
received packets and trace them to their owning process
Network Connections
► Volatility can recover filesystem information from
memory including both metadata and file contents
► Windows - mftparser
► Recovers and parses the MFT for every active NTFS file system
► Output includes metadata for all files and contents for resident
files
► Linux – linux_find_file
► Parses any standard (non-stacked) file system from memory and
dumps the file system to disk
► tmpfs (/dev/shm) lives only in memory!
File systems in Memory
► Volatility can recover privileges assigned to a process
► Help determine what level of access the attacker and/or
malware gained on your system
Process Privileges
Grrcon: What type of
access did the attacker
gain?
Android Malware
in Memory
► Nearly all Android malware involves userland Android
applications
► These are powered by Dalvik, the Android application
virtual machine
► Memory analysis of Dalvik leads to recovery of deep
application state information
Android Malware in Memory
► Volatility has the ability to locate, parse, and report all
information from Dalvik instances:
► Native types
► Collections
► Classes
► Static and instance members (types and values)
► Methods
Dalvik Memory Analysis
► Dalvik analysis is much simpler…
► All variables and methods must be tracked by Dalvik
► Direct analysis of Dalvik bypasses malware’s
obfuscation attempts
► No malware has been found that modifies Dalvik internals
► Technically possibly from native code, but extremely difficult to
do anything complex
Dalvik vs Native Analysis
Software-Based
Encryption
► All major software encryption systems store encryption
keys in memory
► The key is used to decrypt file data being read and
encrypt file data being written
► Memory forensics can recover these keys
Software-Based Encryption
► The following have tools and techniques published to
recover keys from memory:
► Truecrypt
► BitLocker
► FileVault2 (Mac)
► Luks & dm-crypt (Linux, Android)
Volume Encryption
► The following have tools and techniques published to
recover keys from memory:
► PGP
► Truecrypt Containers
► <<A number of enterprise/commercial tools>>
File-Based Encryption
► The protected media must be currently or very recently
accessed/mounted for the key to be in memory
► Closed-source projects require reversing both of the in-
memory key-storage and on-disk format
► Already done for Bitlocker and FileVault2
Limitations of Key Recovery
► Memory forensics recovers a wealth of evidence that is
never stored to disk and is essential to many
investigations
► Live forensics processes are outdated and trivially
defeated/lied to by malware
► Modern malware avoids disk completely
► Will never find it if you pull the plug!
► The pain of encryption can be eased with memory
forensics
Conclusion
► Contact:
► andrew@memoryanalysis.net
► @attrc
► Volatility:
► http://volatility-labs.blogspot.com/
► @volatility
Questions/Comments?
[1] http://code.google.com/p/volatility/
[2] http://mnin.blogspot.com/2012/06/quickpost-flame-volatility.html
References

More Related Content

What's hot

Hunting malware with volatility v2.0
Hunting malware with volatility v2.0Hunting malware with volatility v2.0
Hunting malware with volatility v2.0
Frank Boldewin
 
44CON London - Attacking VxWorks: from Stone Age to Interstellar
44CON London - Attacking VxWorks: from Stone Age to Interstellar44CON London - Attacking VxWorks: from Stone Age to Interstellar
44CON London - Attacking VxWorks: from Stone Age to Interstellar
44CON
 
Reconstructing Gapz: Position-Independent Code Analysis Problem
Reconstructing Gapz: Position-Independent Code Analysis ProblemReconstructing Gapz: Position-Independent Code Analysis Problem
Reconstructing Gapz: Position-Independent Code Analysis ProblemAlex Matrosov
 
Defeating x64: Modern Trends of Kernel-Mode Rootkits
Defeating x64: Modern Trends of Kernel-Mode RootkitsDefeating x64: Modern Trends of Kernel-Mode Rootkits
Defeating x64: Modern Trends of Kernel-Mode Rootkits
Alex Matrosov
 
Hunting rootkits with windbg
Hunting rootkits with windbgHunting rootkits with windbg
Hunting rootkits with windbg
Frank Boldewin
 
Chroot Protection and Breaking
Chroot Protection and BreakingChroot Protection and Breaking
Chroot Protection and BreakingAnton Chuvakin
 
Linux Kernel Crashdump
Linux Kernel CrashdumpLinux Kernel Crashdump
Linux Kernel Crashdump
Marian Marinov
 
Auditing the Opensource Kernels
Auditing the Opensource KernelsAuditing the Opensource Kernels
Auditing the Opensource KernelsSilvio Cesare
 
How to drive a malware analyst crazy
How to drive a malware analyst crazyHow to drive a malware analyst crazy
How to drive a malware analyst crazy
Michael Boman
 
Di shen pacsec_final
Di shen pacsec_finalDi shen pacsec_final
Di shen pacsec_final
PacSecJP
 
Windows persistence presentation
Windows persistence presentationWindows persistence presentation
Windows persistence presentation
OlehLevytskyi1
 
Kernel Hijacking Is Not an Option: MemoryRanger Comes to The Rescue Again
Kernel Hijacking Is Not an Option: MemoryRanger Comes to The Rescue AgainKernel Hijacking Is Not an Option: MemoryRanger Comes to The Rescue Again
Kernel Hijacking Is Not an Option: MemoryRanger Comes to The Rescue Again
Igor Korkin
 
Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisKernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysis
Anne Nicolas
 
Finfisher- Nguyễn Chấn Việt
Finfisher- Nguyễn Chấn ViệtFinfisher- Nguyễn Chấn Việt
Finfisher- Nguyễn Chấn Việt
Security Bootcamp
 
Defeating x64: The Evolution of the TDL Rootkit
Defeating x64: The Evolution of the TDL RootkitDefeating x64: The Evolution of the TDL Rootkit
Defeating x64: The Evolution of the TDL Rootkit
Alex Matrosov
 
Kernel crashdump
Kernel crashdumpKernel crashdump
Kernel crashdump
Adrien Mahieux
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande Modem
Cyber Security Alliance
 
10 Tips for AIX Security
10 Tips for AIX Security10 Tips for AIX Security
10 Tips for AIX Security
HelpSystems
 
Your Linux Passwords Are in Danger: MimiDove Meets the Challenge (lightning t...
Your Linux Passwords Are in Danger: MimiDove Meets the Challenge (lightning t...Your Linux Passwords Are in Danger: MimiDove Meets the Challenge (lightning t...
Your Linux Passwords Are in Danger: MimiDove Meets the Challenge (lightning t...
Igor Korkin
 
WinFE: The (Almost) Perfect Triage Tool
WinFE: The (Almost) Perfect Triage ToolWinFE: The (Almost) Perfect Triage Tool
WinFE: The (Almost) Perfect Triage Tool
Brent Muir
 

What's hot (20)

Hunting malware with volatility v2.0
Hunting malware with volatility v2.0Hunting malware with volatility v2.0
Hunting malware with volatility v2.0
 
44CON London - Attacking VxWorks: from Stone Age to Interstellar
44CON London - Attacking VxWorks: from Stone Age to Interstellar44CON London - Attacking VxWorks: from Stone Age to Interstellar
44CON London - Attacking VxWorks: from Stone Age to Interstellar
 
Reconstructing Gapz: Position-Independent Code Analysis Problem
Reconstructing Gapz: Position-Independent Code Analysis ProblemReconstructing Gapz: Position-Independent Code Analysis Problem
Reconstructing Gapz: Position-Independent Code Analysis Problem
 
Defeating x64: Modern Trends of Kernel-Mode Rootkits
Defeating x64: Modern Trends of Kernel-Mode RootkitsDefeating x64: Modern Trends of Kernel-Mode Rootkits
Defeating x64: Modern Trends of Kernel-Mode Rootkits
 
Hunting rootkits with windbg
Hunting rootkits with windbgHunting rootkits with windbg
Hunting rootkits with windbg
 
Chroot Protection and Breaking
Chroot Protection and BreakingChroot Protection and Breaking
Chroot Protection and Breaking
 
Linux Kernel Crashdump
Linux Kernel CrashdumpLinux Kernel Crashdump
Linux Kernel Crashdump
 
Auditing the Opensource Kernels
Auditing the Opensource KernelsAuditing the Opensource Kernels
Auditing the Opensource Kernels
 
How to drive a malware analyst crazy
How to drive a malware analyst crazyHow to drive a malware analyst crazy
How to drive a malware analyst crazy
 
Di shen pacsec_final
Di shen pacsec_finalDi shen pacsec_final
Di shen pacsec_final
 
Windows persistence presentation
Windows persistence presentationWindows persistence presentation
Windows persistence presentation
 
Kernel Hijacking Is Not an Option: MemoryRanger Comes to The Rescue Again
Kernel Hijacking Is Not an Option: MemoryRanger Comes to The Rescue AgainKernel Hijacking Is Not an Option: MemoryRanger Comes to The Rescue Again
Kernel Hijacking Is Not an Option: MemoryRanger Comes to The Rescue Again
 
Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisKernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysis
 
Finfisher- Nguyễn Chấn Việt
Finfisher- Nguyễn Chấn ViệtFinfisher- Nguyễn Chấn Việt
Finfisher- Nguyễn Chấn Việt
 
Defeating x64: The Evolution of the TDL Rootkit
Defeating x64: The Evolution of the TDL RootkitDefeating x64: The Evolution of the TDL Rootkit
Defeating x64: The Evolution of the TDL Rootkit
 
Kernel crashdump
Kernel crashdumpKernel crashdump
Kernel crashdump
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande Modem
 
10 Tips for AIX Security
10 Tips for AIX Security10 Tips for AIX Security
10 Tips for AIX Security
 
Your Linux Passwords Are in Danger: MimiDove Meets the Challenge (lightning t...
Your Linux Passwords Are in Danger: MimiDove Meets the Challenge (lightning t...Your Linux Passwords Are in Danger: MimiDove Meets the Challenge (lightning t...
Your Linux Passwords Are in Danger: MimiDove Meets the Challenge (lightning t...
 
WinFE: The (Almost) Perfect Triage Tool
WinFE: The (Almost) Perfect Triage ToolWinFE: The (Almost) Perfect Triage Tool
WinFE: The (Almost) Perfect Triage Tool
 

Viewers also liked

Обеспечение информационной безопасности в облачных бизнес-приложениях и дата-...
Обеспечение информационной безопасности в облачных бизнес-приложениях и дата-...Обеспечение информационной безопасности в облачных бизнес-приложениях и дата-...
Обеспечение информационной безопасности в облачных бизнес-приложениях и дата-...
SelectedPresentations
 
Целевое управление доступом в сети. Техническое решение для финансовых органи...
Целевое управление доступом в сети. Техническое решение для финансовых органи...Целевое управление доступом в сети. Техническое решение для финансовых органи...
Целевое управление доступом в сети. Техническое решение для финансовых органи...
SelectedPresentations
 
Об угрозах информационной безопасности, актуальных для разработчика СЗИ
Об угрозах информационной безопасности, актуальных для разработчика СЗИОб угрозах информационной безопасности, актуальных для разработчика СЗИ
Об угрозах информационной безопасности, актуальных для разработчика СЗИ
SelectedPresentations
 
Обеспечение защиты информации на стадиях жизненного цикла ИС
Обеспечение защиты информации на стадиях жизненного цикла ИСОбеспечение защиты информации на стадиях жизненного цикла ИС
Обеспечение защиты информации на стадиях жизненного цикла ИС
SelectedPresentations
 
Основное содержание профессионального стандарта «Специалист по безопасности т...
Основное содержание профессионального стандарта «Специалист по безопасности т...Основное содержание профессионального стандарта «Специалист по безопасности т...
Основное содержание профессионального стандарта «Специалист по безопасности т...
SelectedPresentations
 

Viewers also liked (18)

Hum w23
Hum w23Hum w23
Hum w23
 
Grc t17
Grc t17Grc t17
Grc t17
 
Grc w21
Grc w21Grc w21
Grc w21
 
Stu r33 b (2)
Stu r33 b (2)Stu r33 b (2)
Stu r33 b (2)
 
Grc f43
Grc f43Grc f43
Grc f43
 
Обеспечение информационной безопасности в облачных бизнес-приложениях и дата-...
Обеспечение информационной безопасности в облачных бизнес-приложениях и дата-...Обеспечение информационной безопасности в облачных бизнес-приложениях и дата-...
Обеспечение информационной безопасности в облачных бизнес-приложениях и дата-...
 
Ht r31
Ht r31Ht r31
Ht r31
 
Grc r32
Grc r32Grc r32
Grc r32
 
Hum w21
Hum w21Hum w21
Hum w21
 
Целевое управление доступом в сети. Техническое решение для финансовых органи...
Целевое управление доступом в сети. Техническое решение для финансовых органи...Целевое управление доступом в сети. Техническое решение для финансовых органи...
Целевое управление доступом в сети. Техническое решение для финансовых органи...
 
Iam f41
Iam f41Iam f41
Iam f41
 
Об угрозах информационной безопасности, актуальных для разработчика СЗИ
Об угрозах информационной безопасности, актуальных для разработчика СЗИОб угрозах информационной безопасности, актуальных для разработчика СЗИ
Об угрозах информационной безопасности, актуальных для разработчика СЗИ
 
Обеспечение защиты информации на стадиях жизненного цикла ИС
Обеспечение защиты информации на стадиях жизненного цикла ИСОбеспечение защиты информации на стадиях жизненного цикла ИС
Обеспечение защиты информации на стадиях жизненного цикла ИС
 
Exp t18
Exp t18Exp t18
Exp t18
 
Ht t17
Ht t17Ht t17
Ht t17
 
Ht r35 b
Ht r35 bHt r35 b
Ht r35 b
 
Основное содержание профессионального стандарта «Специалист по безопасности т...
Основное содержание профессионального стандарта «Специалист по безопасности т...Основное содержание профессионального стандарта «Специалист по безопасности т...
Основное содержание профессионального стандарта «Специалист по безопасности т...
 
Hta r31
Hta r31Hta r31
Hta r31
 

Similar to Hta w22

Oleksyk applied-anti-forensics
Oleksyk   applied-anti-forensicsOleksyk   applied-anti-forensics
Oleksyk applied-anti-forensicsDefconRussia
 
Virtual Machines Security Internals: Detection and Exploitation
 Virtual Machines Security Internals: Detection and Exploitation Virtual Machines Security Internals: Detection and Exploitation
Virtual Machines Security Internals: Detection and Exploitation
Mattia Salvi
 
Hunting for Credentials Dumping in Windows Environment
Hunting for Credentials Dumping in Windows EnvironmentHunting for Credentials Dumping in Windows Environment
Hunting for Credentials Dumping in Windows Environment
Teymur Kheirkhabarov
 
Penetration Testing and Intrusion Detection System
Penetration Testing and Intrusion Detection SystemPenetration Testing and Intrusion Detection System
Penetration Testing and Intrusion Detection System
Bikrant Gautam
 
Unmasking Careto through Memory Forensics (video in description)
Unmasking Careto through Memory Forensics (video in description)Unmasking Careto through Memory Forensics (video in description)
Unmasking Careto through Memory Forensics (video in description)
Andrew Case
 
CarolinaCon 2008 Rootkits Then and Now
CarolinaCon 2008 Rootkits Then and NowCarolinaCon 2008 Rootkits Then and Now
CarolinaCon 2008 Rootkits Then and Now
Tyler Shields
 
Memory forensics cheat sheet
Memory forensics cheat sheetMemory forensics cheat sheet
Memory forensics cheat sheet
Martin Cabrera
 
Writing Character driver (loadable module) in linux
Writing Character driver (loadable module) in linuxWriting Character driver (loadable module) in linux
Writing Character driver (loadable module) in linux
RajKumar Rampelli
 
Windows Registry Forensics with Volatility Framework
Windows Registry Forensics with Volatility FrameworkWindows Registry Forensics with Volatility Framework
Windows Registry Forensics with Volatility Framework
Kapil Soni
 
Kush wadhwa _mining_digital_evidence_in_windows - ClubHack2009
Kush wadhwa _mining_digital_evidence_in_windows - ClubHack2009Kush wadhwa _mining_digital_evidence_in_windows - ClubHack2009
Kush wadhwa _mining_digital_evidence_in_windows - ClubHack2009ClubHack
 
Hunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory ForensicsHunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory Forensics
Andrew Case
 
Hunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory ForensicsHunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory Forensics
Andrew Case
 
OMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
OMFW 2012: Analyzing Linux Kernel Rootkits with VolatlityOMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
OMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
Andrew Case
 
Nullbyte 6ed. 2019
Nullbyte 6ed. 2019Nullbyte 6ed. 2019
Nullbyte 6ed. 2019
Ricardo L0gan
 
First Responders Course - Session 7 - Incident Scope Assessment [2004]
First Responders Course - Session 7 - Incident Scope Assessment [2004]First Responders Course - Session 7 - Incident Scope Assessment [2004]
First Responders Course - Session 7 - Incident Scope Assessment [2004]
Phil Huggins FBCS CITP
 
Intrusion Discovery on Windows
Intrusion Discovery on WindowsIntrusion Discovery on Windows
Intrusion Discovery on Windows
dkaya
 
Windows Command Line Tools
Windows Command Line ToolsWindows Command Line Tools
Windows Command Line Toolslove4upratik
 
Ataques dirigidos contra activistas
Ataques dirigidos contra activistasAtaques dirigidos contra activistas
Ataques dirigidos contra activistas
David Barroso
 

Similar to Hta w22 (20)

Oleksyk applied-anti-forensics
Oleksyk   applied-anti-forensicsOleksyk   applied-anti-forensics
Oleksyk applied-anti-forensics
 
Virtual Machines Security Internals: Detection and Exploitation
 Virtual Machines Security Internals: Detection and Exploitation Virtual Machines Security Internals: Detection and Exploitation
Virtual Machines Security Internals: Detection and Exploitation
 
Hunting for Credentials Dumping in Windows Environment
Hunting for Credentials Dumping in Windows EnvironmentHunting for Credentials Dumping in Windows Environment
Hunting for Credentials Dumping in Windows Environment
 
Penetration Testing and Intrusion Detection System
Penetration Testing and Intrusion Detection SystemPenetration Testing and Intrusion Detection System
Penetration Testing and Intrusion Detection System
 
Unmasking Careto through Memory Forensics (video in description)
Unmasking Careto through Memory Forensics (video in description)Unmasking Careto through Memory Forensics (video in description)
Unmasking Careto through Memory Forensics (video in description)
 
CarolinaCon 2008 Rootkits Then and Now
CarolinaCon 2008 Rootkits Then and NowCarolinaCon 2008 Rootkits Then and Now
CarolinaCon 2008 Rootkits Then and Now
 
Memory forensics cheat sheet
Memory forensics cheat sheetMemory forensics cheat sheet
Memory forensics cheat sheet
 
Writing Character driver (loadable module) in linux
Writing Character driver (loadable module) in linuxWriting Character driver (loadable module) in linux
Writing Character driver (loadable module) in linux
 
Windows Registry Forensics with Volatility Framework
Windows Registry Forensics with Volatility FrameworkWindows Registry Forensics with Volatility Framework
Windows Registry Forensics with Volatility Framework
 
Kush wadhwa _mining_digital_evidence_in_windows - ClubHack2009
Kush wadhwa _mining_digital_evidence_in_windows - ClubHack2009Kush wadhwa _mining_digital_evidence_in_windows - ClubHack2009
Kush wadhwa _mining_digital_evidence_in_windows - ClubHack2009
 
Hunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory ForensicsHunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory Forensics
 
Hunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory ForensicsHunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory Forensics
 
OMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
OMFW 2012: Analyzing Linux Kernel Rootkits with VolatlityOMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
OMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
 
Nullbyte 6ed. 2019
Nullbyte 6ed. 2019Nullbyte 6ed. 2019
Nullbyte 6ed. 2019
 
Stuxnet dc9723
Stuxnet dc9723Stuxnet dc9723
Stuxnet dc9723
 
Hta f42
Hta f42Hta f42
Hta f42
 
First Responders Course - Session 7 - Incident Scope Assessment [2004]
First Responders Course - Session 7 - Incident Scope Assessment [2004]First Responders Course - Session 7 - Incident Scope Assessment [2004]
First Responders Course - Session 7 - Incident Scope Assessment [2004]
 
Intrusion Discovery on Windows
Intrusion Discovery on WindowsIntrusion Discovery on Windows
Intrusion Discovery on Windows
 
Windows Command Line Tools
Windows Command Line ToolsWindows Command Line Tools
Windows Command Line Tools
 
Ataques dirigidos contra activistas
Ataques dirigidos contra activistasAtaques dirigidos contra activistas
Ataques dirigidos contra activistas
 

More from SelectedPresentations

Длительное архивное хранение ЭД: правовые аспекты и технологические решения
Длительное архивное хранение ЭД: правовые аспекты и технологические решенияДлительное архивное хранение ЭД: правовые аспекты и технологические решения
Длительное архивное хранение ЭД: правовые аспекты и технологические решения
SelectedPresentations
 
Трансграничное пространство доверия. Доверенная третья сторона.
Трансграничное пространство доверия. Доверенная третья сторона.Трансграничное пространство доверия. Доверенная третья сторона.
Трансграничное пространство доверия. Доверенная третья сторона.
SelectedPresentations
 
Варианты реализации атак через мобильные устройства
Варианты реализации атак через мобильные устройстваВарианты реализации атак через мобильные устройства
Варианты реализации атак через мобильные устройства
SelectedPresentations
 
Новые технологические возможности и безопасность мобильных решений
Новые технологические возможности и безопасность мобильных решенийНовые технологические возможности и безопасность мобильных решений
Новые технологические возможности и безопасность мобильных решений
SelectedPresentations
 
Управление безопасностью мобильных устройств
Управление безопасностью мобильных устройствУправление безопасностью мобильных устройств
Управление безопасностью мобильных устройств
SelectedPresentations
 
Современные технологии контроля и защиты мобильных устройств, тенденции рынка...
Современные технологии контроля и защиты мобильных устройств, тенденции рынка...Современные технологии контроля и защиты мобильных устройств, тенденции рынка...
Современные технологии контроля и защиты мобильных устройств, тенденции рынка...
SelectedPresentations
 
Кадровое агентство отрасли информационной безопасности
Кадровое агентство отрасли информационной безопасностиКадровое агентство отрасли информационной безопасности
Кадровое агентство отрасли информационной безопасности
SelectedPresentations
 
Основное содержание профессионального стандарта «Специалист по безопасности и...
Основное содержание профессионального стандарта «Специалист по безопасности и...Основное содержание профессионального стандарта «Специалист по безопасности и...
Основное содержание профессионального стандарта «Специалист по безопасности и...
SelectedPresentations
 
Основное содержание профессионального стандарта «Специалист по безопасности а...
Основное содержание профессионального стандарта «Специалист по безопасности а...Основное содержание профессионального стандарта «Специалист по безопасности а...
Основное содержание профессионального стандарта «Специалист по безопасности а...
SelectedPresentations
 
Основное содержание профессионального стандарта «Специалист по технической за...
Основное содержание профессионального стандарта «Специалист по технической за...Основное содержание профессионального стандарта «Специалист по технической за...
Основное содержание профессионального стандарта «Специалист по технической за...
SelectedPresentations
 
О профессиональных стандартах по группе занятий (профессий) «Специалисты в об...
О профессиональных стандартах по группе занятий (профессий) «Специалисты в об...О профессиональных стандартах по группе занятий (профессий) «Специалисты в об...
О профессиональных стандартах по группе занятий (профессий) «Специалисты в об...
SelectedPresentations
 
Запись активности пользователей с интеллектуальным анализом данных
Запись активности пользователей с интеллектуальным анализом данныхЗапись активности пользователей с интеллектуальным анализом данных
Запись активности пользователей с интеллектуальным анализом данных
SelectedPresentations
 
Импортозамещение в системах ИБ банков. Практические аспекты перехода на росси...
Импортозамещение в системах ИБ банков. Практические аспекты перехода на росси...Импортозамещение в системах ИБ банков. Практические аспекты перехода на росси...
Импортозамещение в системах ИБ банков. Практические аспекты перехода на росси...
SelectedPresentations
 
Документ, как средство защиты: ОРД как основа обеспечения ИБ
Документ, как средство защиты: ОРД как основа обеспечения ИБДокумент, как средство защиты: ОРД как основа обеспечения ИБ
Документ, как средство защиты: ОРД как основа обеспечения ИБ
SelectedPresentations
 
Чего не хватает в современных ids для защиты банковских приложений
Чего не хватает в современных ids для защиты банковских приложенийЧего не хватает в современных ids для защиты банковских приложений
Чего не хватает в современных ids для защиты банковских приложений
SelectedPresentations
 
Об участии МОО «АЗИ» в разработке профессиональных стандартов в области инфор...
Об участии МОО «АЗИ» в разработке профессиональных стандартов в области инфор...Об участии МОО «АЗИ» в разработке профессиональных стандартов в области инфор...
Об участии МОО «АЗИ» в разработке профессиональных стандартов в области инфор...
SelectedPresentations
 
Оценка состояния, меры формирования индустрии информационной безопасности Рос...
Оценка состояния, меры формирования индустрии информационной безопасности Рос...Оценка состояния, меры формирования индустрии информационной безопасности Рос...
Оценка состояния, меры формирования индустрии информационной безопасности Рос...
SelectedPresentations
 

More from SelectedPresentations (20)

Длительное архивное хранение ЭД: правовые аспекты и технологические решения
Длительное архивное хранение ЭД: правовые аспекты и технологические решенияДлительное архивное хранение ЭД: правовые аспекты и технологические решения
Длительное архивное хранение ЭД: правовые аспекты и технологические решения
 
Трансграничное пространство доверия. Доверенная третья сторона.
Трансграничное пространство доверия. Доверенная третья сторона.Трансграничное пространство доверия. Доверенная третья сторона.
Трансграничное пространство доверия. Доверенная третья сторона.
 
Варианты реализации атак через мобильные устройства
Варианты реализации атак через мобильные устройстваВарианты реализации атак через мобильные устройства
Варианты реализации атак через мобильные устройства
 
Новые технологические возможности и безопасность мобильных решений
Новые технологические возможности и безопасность мобильных решенийНовые технологические возможности и безопасность мобильных решений
Новые технологические возможности и безопасность мобильных решений
 
Управление безопасностью мобильных устройств
Управление безопасностью мобильных устройствУправление безопасностью мобильных устройств
Управление безопасностью мобильных устройств
 
Современные технологии контроля и защиты мобильных устройств, тенденции рынка...
Современные технологии контроля и защиты мобильных устройств, тенденции рынка...Современные технологии контроля и защиты мобильных устройств, тенденции рынка...
Современные технологии контроля и защиты мобильных устройств, тенденции рынка...
 
Кадровое агентство отрасли информационной безопасности
Кадровое агентство отрасли информационной безопасностиКадровое агентство отрасли информационной безопасности
Кадровое агентство отрасли информационной безопасности
 
Основное содержание профессионального стандарта «Специалист по безопасности и...
Основное содержание профессионального стандарта «Специалист по безопасности и...Основное содержание профессионального стандарта «Специалист по безопасности и...
Основное содержание профессионального стандарта «Специалист по безопасности и...
 
Основное содержание профессионального стандарта «Специалист по безопасности а...
Основное содержание профессионального стандарта «Специалист по безопасности а...Основное содержание профессионального стандарта «Специалист по безопасности а...
Основное содержание профессионального стандарта «Специалист по безопасности а...
 
Основное содержание профессионального стандарта «Специалист по технической за...
Основное содержание профессионального стандарта «Специалист по технической за...Основное содержание профессионального стандарта «Специалист по технической за...
Основное содержание профессионального стандарта «Специалист по технической за...
 
О профессиональных стандартах по группе занятий (профессий) «Специалисты в об...
О профессиональных стандартах по группе занятий (профессий) «Специалисты в об...О профессиональных стандартах по группе занятий (профессий) «Специалисты в об...
О профессиональных стандартах по группе занятий (профессий) «Специалисты в об...
 
Запись активности пользователей с интеллектуальным анализом данных
Запись активности пользователей с интеллектуальным анализом данныхЗапись активности пользователей с интеллектуальным анализом данных
Запись активности пользователей с интеллектуальным анализом данных
 
Импортозамещение в системах ИБ банков. Практические аспекты перехода на росси...
Импортозамещение в системах ИБ банков. Практические аспекты перехода на росси...Импортозамещение в системах ИБ банков. Практические аспекты перехода на росси...
Импортозамещение в системах ИБ банков. Практические аспекты перехода на росси...
 
Документ, как средство защиты: ОРД как основа обеспечения ИБ
Документ, как средство защиты: ОРД как основа обеспечения ИБДокумент, как средство защиты: ОРД как основа обеспечения ИБ
Документ, как средство защиты: ОРД как основа обеспечения ИБ
 
Чего не хватает в современных ids для защиты банковских приложений
Чего не хватает в современных ids для защиты банковских приложенийЧего не хватает в современных ids для защиты банковских приложений
Чего не хватает в современных ids для защиты банковских приложений
 
Об участии МОО «АЗИ» в разработке профессиональных стандартов в области инфор...
Об участии МОО «АЗИ» в разработке профессиональных стандартов в области инфор...Об участии МОО «АЗИ» в разработке профессиональных стандартов в области инфор...
Об участии МОО «АЗИ» в разработке профессиональных стандартов в области инфор...
 
Оценка состояния, меры формирования индустрии информационной безопасности Рос...
Оценка состояния, меры формирования индустрии информационной безопасности Рос...Оценка состояния, меры формирования индустрии информационной безопасности Рос...
Оценка состояния, меры формирования индустрии информационной безопасности Рос...
 
Exp r35
Exp r35Exp r35
Exp r35
 
Exp t19 exp-t19
Exp t19 exp-t19Exp t19 exp-t19
Exp t19 exp-t19
 
Exp w21
Exp w21Exp w21
Exp w21
 

Hta w22

  • 1. Session ID: Session Classification: Andrew Case The Volatility Project HTA-W22 Advanced Memory Forensics: Defeating Disk Encryption, Skilled Attackers, and Advanced Malware
  • 2. ► Showcase the power of memory forensics ► Distinguish memory forensics from disk forensics ► Show why live forensics is futile and should be replaced with offline memory forensics Purpose of This Presentation
  • 3. ► Memory forensics is the analysis of captures (samples) of physical memory (RAM) for artifacts relevant to an investigation ► Requires modeling of the operating system’s data structures and algorithms offline in order to recreate state at the time of the capture What is Memory Forensics?
  • 4. ► Traditional forensics only looks at disk images ► This misses information never written to disk ► Network connections, memory allocations, running processes, open file lists, and much more ► Skilled attackers know to avoid the disk and securely clean up any on-disk artifacts Why We *Need* Memory Forensics
  • 5. ► Malware can trivially defeat live analysis ► Live analysis is running tools built into the OS to gather volatile data (the general sysadmin/IR response) ► Malware can lie to any and all userland and even in-kernel tools ► Advanced malware only operates in memory ► Never touches the disk, all network traffic encrypted ► Good luck without memory forensics! Why Cont.
  • 7. ► Most popular memory analysis framework ► Open source, written in Python ► Supports Windows {XP, Vista, 7, 2003, 2008} x86/x64 ► Supports Linux on Intel and ARM (Android) ► Supports Mac 10.5.x-10.8.x x86/x64 ► Allows for analysis plugins to be easily written ► Used daily in real forensics investigations Volatility
  • 8. ► A profile is set of vtypes and (optionally) symbol addresses that are used to model a particular OS version ► This is what allows Volatility plugins to be generic to all the different versions of Windows, Linux, Mac, etc Volatility Terminology - Profiles
  • 9. ► Address spaces are used to translate virtual addresses into physical offsets ► Intel x86, x86 PAE, x86-64 ► ARM ► They also prevent the need to convert all memory captures to a linear format ► Crash dumps ► Hibernation files ► VMware vmss ► Lime ► Mac Memory Reader ► More… Volatility Terminology – Address Spaces
  • 10. ► List and recover processes, network connections, drivers, file systems, and much more ► Detect malware in both userland and the kernel ► We will be using Volatility to recover artifacts throughout the presentation Volatility Capabilities
  • 12. ► Determine system effects ► Uncover processes, network connections, drivers, etc that are “hidden” by malware ► Acquire the unpacked/unencrypted malware in memory Malware Analysis Capabilities
  • 13. ► A running system builds a process list by using APIs that eventually traverse the PsActiveProcessHead list ► This logic is performed by the pslist plugin ► Rootkits break processes from this list to hide themselves ► Pool scanning for EPROCESS structures can find these hidden processes ► This is performed in the psscan plugin ► POC rootkits exist to defeat this by pool header tampering Finding (Hidden) Processes
  • 14. ► Volatility’s psxview plugin can detect all known process hiding techniques by enumerating from many sources ► A number of these sources are not documented except for in Volatility Finding (Hidden) Processes Cont.
  • 15. $ python vol.py -f ds_fuzz_hidden_proc.img psxview Volatile Systems Volatility Framework 2.3_alpha Offset(P) Name PID pslist psscan thrdproc pspcdid csrss session deskthrd ---------- ---------------- ------ ------ ------ -------- ------- ----- ------- ------- 0x01a2b100 winlogon.exe 620 True True True True True True True 0x01a3d360 svchost.exe 932 True True True True True True True 0x018a13c0 VMwareService.e 1756 True True True True True True True 0x018e75e8 spoolsv.exe 1648 True True True True True True True 0x019dbc30 lsass.exe 684 True True True True True True True 0x0184e3a8 wscntfy.exe 560 True True True True True True True 0x018af860 VMwareTray.exe 1896 True True True True True True True 0x01a4bc20 network_listene 1696 False False True True True True True 0x01843b28 wuauclt.exe 1372 True True True True True True True 0x01a59d70 svchost.exe 844 True True True True True True True [snip] psxview Output
  • 16. ► Each process has three lists that track its loaded DLLs ► Process explorer and other live tools focus on one of the lists (load order) ► Malware commonly breaks this list to avoid detection ► Flame is a popular and high-profile example [2] ► ldrmodules cross references the three lists with VAD information for mapped files Hiding Loaded DLLs
  • 17. $ python vol.py -f flame.raw -p 912 ldrmodules Volatile Systems Volatility Framework 2.1_alpha Pid Process Base InLoad InInit InMem MappedPath -------- -------------------- ---------- ------ ------ ----- ---------- 912 services.exe 0x7c900000 True True True WINDOWSsystem32ntdll.dll 912 services.exe 0x7c9c0000 False False False WINDOWSsystem32shell32.dll [snip] ldrmodules Detecting Flame
  • 18. ► malfind looks for pages with suspicious protection bits set (e.g. RWX) ► The following code injection/hiding techniques are all detected by malfind: ► Remote Library Injection ► Remote Shellcode Injection ► Reflective DLL loading Detecting Common Code Hiding Techniques
  • 19. $ python vol.py -f stuxnet.vmem malfind Process: lsass.exe Pid: 868 Address: 0x80000 Vad Tag: Vad Protection: PAGE_EXECUTE_READWRITE Flags: Protection: 6 0x00080000 4d 5a 90 00 03 00 00 00 04 00 00 00 ff ff 00 00 MZ.............. 0x00080010 b8 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 ........@....... 0x00080020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0x00080030 00 00 00 00 00 00 00 00 00 00 00 00 08 01 00 00 ................ Malfind Detecting Stuxnet
  • 21. ► Technique: ► Overwrite the beginning of API functions in order to redirect control flow ► Allows the malware to hide virtually any data from userland tools and even some in-kernel monitors ► The apihooks plugin detects API hooks ► Performs static analysis on the beginning instructions of functions API Hooking
  • 22. Hook mode: Usermode Hook type: Inline/Trampoline Process: 1176 (lsass.exe) Victim module: ntdll.dll (0x7c900000 - 0x7c9af000) Function: ntdll.dll!ZwQuerySection at 0x7c90d8b0 Hook address: 0x980a02 Hooking module: <unknown> Disassembly(0): 0x7c90d8b0 b8020a9800 MOV EAX, 0x980a02 0x7c90d8b5 ffe0 JMP EAX 0x7c90d8b7 03fe ADD EDI, ESI 0x7c90d8b9 7fff JG 0x7c90d8ba 0x7c90d8bb 12c2 ADC AL, DL 0x7c90d8bd 1400 ADC AL, 0x0 0x7c90d8bf 90 NOP 0x7c90d8c0 b8a8000000 MOV EAX, 0xa8 0x7c90d8c5 ba DB 0xba 0x7c90d8c6 0003 ADD [EBX], AL apihooks - Duqu
  • 23. ► The binaries (.exe, .dll, .sys, etc) involved with malicious processes and drivers can be dumped to disk for analysis ► Volatility can also be used to acquire the unpacked version of malware samples from memory ► Run sample, take memory capture, acquire executable Dumping Processes to Disk
  • 24. ► Instead of actively hooking functions in the kernel to determine when certain events occur, there is a much safer, passive option ► You can "register" a function to be called by the system ► Every time the event occurs, your function is called Kernel Callbacks
  • 25. ► Process related ► Activated on process/thread creation, executable loading, etc ► Used to inject DLL into processes on startup and to stop processes from starting ► Used by Mebroot, BlackEnergy, Rustock, TDL ► File system ► Activated on new file system registration ► TDL3 infects MBR and uses callback to know when FS is mounted ► Stuxnet uses to attach to device stack to hide its files Malware Targeted Callbacks
  • 26. ► Bugcheck ► Activated when machine is crashing (BSOD, crash dumping being written) ► Rustock.C cleans itself from memory before a crash dump is written ► Sinowal ensures the MBR is still infected before shutting down after a BSOD ► Registry ► Activated on modifications to the registry, the callback can monitor, block, or modify the operation ► Malware uses to prevent persistence methods inside the registry (run keys, etc) from being modified/deleted Targeted Callbacks Cont.
  • 28. ► Besides malware, we also want to recover actions performed directly by attackers ► Most of the artifacts used to recover this data are not written to disk ► Volatility has many capabilities for this purpose that span across its supported operating systems ► We will discuss capabilities not covered in the malware section Skilled Attackers
  • 29. ► cmdscan/consoles ► Plugins that can recover both the input and output of cmd.exe sessions ► bash_history/bash_hash ► Plugins that can recover commands entered on a system and when they were entered as well as the number of times each binary was executed Attacker Keyboard Input/Interaction
  • 30. ► List files/handles opened by each process on a system ► Determine which files, processes, registry keys, IPC data, etc were being interacted with by a process ► On Linux socket handles are just file descriptors Opened Handles/Files
  • 31. ► Can recover loaded kernel drivers ► Can uncover “hidden” drivers through a combination of memory scanning and cross-referencing ► Windows ► modules & modscan ► Linux ► linux_lsmod & linux_check_modules Kernel Drivers/Modules
  • 32. ► Can list both active connections (e.g. recreate netstat output) as well locate previously terminated network connection structures ► On Linux we can also recover previously sent and received packets and trace them to their owning process Network Connections
  • 33. ► Volatility can recover filesystem information from memory including both metadata and file contents ► Windows - mftparser ► Recovers and parses the MFT for every active NTFS file system ► Output includes metadata for all files and contents for resident files ► Linux – linux_find_file ► Parses any standard (non-stacked) file system from memory and dumps the file system to disk ► tmpfs (/dev/shm) lives only in memory! File systems in Memory
  • 34. ► Volatility can recover privileges assigned to a process ► Help determine what level of access the attacker and/or malware gained on your system Process Privileges
  • 35. Grrcon: What type of access did the attacker gain?
  • 37. ► Nearly all Android malware involves userland Android applications ► These are powered by Dalvik, the Android application virtual machine ► Memory analysis of Dalvik leads to recovery of deep application state information Android Malware in Memory
  • 38. ► Volatility has the ability to locate, parse, and report all information from Dalvik instances: ► Native types ► Collections ► Classes ► Static and instance members (types and values) ► Methods Dalvik Memory Analysis
  • 39. ► Dalvik analysis is much simpler… ► All variables and methods must be tracked by Dalvik ► Direct analysis of Dalvik bypasses malware’s obfuscation attempts ► No malware has been found that modifies Dalvik internals ► Technically possibly from native code, but extremely difficult to do anything complex Dalvik vs Native Analysis
  • 41. ► All major software encryption systems store encryption keys in memory ► The key is used to decrypt file data being read and encrypt file data being written ► Memory forensics can recover these keys Software-Based Encryption
  • 42. ► The following have tools and techniques published to recover keys from memory: ► Truecrypt ► BitLocker ► FileVault2 (Mac) ► Luks & dm-crypt (Linux, Android) Volume Encryption
  • 43. ► The following have tools and techniques published to recover keys from memory: ► PGP ► Truecrypt Containers ► <<A number of enterprise/commercial tools>> File-Based Encryption
  • 44. ► The protected media must be currently or very recently accessed/mounted for the key to be in memory ► Closed-source projects require reversing both of the in- memory key-storage and on-disk format ► Already done for Bitlocker and FileVault2 Limitations of Key Recovery
  • 45. ► Memory forensics recovers a wealth of evidence that is never stored to disk and is essential to many investigations ► Live forensics processes are outdated and trivially defeated/lied to by malware ► Modern malware avoids disk completely ► Will never find it if you pull the plug! ► The pain of encryption can be eased with memory forensics Conclusion
  • 46. ► Contact: ► andrew@memoryanalysis.net ► @attrc ► Volatility: ► http://volatility-labs.blogspot.com/ ► @volatility Questions/Comments?