SlideShare uma empresa Scribd logo
1 de 25
Baixar para ler offline
Linux Memory Analysis with Volatility


               Andrew Case
        Digital Forensics Solutions
Purpose of the Talk
• To highlight the Linux analysis capabilities
  integrated into the Volatility framework within
  the last year
• Some of it is implementation of previously
  published works
• The rest is previously never disclosed analysis
  techniques
  – Mostly related to advanced rootkit detection


                                                   2
The General Plugins
• The goal of the general plugins is to recreate
  the set of commands that would be run on a
  Linux system to investigate activity and
  possible compromise
• Recovery of this information has been covered
  in a number of publications by a wide range of
  authors [1]



                                               3
Recovered Process Information
• Process listing (ps aux)
  – Command line arguments are retrieved from
    userland
• Memory Maps (/proc/<pid>/maps)
  – Can also recover (to disk) specific address ranges
• Open Files (/proc/<pid>/fd)




                                                         4
Recovered Networking Information
•   Network interface information (ifconfig)
•   Open and listening sockets (netstat)
•   ARP tables (arp –a)
•   Routing table (route –n)
•   Routing cache (route –C)
•   Queued Packets
•   Netfilter NAT table (/proc/net/nf_conntrack)
    – Src/Dst IP, # of packets sent, and total bytes for
      each NAT’d connection

                                                           5
Recovered Misc. Information
•   Kernel debug buffer (dmesg)
•   Loaded kernel modules (lsmod)
•   Mounted filesystems (mount, /proc/mounts)
•   CPU Info (/proc/cpuinfo)




                                                6
Recovering Historical Information




                                    7
Recovering Historical Information
• Implemented using the kmem_cache analysis
  presented at DFRWS last year [2]
• Briefly, the kmem_cache:
  – Provides a consistent and fast interface to allocate
    objects (C structures) of the same size
  – Keep freelists of previously allocated objects for
    fast allocation
• Walking the freelists provides an orderly
  method to recover previous structures

                                                           8
Results of kmem_cache Analysis
• Can recover a number of useful structures:
  – Processes
  – Memory Maps
  – Networking Information
  – See /proc/slabinfo
• Two limitations:
  – The aggressiveness of the allocator (SLAB / SLUB)
    when removing freelists
  – Needed references being set to NULL or freed on
    deallocation
                                                        9
Rootkit Detection Techniques




                               10
Rootkit Detection Techniques
• Volatility, as well as other projects, has the
  ability to detect boring rootkits techniques:
  – Code (.text) overwriting
  – System Call/IDT hijacking
• Volatility is the only public project to be able
  to detect advanced, data modification-only
  techniques



                                                     11
Leveraging kmem_cache (again)
• We previously discussed using the freelists to
  find historical data
• Can also use the allocated lists to find all
  instances of a particular structure
  – The one caveat is SLUB without debugging on
  – Every distro checked enables SLUB debugging
  – Might be possible to find all references even with
    debugging off


                                                         12
The Idea Behind the Detection
• Dynamic-data rootkit methods work by
  removing structures from lists, hash tables,
  and other data structures
• To detect this tampering, we can take a
  particular cache instance and use this as a
  cross-reference to other stores
• Any structure in the kmem_cache list, but not
  in another, is hidden
  – Inverse holds as well

                                                  13
Live CD Analysis




                   14
Live CD Analysis
• Live CDs present a problem for investigators as
  they run entirely in RAM
  – No disk or filesystem(s) to do forensics analysis on
• Privacy / Anti-Forensics people are aware of
  this – see [5]
  – TAILs privacy live CD that forces all network
    through TOR and discusses avoiding disk forensics
• … but the filesystem is memory!
  – Memory analysis can recover the entire filesystem

                                                       15
Live CD Filesystems
• Live CDs use a stackable filesystem that
  merges multiple filesystems into one view for
  the OS/users
• Live CDs use this to boot off a read-only CD
  and then store all changes in an in-memory
  filesystem (tmpfs)
• Recovery of the in-memory filesystem finds all
  the created & modified files since system boot
  – Immediately reveals the user’s activities
                                                16
Recovering the Filesystem
• Complete details are in [4]
• The recovery plugin recovers the in-memory
  filesystem and writes it to disk
  – Gathers metadata such as MAC times*,
    owner/group, etc
