SlideShare a Scribd company logo
1 of 20
Download to read offline
SHADOW FORENSICS
Forensics on Windows Volume Shadow
Copies

Yogesh Khatri
Volume Shadow Copy (VSC) in use
• VSC Enables the
 ‘Previous Versions’
 functionality in Windows 7

• Similar functionality called
 ‘File History’ is used in
 Windows 8
System Restore uses VSC
VSC
• Uses
  • Previous Versions/File History functionality
  • Create System Restore Points
  • Backup API for taking ‘Snapshots’ of files/folders/disk
     • Used by Windows Backup, Hyper-V, Virtual Server, Active Directory,
       SQL Server, Exchange Server & SharePoint
     • Used by backup software & AV for reading locked (in-use) files


• Implementation
   • Only for NTFS volumes
   • Volume ShadowCopy Service (VSS)
   • Included in Windows 2003 onwards including Windows 8
   • Not enabled by default on Windows 2008 or 2008 R2
Location of Backups/Restore Points
• Default
  • <Drive Letter>:System Volume Information




• Applications can use API to write to any location
Volume Shadow Copy
• C:System Volume Information




    Figure: ‘C:System Volume Information’ Folder viewed in Encase 6
Forensic Importance
• Shadow copies are the source data for Restore Points
  and the Restore Previous Versions features
• Shadow copies provide a “snapshot” of a volume at a
  particular time
• Shadow copies can show how files have been
  altered/modified
• Shadow copies can retain data that has subsequently
  been deleted, wiped, or encrypted
However...
Volume shadow copies DO NOT contain a complete image
of everything that was on the volume at the time the
shadow copy was made!




           Figure: Settings for VSC located in Registry at:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlBackupRestore
Basic Technical Details
• Volume shadow copies are bit level differential backups of
 a volume
  • NOT File level backups




                                                               Driver Stack
                                                       File

                                                      Volume
• Scheme
  • 16 KB blocks                                       Disk
  • Copy on write
  • Volume Shadow copy files are “difference” files
Copy-on-write illustration
                            Raw Disk blocks



   0         1          2         3           4   5              6

  16 KB                                               Info.txt
                 Amit.pdf
                  36 KB                                32 KB



                               Flier.PPT
                                10 KB
                                                  Operations
                                                  1. Edit & save Info.txt
   6         1          2          3          6
                                                  2. Delete Amit.pdf
                                                  3. Edit & save Info.txt
 Resulting VSC file has copies of only modified
                     blocks
Recreating the volume in time
   • VSC by itself does not have all data
     • Only modified blocks are saved
   • Need volume itself to recreate complete disk


  Volume
              0      1       2        3      4      5   6
  (NOW)


    VSC
              6      1       2        3      6
    data


  Volume
              0      1       2        3      4      5   6
(before all
operations)
VSC File Format
File                                                   Description
{3808876b-c176-4e48-b7ae-04046e6cc752}                 Catalog only

{GUID}{3808876b-c176-4e48-b7ae-04046e6cc752} Catalog and data




       HEADER           CATALOG                   DATA STORES



   Contains VSS Contains Shadow copy       Contains details of shadow copy
   identifier and GUIDS, creation times,   providers, host machine info,
   Catalog offset store offsets, etc..     volume bitmaps and the associated
                                           data
Browsing local shadow copies
Listing local Shadow copies
• Use the ‘vssadmin’ tool
List files in shadow copy
• Commands:
  vssadmin list shadows




  set shadow=?GLOBALROOTDeviceHarddiskvolumeshadowcopyxx
  for /R %shadow% %i in (*) do echo %i
      Or
  for /R %shadow% %i in (*) do echo %i>>"C:shadow.txt"
Investigate Shadow Copies from another
disk
• Commercial software
  • Use Encase Physical Disk Emulator and manual approach using
    command line / PowerShell
  • X-ways Forensic (XWF)
  • Shadow Scanner from EKL
  • Reconnoitre from Sanderson Forensics
  • ProDiscover
