Skip to main content

AIX - AI eXploit Framework: Comprehensive security testing toolkit for AI/LLM systems

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aix_framework-1.2.3.tar.gz (216.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aix_framework-1.2.3-py3-none-any.whl (240.7 kB view details)

Uploaded Python 3

File details

Details for the file aix_framework-1.2.3.tar.gz.

File metadata

  • Download URL: aix_framework-1.2.3.tar.gz
  • Upload date:
  • Size: 216.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aix_framework-1.2.3.tar.gz
Algorithm Hash digest
SHA256 1165333d3b857ce81c6d77eab44a928528f2645ba2186d4a2a9b653b63b55a9d
MD5 86a4c575e8cd4e9be633f5864c85a7ad
BLAKE2b-256 9969cbadcb2ed56934b43528d1b954704e47a0974e6e0b7e5d88a50a64b60c4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for aix_framework-1.2.3.tar.gz:

Publisher: release.yml on licitrasimone/aix-framework

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aix_framework-1.2.3-py3-none-any.whl.

File metadata

  • Download URL: aix_framework-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 240.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aix_framework-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 47352c1cef292e11ab66fcadeb1bfa9c26dcf5520d3f54642ab7dea5b7920cde
MD5 5f213c5fe8783a297734b0e879e17aaa
BLAKE2b-256 53e8521258c906f5bb6b8bbaf539b73e4a147473c5793dfdbebc064b238e81a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for aix_framework-1.2.3-py3-none-any.whl:

Publisher: release.yml on licitrasimone/aix-framework

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page