Skip to content

feat: deceptive tripwire responses + canary credentials (#12) - #26

Merged
cport1 merged 1 commit into
mainfrom
feat/deceptive-responses
Jul 19, 2026
Merged

feat: deceptive tripwire responses + canary credentials (#12)#26
cport1 merged 1 commit into
mainfrom
feat/deceptive-responses

Conversation

@cport1

@cport1 cport1 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

The first beyond-parity feature — deception that @webdecoy/node structurally can't do, because the WordPress plugin owns the entire HTTP response. A tripwire hit can now deceive a scanner instead of just denying it.

Response modes (per the new Tripwires → Response setting)

  • block — 403 (default, unchanged).
  • notfound — 404, indistinguishable from an unprotected site.
  • decoy — 200 with believable fake content: fake .env, wp-config.php.bak, SQL dump, or phpinfo, each embedding unique per-site canary credentials.
  • tarpit — a bounded slow-drip response (≤10s) that burns scanner time.

Canary credentials — the payoff

Canaries are derived from a per-site secret: deterministic, recomputable, and guaranteed never to collide with a real value. When a decoy is served they're recorded in the detections audit trail. Then, because they're recomputable, a later login attempt using a canary credential — something that could only have come from a decoy we served — is caught by a priority-5 authenticate filter, logged as a critical exfiltration detection, and blocked. That turns a scanner slurping a fake .env into attributable evidence the moment they try to use it.

Safety rails

  • Decoy content is template-only and never reads a real configuration value.
  • A path with no matching template fails closed to the normal 403.
  • Decoy/Not-Found/Tarpit deliberately don't locally block the IP — letting the scanner keep pulling decoys gathers more evidence, while edge enforcement still fires via the reported wd_clearance token.
  • Tarpit ties up a PHP-FPM worker for up to 10s; documented and off by default.

Tests

Verified canary determinism, is_canary_credential (true for its own canaries, false for real-looking/empty values), that all four decoy templates embed canaries, fail-closed on unknown paths, and block-mode fallthrough (20 checks). SDK suite still green.

Closes #12. Part of #16.

A tripwire can now deceive a scanner instead of just denying it — something
only possible because PHP owns the whole HTTP response (node middleware can't).

- WebDecoy_Decoy_Response: per-site canary credentials derived from a stored
  secret (deterministic, recomputable, never colliding with real values).
  Response modes for a tripwire hit: block (403, default), notfound (404),
  decoy (200 with believable fake .env / wp-config / SQL dump / phpinfo
  content embedding canaries), tarpit (bounded slow-drip, <=10s).
- Safety: decoy content is template-only and NEVER reads a real config value;
  a path with no template fails closed to 403.
- Deception-first: decoy/notfound/tarpit modes do NOT locally block the IP,
  so the scanner keeps digging decoys — each hit another reported violation —
  while edge enforcement still fires via the reported clearance token.
- Canary-use detection: a login attempt with a canary credential (which could
  only have come from a served decoy) is logged CRITICAL and blocked, via a
  priority-5 authenticate filter.
- New Tripwires-tab 'Response' selector; served canaries recorded in the
  detections audit trail.

Verified canary determinism, is_canary_credential, all four decoy templates
embed canaries, fail-closed on unknown paths, and block-mode fallthrough.

Closes #12. Part of #16.
Co-authored-by: Claude <noreply@anthropic.com>
@cport1
cport1 merged commit aaaf8a8 into main Jul 19, 2026
3 checks passed
@cport1
cport1 deleted the feat/deceptive-responses branch July 19, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deceptive tripwire responses — fake content, canary credentials, tarpit

1 participant