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-lolbas3description: Detect Living Off the Land Binaries (LOLBins/LOLBAS) abuse4version: '1.0'5author: mahipal (vendored by SOCIS)6license: Apache-2.07platforms:8- linux9- macos10- windows11category: security12metadata:13 source: https://skillmd.com/skills/socisio/detecting-living-off-the-land-with-lolbas14 socis:15 tags:16 - lolbas17 - lolbins18 - sigma-rules19 - process-monitoring20 - sysmon21 - endpoint-detection22 - threat-hunting23 subdomain: threat-detection24 upstream: mukul975/Anthropic-Cybersecurity-Skills25 nist_csf:26 - DE.CM-0127 - DE.AE-0228 - DE.AE-0629 - ID.RA-0530 d3fend_techniques:31 - Executable Denylisting32 - Execution Isolation33 - File Metadata Consistency Validation34 - Application Protocol Command Analysis35 - Content Format Conversion36 mitre_attack:37 - T107838 - T119039 - T105940---414243# Detecting Living Off the Land with LOLBAS4445## Overview4647Living 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.484950## When to Use5152- When investigating security incidents that require detecting living off the land with lolbas53- When building detection rules or threat hunting queries for this domain54- When SOC analysts need structured procedures for this analysis type55- When validating security monitoring coverage for related attack techniques5657## Prerequisites5859- Sysmon or Windows Security Event Log (Event ID 4688) with command-line logging enabled60- Sigma rule conversion tool (sigmac or sigma-cli)61- SIEM platform (Splunk, Elastic, or similar) for log ingestion62- Python 3.8+ with pySigma library63- LOLBAS project reference database6465## Steps66671. **Establish LOLBin Watchlist** — Build a prioritized list of monitored binaries (certutil, mshta, regsvr32, rundll32, msbuild, installutil, cmstp, wmic, bitsadmin)682. **Collect Process Telemetry** — Ingest Sysmon Event ID 1 (Process Create) and Windows 4688 events with full command-line capture693. **Build Sigma Detection Rules** — Create Sigma rules matching suspicious command-line arguments, network activity, and parent-child process anomalies for each LOLBin704. **Analyze Parent-Child Relationships** — Flag unexpected parent processes spawning LOLBins (e.g., Excel spawning certutil, Word spawning mshta)715. **Score and Prioritize Alerts** — Apply risk scoring based on argument anomaly, parent process, execution path, and network indicators726. **Generate Detection Report** — Produce a structured report of all LOLBin abuse detections with MITRE ATT&CK mapping7374## Expected Output7576- JSON report listing detected LOLBin abuse events with severity scores77- MITRE ATT&CK technique mapping for each detection (T1218, T1105, T1140, T1127)78- Parent-child process anomaly analysis79- Sigma rule match details with raw event data