SlideShare a Scribd company logo
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

PPT
Preserving and recovering digital evidence
PDF
Supply chain-attack
PPTX
Cyber Forensics Overview
PPTX
Digital forensics
PPTX
Computer forensic ppt
PPTX
Cyber forensics ppt
PPT
Software security
PPTX
Data Acquisition
Preserving and recovering digital evidence
Supply chain-attack
Cyber Forensics Overview
Digital forensics
Computer forensic ppt
Cyber forensics ppt
Software security
Data Acquisition

What's hot (20)

PPTX
Steganography
PDF
03 Data Recovery - Notes
PPT
Windowsforensics
PPTX
Memory forensics
PDF
Machine Learning Approaches for Crime Pattern Detection
PPTX
Incident response process
PPT
Digital Forensics
PPTX
Digital forensic tools
PPTX
Email investigation
PPTX
Computer forensics toolkit
PPT
Linux forensics
PPT
Digital Forensic
PPTX
Aspect Based Sentiment analysis of Afaan Oromoo Movie reviews using machine l...
PPTX
Difference between Cyber and digital Forensic.pptx
PPTX
Digital forensics
PPTX
Mobile Forensics
PPTX
Digital Evidence by Raghu Khimani
PPTX
Intrusion detection system
PPTX
Memory forensics.pptx
PPTX
Computer crimes and forensics
Steganography
03 Data Recovery - Notes
Windowsforensics
Memory forensics
Machine Learning Approaches for Crime Pattern Detection
Incident response process
Digital Forensics
Digital forensic tools
Email investigation
Computer forensics toolkit
Linux forensics
Digital Forensic
Aspect Based Sentiment analysis of Afaan Oromoo Movie reviews using machine l...
Difference between Cyber and digital Forensic.pptx
Digital forensics
Mobile Forensics
Digital Evidence by Raghu Khimani
Intrusion detection system
Memory forensics.pptx
Computer crimes and forensics
Ad

Similar to Shadow forensics print (20)

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

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

PDF
Hardware security testing 101 (Null - Delhi Chapter)
PPTX
SSRF exploit the trust relationship
PDF
PDF
Api security-testing
PDF
Introduction to TLS 1.3
PDF
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
PDF
Talking About SSRF,CRLF
PPTX
Building active directory lab for red teaming
PPTX
Owning a company through their logs
PPTX
Introduction to shodan
PDF
Detecting persistence in windows
PPTX
Frida - Objection Tool Usage
PDF
OSQuery - Monitoring System Process
PDF
DevSecOps Jenkins Pipeline -Security
PDF
Extensible markup language attacks
PPTX
PDF
Hardware security testing 101 (Null - Delhi Chapter)
SSRF exploit the trust relationship
Api security-testing
Introduction to TLS 1.3
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
Talking About SSRF,CRLF
Building active directory lab for red teaming
Owning a company through their logs
Introduction to shodan
Detecting persistence in windows
Frida - Objection Tool Usage
OSQuery - Monitoring System Process
DevSecOps Jenkins Pipeline -Security
Extensible markup language attacks

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)