Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
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.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
exfil-scan — Scan LLM outputs and AI-generated content for data exfiltration signals (EchoLeak, CVE-2025-32711) before they reach users or downstream systems | Kitploit
Tools/GitHubGitHub/vikasudasi/exfil-scan
Data ExfiltrationDevSecOpsSecret DetectionAPI SecurityAI Security
GitHubvikasudasi/exfil-scan

exfil-scan

Scan LLM outputs and AI-generated content for data exfiltration signals (EchoLeak, CVE-2025-32711) before they reach users or downstream systems

View Repository
62541 month agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

exfil-scan

Scan LLM outputs and AI-generated content for data exfiltration signals before they reach users, logs, or downstream systems.


1) Why exfil-scan exists

Modern LLM applications routinely process sensitive prompts, internal documents, API responses, and user data. That creates a new security boundary: the output layer.

The EchoLeak family of attacks (including CVE-2025-32711) demonstrated how hidden or obfuscated payloads can be embedded in generated text and used to exfiltrate data through tools, links, or parsing chains.

Traditional scanners focus on files, dependencies, and runtime traffic. They do not inspect generated model output in a purpose-built way.

exfil-scan provides a "virus scanner for LLM responses":

  • inspects plain text, JSON, markdown, and logs
  • identifies six classes of suspicious exfiltration patterns
  • reports findings with severity and location
  • integrates cleanly into CI/CD and local developer workflows

2) What it detects

CategorySeverityWhat is detected
Hidden TextHIGHZero-width and invisible Unicode sequences used to hide payloads
Encoded DataHIGHBase64/hex/octal/unicode escape runs likely carrying encoded content
Data-in-URLMEDIUMSuspiciously long query strings and encoded URL parameter payloads
Metadata LeaksHIGHCredential-like keys and token formats in structured/unstructured outputs
Unicode SteganographyMEDIUMBidirectional controls and mixed-script homoglyph-style words
Structural AnomaliesLOWExtreme newline/tab runs and replacement-character encoding artifacts

3) Feature highlights

  • Three sensitivity profiles: low, medium, high
  • YAML configuration override support
  • Input from stdin, single file, or directory
  • Output in text, json, markdown, or html
  • Stable exit codes for automation
  • Clean Python API for embedding into other tools

4) Installation

Install from source

root@kitploit:~
git clone https://github.com/your-org/exfil-scan.git
cd exfil-scan
pip install -e .

Standard pip install (when published)

root@kitploit:~
pip install exfil-scan

Development install

root@kitploit:~
pip install -e ".[dev]"
pytest

5) Quick start

Scan piped LLM output

root@kitploit:~
echo 'api_key: sk-ABCDEFGHIJKLMNOPQRSTUVWXYZ123456' | exfil-scan

Scan a single file

root@kitploit:~
exfil-scan --input output.txt

Scan a directory recursively

root@kitploit:~
exfil-scan --directory ./model-logs --recursive

6) CLI options reference

Notes:

  • Use either --input or --directory, not both.
  • If no path is provided, the tool reads from stdin.
  • If findings exist, the process exits with code 1.

7) Usage examples by output format

Plain text output

root@kitploit:~
exfil-scan --input suspicious.txt --format text

Expected style:

root@kitploit:~
exfil-scan report
=================
Scanned targets: 1
Total findings: 2

1. [HIGH] metadata_leaks/known_token_format:openai_key
   Location: suspicious.txt:1:10
   Description: Matched known credential/token format (openai_key).

JSON output

root@kitploit:~
exfil-scan --input suspicious.txt --format json

Expected shape:

root@kitploit:~
{
  "finding_count": 2,
  "scanned_targets": ["suspicious.txt"],
  "findings": [
    {
      "category": "metadata_leaks",
      "rule": "known_token_format:openai_key",
      "severity": "HIGH",
      "description": "Matched known credential/token format (openai_key).",
      "location": "suspicious.txt:1:10",
      "snippet": "..."
    }
  ]
}

HTML output

root@kitploit:~
exfil-scan --directory ./outputs --recursive --format html --output report.html

Expected behavior:

  • Generates a standalone HTML page with findings table
  • Escapes content for safe rendering
  • Includes severity, category, rule, location, description

Markdown output

root@kitploit:~
exfil-scan --input suspicious.txt --format markdown --output report.md

Expected style:

root@kitploit:~
# exfil-scan Report

- Scanned targets: 1
- Total findings: 2

8) Configuration and sensitivity

The repository ships with default-config.yaml. You can pass your own file with --config.

Sensitivity tuning:

  • low: fewer false positives, larger thresholds
  • medium: balanced defaults
  • high: catches more subtle patterns

CLI sensitivity override:

root@kitploit:~
exfil-scan --input out.txt --sensitivity high

9) Custom patterns and policy tuning

You can add your own token formats and metadata keys:

root@kitploit:~
sensitivity: medium
rules:
  metadata_keys:
    - api_key
    - db_password
    - internal_token
  token_patterns:
    custom_jwt: "\\beyJ[A-Za-z0-9_\\-]{10,}\\.[A-Za-z0-9_\\-]{10,}\\.[A-Za-z0-9_\\-]{10,}\\b"
    corp_secret: "\\bcorp_[A-Za-z0-9]{24,}\\b"

Then run:

root@kitploit:~
exfil-scan --input response.log --config ./my-config.yaml

10) Architecture overview

Module responsibilities:

  • exfil_scan/cli.py: argument parsing, input selection, output rendering, exit handling
  • exfil_scan/config.py: defaults, YAML loading, recursive merge, profile normalization
  • exfil_scan/scanner.py: six detection engines, finding dataclasses, report formatting
  • tests/test_scan.py: detection and output-format regression tests

Execution flow:

  1. CLI parses arguments.
  2. Config loads defaults + optional overrides.
  3. Scanner reads text from stdin/file/directory.
  4. Each enabled category runs independently.
  5. Findings are severity-sorted and rendered.
  6. Exit code communicates pass/fail/error for automation.

11) Exit codes

CodeMeaning
0No findings (clean)
1Findings detected
2Runtime or argument error

This makes CI integration straightforward:

root@kitploit:~
exfil-scan --directory ./artifacts --recursive --format json --output exfil-report.json

If any detection is found, your job can fail fast based on exit code 1.


12) Testing

Run tests:

root@kitploit:~
pytest

Coverage includes:

  • all six detection categories
  • report formatting in all four output modes
  • rule-level assertions for stable behavior

13) Security notes

exfil-scan is a heuristic scanner. It is designed to reduce risk and surface suspicious output, not prove content safety.

Recommended deployment pattern:

  1. run scanner in CI on test prompts and fixture outputs
  2. run scanner in production guardrails on generated responses
  3. route findings to analyst triage and telemetry
  4. continuously tune config thresholds based on false-positive review

14) License

This project is licensed under the MIT License. See LICENSE for full terms.


15) Contributing

Contributions are welcome. When opening a PR, include:

  • clear reproduction steps
  • expected and actual behavior
  • tests for new detection logic
  • documentation updates when introducing new rules
Download Tool
OptionTypeDefaultDescription
-i, --inputpathnoneScan one input file
-d, --directorypathnoneScan all supported files in a directory
-r, --recursiveflagfalseRecurse nested directories with --directory
-c, --configpathnoneYAML config file path
-s, --sensitivitylow|medium|highconfig/defaultOverride sensitivity profile
-f, --formattext|json|html|markdowntextRender report format
-o, --outputpathstdoutWrite rendered report to a file
--versionflagn/aPrint CLI version
-h, --helpflagn/aShow usage and arguments