Process
reg.exe
reg.exe is the Console Registry Tool, the command-line program for reading and writing the Windows registry. It can query, add, delete, export, import, and save registry keys, on the local machine or a remote one. Administrators and scripts use it for configuration. Attackers use it for persistence, to dump credential hives, to find stored secrets, and to weaken security settings.
File identity
Not observed.
Not observed.
Not observed.
Not observed.
Execution context
Not observed.
Not observed.
Not observed.
Not observed.
Not observed.
Not observed.
Ancestry
Not observed.
Not observed.
Not observed.
Not observed.
Behavior
Not observed.
Not observed.
Not observed.
Not observed.
reg export HKLM\SOFTWARE\Microsoft\Evilreg {PATH_ABSOLUTE}:evilreg.regADS · Hide/plant registry information in Alternate data stream for later usereg save HKLM\SECURITY {PATH_ABSOLUTE:.1.bak} && reg save HKLM\SYSTEM {PATH_ABSOLUTE:.2.bak} && reg save HKLM\SAM {PATH_ABSOLUTE:.3.bak}Credentials · Dump credentials from the Security Account Manager (SAM)
Indicators
Not observed.
Analysis
reg.exe reads and modifies the Windows registry from the command line. Its main verbs are reg query, reg add, reg delete, reg export and reg import for text .reg files, and reg save and reg load for binary hive files. Several operations can act on a remote machine by prefixing a host, as in reg query \\host\HKLM\.... The genuine binary lives at C:\Windows\System32\reg.exe.
Legitimately, reg is run constantly by installers, scripts, and administrators to read and set configuration, so the process is unremarkable. The key it touches and whether it is reading or writing, both on the command line, are what give an instance meaning.
reg.exe is a common persistence tool (T1547.001). Writing to a Run key, under HKCU or HKLM ...\CurrentVersion\Run, or to another autostart point makes a program launch at logon or boot. Anything added to Run, to the Winlogon Shell or Userinit values, or similar startup locations that points to a script host or a user-writable binary is suspect.
It is also a route to local credentials (T1003.002). reg save HKLM\SAM and reg save HKLM\SYSTEM export the hive files that hold local account password hashes and the boot key needed to decrypt them, and HKLM\SECURITY holds LSA secrets. Saving any of these and moving the files off the host is a recognizable credential-theft step. reg also harvests secrets that applications leave in the registry, such as autologon passwords (T1552.002).
Beyond that, reg supports both reconnaissance and defense evasion. reg query enumerates installed software, configuration, and stored credentials (T1012), while reg add and reg delete flip security-relevant settings off, disabling Defender features or UAC, for example (T1112). Because reg is a normal administrative tool, the key path, the direction, the parent, and any remote target are what separate configuration from abuse.
- Image path other than
C:\Windows\System32\reg.exehigh reg saveofHKLM\SAM,HKLM\SYSTEM, orHKLM\SECURITYhighreg addto a Run key or another autostart locationhighreg addorreg deletechanging security settings (Defender, UAC)high- Parent is an Office application, a script host, or an unfamiliar processhigh
reg queryof known credential-storage keys (autologon, stored passwords)med- A remote target,
\\host\on the command linemed
Telemetry
Not observed.
Not observed.