• The recovered FS can be written to a disk
  image using loopback or to other media and
  then mounted read-only for normal
  investigation
                                               17
Android Analysis




                   18
Android Analysis
• If you didn’t know, Android runs Linux
  – Means we can analyze it using similar techniques
• Volatility contains two analysis parts:
  1. Kernel Analysis
  2. Dalvik Analysis




                                                       19
Kernel Analysis
• Same capabilities as discussed throughout
  presentation
• “Porting” to Android (ARM) from Intel only
  required adding an “address space” for the
  architecture
  – Address spaces handle virtual address to physical
    offset translation




                                                        20
Dalvik Analysis
• Dalvik is the software VM for Android
  – Very similar to the JVM
  – Controls all Android applications
• I recently presented on analyzing Dalvik memory
  captures to gather application-specific data [6]
  –   Call Information
  –   Text messages
  –   Emails
  –   And so on…

                                                     21
Listing Instance Members
Source file: ComposeMessageActivity.java
Class: Lcom/android/mms/ui/ComposeMessageActivity;
Instance Fields:
   name:      m_receiver
   signature: Landroid/content/BroadcastReceiver;

  name:      m_filter
  signature: Landroid/content/IntentFilter;

  name:      mAppContext
  signature: Landroid/content/Context;

  name:     mAvailableDirPath
  signature: Ljava/lang/String;

                                                     22
Conclusion
• Volatility Linux lives!
   – See the linux-support branch in SVN
   – Support tested on Intel Linux 2.6.9 to 2.6.3x
   – Android/ARM tested on a number of phones
      • Feel free to send me Android tablets if you want
        specific support for them ;)
• Hopefully will have a proper release with all
  the discussed features within the next few
  months

                                                           23
Questions/Comments?
• Contact:
  – andrew@digdeeply.com
  – @attrc




                              24
References
[1] http://4tphi.net/fatkit/
[2] http://dfrws.org/2010/proceedings/2010-305.pdf
[3] http://www.cc.gatech.edu/~brendan/ccs09_siggen.pdf
[4] https://media.blackhat.com/bh-dc-
   11/Case/BlackHat_DC_2011_Case_De-Anonymizing_Live_CDs-
   wp.pdf
[5] http://tails.boum.org/
[6] http://digitalforensicssolutions.com/papers/android-memory-
   analysis.pdf




                                                                  25

Mais conteúdo relacionado

Mais procurados

Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
Ni Zo-Ma
 
Linux Kernel Image
Linux Kernel ImageLinux Kernel Image
Linux Kernel Image
艾鍗科技
 

Mais procurados (20)

Linux Initialization Process (1)
Linux Initialization Process (1)Linux Initialization Process (1)
Linux Initialization Process (1)
 
QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?
 
Performance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux KernelPerformance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux Kernel
 
Physical Memory Management.pdf
Physical Memory Management.pdfPhysical Memory Management.pdf
Physical Memory Management.pdf
 
LAS16-403: GDB Linux Kernel Awareness
LAS16-403: GDB Linux Kernel AwarenessLAS16-403: GDB Linux Kernel Awareness
LAS16-403: GDB Linux Kernel Awareness
 
Slab Allocator in Linux Kernel
Slab Allocator in Linux KernelSlab Allocator in Linux Kernel
Slab Allocator in Linux Kernel
 
Linux Crash Dump Capture and Analysis
Linux Crash Dump Capture and AnalysisLinux Crash Dump Capture and Analysis
Linux Crash Dump Capture and Analysis
 
U-Boot - An universal bootloader
U-Boot - An universal bootloader U-Boot - An universal bootloader
U-Boot - An universal bootloader
 
qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...
qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...
qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...
 
LCA14: LCA14-306: CPUidle & CPUfreq integration with scheduler
LCA14: LCA14-306: CPUidle & CPUfreq integration with schedulerLCA14: LCA14-306: CPUidle & CPUfreq integration with scheduler
LCA14: LCA14-306: CPUidle & CPUfreq integration with scheduler
 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
 
Syslog
SyslogSyslog
Syslog
 
Linux memory-management-kamal
Linux memory-management-kamalLinux memory-management-kamal
Linux memory-management-kamal
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
 
Memory management in Linux kernel
Memory management in Linux kernelMemory management in Linux kernel
Memory management in Linux kernel
 
Linux Kernel Image
Linux Kernel ImageLinux Kernel Image
Linux Kernel Image
 
