CatalogLOLBAS

LOL · Binary

Reg.exe

2 techniquesWindowsLOLBASGPL-3.0

ADS

Defense EvasionFile WriteWindows

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
Evidence
Upstream reference
Environment
Local host
Context
user
Native
ADS
Detection
IOC: reg.exe writing to an ADS

Credentials

Credential AccessWindows

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}
Evidence
Upstream reference
Environment
Local host
Context
admin
Native
Credentials
Detection
IOC: reg.exe writing to an ADS