diskshadow.exe

  • File Path: C:\windows\SysWOW64\diskshadow.exe
  • Description: DiskShadow

Hashes

Type Hash
MD5 4E8FF2442983B200DA06EF2CDDB994CA
SHA1 535569D1EE67B43BC08DEB945C5B3A6D207F36D4
SHA256 A3BB39A8E9AC6177CA65A54279049B12666A8631A995ECC79A59BE1D4E539C85
SHA384 9E458C6E3F051DEEE56773D3EAA4416B53DF8C1C9399655D255B7A02C3A31870C42D59CFAD52F8AC70F36850CC1BCF3C
SHA512 53DCF28CE770EDBB5DCBB07A39D2F79F2C29587C1F93E7C8DE10E80BD26C4D036E22BB59BD5ECD06266989F66BB79B7CAFC1A110E41C4A8518DB438A226D67F6
SSDEEP 3072:kZT4ncFDRVJT/5CFqLHhD7OHMzt/1bwM0aY7g4AXhMWJwJ0V4Ay:kZ3IGHhD7rNbwM0aY7grX2X0St

Signature

  • Status: The file C:\windows\SysWOW64\diskshadow.exe is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170
  • Serial: ``
  • Thumbprint: ``
  • Issuer:
  • Subject:

File Metadata

  • Original Filename: diskshadow.exe.mui
  • Product Name: Microsoft Windows Operating System
  • Company Name: Microsoft Corporation
  • File Version: 6.3.9600.16384 (winblue_rtm.130821-1623)
  • Product Version: 6.3.9600.16384
  • Language: English (United States)
  • Legal Copyright: Microsoft Corporation. All rights reserved.

Possible Misuse

The following table contains possible examples of diskshadow.exe being misused. While diskshadow.exe is not inherently malicious, its legitimate functionality can be abused for malicious purposes.

Source Source File Example License
sigma proc_creation_win_shadow_copies_deletion.yml - '\diskshadow.exe' DRL 1.0
sigma proc_creation_win_susp_diskshadow.yml title: Execution via Diskshadow.exe DRL 1.0
sigma proc_creation_win_susp_diskshadow.yml description: Detects using Diskshadow.exe to execute arbitrary code in text file DRL 1.0
sigma proc_creation_win_susp_diskshadow.yml - https://bohops.com/2018/03/26/diskshadow-the-return-of-vss-evasion-persistence-and-active-directory-database-extraction/ DRL 1.0
sigma proc_creation_win_susp_diskshadow.yml Image\|endswith: '\diskshadow.exe' DRL 1.0
sigma proc_creation_win_susp_diskshadow.yml - False postitve can be if administrators use diskshadow tool in their infrastructure as a main backup tool with scripts. DRL 1.0
LOLBAS Diskshadow.yml Name: Diskshadow.exe  
LOLBAS Diskshadow.yml Description: Diskshadow.exe is a tool that exposes the functionality offered by the volume shadow copy Service (VSS).  
LOLBAS Diskshadow.yml - Command: diskshadow.exe /s c:\test\diskshadow.txt  
LOLBAS Diskshadow.yml Description: Execute commands using diskshadow.exe from a prepared diskshadow script.  
LOLBAS Diskshadow.yml Usecase: Use diskshadow to exfiltrate data from VSS such as NTDS.dit  
LOLBAS Diskshadow.yml - Command: diskshadow> exec calc.exe  
LOLBAS Diskshadow.yml Description: Execute commands using diskshadow.exe to spawn child process  
LOLBAS Diskshadow.yml Usecase: Use diskshadow to bypass defensive counter measures  
LOLBAS Diskshadow.yml - Path: C:\Windows\System32\diskshadow.exe  
LOLBAS Diskshadow.yml - Path: C:\Windows\SysWOW64\diskshadow.exe  
LOLBAS Diskshadow.yml - IOC: Child process from diskshadow.exe  
LOLBAS Diskshadow.yml - Link: https://bohops.com/2018/03/26/diskshadow-the-return-of-vss-evasion-persistence-and-active-directory-database-extraction/  
atomic-red-team index.md - Atomic Test #9: DiskShadow Command Execution [windows] MIT License. © 2018 Red Canary
atomic-red-team windows-index.md - Atomic Test #9: DiskShadow Command Execution [windows] MIT License. © 2018 Red Canary
atomic-red-team T1218.md - Atomic Test #9 - DiskShadow Command Execution MIT License. © 2018 Red Canary
atomic-red-team T1218.md ## Atomic Test #9 - DiskShadow Command Execution MIT License. © 2018 Red Canary
atomic-red-team T1218.md Emulates attack with a DiskShadow.exe (LOLBIN installed by default on Windows) being used to execute arbitrary commands Reference: https://bohops.com/2018/03/26/diskshadow-the-return-of-vss-evasion-persistence-and-active-directory-database-extraction/ MIT License. © 2018 Red Canary
atomic-red-team T1218.md | dspath | Default location of DiskShadow.exe | Path | C:\Windows\System32\diskshadow.exe| MIT License. © 2018 Red Canary
atomic-red-team T1218.md ##### Description: DiskShadow.exe must exist on disk at specified location (#{dspath}) MIT License. © 2018 Red Canary
atomic-red-team T1218.md echo “DiskShadow.exe not found on disk at expected location” MIT License. © 2018 Red Canary