Linux Memory Management with CMA (Contiguous Memory Allocator)
Linux Memory Management with CMA (Contiguous Memory Allocator)Linux Memory Management with CMA (Contiguous Memory Allocator)
Linux Memory Management with CMA (Contiguous Memory Allocator)
 
Linux Kernel Crashdump
Linux Kernel CrashdumpLinux Kernel Crashdump
Linux Kernel Crashdump
 
U boot-boot-flow
U boot-boot-flowU boot-boot-flow
U boot-boot-flow
 
malloc & vmalloc in Linux
malloc & vmalloc in Linuxmalloc & vmalloc in Linux
malloc & vmalloc in Linux
 

Destaque

Memory forensics
Memory forensicsMemory forensics
Memory forensics
Sunil Kumar
 

Destaque (9)

De-Anonymizing Live CDs through Physical Memory Analysis
De-Anonymizing Live CDs through Physical Memory AnalysisDe-Anonymizing Live CDs through Physical Memory Analysis
De-Anonymizing Live CDs through Physical Memory Analysis
 
Investigating Cooridinated Data Exfiltration
Investigating Cooridinated Data ExfiltrationInvestigating Cooridinated Data Exfiltration
Investigating Cooridinated Data Exfiltration
 
Memory forensics and incident response
Memory forensics and incident responseMemory forensics and incident response
Memory forensics and incident response
 
katagaitaictf7_hw_ysk
katagaitaictf7_hw_yskkatagaitaictf7_hw_ysk
katagaitaictf7_hw_ysk
 
(120513) #fitalk an introduction to linux memory forensics
(120513) #fitalk   an introduction to linux memory forensics(120513) #fitalk   an introduction to linux memory forensics
(120513) #fitalk an introduction to linux memory forensics
 
Memory forensics
Memory forensicsMemory forensics
Memory forensics
 
REMnux tutorial-2: Extraction and decoding of Artifacts
REMnux tutorial-2: Extraction and decoding of ArtifactsREMnux tutorial-2: Extraction and decoding of Artifacts
REMnux tutorial-2: Extraction and decoding of Artifacts
 
katagaitai CTF 勉強会 #5 -関東 |med おまけ問題 Parlor (Plaid CTF 2014) @m1z0r3勉強会
katagaitai CTF 勉強会 #5 -関東 |med おまけ問題 Parlor (Plaid CTF 2014) @m1z0r3勉強会katagaitai CTF 勉強会 #5 -関東 |med おまけ問題 Parlor (Plaid CTF 2014) @m1z0r3勉強会
katagaitai CTF 勉強会 #5 -関東 |med おまけ問題 Parlor (Plaid CTF 2014) @m1z0r3勉強会
 
katagaitai CTF勉強会 #5 Crypto
katagaitai CTF勉強会 #5 Cryptokatagaitai CTF勉強会 #5 Crypto
katagaitai CTF勉強会 #5 Crypto
 

Semelhante a Linux Memory Analysis with Volatility

Linux操作系统01 简介
Linux操作系统01 简介Linux操作系统01 简介
Linux操作系统01 简介
lclsg123
 

Semelhante a Linux Memory Analysis with Volatility (20)

Mac Memory Analysis with Volatility
Mac Memory Analysis with VolatilityMac Memory Analysis with Volatility
Mac Memory Analysis with Volatility
 
Memory Analysis of the Dalvik (Android) Virtual Machine
Memory Analysis of the Dalvik (Android) Virtual MachineMemory Analysis of the Dalvik (Android) Virtual Machine
Memory Analysis of the Dalvik (Android) Virtual Machine
 
Workshop - Linux Memory Analysis with Volatility
Workshop - Linux Memory Analysis with VolatilityWorkshop - Linux Memory Analysis with Volatility
Workshop - Linux Memory Analysis with Volatility
 
Hands on kubernetes_container_orchestration
Hands on kubernetes_container_orchestrationHands on kubernetes_container_orchestration
Hands on kubernetes_container_orchestration
 
Embedded system - embedded system programming
Embedded system - embedded system programmingEmbedded system - embedded system programming
Embedded system - embedded system programming
 
First steps on CentOs7
First steps on CentOs7First steps on CentOs7
First steps on CentOs7
 
