SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to filesystems and computer forensics
Introduction to filesystems and computer forensicsIntroduction to filesystems and computer forensics
Introduction to filesystems and computer forensicsMayank Chaudhari
 
Next Generation Memory Forensics
Next Generation Memory ForensicsNext Generation Memory Forensics
Next Generation Memory ForensicsAndrew Case
 
Mac Forensics
Mac ForensicsMac Forensics
Mac ForensicsCTIN
 
Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...
Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...
Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...Sam Bowne
 
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 NLKBshimosawa
 
06. security concept
06. security concept06. security concept
06. security conceptMuhammad Ahad
 
Memory forensics.pptx
Memory forensics.pptxMemory forensics.pptx
Memory forensics.pptx9905234521
 
Practical Malware Analysis Ch 14: Malware-Focused Network Signatures
Practical Malware Analysis Ch 14: Malware-Focused Network SignaturesPractical Malware Analysis Ch 14: Malware-Focused Network Signatures
Practical Malware Analysis Ch 14: Malware-Focused Network SignaturesSam Bowne
 
Aujas incident management webinar deck 08162016
Aujas incident management webinar deck 08162016Aujas incident management webinar deck 08162016
Aujas incident management webinar deck 08162016Karl Kispert
 
computer forensic tools-Hardware & Software tools
computer forensic tools-Hardware & Software toolscomputer forensic tools-Hardware & Software tools
computer forensic tools-Hardware & Software toolsN.Jagadish Kumar
 
Lecture4 Windows System Artifacts.pptx
Lecture4 Windows System Artifacts.pptxLecture4 Windows System Artifacts.pptx
Lecture4 Windows System Artifacts.pptxGaganvirKaur
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in LinuxHenry Osborne
 
Virus and Malicious Code Chapter 5
Virus and Malicious Code Chapter 5Virus and Malicious Code Chapter 5
Virus and Malicious Code Chapter 5AfiqEfendy Zaen
 
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static TechniquesCNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static TechniquesSam Bowne
 

Was ist angesagt? (20)

CS6004 Cyber Forensics
CS6004 Cyber ForensicsCS6004 Cyber Forensics
CS6004 Cyber Forensics
 
Introduction to filesystems and computer forensics
Introduction to filesystems and computer forensicsIntroduction to filesystems and computer forensics
Introduction to filesystems and computer forensics
 
Next Generation Memory Forensics
Next Generation Memory ForensicsNext Generation Memory Forensics
Next Generation Memory Forensics
 
Mac Forensics
Mac ForensicsMac Forensics
Mac Forensics
 
Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...
Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...
Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...
 
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
 
Metasploitable
MetasploitableMetasploitable
Metasploitable
 
Understanding NMAP
Understanding NMAPUnderstanding NMAP
Understanding NMAP
 
06. security concept
06. security concept06. security concept
06. security concept
 
Intrusion Prevention System
Intrusion Prevention SystemIntrusion Prevention System
Intrusion Prevention System
 
Memory forensics.pptx
Memory forensics.pptxMemory forensics.pptx
Memory forensics.pptx
 
Practical Malware Analysis Ch 14: Malware-Focused Network Signatures
Practical Malware Analysis Ch 14: Malware-Focused Network SignaturesPractical Malware Analysis Ch 14: Malware-Focused Network Signatures
Practical Malware Analysis Ch 14: Malware-Focused Network Signatures
 
Aujas incident management webinar deck 08162016
Aujas incident management webinar deck 08162016Aujas incident management webinar deck 08162016
Aujas incident management webinar deck 08162016
 
computer forensic tools-Hardware & Software tools
computer forensic tools-Hardware & Software toolscomputer forensic tools-Hardware & Software tools
computer forensic tools-Hardware & Software tools
 
Linux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
 
Lecture4 Windows System Artifacts.pptx
Lecture4 Windows System Artifacts.pptxLecture4 Windows System Artifacts.pptx
Lecture4 Windows System Artifacts.pptx
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in Linux
 
Virus and Malicious Code Chapter 5
Virus and Malicious Code Chapter 5Virus and Malicious Code Chapter 5
Virus and Malicious Code Chapter 5
 
Current Forensic Tools
Current Forensic Tools Current Forensic Tools
Current Forensic Tools
 
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static TechniquesCNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
 

Andere mochten auch

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 AnalysisAndrew Case
 
Investigating Cooridinated Data Exfiltration
Investigating Cooridinated Data ExfiltrationInvestigating Cooridinated Data Exfiltration
Investigating Cooridinated Data ExfiltrationAndrew Case
 
katagaitaictf7_hw_ysk
katagaitaictf7_hw_yskkatagaitaictf7_hw_ysk
katagaitaictf7_hw_yskysk256
 
(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 forensicsINSIGHT FORENSIC
 
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 ArtifactsRhydham Joshi
 
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勉強会sonickun
 
katagaitai CTF勉強会 #5 Crypto
katagaitai CTF勉強会 #5 Cryptokatagaitai CTF勉強会 #5 Crypto
katagaitai CTF勉強会 #5 Cryptotrmr
 

Andere mochten auch (8)

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

Ähnlich wie Linux Memory Analysis with Volatility

Mac Memory Analysis with Volatility
Mac Memory Analysis with VolatilityMac Memory Analysis with Volatility
Mac Memory Analysis with VolatilityAndrew Case
 
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 MachineAndrew Case
 
Workshop - Linux Memory Analysis with Volatility
Workshop - Linux Memory Analysis with VolatilityWorkshop - Linux Memory Analysis with Volatility
Workshop - Linux Memory Analysis with VolatilityAndrew Case
 
Hands on kubernetes_container_orchestration
Hands on kubernetes_container_orchestrationHands on kubernetes_container_orchestration
Hands on kubernetes_container_orchestrationAmir Hossein Sorouri
 
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 Roger Zhou 周志强
 
Case study operating systems
Case study operating systemsCase study operating systems
Case study operating systemsAkhil Bevara
 
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 CloudSalman Baset
 
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 SecurityPhil Estes
 
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-slidesKASHISH BHATIA
 
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 PlatformAll Things Open
 
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 P2302Boden Russell
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-reviewabinaya m
 
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 PlatformAll Things Open
 
Linux操作系统01 简介
Linux操作系统01 简介Linux操作系统01 简介
Linux操作系统01 简介lclsg123
 
Ganesh naik linux_kernel_internals
Ganesh naik linux_kernel_internalsGanesh naik linux_kernel_internals
Ganesh naik linux_kernel_internalsnullowaspmumbai
 
Ganesh naik linux_kernel_internals
Ganesh naik linux_kernel_internalsGanesh naik linux_kernel_internals
Ganesh naik linux_kernel_internalsGanesh Naik
 
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 SystemsSam Bowne
 

Ähnlich wie 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
 

Mehr von Andrew Case

Proactive Measures to Defeat Insider Threat
Proactive Measures to Defeat Insider ThreatProactive Measures to Defeat Insider Threat
Proactive Measures to Defeat Insider ThreatAndrew Case
 
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
 
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 VolatlityAndrew Case
 
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 ...Andrew Case
 
Hunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory ForensicsHunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory ForensicsAndrew Case
 
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)Andrew Case
 

Mehr von 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)
 

Kürzlich hochgeladen

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Kürzlich hochgeladen (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

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