The idea
Emil looks after the computers at Volans Observatory, whose archive holds decades of telescope data. A visiting researcher's account was used last week from a desk nobody was sitting at, and Emil wants to know if anyone is poking around where they shouldn't.
He sets two honey-traps: bait with no legitimate use, so any touch of it is an alert worth acting on, with almost no false positives. One is a honeypot host whose fake SSH, FTP and admin ports log every connection. The other is a canary token, a URL planted in a bait credentials file on the real archive, which calls home the instant anyone fetches it.
Steps
-
Two traps, nothing legitimate touches
Emil has set two decoys on the
decoyhost (10.0.1.11). The first is a honeypot. It listens on three ports a snooper loves, 22 (SSH), 21 (FTP) and 8080 (a web admin panel), and none of them serves anyone.The second is the call-home for a canary token: a small web server on port 9000, the beacon, that logs any fetch of a planted URL.
Neither has a legitimate user, so both logs should be empty right now. That empty log is the baseline, and every line that appears later is a lead.
decoy:~# ss -tln decoy:~# awk '/accepting connection/ {n++} END {print (n + 0) " touches logged"}' /var/log/honeypot.log decoy:~# awk '/CANARY/ {n++} END {print (n + 0) " token fetches logged"}' /var/log/canary.log -
A normal day, no alerts
The analyst does their real work: they fetch the front page from the
archiveserver (10.0.1.10). Honest traffic has no reason to reach a decoy or to know a planted URL, so both traps should stay silent.That silence is why their alerts are worth reading. A trap never has honest traffic to wade through, so it raises no false alarms.
analyst:~# curl -sS http://10.0.1.10/ decoy:~# awk '/accepting connection/ {n++} END {print (n + 0) " touches logged"}' /var/log/honeypot.log decoy:~# awk '/CANARY/ {n++} END {print (n + 0) " token fetches logged"}' /var/log/canary.log -
A scan trips the honeypot
Someone who gets onto a network usually maps it first. A port scan knocks on every address's ports to see which are open. The scan cannot know which host is the trap, so it connects to the
decoyhost like any other, and the moment it does, the honeypot logs the touch with the source address.insider:~# nmap -Pn -sT -p 21,22,8080 10.0.1.10-13 decoy:~# grep 'accepting connection' /var/log/honeypot.log
-
The canary token: bait in your data
A honeypot catches someone probing the network. A canary token catches someone already inside your data: it is a decoy credential, file or URL that nothing legitimate uses, wired to alert the instant anything touches it.
Emil planted one: a bait
credentials-backup.txtat an unlinked path on thearchiveserver. No staffer browses there, but an intruder trying paths on the web server finds it. Read it the way they would.insider:~# curl -sS http://10.0.1.10/backup/credentials-backup.txt
-
Take the bait, call home
The intruder, tempted by a "recovery-doc" in a file of admin secrets, fetches the token URL to see what it holds. That fetch is what Emil was waiting for. The URL is unique to this bait, so the server that answers it knows which decoy was touched, and by whom.
Fetch it, then read the canary's log.
insider:~# curl -sS http://10.0.1.11:9000/t/vault-7f3a2c decoy:~# grep CANARY /var/log/canary.log