Linux High Availability Overview - openSUSE.Asia Summit 2015
Linux High Availability Overview - openSUSE.Asia Summit 2015 Linux High Availability Overview - openSUSE.Asia Summit 2015
Linux High Availability Overview - openSUSE.Asia Summit 2015
 
Hdfs architecture
Hdfs architectureHdfs architecture
Hdfs architecture
 
Case study operating systems
Case study operating systemsCase study operating systems
Case study operating systems
 
Unraveling Docker Security: Lessons From a Production Cloud
Unraveling Docker Security: Lessons From a Production CloudUnraveling Docker Security: Lessons From a Production Cloud
Unraveling Docker Security: Lessons From a Production Cloud
 
Tokyo OpenStack Summit 2015: Unraveling Docker Security
Tokyo OpenStack Summit 2015: Unraveling Docker SecurityTokyo OpenStack Summit 2015: Unraveling Docker Security
Tokyo OpenStack Summit 2015: Unraveling Docker Security
 
Linux io introduction-fudcon-2015-with-demo-slides
Linux io introduction-fudcon-2015-with-demo-slidesLinux io introduction-fudcon-2015-with-demo-slides
Linux io introduction-fudcon-2015-with-demo-slides
 
Securing Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container PlatformSecuring Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container Platform
 
Linux Container Brief for IEEE WG P2302
Linux Container Brief for IEEE WG P2302Linux Container Brief for IEEE WG P2302
Linux Container Brief for IEEE WG P2302
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-review
 
Securing Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container PlatformSecuring Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container Platform
 
Linux操作系统01 简介
Linux操作系统01 简介Linux操作系统01 简介
Linux操作系统01 简介
 
Ganesh naik linux_kernel_internals
Ganesh naik linux_kernel_internalsGanesh naik linux_kernel_internals
Ganesh naik linux_kernel_internals
 
Ganesh naik linux_kernel_internals
Ganesh naik linux_kernel_internalsGanesh naik linux_kernel_internals
Ganesh naik linux_kernel_internals
 
CNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X SystemsCNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X Systems
 

Mais de Andrew Case

Mais de Andrew Case (6)

Proactive Measures to Defeat Insider Threat
Proactive Measures to Defeat Insider ThreatProactive Measures to Defeat Insider Threat
Proactive Measures to Defeat Insider Threat
 
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)
 
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
 
Memory Forensics: Defeating Disk Encryption, Skilled Attackers, and Advanced ...
Memory Forensics: Defeating Disk Encryption, Skilled Attackers, and Advanced ...Memory Forensics: Defeating Disk Encryption, Skilled Attackers, and Advanced ...
Memory Forensics: Defeating Disk Encryption, Skilled Attackers, and Advanced ...
 
Hunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory ForensicsHunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory Forensics
 
My Keynote from BSidesTampa 2015 (video in description)
My Keynote from BSidesTampa 2015 (video in description)My Keynote from BSidesTampa 2015 (video in description)
My Keynote from BSidesTampa 2015 (video in description)
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