Additional Info*

*The information below is copied from MicrosoftDocs, which is maintained by Microsoft. Available under CC BY 4.0 license.


Diskshadow

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Diskshadow.exe is a tool that exposes the functionality offered by the volume shadow copy Service (VSS). By default, Diskshadow uses an interactive command interpreter similar to that of Diskraid or Diskpart. Diskshadow also includes a scriptable mode.

[!NOTE] Membership in the local Administrators group, or equivalent, is the minimum required to run Diskshadow.

Syntax

For interactive mode, type the following at the command prompt to start the Diskshadow command interpreter:

diskshadow

For script mode, type the following, where script.txt is a script file containing Diskshadow commands:

diskshadow -s script.txt

Parameters

You can run the following commands in the Diskshadow command interpreter or through a script file. At a minimum, only add and create are necessary to create a shadow copy. However, this forfeits the context and option settings, will be a copy backup, and creates a shadow copy with no backup execution script.

Command Description
set command Sets the context, options, verbose mode, and metadata file for creating shadow copies.
load metadata command Loads a metadata .cab file prior to importing a transportable shadow copy or loads the writer metadata in the case of a restore.
writer command verifies that a writer or component is included or excludes a writer or component from the backup or restore procedure.
add command Adds volumes to the set of volumes that are to be shadow copied, or adds aliases to the alias environment.
create command Starts the shadow copy creation process, using the current context and option settings.
exec command Executes a file on the local computer.
begin backup command Starts a full backup session.
end backup command Ends a full backup session and issues a backupcomplete event with the appropriate writer state, if needed.
begin restore command Starts a restore session and issues a prerestore event to involved writers.
end restore command Ends a restore session and issues a postrestore event to involved writers.
reset command Resets Diskshadow to the default state.
list command Lists writers, shadow copies, or currently registered shadow copy providers that are on the system.
delete shadows command Deletes shadow copies.
import command Imports a transportable shadow copy from a loaded metadata file into the system.
mask command Removes hardware shadow copies that were imported by using the import command.
expose command Exposes a persistent shadow copy as a drive letter, share, or mount point.
unexpose command Unexposes a shadow copy that was exposed by using the expose command.
break command Disassociates a shadow copy volume from VSS.
revert command Reverts a volume back to a specified shadow copy.
exit command Exits the command interpreter or script.

Examples

This is a sample sequence of commands that will create a shadow copy for backup. It can be saved to file as script.dsh, and executed using diskshadow /s script.dsh.

Assume the following:

  • You have an existing directory called c:\diskshadowdata.

  • Your system volume is C: and your data volume is D:.

  • You have a backupscript.cmd file in c:\diskshadowdata.

  • Your backupscript.cmd file will perform the copy of shadow data p: and q: to your backup drive.

You can enter these commands manually or script them:

##Diskshadow script file
set context persistent nowriters
set metadata c:\diskshadowdata\example.cab
set verbose on
begin backup
add volume c: alias systemvolumeshadow
add volume d: alias datavolumeshadow

create

expose %systemvolumeshadow% p:
expose %datavolumeshadow% q:
exec c:\diskshadowdata\backupscript.cmd
end backup
##End of script

Additional References


MIT License. Copyright (c) 2020-2021 Strontic.