LLM application security testing framework — prompt injection, safety bypass, and indirect injection scanner
Project description
AICU
Black-box security scanner for LLM applications. Point it at any chat endpoint, get a report of what leaks.
AICU replays captured HTTP requests with adversarial payloads and evaluates whether the target discloses system prompts, internal tools, credentials, or responds to safety bypass attempts — no API keys or model access required.
Quick Start (2 minutes)
# Install
git clone https://github.com/Jake-Schoellkopf/aicu.git && cd aicu
pip install -e .
# Start the built-in vulnerable demo target
python demo_server.py &
# Run a full scan
aicu scan --request examples/demo_request.txt
What It Finds
| Category | Examples |
|---|---|
| Prompt Disclosure | System prompt leakage via translation, repetition, reframing |
| Capability Leakage | Tool names, API schemas, internal function exposure |
| Safety Bypass | Roleplay, hypothetical, academic, completion tricks |
| Credential Exposure | API keys, tokens, internal URLs leaked in responses |
| Multi-turn Escalation | Crescendo-style attacks that build trust over turns |
| Indirect Injection | Malicious payloads embedded in uploaded files |
| Harmful Content | Phishing, malware generation, disinformation |
| Unauthorized Actions | Privilege escalation, data exfiltration prompts |
How It Works
- Capture a request to your LLM endpoint (Burp Suite, browser dev tools, curl)
- Save it as a raw HTTP file
- Run
aicu scan --request req.txt - Read the HTML/JSON/Markdown report with findings and evidence
AICU establishes a baseline response, then fires YAML-driven payloads (single-turn, multi-turn, file-based) and uses a strict multi-layer evaluator to classify results with minimal false positives.
Usage
# Full scan (recommended)
aicu scan --request req.txt
# Individual modes
aicu single-turn --request req.txt --best-of-n 10
aicu multi-turn --request req.txt
aicu safety --request req.txt --category safety_bypass
aicu indirect --request upload_req.txt
# With target profile
aicu scan --request req.txt --profile openai
Burp Suite Integration
- Capture a request in Burp (Proxy → HTTP history)
- Right-click → Copy to file → save as
req.txt aicu scan --request req.txt
CI/CD
- name: LLM Security Scan
run: aicu scan --request req.txt
# Exit 0 = clean, 1 = confirmed findings, 2 = suspicious only
Target Profiles
Built-in: openai, anthropic, azure_openai, generic
Custom via YAML:
preset: openai
name: my_chatbot
response_path: choices[0].message.content
request_delay_ms: 200
False Positive Reduction
No external LLM needed for evaluation. AICU uses:
- Payload echo detection
- Baseline similarity comparison
- Reflection/httpbin filtering
- Entropy analysis
- Refusal detection
- Tiered confidence scoring
Output
Reports land in runs/run_<timestamp>/:
report.html— interactive HTML reportresults.json— structured findingsreport.md— markdown summaryevidence/— raw response captures
Companion Tool
| Tool | Tests |
|---|---|
| AICU | LLM applications (prompt injection, file upload, safety bypass) |
| AICU Agent | MCP infrastructure (server probing, credential extraction, protocol attacks) |
Install
pip install -e . # editable install
pip install -e ".[dev]" # with test/lint tools
Run Tests
pytest -v
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aicu_scanner-0.1.1.tar.gz.
File metadata
- Download URL: aicu_scanner-0.1.1.tar.gz
- Upload date:
- Size: 111.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
805edbe6e8a51fcf3c4f68de49368aff2306baddcd3bb9eebb96dccd1ec67485
|
|
| MD5 |
9fe218469cc3a2dcad8660381540aaf9
|
|
| BLAKE2b-256 |
01a5f0f22b928357e542b4baef7da9a3506cdb118883ae1a13988e661b5ed0d6
|
File details
Details for the file aicu_scanner-0.1.1-py3-none-any.whl.
File metadata
- Download URL: aicu_scanner-0.1.1-py3-none-any.whl
- Upload date:
- Size: 132.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d16b39619497bf7341ace871be02123fddc49a2f6e9706bf0c85cbf3a9dfe56
|
|
| MD5 |
c0d8a34c2d29347b7523d1e531b4564a
|
|
| BLAKE2b-256 |
2f0f3170bb9d6750a91f143a6ae4097db34b6e0e8a3be005d2b5a1e3961c9e91
|