Skip to main content

AI Red Team Framework

Python 3.9+ License: MIT PyPI Downloads

Automated security testing for AI/LLM endpoints — from recon to exploitation.


Install

pip install aix-framework
# with ML fingerprinting support
pip install aix-framework[ml]

Or from source:

git clone https://github.com/licitrasimone/aix-framework.git
cd aix-framework && pip install -e .

Quickstart

# Step 1 — fingerprint the target and detect guardrails
aix recon https://api.target.com/chat -k sk-xxx

# Step 2 — attack (bypass engine activates automatically if a guardrail was found)
aix inject https://api.target.com/chat -k sk-xxx
aix jailbreak https://api.target.com/chat -k sk-xxx

# Run everything
aix scan https://api.target.com/chat -k sk-xxx

# Export report
aix db --export report.html

Works with any endpoint — OpenAI, Anthropic, Ollama, Azure, AWS Bedrock, WebSockets, or raw HTTP via Burp Suite request files.


What it does

Module What it tests
recon API structure, model fingerprinting, guardrail detection (8 providers)
inject Prompt injection — direct, indirect, instruction override
jailbreak Safety bypass — DAN variants, roleplay, developer mode
extract System prompt extraction
leak Training data leakage, PII in responses
exfil Exfiltration channels — markdown, links, webhooks
agent Tool abuse, privilege escalation, unauthorized actions
dos Token exhaustion, rate limits, infinite loops
fuzz Edge cases, unicode, encoding attacks
memory Context manipulation, conversation history poisoning
rag RAG-specific attacks — indirect injection, context poisoning, KB extraction
multiturn Multi-turn attacks — crescendo, trust building, instruction layering
fingerprint Probabilistic LLM identification (embedding + pattern analysis)
chain YAML-defined attack workflows with conditional branching

Key Features

Adaptive Bypass Engine After aix recon detects a guardrail, all subsequent attack modules automatically apply targeted evasion techniques based on the detected provider's known weaknesses — no flags needed. Use --no-bypass to disable.

Guardrail Fingerprinting Detects which safety layer is deployed in front of the model: OpenAI Moderation, Azure Content Safety, AWS Bedrock Guardrails, Llama Guard, Lakera Guard, Perspective API, NeMo Guardrails, or custom filters. Returns confidence score, sensitivity profile per content category, and known bypass weaknesses.

MITRE ATLAS + OWASP LLM Top 10 Every finding is tagged with both MITRE ATLAS technique IDs and OWASP LLM Top 10 categories. Reports are credible in enterprise red team contexts.

Attack Chains Chain modules together in YAML playbooks with conditional branching, variable interpolation, and state passing between steps.

aix chain https://api.target.com -k sk-xxx -P full_compromise

AI-Powered Testing Use a secondary LLM as judge to evaluate attack success, gather target context, and generate domain-aware payloads.

aix inject https://api.target.com -k sk-xxx --ai openai --ai-key sk-xxx -g 5

Burp Suite + WebSocket support

aix inject -r request.txt -p "messages[0].content"
aix inject wss://api.target.com/ws -k sk-xxx

Session-Aware Workflow

AIX groups every scan into sessions by target. The bypass engine reads guardrail data stored by a prior recon run — so the workflow is:

aix recon  →  detects LlamaGuard (85% confidence)
                └─ stores result in session DB

aix inject →  reads session → auto-applies token-split + base64 evasion
               "[*] Auto-bypass active: LlamaGuard — token-split, base64-segment"

Browse sessions and conversations:

aix db --sessions
aix db --session <id>
aix db --conversations

Documentation

Full documentation on the Wiki:


Disclaimer

For authorized security testing only. Always obtain explicit permission before testing AI systems. The authors are not responsible for misuse.


MIT License — LICENSE

Made with ❤️ by r08t

Release files for aix-framework 1.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aix-framework 1.2.3
File Size Uploaded
aix_framework-1.2.3.tar.gz 216.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aix-framework 1.2.3
File Interpreter ABI Platform
aix_framework-1.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 457.6 kB

Release files / aix_framework-1.2.3.tar.gz

Download URL aix_framework-1.2.3.tar.gz
Size 216.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1165333d3b857ce81c6d77eab44a928528f2645ba2186d4a2a9b653b63b55a9d
BLAKE2b-256 checksum
How to use checksums
9969cbadcb2ed56934b43528d1b954704e47a0974e6e0b7e5d88a50a64b60c4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.

Transparency log

Release files / aix_framework-1.2.3-py3-none-any.whl

Download URL aix_framework-1.2.3-py3-none-any.whl
Size 240.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47352c1cef292e11ab66fcadeb1bfa9c26dcf5520d3f54642ab7dea5b7920cde
BLAKE2b-256 checksum
How to use checksums
53e8521258c906f5bb6b8bbaf539b73e4a147473c5793dfdbebc064b238e81a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.3 This release

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page