Investigate Shadow Copies from another
disk
• FREEWARE approach 1
  • Use FTK Imager to mount your evidence disk as a physical device
  • Add the mounted disk as a new Hard Disk to an existing Windows
    7 Virtual Machine (VM) in VMware Player (or VirtualBox)
  • Boot VM, now vssadmin should be able to see the snapshots
  • Use manual approach to list / parse / copy out



• FREEWARE approach 2
  • Use Joachim Metz’s libvshadow project
    (https://code.google.com/p/libvshadow/)
    • Mounts your shadow copies in a linux enviroment
FTK Imager + VMware
                      FTK Imager Mount Settings

                      VM settings (added new Hard
                                  Disk)
Questions
Thanks for listening!


More forensic articles, tips and scripts on my blog –
www.swiftforensics.com


       Yogesh Khatri
       Director, Training & Services
       W.H.S.
       yogesh.khatri@whitehats.in
       yogesh@swiftforensics.com
References
• libvshadow (https://code.google.com/p/libvshadow/)


• Volume Shadow Copy Service on MSDN
 (http://msdn.microsoft.com/en-
 us/library/windows/desktop/bb968832(v=vs.85).aspx)

• Harlan Carvey’s blog (http://windowsir.blogspot.com)

More Related Content

What's hot

Memory forensics
Memory forensicsMemory forensics
Memory forensics
Sunil Kumar
 
Information Security Principles - Access Control
Information Security  Principles -  Access ControlInformation Security  Principles -  Access Control
Information Security Principles - Access Control
idingolay
 
Computer forensics toolkit
Computer forensics toolkitComputer forensics toolkit
Computer forensics toolkit
Milap Oza
 
Encase V7 Presented by Guidance Software august 2011
Encase V7 Presented by Guidance Software   august 2011Encase V7 Presented by Guidance Software   august 2011
Encase V7 Presented by Guidance Software august 2011
CTIN
 
Windows 7 forensics event logs-dtl-r3
Windows 7 forensics event logs-dtl-r3Windows 7 forensics event logs-dtl-r3
Windows 7 forensics event logs-dtl-r3
CTIN
 

What's hot (20)

Understanding the Event Log
Understanding the Event LogUnderstanding the Event Log
Understanding the Event Log
 
Module 02 ftk imager
Module 02 ftk imagerModule 02 ftk imager
Module 02 ftk imager
 
Digital Forensic ppt
Digital Forensic pptDigital Forensic ppt
Digital Forensic ppt
 
Memory forensics
Memory forensicsMemory forensics
Memory forensics
 
Windows forensic
Windows forensicWindows forensic
Windows forensic
 
Forensic imaging tools
Forensic imaging tools Forensic imaging tools
Forensic imaging tools
 
6. Security Assessment and Testing
6. Security Assessment and Testing6. Security Assessment and Testing
6. Security Assessment and Testing
 
Registry Forensics
Registry ForensicsRegistry Forensics
Registry Forensics
 
Case study on Physical devices used in Computer forensics.
Case study on Physical devices used in Computer forensics.Case study on Physical devices used in Computer forensics.
Case study on Physical devices used in Computer forensics.
 
Introduction to forensic imaging
Introduction to forensic imagingIntroduction to forensic imaging
Introduction to forensic imaging
 
Introduction to computer forensic
Introduction to computer forensicIntroduction to computer forensic
Introduction to computer forensic
 
Memory forensics.pptx
Memory forensics.pptxMemory forensics.pptx
Memory forensics.pptx
 
Information Security Principles - Access Control
Information Security  Principles -  Access ControlInformation Security  Principles -  Access Control
Information Security Principles - Access Control
 
Computer forensics toolkit
Computer forensics toolkitComputer forensics toolkit
Computer forensics toolkit
 
Encase V7 Presented by Guidance Software august 2011
Encase V7 Presented by Guidance Software   august 2011Encase V7 Presented by Guidance Software   august 2011
Encase V7 Presented by Guidance Software august 2011
 
Extracting and Decoding Smartphone and Tablet Evidence with the UFED Series: ...
Extracting and Decoding Smartphone and Tablet Evidence with the UFED Series: ...Extracting and Decoding Smartphone and Tablet Evidence with the UFED Series: ...
Extracting and Decoding Smartphone and Tablet Evidence with the UFED Series: ...
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
 
Windows 7 forensics event logs-dtl-r3
Windows 7 forensics event logs-dtl-r3Windows 7 forensics event logs-dtl-r3
Windows 7 forensics event logs-dtl-r3
 
Présentation ELK/SIEM et démo Wazuh
Présentation ELK/SIEM et démo WazuhPrésentation ELK/SIEM et démo Wazuh
Présentation ELK/SIEM et démo Wazuh
 
Windows forensic artifacts
Windows forensic artifactsWindows forensic artifacts
Windows forensic artifacts
 

Similar to Shadow forensics print

Storage in windows server 2012
Storage in windows server 2012Storage in windows server 2012
Storage in windows server 2012
David De Vos
 
Deployment Strategy
Deployment StrategyDeployment Strategy
Deployment Strategy
MongoDB
 
VDI storage and storage virtualization
VDI storage and storage virtualizationVDI storage and storage virtualization
VDI storage and storage virtualization
Sisimon Soman
 
Windows 7 forensics -overview-r3
Windows 7 forensics -overview-r3Windows 7 forensics -overview-r3
Windows 7 forensics -overview-r3
CTIN
 

Similar to Shadow forensics print (20)

PC = Personal Cloud (or how to use your development machine with Vagrant and ...
PC = Personal Cloud (or how to use your development machine with Vagrant and ...PC = Personal Cloud (or how to use your development machine with Vagrant and ...
PC = Personal Cloud (or how to use your development machine with Vagrant and ...
 
Benefity Oracle Cloudu (3/4): Compute
Benefity Oracle Cloudu (3/4): ComputeBenefity Oracle Cloudu (3/4): Compute
Benefity Oracle Cloudu (3/4): Compute
 
The Unofficial VCAP / VCP VMware Study Guide
The Unofficial VCAP / VCP VMware Study GuideThe Unofficial VCAP / VCP VMware Study Guide
The Unofficial VCAP / VCP VMware Study Guide
 
Development with Qt for Windows CE
Development with Qt for Windows CEDevelopment with Qt for Windows CE
Development with Qt for Windows CE
 
Storage in windows server 2012
Storage in windows server 2012Storage in windows server 2012
Storage in windows server 2012
 
Road show 2015 triangle meetup
Road show 2015 triangle meetupRoad show 2015 triangle meetup
Road show 2015 triangle meetup
 
JUDCon 2010 Boston : BoxGrinder
JUDCon 2010 Boston : BoxGrinderJUDCon 2010 Boston : BoxGrinder
JUDCon 2010 Boston : BoxGrinder
 
DockerCon 2016 - Windows Server and Docker
DockerCon 2016 - Windows Server and DockerDockerCon 2016 - Windows Server and Docker
DockerCon 2016 - Windows Server and Docker
 
Windows Server and Docker - The Internals Behind Bringing Docker and Containe...
Windows Server and Docker - The Internals Behind Bringing Docker and Containe...Windows Server and Docker - The Internals Behind Bringing Docker and Containe...
Windows Server and Docker - The Internals Behind Bringing Docker and Containe...
 
Some key value stores using log-structure
Some key value stores using log-structureSome key value stores using log-structure
Some key value stores using log-structure
 
Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)
 
Virtualization VM VirtualBox + Oracle Enterprise Linux With Oracle 11GR2
Virtualization VM VirtualBox + Oracle Enterprise Linux With Oracle 11GR2Virtualization VM VirtualBox + Oracle Enterprise Linux With Oracle 11GR2
Virtualization VM VirtualBox + Oracle Enterprise Linux With Oracle 11GR2
 
PhegData X - High Performance EBS
PhegData X - High Performance EBSPhegData X - High Performance EBS
PhegData X - High Performance EBS
 
Deployment Strategy
Deployment StrategyDeployment Strategy
Deployment Strategy
 
VDI storage and storage virtualization
VDI storage and storage virtualizationVDI storage and storage virtualization
VDI storage and storage virtualization
 
Bare-metal, Docker Containers, and Virtualization: The Growing Choices for Cl...
Bare-metal, Docker Containers, and Virtualization: The Growing Choices for Cl...Bare-metal, Docker Containers, and Virtualization: The Growing Choices for Cl...
Bare-metal, Docker Containers, and Virtualization: The Growing Choices for Cl...
 
Windows 7 forensics -overview-r3
Windows 7 forensics -overview-r3Windows 7 forensics -overview-r3
Windows 7 forensics -overview-r3
 
Deployment Strategies
Deployment StrategiesDeployment Strategies
Deployment Strategies
 
VMworld 2013: IBM Solutions for VMware Virtual SAN
VMworld 2013: IBM Solutions for VMware Virtual SAN VMworld 2013: IBM Solutions for VMware Virtual SAN
VMworld 2013: IBM Solutions for VMware Virtual SAN
 
WTF my container just spawned a shell!
WTF my container just spawned a shell!WTF my container just spawned a shell!
WTF my container just spawned a shell!
 

More from n|u - The Open Security Community

More from n|u - The Open Security Community (20)

Hardware security testing 101 (Null - Delhi Chapter)
Hardware security testing 101 (Null - Delhi Chapter)Hardware security testing 101 (Null - Delhi Chapter)
Hardware security testing 101 (Null - Delhi Chapter)
 
Osint primer
Osint primerOsint primer
Osint primer
 
SSRF exploit the trust relationship
SSRF exploit the trust relationshipSSRF exploit the trust relationship
SSRF exploit the trust relationship
 
Nmap basics
Nmap basicsNmap basics
Nmap basics
 
Metasploit primary
Metasploit primaryMetasploit primary
Metasploit primary
 
Api security-testing
Api security-testingApi security-testing
Api security-testing
 
Introduction to TLS 1.3
Introduction to TLS 1.3Introduction to TLS 1.3
Introduction to TLS 1.3
 
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
 
Talking About SSRF,CRLF
Talking About SSRF,CRLFTalking About SSRF,CRLF
Talking About SSRF,CRLF
 
Building active directory lab for red teaming
Building active directory lab for red teamingBuilding active directory lab for red teaming
Building active directory lab for red teaming
 
Owning a company through their logs
Owning a company through their logsOwning a company through their logs
Owning a company through their logs
 
Introduction to shodan
Introduction to shodanIntroduction to shodan
Introduction to shodan
 
Cloud security
Cloud security Cloud security
Cloud security
 
Detecting persistence in windows
Detecting persistence in windowsDetecting persistence in windows
Detecting persistence in windows
 
Frida - Objection Tool Usage
Frida - Objection Tool UsageFrida - Objection Tool Usage
Frida - Objection Tool Usage
 
OSQuery - Monitoring System Process
OSQuery - Monitoring System ProcessOSQuery - Monitoring System Process
OSQuery - Monitoring System Process
 
DevSecOps Jenkins Pipeline -Security
DevSecOps Jenkins Pipeline -SecurityDevSecOps Jenkins Pipeline -Security
DevSecOps Jenkins Pipeline -Security
 
Extensible markup language attacks
Extensible markup language attacksExtensible markup language attacks
Extensible markup language attacks
 
Linux for hackers
Linux for hackersLinux for hackers
Linux for hackers
 
Android Pentesting
Android PentestingAndroid Pentesting
Android Pentesting
 

Shadow forensics print

  • 1. SHADOW FORENSICS Forensics on Windows Volume Shadow Copies Yogesh Khatri
  • 2. Volume Shadow Copy (VSC) in use • VSC Enables the ‘Previous Versions’ functionality in Windows 7 • Similar functionality called ‘File History’ is used in Windows 8
  • 4. VSC • Uses • Previous Versions/File History functionality • Create System Restore Points • Backup API for taking ‘Snapshots’ of files/folders/disk • Used by Windows Backup, Hyper-V, Virtual Server, Active Directory, SQL Server, Exchange Server & SharePoint • Used by backup software & AV for reading locked (in-use) files • Implementation • Only for NTFS volumes • Volume ShadowCopy Service (VSS) • Included in Windows 2003 onwards including Windows 8 • Not enabled by default on Windows 2008 or 2008 R2
  • 5. Location of Backups/Restore Points • Default • <Drive Letter>:System Volume Information • Applications can use API to write to any location
  • 6. Volume Shadow Copy • C:System Volume Information Figure: ‘C:System Volume Information’ Folder viewed in Encase 6
  • 7. Forensic Importance • Shadow copies are the source data for Restore Points and the Restore Previous Versions features • Shadow copies provide a “snapshot” of a volume at a particular time • Shadow copies can show how files have been altered/modified • Shadow copies can retain data that has subsequently been deleted, wiped, or encrypted
  • 8. However... Volume shadow copies DO NOT contain a complete image of everything that was on the volume at the time the shadow copy was made! Figure: Settings for VSC located in Registry at: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlBackupRestore
  • 9. Basic Technical Details • Volume shadow copies are bit level differential backups of a volume • NOT File level backups Driver Stack File Volume • Scheme • 16 KB blocks Disk • Copy on write • Volume Shadow copy files are “difference” files
  • 10. Copy-on-write illustration Raw Disk blocks 0 1 2 3 4 5 6 16 KB Info.txt Amit.pdf 36 KB 32 KB Flier.PPT 10 KB Operations 1. Edit & save Info.txt 6 1 2 3 6 2. Delete Amit.pdf 3. Edit & save Info.txt Resulting VSC file has copies of only modified blocks
  • 11. Recreating the volume in time • VSC by itself does not have all data • Only modified blocks are saved • Need volume itself to recreate complete disk Volume 0 1 2 3 4 5 6 (NOW) VSC 6 1 2 3 6 data Volume 0 1 2 3 4 5 6 (before all operations)
  • 12. VSC File Format File Description {3808876b-c176-4e48-b7ae-04046e6cc752} Catalog only {GUID}{3808876b-c176-4e48-b7ae-04046e6cc752} Catalog and data HEADER CATALOG DATA STORES Contains VSS Contains Shadow copy Contains details of shadow copy identifier and GUIDS, creation times, providers, host machine info, Catalog offset store offsets, etc.. volume bitmaps and the associated data
  • 14. Listing local Shadow copies • Use the ‘vssadmin’ tool
  • 15. List files in shadow copy • Commands: vssadmin list shadows set shadow=?GLOBALROOTDeviceHarddiskvolumeshadowcopyxx for /R %shadow% %i in (*) do echo %i Or for /R %shadow% %i in (*) do echo %i>>"C:shadow.txt"
  • 16. Investigate Shadow Copies from another disk • Commercial software • Use Encase Physical Disk Emulator and manual approach using command line / PowerShell • X-ways Forensic (XWF) • Shadow Scanner from EKL • Reconnoitre from Sanderson Forensics • ProDiscover
  • 17. Investigate Shadow Copies from another disk • FREEWARE approach 1 • Use FTK Imager to mount your evidence disk as a physical device • Add the mounted disk as a new Hard Disk to an existing Windows 7 Virtual Machine (VM) in VMware Player (or VirtualBox) • Boot VM, now vssadmin should be able to see the snapshots • Use manual approach to list / parse / copy out • FREEWARE approach 2 • Use Joachim Metz’s libvshadow project (https://code.google.com/p/libvshadow/) • Mounts your shadow copies in a linux enviroment
  • 18. FTK Imager + VMware FTK Imager Mount Settings VM settings (added new Hard Disk)
  • 19. Questions Thanks for listening! More forensic articles, tips and scripts on my blog – www.swiftforensics.com Yogesh Khatri Director, Training & Services W.H.S. yogesh.khatri@whitehats.in yogesh@swiftforensics.com
  • 20. References • libvshadow (https://code.google.com/p/libvshadow/) • Volume Shadow Copy Service on MSDN (http://msdn.microsoft.com/en- us/library/windows/desktop/bb968832(v=vs.85).aspx) • Harlan Carvey’s blog (http://windowsir.blogspot.com)