Linux Memory Analysis with Volatility

  • 1. Linux Memory Analysis with Volatility Andrew Case Digital Forensics Solutions
  • 2. Purpose of the Talk • To highlight the Linux analysis capabilities integrated into the Volatility framework within the last year • Some of it is implementation of previously published works • The rest is previously never disclosed analysis techniques – Mostly related to advanced rootkit detection 2
  • 3. The General Plugins • The goal of the general plugins is to recreate the set of commands that would be run on a Linux system to investigate activity and possible compromise • Recovery of this information has been covered in a number of publications by a wide range of authors [1] 3
  • 4. Recovered Process Information • Process listing (ps aux) – Command line arguments are retrieved from userland • Memory Maps (/proc/<pid>/maps) – Can also recover (to disk) specific address ranges • Open Files (/proc/<pid>/fd) 4
  • 5. Recovered Networking Information • Network interface information (ifconfig) • Open and listening sockets (netstat) • ARP tables (arp –a) • Routing table (route –n) • Routing cache (route –C) • Queued Packets • Netfilter NAT table (/proc/net/nf_conntrack) – Src/Dst IP, # of packets sent, and total bytes for each NAT’d connection 5
  • 6. Recovered Misc. Information • Kernel debug buffer (dmesg) • Loaded kernel modules (lsmod) • Mounted filesystems (mount, /proc/mounts) • CPU Info (/proc/cpuinfo) 6
  • 8. Recovering Historical Information • Implemented using the kmem_cache analysis presented at DFRWS last year [2] • Briefly, the kmem_cache: – Provides a consistent and fast interface to allocate objects (C structures) of the same size – Keep freelists of previously allocated objects for fast allocation • Walking the freelists provides an orderly method to recover previous structures 8
  • 9. Results of kmem_cache Analysis • Can recover a number of useful structures: – Processes – Memory Maps – Networking Information – See /proc/slabinfo • Two limitations: – The aggressiveness of the allocator (SLAB / SLUB) when removing freelists – Needed references being set to NULL or freed on deallocation 9
  • 11. Rootkit Detection Techniques • Volatility, as well as other projects, has the ability to detect boring rootkits techniques: – Code (.text) overwriting – System Call/IDT hijacking • Volatility is the only public project to be able to detect advanced, data modification-only techniques 11
  • 12. Leveraging kmem_cache (again) • We previously discussed using the freelists to find historical data • Can also use the allocated lists to find all instances of a particular structure – The one caveat is SLUB without debugging on – Every distro checked enables SLUB debugging – Might be possible to find all references even with debugging off 12
  • 13. The Idea Behind the Detection • Dynamic-data rootkit methods work by removing structures from lists, hash tables, and other data structures • To detect this tampering, we can take a particular cache instance and use this as a cross-reference to other stores • Any structure in the kmem_cache list, but not in another, is hidden – Inverse holds as well 13
  • 15. Live CD Analysis • Live CDs present a problem for investigators as they run entirely in RAM – No disk or filesystem(s) to do forensics analysis on • Privacy / Anti-Forensics people are aware of this – see [5] – TAILs privacy live CD that forces all network through TOR and discusses avoiding disk forensics • … but the filesystem is memory! – Memory analysis can recover the entire filesystem 15
  • 16. Live CD Filesystems • Live CDs use a stackable filesystem that merges multiple filesystems into one view for the OS/users • Live CDs use this to boot off a read-only CD and then store all changes in an in-memory filesystem (tmpfs) • Recovery of the in-memory filesystem finds all the created & modified files since system boot – Immediately reveals the user’s activities 16
  • 17. Recovering the Filesystem • Complete details are in [4] • The recovery plugin recovers the in-memory filesystem and writes it to disk – Gathers metadata such as MAC times*, owner/group, etc • The recovered FS can be written to a disk image using loopback or to other media and then mounted read-only for normal investigation 17
  • 19. Android Analysis • If you didn’t know, Android runs Linux – Means we can analyze it using similar techniques • Volatility contains two analysis parts: 1. Kernel Analysis 2. Dalvik Analysis 19
  • 20. Kernel Analysis • Same capabilities as discussed throughout presentation • “Porting” to Android (ARM) from Intel only required adding an “address space” for the architecture – Address spaces handle virtual address to physical offset translation 20
  • 21. Dalvik Analysis • Dalvik is the software VM for Android – Very similar to the JVM – Controls all Android applications • I recently presented on analyzing Dalvik memory captures to gather application-specific data [6] – Call Information – Text messages – Emails – And so on… 21
  • 22. Listing Instance Members Source file: ComposeMessageActivity.java Class: Lcom/android/mms/ui/ComposeMessageActivity; Instance Fields: name: m_receiver signature: Landroid/content/BroadcastReceiver; name: m_filter signature: Landroid/content/IntentFilter; name: mAppContext signature: Landroid/content/Context; name: mAvailableDirPath signature: Ljava/lang/String; 22
  • 23. Conclusion • Volatility Linux lives! – See the linux-support branch in SVN – Support tested on Intel Linux 2.6.9 to 2.6.3x – Android/ARM tested on a number of phones • Feel free to send me Android tablets if you want specific support for them ;) • Hopefully will have a proper release with all the discussed features within the next few months 23
  • 24. Questions/Comments? • Contact: – andrew@digdeeply.com – @attrc 24
  • 25. References [1] http://4tphi.net/fatkit/ [2] http://dfrws.org/2010/proceedings/2010-305.pdf [3] http://www.cc.gatech.edu/~brendan/ccs09_siggen.pdf [4] https://media.blackhat.com/bh-dc- 11/Case/BlackHat_DC_2011_Case_De-Anonymizing_Live_CDs- wp.pdf [5] http://tails.boum.org/ [6] http://digitalforensicssolutions.com/papers/android-memory- analysis.pdf 25