hypnguyen1209/offensive-claude / skills/threat-hunting
threat-hunting
FlaggedUse when hunting threats or engineering detections — ATT&CK Detection-Strategies, Sigma + correlation with Detection-as-Code CI, Windows endpoint hunting (Sysmon/ETW/LSASS/LOLBins), network C2 hunting (JA4+, beaconing, DNS tunneling), cloud-identity hunting, Atomic Red Team purple-team validation
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.2 KB |
| references/cloud-identity-hunting.md | markdown | 9.2 KB |
| references/methodology-hunt-loop.md | markdown | 7.9 KB |
| references/network-c2-hunting.md | markdown | 8.6 KB |
| references/purple-team-validation.md | markdown | 6.4 KB |
| references/sigma-rule-engineering.md | markdown | 9.6 KB |
| references/windows-endpoint-hunting.md | markdown | 10.6 KB |
| scripts/beacon_hunter.py | script | 9.8 KB |
| scripts/cloudtrail_hunt.py | script | 7.8 KB |
| scripts/coverage_matrix.py | script | 7.2 KB |
| scripts/dac_validate.py | script | 6.1 KB |
| scripts/entra_hunt.kql | other | 4.8 KB |
| scripts/evtx_hunt.py | script | 9.5 KB |
| scripts/sigma_pipeline.sh | script | 2.3 KB |
| scripts/sysmon_config_2025.xml | config | 6.9 KB |
scripts/sigma_pipeline.sh
View on GitHub#!/usr/bin/env bash
# =============================================================================
# sigma_pipeline.sh - Detection-as-Code pipeline: lint -> convert -> artifact.
#
# Lints every Sigma rule (via dac_validate.py) then compiles the rule set to one
# or more SIEM backends with sigma-cli, writing per-backend artifacts. Designed to
# be the single command a CI job runs.
#
# USAGE:
# ./sigma_pipeline.sh <rules_dir> [out_dir] [backend1 backend2 ...]
# ./sigma_pipeline.sh ./rules ./build splunk microsoft365defender elasticsearch
# (default backends: splunk microsoft365defender elasticsearch)
#
# DEPENDENCIES:
# python3, pyyaml, sigma-cli and backend plugins:
# pip install sigma-cli pysigma-backend-splunk \
# pysigma-backend-microsoft365defender pysigma-backend-elasticsearch \
# pysigma-pipeline-sysmon pyyaml
#
# EXIT: non-zero if lint finds errors or any backend conversion fails (CI gate).
# Defensive detection-engineering tooling. Authorized use only.
# =============================================================================
set -euo pipefail
RULES_DIR="${1:?usage: sigma_pipeline.sh <rules_dir> [out_dir] [backends...]}"
OUT_DIR="${2:-./build}"
shift || true
shift || true
BACKENDS=("$@")
if [ "${#BACKENDS[@]}" -eq 0 ]; then
BACKENDS=(splunk microsoft365defender elasticsearch)
fi
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
mkdir -p "$OUT_DIR"
echo "[*] Stage 1/3 - lint $RULES_DIR (Detection-as-Code policy)"
python3 "$SCRIPT_DIR/dac_validate.py" "$RULES_DIR" --fail-on-error
# Map a sensible default pipeline per backend (sysmon mapping for windows backends).
pipeline_for() {
case "$1" in
splunk|elasticsearch) echo "sysmon" ;;
*) echo "" ;;
esac
}
echo "[*] Stage 2/3 - convert to backends: ${BACKENDS[*]}"
fail=0
for be in "${BACKENDS[@]}"; do
pl="$(pipeline_for "$be")"
out="$OUT_DIR/detections_${be}.txt"
echo " -> $be (pipeline='${pl:-none}') => $out"
if [ -n "$pl" ]; then
sigma convert -t "$be" -p "$pl" "$RULES_DIR" -o "$out" || fail=1
else
sigma convert -t "$be" "$RULES_DIR" -o "$out" || fail=1
fi
done
echo "[*] Stage 3/3 - summary"
ls -la "$OUT_DIR"
if [ "$fail" -ne 0 ]; then
echo "[!] One or more backend conversions failed." >&2
exit 1
fi
echo "[+] Pipeline complete. Artifacts in $OUT_DIR/"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |