Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
stego_provenance_defense — Steganographic prompt-injection defense for agentic AI using decode-time provenance binding, HMAC authentication, and MCP trust enforcement. | Kitploit
Tools/GitHubGitHub/ericyoc/stego_provenance_defense
Defensive ToolsSteganographyAuthenticationPapers & ResearchLearning & EducationAI Security
GitHubericyoc/stego_provenance_defense

stego_provenance_defense

Steganographic prompt-injection defense for agentic AI using decode-time provenance binding, HMAC authentication, and MCP trust enforcement.

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
View RepositoryWebsite
102 days agoNot yet reviewed

Eric Yocam on Lounge

Decode-Time Provenance Binding for MCP Agents

A reproducible proof-of-concept for a steganographic prompt-injection vector that defeats text content scanners, and a defense that contains it at the decode boundary — decode-time provenance binding.

Educational / defensive security research only. All secrets in this repo are fake. Use only on systems you own or are authorized to test.


Summary

An attacker emails a victim an ordinary-looking message. A brand logo in the email signature hides an instruction via steganography (LSB, DCT, or metadata). The image is visually identical to the original and contains no suspicious text, so a content scanner sees nothing and the victim never clicks anything. But the victim's routine inbox-summarization agent processes the signature, a tool in its pipeline decodes the image, and the hidden instruction enters the agent's context — where, in a multi-agent MCP pipeline, it is relayed between agents as trusted peer output and drives a critical tool call. This is cross-modal trust laundering. The defense, decode-time provenance binding, mints an HMAC-signed UNTRUSTED label at the instant a concealment-reversing tool runs and has the MCP layer maintain the provenance lineage itself, so it blocks any critical tool call whose lineage is untrusted — even when a compromised agent presents a valid label for an unrelated trusted value. It contains rather than detects, so it is independent of payload wording and carrier.


Results

Attack success rate (ASR) — 24 payloads (three carriers × eight evasions: plain, benign-worded, Base64, token-split, Cyrillic homoglyph, zero-width, Unicode-confusable, HTML-comment); lower is better. The in-process taint baseline is an information-flow control that marks decode output untrusted but carries no cross-domain cryptographic binding:

DefenseLeaksnASR
Undefended (no checks)2424100%
Content scanner (keyword/DLP)152462.5%
Regex intent parser152462.5%
Data-flow taint (IFC baseline)0240%
Decode-time provenance (ours)0240%

Taint and provenance tie on single-domain ASR; they diverge under adversarial relaying (below), which is the point of the cryptographic binding.

Valid-label substitution — a compromised agent presents a legitimately signed TRUSTED binding from a benign tool while omitting the UNTRUSTED decode origin that actually drives the call. The fix is that the MCP layer maintains the lineage itself and decides on its own ledger, not on the agent-supplied binding:

EnforcementDecision
Agent-supplied binding only (naive)allow (leaks)
Layer-maintained, dependency omittedblock
Layer-maintained, dependency in argumentsblock
Layer-maintained, clean contextallow

Component ablation — four components, each defending a distinct attack. Disable one at a time; substitution is in-domain, forged relay is a forged TRUSTED label crossing an untrusted relay to a remote verifier that holds only the presented binding. Crucially, HMAC alone does not stop substitution (the ledger does), and the ledger alone does not survive a cross-domain relay (the HMAC does):

ConfigurationHonestSubstitutionForged relay
Full mechanismblockedblockedblocked
− decode markingleaksleaksleaks
− cryptographic auth (HMAC)blockedblockedleaks
− trusted lineage trackingblockedleaksblocked
− sink mediationleaksleaksleaks

Cross-context propagation — taint survives an inter-agent message boundary, not just a tool-return handle. An untrusted decode in Agent A reaches a critical call in Agent B's separate context, and on a mediated channel (which the threat model already requires for inter-agent comms) the taint propagates and B is blocked. A channel the layer doesn't mediate is outside the model by construction — not a leak within scope:

Channel A → BB's critical call
Mediated inter-agent message (in scope)block (taint propagated)
Unmediated side channel (outside the model)not covered

Overhead scaling — MintBinding is ~O(1) (~10–14 µs regardless of depth); EnforceCritical is linear in the dependency-closure it traverses (≈10 µs at depth 1 → ≈0.66 ms at depth 100 → ≈6.7 ms at depth 1000) and flat (~6–7 µs) in the number of concurrent tainted contexts. Realistic closures (depth in the tens) stay under ~0.1 ms.

Legitimate-task utility — an audited trusted-promotion path (re-labelling a specific decoded value, e.g. an OCR'd invoice number, under authorization) eliminates false blocks while the attack stays blocked:

RegimeCompletionFalse blocksAttack blocked
No promotion2/3 (67%)1yes
Trusted promotion3/3 (100%)0yes

Decode-set completeness — the registration assumption, stressed directly:

Decode setStego attackLegitimate critical call
Correctblockedallowed
Missing decoderleaksallowed
Over-broadblockedfalse block

Label integrity across handoffs — the binding survives honest relaying and resists a compromised worker:

Relay scenarioVerifier decision
Honest relay, 1 / 3 / 5 / 10 hopsverifies; blocked
Compromised: rewrite payload, keep HMACblock (HMAC mismatch)
Compromised: forge TRUSTEDblock (HMAC mismatch)
Compromised: strip bindingblock (no valid label)

Overhead — effectively free at the decision point: minting and verifying a binding are ~8–9 µs each (~17 µs combined), versus a ~11 ms decode tool call — under ~0.2% added. Carrier distortion is low (LSB ≈ 76 dB PSNR, metadata lossless; DCT ≈ 18 dB — a distortion metric, not a perceptual-imperceptibility claim).


What's in here

stego_provenance_defense_poc.ipynb   # the full PoC (run top-to-bottom)
requirements.txt                     # dependencies (mcp pinned <2)

Running the notebook writes all figures, tables, and CSVs to MyDrive/stego_provenance_poc/{figures,tables,data} in Colab (or ./stego_provenance_poc/ locally). Every figure and table is produced by a cell, so the whole thing is reproducible from a clean run.


Run it

Google Colab (recommended)

  1. Open stego_provenance_defense_poc.ipynb in Colab.
  2. Runtime → Run all. It mounts Google Drive and installs dependencies itself.
  3. Outputs appear under MyDrive/stego_provenance_poc/{figures,tables,data}.

Local

pip install -r requirements.txt
jupyter notebook stego_provenance_defense_poc.ipynb

Outputs land in ./stego_provenance_poc/. A GPU is optional (the agent model is small); the security result does not depend on the model.


How the defense works

It combines two guarantees that are usually conflated, and it is their conjunction — not the HMAC alone — that is the contribution:

Download Tool