threat-hunting
Skill1 starsChanged 9 months agoMITView on GitHub
Hunt threats using Sigma detection rules and security analysis techniques. Use when investigating security incidents, creating detection rules, or analyzing suspicious activity.
Files
Threat Hunting with Sigma Rules
When to Use This Skill
- Investigating security incidents
- Creating detection rules for SIEM
- Analyzing suspicious activity patterns
- Building threat detection pipelines
- Converting detections between platforms
Sigma Rule Basics
Rule Structure
title: Suspicious PowerShell Download
id: 3b6ab547-8ec2-4991-b9d2-2b06702a48d7
status: experimental
description: Detects PowerShell commands downloading files from the internet
author: Security Team
date: 2024/01/15
modified: 2024/01/20
logsource:
category: process_creation
product: windows
detection:
selection_process:
Image|endswith: '\powershell.exe'
selection_commands:
CommandLine|contains|all:
- 'Net.WebClient'
- 'DownloadString'
condition: selection_process and selection_commands
falsepositives:
- Legitimate administrative scripts
- Software installers
level: medium
tags:
- attack.execution
- attack.t1059.001
- attack.defense_evasion
- attack.t1140Field Modifiers
| Modifier | Description | Example |
contains | Substring match | CommandLine|contains: 'wget' |
startswith | Prefix match | Image|startswith: 'C:\Temp' |
endswith | Suffix match | Image|endswith: '.exe' |
re | Regex match | CommandLine|re: '.*base64.*' |
all | All values must match | |contains|all: |
base64 | Base64 decode first | CommandLine|base64|contains: |
cidr | IP range match | DestinationIp|cidr: '10.0.0.0/8' |
Common Detection Patterns
Process Creation
title: Suspicious Process from Temp Directory
logsource:
category: process_creation
product: windows
detection:
selection:
Image|contains:
- '\Temp\'
- '\AppData\Local\Temp\'
Image|endswith:
- '.exe'
- '.com'
- '.scr'
filter_known:
Image|endswith:
- '\setup.exe'
- '\installer.exe'
condition: selection and not filter_knownNetwork Connections
title: Outbound Connection to Known Malicious Port
logsource:
category: network_connection
product: windows
detection:
selection:
Initiated: 'true'
DestinationPort:
- 4444 # Metasploit
- 5555 # Common RAT
- 6666 # IRC
- 8080 # Web proxy
condition: selectionFile Creation
title: Executable Created in Suspicious Location
logsource:
category: file_event
product: windows
detection:
selection:
EventType: 'creation'
TargetFilename|endswith:
- '.exe'
- '.dll'
- '.ps1'
TargetFilename|contains:
- '\Windows\Temp\'
- '\ProgramData\'
- '\Users\Public\'
condition: selectionRegistry Modifications
title: Run Key Persistence
logsource:
category: registry_event
product: windows
detection:
selection:
EventType: SetValue
TargetObject|contains:
- '\SOFTWARE\Microsoft\Windows\CurrentVersion\Run'
- '\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce'
condition: selectionHunting Queries
PowerShell Hunting
# Encoded PowerShell Commands
title: Encoded PowerShell Execution
detection:
selection:
CommandLine|contains:
- '-enc'
- '-EncodedCommand'
- '-e '
CommandLine|base64offset|contains:
- 'IEX'
- 'Invoke-Expression'
condition: selectionLateral Movement
# PsExec-like Activity
title: Remote Service Installation
logsource:
product: windows
service: system
detection:
selection:
EventID: 7045 # Service installed
ServiceFileName|contains:
- '\ADMIN$\'
- '\C$\'
condition: selectionData Exfiltration
# Large Outbound Transfers
title: Large Data Transfer to External IP
logsource:
category: proxy
detection:
selection:
bytes_out|gt: 10000000 # 10MB
filter_internal:
dst_ip|cidr:
- '10.0.0.0/8'
- '172.16.0.0/12'
- '192.168.0.0/16'
condition: selection and not filter_internalMITRE ATT&CK Mapping
tags:
# Initial Access
- attack.initial_access
- attack.t1566 # Phishing
# Execution
- attack.execution
- attack.t1059.001 # PowerShell
- attack.t1059.003 # Windows Command Shell
# Persistence
- attack.persistence
- attack.t1547.001 # Registry Run Keys
# Defense Evasion
- attack.defense_evasion
- attack.t1140 # Deobfuscate/Decode
# Credential Access
- attack.credential_access
- attack.t1003 # OS Credential Dumping
# Lateral Movement
- attack.lateral_movement
- attack.t1021.002 # SMB/Windows Admin SharesConverting Sigma Rules
To Splunk
# Using sigmac (legacy)
sigmac -t splunk -c sysmon rule.yml
# Using sigma-cli
sigma convert -t splunk -p sysmon rule.ymlTo Elastic
sigma convert -t elasticsearch -p ecs-windows rule.ymlTo Microsoft Sentinel
sigma convert -t microsoft365defender rule.ymlInvestigation Workflow
1. Triage Alert
## Alert Triage Checklist
- [ ] Verify the detection fired correctly
- [ ] Check for false positive indicators
- [ ] Identify affected systems
- [ ] Determine timeline of activity
- [ ] Assess potential impact2. Gather Context
# Related process activity
index=windows EventCode=1
| where host="affected_host"
| where _time >= relative_time(now(), "-1h")
| stats count by Image, CommandLine, ParentImage
| sort -count
# Network connections from host
index=network src_ip="10.1.1.50"
| where _time >= relative_time(now(), "-1h")
| stats count by dest_ip, dest_port
| sort -count3. Timeline Analysis
| Time | Event | Source | Details |
|------|-------|--------|---------|
| 10:00 | Phishing email | Email logs | malicious.doc attached |
| 10:05 | Document opened | Process logs | WINWORD.EXE spawned |
| 10:06 | PowerShell | Process logs | Encoded command |
| 10:07 | Network conn | Firewall | C2 callback to 1.2.3.4 |
| 10:10 | New service | Event logs | Persistence installed |4. Containment
# Isolate affected system
# Block IOCs at firewall
# Disable compromised accounts
# Preserve evidenceRule Testing
# Test Sigma rule with pySigma
from sigma.rule import SigmaRule
from sigma.backends.splunk import SplunkBackend
rule = SigmaRule.from_yaml("""
title: Test Rule
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: '\\cmd.exe'
condition: selection
""")
backend = SplunkBackend()
print(backend.convert_rule(rule))Best Practices
- Test rules against known-good baseline
- Include false positive documentation
- Map to MITRE ATT&CK techniques
- Version control all rules
- Regular rule review and tuning
- Document investigation runbooks
- Share rules with community (when appropriate)
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- zhaoxuya520/reverse-skill-private★ 40ksame name
- zhaoxuya520/reverse-skill★ 38ksame name
- briiirussell/cybersecurity-skills★ 489same name
- hypnguyen1209/offensive-claude★ 401same name
- lza6/claw-code-tingfeng★ 5same name
- jaskaranhundal/usap-skills★ 4same name
- jessefmoore/offensive-claude-code★ 2same name
- Quad4-Software/skills★ 1same name
- ftrout/secops-claude-skills★ 0same name
- imMamdouhaboammar/cybersecurity-skills★ 0same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use malware-analysis, web-pentest and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
tsaleSkillmalware-analysis
Professional malware analysis workflow for PE executables and suspicious files. Triggers on file uploads with requests like "analyze this malware", "analyze this sample", "what does this executable do", "check this file for malware", or any request to examine suspicious files. Performs static analysis, threat intelligence triage, behavioral inference, and produces analyst-grade reports with reasoned conclusions.
Also in 4 projects that use this
samklee1Skillweb-pentest
Orchestrates authorized web app pentesting on Kali Linux using Opus sub-agents with difficulty-aware planning (TDA/EGATS), browser-first exploration, iterative verification, two-layer review (per-sub-agent + phase-level), optional cross-model gap audit (GPT/codex via codex-plugin-cc), and enforced KB updates. Trigger on: pentesting, penetration testing, web app security assessment, vulnerability assessment, OWASP testing, PTES, attack surface mapping, API security testing, pentest reporting, or 'help me test this app'. NOT for network-only pentesting, malware analysis, reverse engineering, or CTFs.
Also in 3 projects that use this
QiuChenlySkillreverse-engineering
专业二进制逆向工程分析技能。使用IDA Pro MCP工具分析二进制文件、反编译代码、识别漏洞、理解程序逻辑。当用户要求分析可执行文件、反汇编、逆向工程、漏洞挖掘、恶意软件分析时使用此技能。
Also in 4 projects that use this
In this repository125 other files it gives its agents.
- skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- skills/vercel-react-native-skills/AGENTS.mdAGENTS.md
- address-sanitizerSkill
- aflppSkill
- algorand-vulnerability-scannerSkill
- algorithmic-artSkill
- ask-questions-if-underspecifiedSkill
- atherisSkill
- audit-context-buildingSkill
- audit-prep-assistantSkill
- autonomous-skillSkill
- aws-skillsSkill
- better-authSkill
- brainstormingSkill
- brand-guidelinesSkill
- burpsuite-project-parserSkill
- cairo-vulnerability-scannerSkill
- canvas-designSkill
- cargo-fuzzSkill
- changelog-generatorSkill
- claude-in-chrome-troubleshootingSkill
- cloudflare-skillsSkill
- code-maturity-assessorSkill
- codeqlSkill
- codex-skillSkill
- constant-time-analysisSkill
- constant-time-testingSkill
- cosmos-vulnerability-scannerSkill
- coverage-analysisSkill
- d3js-visualizationSkill
- db-resetSkill
- deep-researchSkill
- deploySkill
- dev-startSkill
- differential-reviewSkill
- dispatching-parallel-agentsSkill
- doc-coauthoringSkill
- doc-generateSkill
- documentationSkill
- docxSkill
- dwarf-expertSkill
- entry-point-analyzerSkill
- env-checkSkill
- executing-plansSkill
- expo-skillsSkill
- finishing-a-development-branchSkill
- firebase-apk-scannerSkill
- fix-reviewSkill
- frontend-designSkill
- fuzzing-dictionarySkill
- fuzzing-obstaclesSkill
- git-automationSkill
- google-design-mdSkill
- guidelines-advisorSkill
- harness-writingSkill
- health-checkSkill
- huggingface-skillsSkill
- insecure-defaultsSkill
- internal-commsSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

