A honeypot shows you what attackers do on the box. It doesn’t show what they do with what they take from it. Honeytokens can close that gap, and this is a small project for once the main sensor is stable.

The idea

  1. Generate a fake AWS access key at canarytokens.org. It’s free, and the key looks real but alerts you when someone uses it.
  2. Plant it where attackers look for credentials inside Cowrie’s fake filesystem: a ~/.aws/credentials file, or an .env in a plausible app directory.
  3. Wait. When an attacker steals the key and tries it against AWS, I get an alert with the source IP and the time.

Comparing that alert with Cowrie’s session log answers questions the honeypot alone can’t:

  • Was the key harvested by the same IP that logged in, or passed along to someone else?
  • How long between theft and use: seconds (automated) or days (a human working a list)?
  • Do the same actors come back?

The Cowrie detail that matters

Older guides say to drop files into Cowrie’s honeyfs folder. In current Cowrie, the fake filesystem lives in fs.pickle, which holds both the file list and the contents of small files that attackers tend to cat. You edit it with Cowrie’s fsctl tool. A file only in honeyfs may never show up in a directory listing, so I’ll add it through fsctl and confirm it appears in a test session.

Rules for myself

  • Use a lab-only email address for the alerts, not my personal one.
  • Don’t publish the token or anything that identifies it.
  • Treat the alert data like the rest of the honeypot data: attacker-controlled, and never fed straight to a tool with a shell.

References