$ cd ~/projects/playbook-defense

Playbook Defense

Honeypot findings, turned into alerts, an allowlist and a trap · Sigma and Terraform on Google Cloud · Nov 2026

Sigma Terraform Google Cloud MITRE ATT&CK Alerting Deception GitHub Actions
17
Sigma rules, checked against ATT&CK in CI
12/12
playbook steps with at least one alert
1
file feeds both the firewall and the alerts
12
NAS ports on the decoy's tripwire
01

In short

02

Three layers

How the three layers fit together Bots on the internet are stopped at the edge allowlist, while the VPN, office and Identity-Aware Proxy reach the company's servers. IoT devices can't connect out except to approved servers. Inside the network, any connection to the NAS decoy is an alert. All three write firewall logs, which the Sigma rules turn into alerts, and one allowlist file feeds both the firewall and the rules. Internet bots · scanners Approved VPN · office · IAP edge allowlist company network · GCP VPC Servers tag: managed IoT segment cameras · DVRs · routers nas-backup-01 NAS decoy · no public IP 1 2 3 4 allowlist.yaml VPC firewall logs 17 Sigma rules SIEM alerts same addresses, both places
The numbers match the list below. Every arrow that crosses a firewall writes a log entry, and those log entries are what the alerts read.
  1. Designed to stop bots at the edge. Admin ports (SSH, RDP, VNC and device web pages) only answer the VPN, static office addresses and Google's Identity-Aware Proxy. Telnet, the door every bot on the honeypot came through, is closed to everyone by default, the allowlist included.
  2. Approved people still get in. One door, preferably the VPN. Losing a laptop means revoking one VPN account, not editing the firewall.
  3. IoT devices are blocked from calling out. Every dropper the honeypot saw fetched its payload from a raw IP address on the internet. IoT devices may only reach the few servers they need, so that download would fail, and the blocked attempt would raise an alert.
  4. Anything that touches the decoy is an alert. The NAS decoy sits inside the network with an ordinary server name. No real person or system is meant to use it, so a connection most likely means someone inside is exploring: a compromised device, a bot past the edge, or a person who shouldn't be there.
03

Every playbook step, as an alert

The honeypot recorded the same playbook again and again. Each step became at least one rule, written in Sigma so it converts to Splunk, Sentinel, Elastic and other SIEMs. Rules that read firewall logs work everywhere; the rest need process or login logs from the device itself, which many IoT devices can't provide.

Playbook stepMITRE ATT&CKRuleReadsLevel
Log in with factory defaultsT1110.001, T1078.001Telnet or admin port from outside the allowlist; login as root, admin, guest…Firewall, loginhigh
Break out of a router's limited menuT1059.008, T1059.004Shell started under telnetd or loginProcessesmedium
Try a router CLIT1059.008Shell started under telnetd or loginProcessesmedium
Inject a shell into a ping toolT1059.004Shell syntax in a ping or diagnostics requestWeb serverhigh
Look aroundT1082, T1087.001, T1033, T1083CPU, mount and user checksProcesseslow
Find a writable folder, then check with a hex echoT1083Mount checks, and echo -e with hexProcesseshigh
Check for a real BusyBoxT1497.001BusyBox with a made-up applet nameProcesseshigh
Check that echo worksT1497.001Shell-check commands people don't typeProcesseshigh
The SHELL_TEST checkT1497.001SHELL_TEST anywhere in a commandProcesseshigh
Download and runT1105, T1222.002, T1059.004Download from a raw IP; IoT device calling out, critical on dropper portsProcesses, firewallcritical
Remove rival botsT1489kill -9 aimed at other malwareProcessesmedium
Clean upT1070.004Dropped file or shell history deletedProcessesmedium
Write a payload with hex echoes, instead of downloadingT1140, T1059.004Long runs of hex escapes in echo -ne or printfProcessesmedium
The whole playbook—Telnet from outside, then the same device calls out within 10 minutesFirewallcritical
The trap—Any connection to the decoy; a login attempt on it; the decoy trying to connect outFirewallcritical

The first 12 rows are the 12 steps on the honeypot page, with the same names and ATT&CK IDs. The last three go further: a payload written with hex echoes instead of downloaded, seen in one honeypot session; the whole playbook; and the trap. Each rule's file is in the repo's rules folder.

04

The trap

Why this is worth having. The allowlist and the IoT rules are designed to stop bots at the door, and the decoy is there to catch what gets past them. Because nothing legitimate should connect to it, its alerts should have few false positives, which is rare for detection inside a network. The one exception is an approved vulnerability scanner, and the allowlist file has a place to exclude those.

05

What's tested, and what isn't

The code

The rules, the Terraform, the allowlist script and a step-by-step README, including how to keep the trap a trap.