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

Network forensics and investigating logs
Network forensics and investigating logsNetwork forensics and investigating logs
Network forensics and investigating logsanilinvns
 
Anti forensic
Anti forensicAnti forensic
Anti forensicMilap Oza
 
CNIT 121: 8 Forensic Duplication
CNIT 121: 8 Forensic DuplicationCNIT 121: 8 Forensic Duplication
CNIT 121: 8 Forensic DuplicationSam Bowne
 
Anti-Forensics: Real world identification, analysis and prevention
Anti-Forensics: Real world identification, analysis and preventionAnti-Forensics: Real world identification, analysis and prevention
Anti-Forensics: Real world identification, analysis and preventionSeccuris Inc.
 
Operating Systems: Computer Security
Operating Systems: Computer SecurityOperating Systems: Computer Security
Operating Systems: Computer SecurityDamian T. Gordon
 
Logging, monitoring and auditing
Logging, monitoring and auditingLogging, monitoring and auditing
Logging, monitoring and auditingPiyush Jain
 
Secure electronic transaction ppt
Secure electronic transaction pptSecure electronic transaction ppt
Secure electronic transaction pptSubhash Gupta
 
NETWORK SECURITY
NETWORK SECURITYNETWORK SECURITY
NETWORK SECURITYafaque jaya
 
Memory forensics
Memory forensicsMemory forensics
Memory forensicsSunil Kumar
 
Linux Memory Analysis with Volatility
Linux Memory Analysis with VolatilityLinux Memory Analysis with Volatility
Linux Memory Analysis with VolatilityAndrew Case
 
Intrusion detection system ppt
Intrusion detection system pptIntrusion detection system ppt
Intrusion detection system pptSheetal Verma
 

What's hot (20)

Network forensics and investigating logs
Network forensics and investigating logsNetwork forensics and investigating logs
Network forensics and investigating logs
 
Anti forensic
Anti forensicAnti forensic
Anti forensic
 
Browser forensics
Browser forensicsBrowser forensics
Browser forensics
 
Data Acquisition
Data AcquisitionData Acquisition
Data Acquisition
 
CNIT 121: 8 Forensic Duplication
CNIT 121: 8 Forensic DuplicationCNIT 121: 8 Forensic Duplication
CNIT 121: 8 Forensic Duplication
 
computer forensics
computer forensicscomputer forensics
computer forensics
 
Windowsforensics
WindowsforensicsWindowsforensics
Windowsforensics
 
Anti-Forensics: Real world identification, analysis and prevention
Anti-Forensics: Real world identification, analysis and preventionAnti-Forensics: Real world identification, analysis and prevention
Anti-Forensics: Real world identification, analysis and prevention
 
Operating Systems: Computer Security
Operating Systems: Computer SecurityOperating Systems: Computer Security
Operating Systems: Computer Security
 
Linux forensics
Linux forensicsLinux forensics
Linux forensics
 
Logging, monitoring and auditing
Logging, monitoring and auditingLogging, monitoring and auditing
Logging, monitoring and auditing
 
Secure electronic transaction ppt
Secure electronic transaction pptSecure electronic transaction ppt
Secure electronic transaction ppt
 
NETWORK SECURITY
NETWORK SECURITYNETWORK SECURITY
NETWORK SECURITY
 
Memory forensics
Memory forensicsMemory forensics
Memory forensics
 
Session hijacking
Session hijackingSession hijacking
Session hijacking
 
Malware forensics
Malware forensicsMalware forensics
Malware forensics
 
Linux Memory Analysis with Volatility
Linux Memory Analysis with VolatilityLinux Memory Analysis with Volatility
Linux Memory Analysis with Volatility
 
Intrusion detection system ppt
Intrusion detection system pptIntrusion detection system ppt
Intrusion detection system ppt
 
Data encryption
Data encryptionData encryption
Data encryption
 
IDS and IPS
IDS and IPSIDS and IPS
IDS and IPS
 

Similar to Shadow forensics print

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 ...Codemotion
 
Benefity Oracle Cloudu (3/4): Compute
Benefity Oracle Cloudu (3/4): ComputeBenefity Oracle Cloudu (3/4): Compute
Benefity Oracle Cloudu (3/4): ComputeMarketingArrowECS_CZ
 
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 GuideVeeam Software
 
Development with Qt for Windows CE
Development with Qt for Windows CEDevelopment with Qt for Windows CE
Development with Qt for Windows CEaccount inactive
 
Storage in windows server 2012
Storage in windows server 2012Storage in windows server 2012
Storage in windows server 2012David De Vos
 
Road show 2015 triangle meetup
Road show 2015 triangle meetupRoad show 2015 triangle meetup
Road show 2015 triangle meetupwim_provoost
 
JUDCon 2010 Boston : BoxGrinder
JUDCon 2010 Boston : BoxGrinderJUDCon 2010 Boston : BoxGrinder
JUDCon 2010 Boston : BoxGrindermarekgoldmann
 
DockerCon 2016 - Windows Server and Docker
DockerCon 2016 - Windows Server and DockerDockerCon 2016 - Windows Server and Docker
DockerCon 2016 - Windows Server and DockerTaylor Brown
 
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...Docker, Inc.
 
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-structureZhichao Liang
 
Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)MongoDB
 
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 11GR2John Heaton
 
PhegData X - High Performance EBS
PhegData X - High Performance EBSPhegData X - High Performance EBS
PhegData X - High Performance EBSHanson Dong
 
Deployment Strategy
Deployment StrategyDeployment Strategy
Deployment StrategyMongoDB
 
VDI storage and storage virtualization
VDI storage and storage virtualizationVDI storage and storage virtualization
VDI storage and storage virtualizationSisimon Soman
 
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...Odinot Stanislas
 
Windows 7 forensics -overview-r3
Windows 7 forensics -overview-r3Windows 7 forensics -overview-r3
Windows 7 forensics -overview-r3CTIN
 
Deployment Strategies
Deployment StrategiesDeployment Strategies
Deployment StrategiesMongoDB
 
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 VMworld
 
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!Sysdig
 

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

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