Booby-Trapping My Own NAS with Canarytokens · NOV 10, 2026
Summary
I planted two fake "secrets" on my NAS: a passwords file and a set of cloud access keys. Nobody has a reason to touch them, so any use at all means something is wrong. Then I attacked them myself. Both traps fired, and the alerts showed up within minutes with the time, the source, and the tool used. Total cost: $0.
What a canary token is
The name comes from the canary in a coal mine: a cheap early warning. A canary token is fake bait with a unique ID hidden inside it. When someone opens or uses the bait, that ID "phones home" and you get an alert. It's the same idea as a tracking pixel in an email, turned into a burglar alarm.
I used canarytokens.org, a free service from the security company Thinkst. No account is needed, just an email address for alerts and a note to remind you where you hid each token. It never sees your files or your network; it only learns about whoever trips the trap.
The bait
| Bait | What it looks like | What sets it off |
|---|---|---|
passwords.txt | A careless list of logins, with a "password manager" link at the top | Anyone who visits that link |
aws-keys.txt | Amazon cloud access keys | Anyone who tries to use the keys |
Every login in the passwords file is invented, and the email address uses a .test domain, which is reserved and can never exist. The AWS keys are real keys, but for an account Thinkst owns, with zero permissions, so they can't do anything. I put both in a Finance folder on my NAS, and each file points at the other, the way a real messy setup would look.
Attacking myself
To test it, I did what an intruder would do with each file.
The keys. I ran aws sts get-caller-identity with them. That command asks AWS "who am I?" and it succeeds for any valid key, even one with no permissions. That's exactly why attackers run it first on stolen keys. The fake keys answered, and that answer is what set off the alarm.
The passwords file. I opened its "password manager" link on my phone, over mobile data, so it would come from outside my network like a real intruder. The intruder just sees a harmless picture:
What the alerts told me
Both traps fired. Every alert arrived within minutes, each timestamped to the minute I ran the test.
| Trap | Fired? | What the alert captured |
|---|---|---|
| AWS keys | Yes, every attempt | Time, source address, rough location on a map, and the exact tool and command used |
| Passwords link | Yes | Time, source address, and the visitor's claimed browser |
A lesson from the passwords alert
The passwords alert said the visitor used Firefox 24 on Ubuntu Linux, a browser from 2013, while also claiming to be Chrome 80. I actually opened the link with a privacy-hardened Firefox on my phone, which deliberately reports a fake, generic identity.
That's the lesson: a "user agent" is just what the visitor claims to be, and it's trivial to fake. An analyst should lean on what can't be faked as easily: that the trap fired, when, and from where. Attackers with any skill disguise their tools the same way my browser did.
Why this is worth doing
- Almost no false alarms. Normal activity never touches these files, so an alert is worth reading right away.
- It catches what scanners miss. Antivirus looks for known bad files. A canary catches behavior: someone going through your stuff, whatever tool they use.
- The keys follow the thief. If the files get copied off my NAS, the AWS keys still alert from wherever someone tries them.
- Cheap and fast. Free, about 15 minutes to set up, nothing to install on my servers.
What this can't catch
- Quiet reads. Someone who opens
passwords.txtbut never visits the link triggers nothing. The file only alarms when the bait is used. - Offline attackers. Both tokens have to reach the internet to report in. A machine with no internet access won't raise an alert.
- It depends on an outside service. If canarytokens.org or my email is down, the alert is delayed or lost.
- A careful attacker may spot it. Well-known token formats can be recognized, so canaries are one layer, not the whole defense.
Next: a tripwire that doesn't need the internet
The first gap matters most, so the next post closes it. I'll use the Linux audit system on the server that holds the NAS drives to watch these exact files, so any read at all, even fully offline, raises a high-priority alert in my Wazuh SIEM and on my phone, naming the process and user that touched them. Canarytokens catch the bait being used; the local tripwire will catch someone just looking.