Detecting Living Off the Land with LOLBAS
Overview
Living Off the Land Binaries, Scripts, and Libraries (LOLBAS) are legitimate system utilities abused by attackers to execute malicious actions while evading detection. This skill covers detecting abuse of certutil.exe, regsvr32.exe, mshta.exe, rundll32.exe, msbuild.exe, and other LOLBins using process telemetry from Sysmon and Windows Event Logs, combined with Sigma rule-based detection.
When to Use
- When investigating security incidents that require detecting living off the land with lolbas
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Prerequisites
- Sysmon or Windows Security Event Log (Event ID 4688) with command-line logging enabled
- Sigma rule conversion tool (sigmac or sigma-cli)
- SIEM platform (Splunk, Elastic, or similar) for log ingestion
- Python 3.8+ with pySigma library
- LOLBAS project reference database
Steps
- Establish LOLBin Watchlist — Build a prioritized list of monitored binaries (certutil, mshta, regsvr32, rundll32, msbuild, installutil, cmstp, wmic, bitsadmin)
- Collect Process Telemetry — Ingest Sysmon Event ID 1 (Process Create) and Windows 4688 events with full command-line capture
- Build Sigma Detection Rules — Create Sigma rules matching suspicious command-line arguments, network activity, and parent-child process anomalies for each LOLBin
- Analyze Parent-Child Relationships — Flag unexpected parent processes spawning LOLBins (e.g., Excel spawning certutil, Word spawning mshta)
- Score and Prioritize Alerts — Apply risk scoring based on argument anomaly, parent process, execution path, and network indicators
- Generate Detection Report — Produce a structured report of all LOLBin abuse detections with MITRE ATT&CK mapping
Expected Output
- JSON report listing detected LOLBin abuse events with severity scores
- MITRE ATT&CK technique mapping for each detection (T1218, T1105, T1140, T1127)
- Parent-child process anomaly analysis
- Sigma rule match details with raw event data
1---2name: detecting-living-off-the-land-with-lolbas-23description: Detect Living Off the Land Binaries (LOLBins/LOLBAS) abuse including4 certutil, regsvr32, mshta, and rundll32 via process telemetry, Sigma rules, and5 parent-child process analysis with Sysmon endpoint data. Use when hunting for adversaries6 abusing built-in Windows binaries to download, execute, or proxy malicious code while7 evading traditional executable-based detection.8domain: cybersecurity9subdomain: threat-detection10tags:11- lolbas12- lolbins13- sigma-rules14- process-monitoring15- sysmon16- endpoint-detection17- threat-hunting18version: '1.0'19author: mahipal20license: Apache-2.021d3fend_techniques:22- Executable Denylisting23- Execution Isolation24- File Metadata Consistency Validation25- Application Protocol Command Analysis26- Content Format Conversion27nist_csf:28- DE.CM-0129- DE.AE-0230- DE.AE-0631- ID.RA-0532mitre_attack:33- T107834- T119035- T105936metadata:37 source: https://skillmd.com/skills/26zl/detecting-living-off-the-land-with-lolbas-238---3940# Detecting Living Off the Land with LOLBAS4142## Overview4344Living Off the Land Binaries, Scripts, and Libraries (LOLBAS) are legitimate system utilities abused by attackers to execute malicious actions while evading detection. This skill covers detecting abuse of certutil.exe, regsvr32.exe, mshta.exe, rundll32.exe, msbuild.exe, and other LOLBins using process telemetry from Sysmon and Windows Event Logs, combined with Sigma rule-based detection.454647## When to Use4849- When investigating security incidents that require detecting living off the land with lolbas50- When building detection rules or threat hunting queries for this domain51- When SOC analysts need structured procedures for this analysis type52- When validating security monitoring coverage for related attack techniques5354## Prerequisites5556- Sysmon or Windows Security Event Log (Event ID 4688) with command-line logging enabled57- Sigma rule conversion tool (sigmac or sigma-cli)58- SIEM platform (Splunk, Elastic, or similar) for log ingestion59- Python 3.8+ with pySigma library60- LOLBAS project reference database6162## Steps63641. **Establish LOLBin Watchlist** — Build a prioritized list of monitored binaries (certutil, mshta, regsvr32, rundll32, msbuild, installutil, cmstp, wmic, bitsadmin)652. **Collect Process Telemetry** — Ingest Sysmon Event ID 1 (Process Create) and Windows 4688 events with full command-line capture663. **Build Sigma Detection Rules** — Create Sigma rules matching suspicious command-line arguments, network activity, and parent-child process anomalies for each LOLBin674. **Analyze Parent-Child Relationships** — Flag unexpected parent processes spawning LOLBins (e.g., Excel spawning certutil, Word spawning mshta)685. **Score and Prioritize Alerts** — Apply risk scoring based on argument anomaly, parent process, execution path, and network indicators696. **Generate Detection Report** — Produce a structured report of all LOLBin abuse detections with MITRE ATT&CK mapping7071## Expected Output7273- JSON report listing detected LOLBin abuse events with severity scores74- MITRE ATT&CK technique mapping for each detection (T1218, T1105, T1140, T1127)75- Parent-child process anomaly analysis76- Sigma rule match details with raw event data