Detection-as-code

Detections for SSH and Telnet attacks and the network traffic around them, written once in Sigma and converted to Splunk SPL and Microsoft Sentinel KQL. Every rule is tested in CI against attack events that must match and look-alike events that must not. The behaviour comes from the live honeypot: Cowrie's shell sessions and the Suricata IDS beside it, joined by source IP where a rule needs both.

18rules
18ATT&CK techniques
71attack test events
115look-alike test events
17 of 18rules fired on the honeypot, last 30 days

How a rule gets here

  1. Sigma rule in rules/, tagged with ATT&CK
  2. Validation: pySigma's 31 validators, and every regex checked to be RE2-safe for KQL
  3. Tests: an evaluator runs the rule on match.jsonl (must fire) and nomatch.jsonl (must not)
  4. Conversion to SPL and KQL, committed in dist/; CI fails if they're stale
  5. Splunk and Sentinel checks: the generated SPL runs in Splunk and the KQL in Microsoft Sentinel on the same test events, and both must agree with the evaluator
  6. Deploy: the rules run as Sentinel analytics rules on the live honeypot feed, which arrives every 10 minutes

Automated response

Every incident these rules raise in Microsoft Sentinel goes through SOAR playbooks (Logic Apps, deployed with Bicep). The honeypot only sees attacks, so they triage rather than block: each incident is enriched with AbuseIPDB and the source's activity on the honeypot, Low-severity incidents from widely reported sources are closed, and High ones are assigned and sent to my phone. An incident is High only when its source brought a file or an exploit the honeypot hasn't seen in two days; the same botnets' daily droppers are Medium.

5462incidents
81%enriched, median 130 s after creation
68%closed automatically
143 of 179High incidents escalated

Since 2026-11-09, as of 2026-12-05 01:05:53 UTC. Test incidents are left out. soar.json

ATT&CK coverage

TacticTechniqueRules
ReconnaissanceT1595Active ScanningScanned Then Logged In
Initial AccessT1078Valid AccountsBlocklisted Source Logs In, Login Followed By Tool Transfer, Scanned Then Logged In
T1190Exploit Public-Facing ApplicationNetwork Exploit Attempt, Telnet Login Bypass Attempt
ExecutionT1053.003CronCron Job Added From Interactive Session
T1059.004Unix ShellPermissions Changed To Run Or Unlock A File, Download And Execute In One Command, Writable And Executable Directory Probe
T1059.008Network Device CLINetwork Device CLI Escape Attempt
PersistenceT1053.003CronCron Job Added From Interactive Session
T1078Valid AccountsBlocklisted Source Logs In, Login Followed By Tool Transfer, Scanned Then Logged In
T1098.004SSH Authorized KeysSSH Authorized Keys Modified
Privilege EscalationT1053.003CronCron Job Added From Interactive Session
T1078Valid AccountsBlocklisted Source Logs In, Login Followed By Tool Transfer, Scanned Then Logged In
T1098.004SSH Authorized KeysSSH Authorized Keys Modified
StealthT1027Obfuscated Files or InformationBinary Written With Hex-Escaped Echo
T1070.003Clear Command HistoryShell History Cleared Or Disabled
T1070.004File DeletionFile Deleted Right After It Runs
T1078Valid AccountsBlocklisted Source Logs In, Login Followed By Tool Transfer, Scanned Then Logged In
Defense ImpairmentT1222.002Linux and Mac PermissionsPermissions Changed To Run Or Unlock A File
T1685Disable or Modify ToolsFirewall Or Security Agent Disabled
T1686Disable or Modify System FirewallFirewall Or Security Agent Disabled
Credential AccessT1110.001Password GuessingPassword Guessing From One Source
DiscoveryT1082System Information DiscoverySystem Fingerprinted In One Command
T1083File and Directory DiscoveryWritable And Executable Directory Probe
Command and ControlT1105Ingress Tool TransferDownload And Execute In One Command, Binary Written With Hex-Escaped Echo, Login Followed By Tool Transfer
ImpactT1496Resource HijackingCryptocurrency Miner Indicators

Rules

Honeypot #2, a real Debian server, is watched by Wazuh XML rules outside this pipeline: the rules and how each was verified, and the intrusion that led to most of them, INC-001.