Five fake keys, each wired into a setting the tool already reads.
Nothing watches your files and nothing runs in the background. The client makes the call itself, at the moment something uses the bait.
-
aws
AWS profile
~/.aws/config
credential_process = sh -c 'r=$(curl -sf "<your callback URL>" …); printf "{… fake keys …}"'Fires when anything resolves the planted profile.
-
ssh
SSH host
~/.ssh/config
ProxyCommand sh -c 'curl -fsS <your callback URL> …; exec nc "$0" "$1"' %h %p
Fires when anything connects to the fake host.
-
k8s
Kubeconfig
~/.kube/<name>.yaml
server: <your callback URL>
Fires when kubectl contacts the fake cluster. Your own ~/.kube/config is not modified.
-
git
Git host
~/.gitconfig
[url "<your callback URL>"] insteadOf = https://git.<fake-host>.io/
Fires when Git targets the fake internal host.
-
npm
npm scope
~/.npmrc
@<fake-scope>:registry=<your callback URL>
Fires when npm looks up a package under the fake scope.
These five are the defaults. More types are opt-in with snare arm --select or snare plant --type <type>, for example aws, gcp, pypi-upload and git-credentials. Each fires under narrower conditions; see Detection contracts.
Profile along the AWS canary
The alert leaves before the first API call does.
Resolving the planted profile runs a command, and that command calls home before it hands back fake keys, so the alert goes out before the API call is even attempted. Then that call fails.
- AThe agent runs a command with the planted profile. Credential resolution begins.
- BThe planted line runs curl to the callback. The alert is sent to your webhook.
- COnly now does the client get its keys and send the API call. The keys are fake. It fails.
credential_process = sh -c 'r=$(curl -sf "<your callback URL>" …); printf "{… fake keys …}"'
The planted line in ~/.aws/config, abridged. Timings illustrative, not to scale. Canary keys that alert from AWS’s own logs need nothing on the machine, but they report minutes after the call.
Field note, in our lab
It used the keys anyway.
In our lab, an autonomous agent told to find and use every credential on a machine tripped Snare in 58 seconds, after it had already guessed it was a trap.
It lands where your team already looks.
Every alert carries the same fields: what fired, where it was used from, and the client that called home.
Hosted alerts are formatted for Discord, Slack and Telegram. Self-host to send the same event to any HTTPS endpoint.
Sample alert
- canary
- AWS profile
- label
- dev-laptop
Which canary fired, plus the label you gave it with --label, if any.
- time
- 2026-03-14 04:07:33 UTC
- source IP
- 203.0.113.42
- network/ASN
- AS64500
When it was used, and from where. An agent on your laptop fires from your own address. Bait copied off the machine fires from theirs.
- user agent
- curl/8.7.1
The client that called home. Here it is curl, because the planted command phones home itself. The kubeconfig canary shows kubectl, for example kubectl/v1.34.2.
Snare never reads request bodies or stores credential values.
Bring your own domain.
Callbacks can live on your own domain. Nobody else shares your host, so there is no shared host to search for.
- Your own Cloudflare Worker
- Free plan.
snare serve- One binary, SQLite.
The hosted default uses a neutral callback host that does not name Snare. Set up your own callback domain
Arm it in a minute. Remove it with one command.
curl -fsSL https://snare.sh/install | shOne binary for Linux and macOS, or
brew install peg/tap/snare. Release checksums are signed with Sigstore. On Windows 10 or later, from PowerShell:irm https://snare.sh/install.ps1 | iexsnare armAsks where alerts go (Discord, Slack or Telegram), plants five canaries and sends a test alert.
snare prove --runSafely trips each canary and confirms the hit was recorded.
snare disarmRemoves every canary. Your real profiles, hosts and repos were never changed.
- gitnever fired
- npmnever fired
- sshnever fired
- k8snever fired
- awsprocnever fired
Then, usually, nothing.
Healthy work never touches the bait. snare status will say never fired, and that is the normal state.
What Snare does not do.
It fires when the bait is used. It does not see a file being read, and it does not block anything.
- Reads are invisible.
- If an agent only reads ~/.aws/config and never uses the profile, nothing fires. That needs an OS-level sensor, and Snare is not one.
- It needs a network path.
- Offline, the bait still returns fake keys. The alert only goes out when the bait is used somewhere that can reach the callback.
- It detects. It does not block.
- Pair it with a sandbox or a policy tool for prevention, such as Rampart, which blocks calls by policy.