Skip to main content Inicio Creadores copyleftdev sk1llz rodriguez-threat-hunter-playbook
rodriguez-threat-hunter-playbook Apply Roberto Rodriguez's threat hunting methodology with the Threat Hunter Playbook and HELK. Emphasizes documented hunts, open source infrastructure, and data-driven hunting. Use when building hunting programs or developing hunt playbooks.
Ir a la instalación Skills Marketplace Descubre y explora habilidades de IA creadas por la comunidad.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Copiar promptMostrar detalles del prompt Un comando directo omite el prompt de revisión. Revisa el origen antes de ejecutarlo.
npx skills add https://github.com/copyleftdev/sk1llz --skill rodriguez-threat-hunter-playbookEl comando permanece en una sola línea. Desplázate horizontalmente para revisarlo antes de copiarlo.
¿Prefieres una copia local? Descarga los archivos que SkillsMP tiene disponibles ahora.
Descargar Zip Descargando... Más de este repositorio Design network-based software architectures using Roy Fielding's REST principles. Emphasizes the constraints of the web—statelessness, cacheability, uniform interfaces, and HATEOAS. Use when designing web APIs that must endure for decades.
Design APIs using Kin Lane's "API Evangelist" philosophy. Emphasizes Design-First (OpenAPI), governance, treating APIs as products, and the political/business impact of interfaces. Use when building public platforms or large-scale internal ecosystems.
Design event-driven architectures using Fran Méndez's "AsyncAPI" philosophy. Emphasizes Event-First design, treating message contracts with the same rigor as REST (AsyncAPI spec), and decoupling producers from consumers. Use when building message buses, IoT networks, or microservices that communicate asynchronously.
Ocupaciones relacionadas SOC
Basado en la clasificación ocupacional SOC
Explorador de archivos
2 archivos name rodriguez-threat-hunter-playbook description Apply Roberto Rodriguez's threat hunting methodology with the Threat Hunter Playbook and HELK. Emphasizes documented hunts, open source infrastructure, and data-driven hunting. Use when building hunting programs or developing hunt playbooks. tags threat-hunting, jupyter, analytics, detection, siem, log-analysis, sigma, endpoint, investigation
Roberto Rodriguez — Threat Hunter Playbook
Overview
Roberto Rodriguez is a Principal Threat Researcher at Microsoft and creator of the Threat Hunter Playbook and HELK (Hunting ELK). His work democratized threat hunting by providing open-source infrastructure, documented methodologies, and reproducible hunt procedures.
References
Core Philosophy
"Share knowledge, not just indicators."
"If you can't reproduce it, you can't improve it."
"The best defense is an educated community."
Rodriguez believes that threat hunting knowledge should be open, reproducible, and accessible. His playbooks document not just what to hunt, but how to think about hunting.
Key Contributions
Threat Hunter Playbook
Community-driven library of documented hunts mapped to ATT&CK, with queries, notebooks, and methodology.
HELK (Hunting ELK)
Open source hunting platform combining Elasticsearch, Logstash, Kibana with Jupyter notebooks for interactive analysis.
Mordor Datasets
Pre-recorded attack datasets for testing detections without needing a lab.
When Implementing
Always
Document every hunt with methodology
Map hunts to ATT&CK techniques
Use Jupyter notebooks for reproducibility
Share successful hunts with the team
Test detections with Mordor datasets
Build on community playbooks
Never
Hunt without a hypothesis
Keep successful methodologies private
Deploy without testing against known attacks
Ignore the importance of data quality
Skip documentation of findings
Prefer
Interactive notebooks over static queries
Reproducible hunts over one-time searches
Community playbooks as starting points
Data-driven hypotheses over intuition
Open source tools over vendor lock-in
Implementation Patterns
Hunt Playbook Structure
from dataclasses import dataclass, field
from typing import List , Dict , Optional
from datetime import datetime
@dataclass
class DataSource :
"""Required data for the hunt"""
name: str
category: str
platforms: List [str ]
collection_method: str
fields_required: List [str ]
@dataclass
class AnalyticStep :
"""Single step in hunt analytics"""
step_number: int
description: str
query: str
query_language: str
expected_output: str
interpretation: str
@dataclass
class HuntPlaybook :
"""Complete hunt playbook - Rodriguez style"""
id : str
title: str
description: str
author: str
created: datetime
modified: datetime
tactics: [ ]
techniques: [ ]
hypothesis:
technical_context:
data_sources: [DataSource]
platforms: [ ]
analytics: [AnalyticStep]
mordor_datasets: [ ]
expected_benign: [ ]
known_bypasses: [ ]
references: [ ]
( ) -> :
cells = []
cells.append({
: ,
: [
,
,
,
,
,
,
,
]
})
cells.append({
: ,
: [
,
,
,
]
})
analytic .analytics:
cells.append({
: ,
: [
,
]
})
cells.append({
: ,
: [analytic.query]
})
{
: cells,
: {
: {
: ,
: ,
:
}
},
: ,
:
}
( ) -> :
{
: .mordor_datasets,
: [
,
,
,
,
]
}
lsass_playbook = HuntPlaybook(
= ,
title= ,
description=
,
author= ,
created=datetime( , , ),
modified=datetime( , , ),
tactics=[ ],
techniques=[ ],
hypothesis=
,
technical_context= ,
data_sources=[
DataSource(
name= ,
category= ,
platforms=[ ],
collection_method= ,
fields_required=[
,
,
,
]
)
],
platforms=[ ],
analytics=[
AnalyticStep(
step_number= ,
description= ,
query= ,
query_language= ,
expected_output= ,
interpretation=
),
AnalyticStep(
step_number= ,
description= ,
query= ,
query_language= ,
expected_output= ,
interpretation=
)
],
mordor_datasets=[
],
expected_benign=[
,
,
,
],
known_bypasses=[
,
,
],
references=[
,
,
]
)
HELK-Style Hunting Platform
from dataclasses import dataclass
from typing import List , Dict , Any
import pandas as pd
@dataclass
class HuntingPlatform :
"""HELK-inspired hunting infrastructure"""
elasticsearch_url: str
spark_master: str
jupyter_url: str
def query_elastic (self, query: Dict ) -> pd.DataFrame:
"""Query Elasticsearch and return DataFrame"""
from elasticsearch import Elasticsearch
es = Elasticsearch([self .elasticsearch_url])
response = es.search(
index="logs-*" ,
body=query,
size=10000
)
hits = response['hits' ]['hits' ]
return pd.DataFrame([hit['_source' ] for hit in hits])
def hunt_with_spark (self, sql_query: str ) -> pd.DataFrame:
"""Execute Spark SQL for large-scale hunting"""
from pyspark.sql import SparkSession
spark = SparkSession.builder \
.master(self .spark_master) \
.appName("ThreatHunting" ) \
.getOrCreate()
result = spark.sql(sql_query)
result.toPandas()
:
( ):
.platform = platform
.findings = []
.timeline = []
( ) -> pd.DataFrame:
.timeline.append({
: ,
: query,
: time_range
})
elastic_query = {
: {
: {
: [
{ : { : query}},
{ : { : { : }}}
]
}
}
}
.platform.query_elastic(elastic_query)
( ) -> pd.DataFrame:
.timeline.append({
: ,
: column,
: exclude
})
mask = ~df[column].isin(exclude)
df[mask]
( ) -> pd.DataFrame:
.timeline.append({
: ,
: pivot_field,
: pivot_value
})
query =
.search(query, time_range= )
( ):
.findings.append({
: description,
: (evidence),
: severity,
: evidence.head( ).to_dict()
})
( ) -> :
report =
report +=
i, step ( .timeline, ):
report +=
step[ ] == :
report +=
step[ ] == :
report +=
step[ ] == :
report +=
report +=
i, finding ( .findings, ):
report +=
report +=
report +=
report
Mordor Dataset Integration
from dataclasses import dataclass
from typing import List , Dict , Optional
import requests
import json
@dataclass
class MordorDataset :
"""Mordor attack dataset reference"""
id : str
name: str
description: str
attack_technique: str
platform: str
download_url: str
file_format: str
expected_processes: List [str ]
expected_files: List [str ]
expected_network: List [str ]
def download (self, output_path: str ):
"""Download dataset"""
response = requests.get(self .download_url)
response.raise_for_status()
with open (output_path, 'wb' ) as f:
f.write(response.content)
return output_path
def load_events (self ) -> List [Dict ]:
"""Load events from dataset"""
response = requests.get( .download_url)
response.raise_for_status()
.file_format == :
response.json()
:
:
( ):
.results = []
( ) -> :
events = dataset.load_events()
event events:
query_executor.index(event)
matches = query_executor.search(detection_query)
result = {
: dataset. ,
: dataset.attack_technique,
: (events),
: (matches),
: (matches) > ,
: ._check_indicators(
matches, , dataset.expected_processes
)
}
.results.append(result)
result
( ) -> [ ]:
found = []
matches:
value = .get(field)
value expected:
found.append(value)
( (found))
( ) -> :
report =
detected = ( r .results r[ ])
total = ( .results)
report +=
report +=
report +=
result .results:
status = result[ ]
report +=
report +=
report
Mental Model
Rodriguez approaches threat hunting by asking:
Is this documented? Can others reproduce this hunt?
Is this mapped? What ATT&CK technique does this address?
Can I test this? Do I have Mordor data to validate?
Is this shareable? Can the community benefit?
Is this interactive? Can I explore and pivot?
Signature Rodriguez Moves
Jupyter notebooks for reproducible hunts
Mordor datasets for validation
ATT&CK mapping for all playbooks
Open source hunting infrastructure (HELK)
Community playbook contribution
Data-driven hypothesis generation
List
str
List
str
str
str
List
List
str
List
List
str
List
str
List
str
List
str
def
to_jupyter_notebook
self
dict
"""Export playbook as Jupyter notebook"""
"cell_type"
"markdown"
"source"
f"# {self.title} \n"
f"\n"
f"**Author:** {self.author} \n"
f"**Created:** {self.created} \n"
f"\n"
f"## ATT&CK Mapping\n"
f"- **Tactics:** {', ' .join(self.tactics)} \n"
f"- **Techniques:** {', ' .join(self.techniques)} \n"
"cell_type"
"markdown"
"source"
"## Hypothesis\n"
f"\n{self.hypothesis} \n"
"\n## Technical Context\n"
f"\n{self.technical_context} \n"
for
in
self
"cell_type"
"markdown"
"source"
f"### Step {analytic.step_number} : {analytic.description} \n"
f"\n{analytic.interpretation} \n"
"cell_type"
"code"
"source"
return
"cells"
"metadata"
"kernelspec"
"display_name"
"PySpark"
"language"
"python"
"name"
"pyspark"
"nbformat"
4
"nbformat_minor"
4
def
validate_with_mordor
self
dict
"""Instructions for validating with Mordor datasets"""
return
"datasets"
self
"instructions"
"1. Download Mordor dataset from https://mordordatasets.com/"
"2. Import into your SIEM/hunting platform"
f"3. Run analytics from this playbook"
"4. Verify detection of simulated attack"
"5. Document any required tuning"
id
"WIN-190625024610"
"Credential Dumping via LSASS Memory Access"
"Detect credential dumping by monitoring processes "
"that access LSASS memory"
"Roberto Rodriguez @Cyb3rWard0g"
2024
1
15
2024
2
20
"Credential Access"
"T1003.001"
"Adversaries might be accessing LSASS process memory "
"to extract credentials"
"""
The Local Security Authority Subsystem Service (LSASS) stores
credentials in memory for single sign-on. Attackers commonly
target LSASS using tools like Mimikatz, procdump, or comsvcs.dll.
Windows Event ID 10 (Sysmon) captures process access events,
including when a process reads another process's memory.
"""
"Process Access"
"Process Monitoring"
"Windows"
"Sysmon Event ID 10"
"SourceProcessGUID"
"SourceImage"
"TargetImage"
"GrantedAccess"
"Windows"
1
"Find processes accessing LSASS"
"""
SELECT
SourceImage,
TargetImage,
GrantedAccess,
COUNT(*) as AccessCount
FROM sysmon_events
WHERE EventCode = 10
AND TargetImage LIKE '%lsass.exe'
AND SourceImage NOT LIKE '%MsMpEng.exe'
AND SourceImage NOT LIKE '%csrss.exe'
GROUP BY SourceImage, TargetImage, GrantedAccess
ORDER BY AccessCount DESC
"""
"SQL (Spark)"
"List of processes accessing LSASS with counts"
"Look for unusual processes or high access counts"
2
"Analyze granted access rights"
"""
SELECT
SourceImage,
GrantedAccess,
CASE
WHEN GrantedAccess IN ('0x1010', '0x1410', '0x1438', '0x143a')
THEN 'SUSPICIOUS - Memory Read Access'
ELSE 'Likely Benign'
END as Assessment
FROM sysmon_events
WHERE EventCode = 10
AND TargetImage LIKE '%lsass.exe'
"""
"SQL (Spark)"
"Access rights analysis"
"Memory read access (0x1010, 0x1410) indicates "
"potential credential dumping"
"https://mordordatasets.com/notebooks/small/windows/06_credential_access/"
"Windows Defender (MsMpEng.exe)"
"Client Server Runtime (csrss.exe)"
"System process"
"Antivirus products"
"Direct syscalls (bypass Sysmon hooking)"
"Targeting SAM/SECURITY registry instead"
"Using MiniDumpWriteDump variations"
"https://attack.mitre.org/techniques/T1003/001/"
"https://github.com/gentilkiwi/mimikatz"
"https://threathunterplaybook.com/notebooks/windows/06_credential_access/"
return
class
InteractiveHunt
"""Jupyter notebook-based interactive hunt"""
def
__init__
self, platform: HuntingPlatform
self
self
self
def
search
self, query: str , time_range: str = "24h"
"""Execute search and track in timeline"""
self
'action'
'search'
'query'
'time_range'
"query"
"bool"
"must"
"query_string"
"query"
"range"
"@timestamp"
"gte"
f"now-{time_range} "
return
self
def
filter_noise
self, df: pd.DataFrame,
column: str ,
exclude: List [str ]
"""Filter known benign activity"""
self
'action'
'filter'
'column'
'excluded'
return
def
pivot
self, df: pd.DataFrame,
pivot_field: str ,
pivot_value: Any
"""Pivot investigation to related events"""
self
'action'
'pivot'
'field'
'value'
f'{pivot_field} :"{pivot_value} "'
return
self
"7d"
def
mark_finding
self, description: str ,
evidence: pd.DataFrame,
severity: str
"""Document a finding"""
self
'description'
'evidence_count'
len
'severity'
'evidence_sample'
5
def
generate_report
self
str
"""Generate hunt report"""
"# Hunt Report\n\n"
"## Investigation Timeline\n\n"
for
in
enumerate
self
1
f"{i} . **{step['action' ].title()} **: "
if
'action'
'search'
f"Query: `{step['query' ]} `\n"
elif
'action'
'filter'
f"Excluded {len (step['excluded' ])} values from {step['column' ]} \n"
elif
'action'
'pivot'
f"Pivoted on {step['field' ]} ={step['value' ]} \n"
"\n## Findings\n\n"
for
in
enumerate
self
1
f"### Finding {i} : {finding['description' ]} \n"
f"- **Severity**: {finding['severity' ]} \n"
f"- **Evidence Count**: {finding['evidence_count' ]} \n\n"
return
self
if
self
'json'
return
else
pass
class
DetectionValidator
"""Validate detections against Mordor datasets"""
def
__init__
self
self
def
test_detection
self,
detection_query: str ,
dataset: MordorDataset,
query_executor
dict
"""Test if detection finds attack in Mordor data"""
for
in
'dataset'
id
'technique'
'total_events'
len
'matches'
len
'detected'
len
0
'expected_processes_found'
self
'process.name'
self
return
def
_check_indicators
self,
matches: List [Dict ],
field: str ,
expected: List [str ]
List
str
"""Check which expected indicators were found"""
for
match
in
match
if
in
return
list
set
def
coverage_report
self
str
"""Generate detection coverage report"""
"# Detection Validation Report\n\n"
sum
1
for
in
self
if
'detected'
len
self
f"**Overall Detection Rate**: {detected} /{total} "
f"({detected/total*100 :.1 f} %)\n\n"
"## Results by Technique\n\n"
for
in
self
"✅"
if
'detected'
else
"❌"
f"- {status} **{result['technique' ]} **: "
f"{result['matches' ]} matches in {result['total_events' ]} events\n"
return