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
3description: Detect Living Off the Land Binaries (LOLBins/LOLBAS) abuse including
4 certutil, regsvr32, mshta, and rundll32 via process telemetry, Sigma rules, and
5 parent-child process analysis
6domain: cybersecurity
7subdomain: threat-detection
8tags:
9- lolbas
10- lolbins
11- sigma-rules
12- process-monitoring
13- sysmon
14- endpoint-detection
15- threat-hunting
16version: '1.0'
17author: mahipal
18license: Apache-2.0
19d3fend_techniques:
20- Executable Denylisting
21- Execution Isolation
22- File Metadata Consistency Validation
23- Application Protocol Command Analysis
24- Content Format Conversion
25nist_csf:
26- DE.CM-01
27- DE.AE-02
28- DE.AE-06
29- ID.RA-05
30mitre_attack:
31- T1078
32- T1190
33- T1059
34source: https://github.com/mukul975/Anthropic-Cybersecurity-Skills
35source_commit: 04450304b12645cb2b974ab96d28c0664758a88d
36metadata:
37 source: https://skillmd.com/skills/yanacuti1121/detecting-living-off-the-land-with-lolbas
38---
39
40# Detecting Living Off the Land with LOLBAS
41
42## Overview
43
44Living 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.
45
46
47## When to Use
48
49- When investigating security incidents that require detecting living off the land with lolbas
50- When building detection rules or threat hunting queries for this domain
51- When SOC analysts need structured procedures for this analysis type
52- When validating security monitoring coverage for related attack techniques
53
54## Prerequisites
55
56- Sysmon or Windows Security Event Log (Event ID 4688) with command-line logging enabled
57- Sigma rule conversion tool (sigmac or sigma-cli)
58- SIEM platform (Splunk, Elastic, or similar) for log ingestion
59- Python 3.8+ with pySigma library
60- LOLBAS project reference database
61
62## Steps
63
641. **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 capture
663. **Build Sigma Detection Rules** — Create Sigma rules matching suspicious command-line arguments, network activity, and parent-child process anomalies for each LOLBin
674. **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 indicators
696. **Generate Detection Report** — Produce a structured report of all LOLBin abuse detections with MITRE ATT&CK mapping
70
71## Expected Output
72
73- JSON report listing detected LOLBin abuse events with severity scores
74- MITRE ATT&CK technique mapping for each detection (T1218, T1105, T1140, T1127)
75- Parent-child process anomaly analysis
76- Sigma rule match details with raw event data