detection-engineer — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited detection-engineer (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Transform malware analysis findings into production-ready detection rules, hunting queries, and operationalized IOCs.
Note: YARA rules are authored in the malware-report-writer skill, not here. This skill covers Sigma rules, Suricata/Snort rules, and hunting queries.Use this skill when you need to:
Problem: Live IOCs in reports can be:
Solution: Defang (neutralize) IOCs for safe sharing.
# URLs
http://malicious.com/payload.exe
→ hxxp://malicious[.]com/payload[.]exe
https://evil.tk/login
→ hxxps://evil[.]tk/login
# Domains
malicious.com
→ malicious[.]com
c2-server.example.org
→ c2-server[.]example[.]org
# IPs
192.168.1.100
→ 192[.]168[.]1[.]100
10.0.0.50
→ 10[.]0[.]0[.]50
# Email addresses
[email protected]
→ attacker[@]evil[.]com
[email protected]
→ phishing[@]malware[.]tk
# File paths (optional)
C:\Windows\System32\malware.exe
→ C:\Windows\System32\malware[.]exeTool: ioc-fanger (Python)
# Install
pip install ioc-fanger
# Defang
echo "http://malicious.com" | fanger --defang
# Output: hxxp://malicious[.]com
# Refang (restore for testing)
echo "hxxp://malicious[.]com" | fanger --fang
# Output: http://malicious.comManual sed/awk:
# Defang URLs and domains
echo "http://malicious.com/payload.exe" | sed 's/http:/hxxp:/g; s/\./[.]/g'
# Defang IPs
echo "192.168.1.100" | sed 's/\./[.]/g'
# Defang emails
echo "[email protected]" | sed 's/@/[@]/g; s/\./[.]/g'| IOC Type | Confidence | Volatility | Reasoning |
|---|---|---|---|
| File Hash (SHA256) | High | Static | Unique to sample, won't change |
| Mutex Name | High | Static | Hardcoded in malware |
| PDB Path | High | Static | Compilation artifact |
| Registry Key | High | Static | Persistence mechanism |
| Certificate Hash | High | Static | Code signing certificate |
| IP Address | Medium | Dynamic | Can change (DGA, fast-flux, hosting) |
| Domain (C2) | Medium | Dynamic | May rotate frequently |
| URL Path | Low-Medium | Dynamic | Often dynamic or timestamped |
| User-Agent | Low | Dynamic | Common strings, high FP rate |
| File Path | Medium | Static | May vary by environment |
| Process Name | Low | Dynamic | Easily changed by attacker |
Label IOCs appropriately:
### Network Indicators (Medium Confidence - Dynamic)
- Domain: malicious[.]com (C2 server - may rotate)
- IP: 192[.]168[.]1[.]100 (C2 IP - may change)
### Host Indicators (High Confidence - Static)
- Mutex: Global\UniqueMalwareMutex
- Registry: HKCU\Software\Microsoft\Windows\CurrentVersion\Run\Malware
- File Hash: abc123... (SHA256)Sigma is a generic signature format for SIEM systems. Write once, convert to Splunk/Elastic/QRadar/ArcSight queries.
Official Repo: https://github.com/SigmaHQ/sigma
title: Short Descriptive Title
id: unique-uuid-for-this-rule
status: experimental | test | stable
description: Detailed description of what this detects
references:
- https://attack.mitre.org/techniques/T1059/001/
author: Your Name
date: 2025-10-26
tags:
- attack.execution
- attack.t1059.001
logsource:
category: process_creation # or network_connection, file_event, etc.
product: windows
detection:
selection:
Image|endswith: '\powershell.exe'
CommandLine|contains|all:
- 'DownloadString'
- 'Invoke-Expression'
condition: selection
falsepositives:
- Legitimate administrative scripts
level: high # informational, low, medium, high, critical| Category | Product | Event Source | Use Case |
|---|---|---|---|
process_creation | windows | Sysmon Event ID 1, Security 4688 | Process execution |
network_connection | windows | Sysmon Event ID 3 | Network activity |
file_event | windows | Sysmon Event ID 11 | File creation |
registry_event | windows | Sysmon Event ID 12/13/14 | Registry modifications |
image_load | windows | Sysmon Event ID 7 | DLL loading |
create_remote_thread | windows | Sysmon Event ID 8 | Process injection |
dns_query | windows | Sysmon Event ID 22 | DNS queries |
String Matching:
|contains - String contains value|startswith - String starts with value|endswith - String ends with value|all - All values must be present|re - Regular expression matchExamples:
# Contains any
CommandLine|contains:
- 'powershell'
- 'cmd.exe'
# Contains all
CommandLine|contains|all:
- 'Invoke-WebRequest'
- '-OutFile'
# Ends with
Image|endswith: '\rundll32.exe'
# Starts with
CommandLine|startswith: 'C:\Windows\System32\'
# Regex
CommandLine|re: '.*\\\\AppData\\\\Local\\\\Temp\\\\[a-z]{8}\.exe'title: Suspicious PowerShell Download and Execute
id: a6e0ee39-d2cb-477d-9223-7b9e6090613a
status: experimental
description: Detects PowerShell downloading content and executing it via Invoke-Expression
references:
- https://attack.mitre.org/techniques/T1059/001/
- https://attack.mitre.org/techniques/T1105/
author: Analyst Name
date: 2025-10-26
tags:
- attack.execution
- attack.t1059.001
- attack.command_and_control
- attack.t1105
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
CommandLine|contains|all:
- 'DownloadString'
- 'IEX'
condition: selection
falsepositives:
- Legitimate software deployment scripts
- Administrative automation
level: hightitle: Malware Persistence via Registry Run Key
id: 8ff9a2f5-f996-4405-a5f1-d79d680cb5e6
status: stable
description: Detects creation of registry Run key pointing to suspicious locations
references:
- https://attack.mitre.org/techniques/T1547/001/
author: Analyst Name
date: 2025-10-26
tags:
- attack.persistence
- attack.t1547.001
logsource:
category: registry_event
product: windows
detection:
selection:
EventType: SetValue
TargetObject|contains: '\Software\Microsoft\Windows\CurrentVersion\Run\'
Details|contains:
- '\AppData\Local\Temp\'
- '\Users\Public\'
- '\ProgramData\'
- '%TEMP%'
condition: selection
falsepositives:
- Legitimate software installations
level: mediumtitle: Network Connection to Known C2 Server
id: 54502807-546d-4152-abd4-7c12ac7f9833
status: experimental
description: Detects network connection to known malware C2 IP address
references:
- Internal malware analysis report
author: Analyst Name
date: 2025-10-26
tags:
- attack.command_and_control
- attack.t1071
logsource:
category: network_connection
product: windows
detection:
selection:
DestinationIp:
- '192.168.56.101' # Replace with actual C2 IP
- '10.0.0.50'
DestinationPort:
- 443
- 8080
condition: selection
falsepositives:
- Rare, should be investigated
level: hightitle: Malware Dropping Files to Suspicious Location
id: 37ec0b15-debf-46d3-8132-ff7aa637a0b0
status: experimental
description: Detects file creation in common malware drop locations
references:
- https://attack.mitre.org/techniques/T1105/
author: Analyst Name
date: 2025-10-26
tags:
- attack.defense_evasion
- attack.t1105
logsource:
category: file_event
product: windows
detection:
selection:
TargetFilename|contains:
- '\AppData\Local\Temp\'
- '\Users\Public\'
TargetFilename|endswith:
- '.exe'
- '.dll'
- '.bat'
- '.vbs'
condition: selection
falsepositives:
- Software installations
- Temporary file creation by legitimate apps
level: lowUsing sigma-cli (modern — replaces legacy sigmac):
# Install sigma-cli
pip install sigma-cli
# Convert to Splunk
sigma convert -t splunk rule.yml
# Convert to Elastic
sigma convert -t elasticsearch rule.yml
# Convert to QRadar
sigma convert -t qradar rule.yml
# Convert to Microsoft Sentinel
sigma convert -t sentinel rule.ymlExample Conversions:
Splunk:
index=windows EventCode=1
(Image="*\\powershell.exe" OR Image="*\\pwsh.exe")
CommandLine="*DownloadString*" CommandLine="*IEX*"Elastic:
{
"query": {
"bool": {
"must": [
{"wildcard": {"process.executable": "*\\\\powershell.exe"}},
{"wildcard": {"process.command_line": "*DownloadString*"}},
{"wildcard": {"process.command_line": "*IEX*"}}
]
}
}
}Do:
uuidgen or online)Don't:
action protocol src_ip src_port -> dest_ip dest_port (rule_options)Components:
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"ET MALWARE Suspicious C2 Checkin";
flow:established,to_server;
http.method; content:"POST";
http.uri; content:"/api/checkin";
http.user_agent; content:"Mozilla/4.0 (compatible|3b| MSIE 6.0)";
sid:1000001;
rev:1;
metadata:created_at 2025_10_26;
)Breakdown:
alert http - Alert on HTTP traffic$HOME_NET any -> $EXTERNAL_NET any - Outbound trafficflow:established,to_server - Established connection to serverhttp.method; content:"POST" - HTTP POST request (sticky buffer)http.uri; content:"/api/checkin" - Specific URI path (sticky buffer)http.user_agent; content:"..." - Specific User-Agent (sticky buffer)sid:1000001 - Signature ID (use 1000000+ for custom rules)rev:1 - Revision numberalert dns $HOME_NET any -> any 53 (
msg:"ET MALWARE Suspicious DGA Domain Query";
dns.query; content:".tk"; nocase;
sid:1000002;
rev:1;
metadata:created_at 2025_10_26;
)alert tls $HOME_NET any -> $EXTERNAL_NET 443 (
msg:"ET MALWARE Known C2 Server Certificate";
tls.sni; content:"malicious.com";
tls.cert_subject; content:"CN=Evil Corp";
sid:1000003;
rev:1;
metadata:created_at 2025_10_26;
)alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"ET MALWARE Executable Download from Suspicious TLD";
flow:established,to_server;
http.uri; content:".exe"; endswith;
http.host; content:".tk"; endswith;
sid:1000004;
rev:1;
metadata:created_at 2025_10_26;
)http.method - GET, POST, PUT, etc.http.uri - Request URI pathhttp.host - Host headerhttp.user_agent - User-Agent stringhttp.request_body - POST datahttp.response_body - Response contenthttp.header - Any HTTP headerhttp.stat_code - Response code (200, 404, etc.)dns.query - DNS query namedns.opcode - DNS operation codedns.rcode - DNS response codetls.sni - Server Name Indicationtls.cert_subject - Certificate subjecttls.cert_issuer - Certificate issuertls.cert_serial - Certificate serial numbertls.version - TLS version# Test rule syntax
suricata -T -c /etc/suricata/suricata.yaml -S custom.rules
# Run on PCAP
suricata -r sample_traffic.pcapng -S custom.rules -l /var/log/suricata/
# Check alerts
cat /var/log/suricata/fast.logDo:
Don't:
Hunt for PowerShell Download Cradles:
index=windows EventCode=1
(Image="*\\powershell.exe" OR Image="*\\pwsh.exe")
(CommandLine="*DownloadString*" OR CommandLine="*DownloadFile*" OR CommandLine="*Invoke-WebRequest*")
| table _time, ComputerName, User, CommandLine
| sort -_timeHunt for Suspicious Registry Run Keys:
index=windows EventCode=13
TargetObject="*\\Software\\Microsoft\\Windows\\CurrentVersion\\Run*"
(Details="*\\AppData\\Local\\Temp\\*" OR Details="*\\Users\\Public\\*" OR Details="*\\ProgramData\\*")
| table _time, ComputerName, TargetObject, Details
| sort -_timeHunt for Outbound Connections to Rare Destinations:
index=network
| stats count by dest_ip
| where count < 5
| join dest_ip [search index=network]
| table _time, src_ip, dest_ip, dest_port, bytes_outHunt for Process Injection:
event.code:8 AND
winlog.event_data.TargetImage:(*\\explorer.exe OR *\\svchost.exe) AND
NOT winlog.event_data.SourceImage:C\\:\\Windows\\System32\\*Hunt for Suspicious File Creations:
event.code:11 AND
file.path:(*\\AppData\\Local\\Temp\\*.exe OR *\\Users\\Public\\*.exe) AND
NOT process.executable:(*\\Windows\\System32\\* OR *\\Program Files\\*)Hunt for Credential Access:
Process = "lsass.exe" AND
AccessMask IN (0x1010, 0x1410, 0x1438) AND
SourceImage NOT IN (known_good_processes)Hunt for Lateral Movement:
Process = "psexec.exe" OR
Process = "wmic.exe" OR
(Process = "powershell.exe" AND CommandLine CONTAINS "Invoke-Command")STIX 2.1 Example:
{
"type": "indicator",
"spec_version": "2.1",
"id": "indicator--91ec6a8e-61ab-4c6a-b8f5-95240110b203",
"created": "2025-10-26T12:00:00.000Z",
"modified": "2025-10-26T12:00:00.000Z",
"name": "Malicious Domain: malicious.com",
"description": "C2 domain for Malware Family X",
"pattern": "[domain-name:value = 'malicious.com']",
"pattern_type": "stix",
"valid_from": "2025-10-26T12:00:00.000Z",
"labels": ["malicious-activity"]
}ioc_type,ioc_value,confidence,description,first_seen
domain,malicious.com,high,C2 server,2025-10-26
ip,192.168.1.100,medium,C2 IP address,2025-10-26
sha256,abc123...,high,Malware sample hash,2025-10-26
mutex,Global\M12345,high,Mutex name,2025-10-26
registry,HKCU\Software\...\Run,high,Persistence key,2025-10-26<?xml version="1.0" encoding="UTF-8"?>
<ioc xmlns="http://schemas.mandiant.com/2010/ioc">
<short_description>Malware Family X IOCs</short_description>
<description>IOCs from analysis of Malware Family X</description>
<authored_by>Analyst Name</authored_by>
<authored_date>2025-10-26T12:00:00</authored_date>
<definition>
<Indicator operator="OR">
<IndicatorItem>
<Context document="FileItem" search="FileItem/Md5sum"/>
<Content type="md5">abc123...</Content>
</IndicatorItem>
<IndicatorItem>
<Context document="Network" search="Network/DNS"/>
<Content type="string">malicious.com</Content>
</IndicatorItem>
</Indicator>
</definition>
</ioc>Step 1: Identify Unique Behaviors From dynamic analysis, extract behaviors that are:
Step 2: Map to Data Sources
| Behavior | Data Source | Detection Method |
|---|---|---|
| Process injection | Sysmon Event ID 8 | Sigma rule |
| C2 beacon | Network logs, proxy | Suricata rule |
| Registry persistence | Sysmon Event ID 13 | Sigma rule |
| File drop | Sysmon Event ID 11 | Sigma rule + YARA |
| DNS query (DGA) | DNS logs | Suricata rule |
Step 3: Write Detection Rule
Choose appropriate rule type:
Step 4: Test & Validate
Step 5: Deploy & Tune
Before finalizing detection content:
Sigma Rules:
Suricata Rules:
IOCs:
Hunting Queries:
Detection content appears in multiple report sections:
IOCs Section:
Detection Rules Section:
Remediation Section:
Appendix:
| Task | Tool | Command | |
|---|---|---|---|
| Defang IOCs | ioc-fanger | `echo "http://evil.com" \ | fanger --defang` |
| Convert Sigma | sigma-cli | sigma convert -t splunk rule.yml | |
| Test Suricata | suricata | suricata -T -S rules.rules | |
| Generate UUID | uuidgen | uuidgen (Linux/Mac) or online | |
| Validate STIX | stix2-validator | stix2_validator file.json |
User request: "Help me create detection rules for this ransomware that encrypts files with .locked extension"
Workflow:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.