Open toolkit

LLM-SEC

Multi-step attack orchestration for agents, RAG systems, memory, and tools. Built so a finding is a chain with a defense, not a clever prompt.

What it does

LLM-SEC runs campaigns. A planner chooses probes, a harness talks to the target (chat, retrieval, tools, memory), and a reporter turns the trace into a reproducible finding. The interesting bugs live in the handoff between those parts.

Campaign engine

LangGraph-style orchestration that runs multi-step attack campaigns instead of one-shot jailbreak prompts.

Vector Guard

Probes retrieval: poisoned chunks, ranking manipulation, and instructions hidden in documents the model will trust.

Agency Auditor

Exercises tool-use, memory, and permission boundaries. Looks for goal hijack and calls the user never asked for.

Finding reports

Each run ends as a finding: what happened, how to reproduce it, severity, and a defense a team can ship.

Quick start

# illustrative — pin versions in the repo README
git clone <llm-sec>
cd llm-sec
python -m venv .venv && source .venv/bin/activate
pip install -e .

llm-sec run --target ./examples/rag-agent.yaml --campaign memory-poison

Point a campaign at a local agent or a documented API. Do not run against systems you do not own or lack written permission to test.

Architecture

  1. 1. Scope

    Target, tools, memory, and success criteria.

  2. 2. Campaign

    Graph of probes: inject, persist, escalate.

  3. 3. Harness

    Calls the model, retriever, and tools under test.

  4. 4. Report

    Chain, evidence, severity, defense.

Framework mapping

Qualitative coverage. Not a certification.

  • LLM01Prompt injection — Direct and indirect, including retrieved content.
  • LLM02Sensitive disclosure — System prompt, memory, and neighboring RAG chunks.
  • LLM06Excessive agency — Tool scope creep and unauthorized actions.
  • LLM08Vector / embedding weakness — Poisoned or misleading retrieval.
  • ATLASAML.T0051 / tool abuse — Mapped qualitatively to agent tool misuse.

Status

  • Active: campaign runner, RAG probes, tool-boundary checks.
  • Next: repeatable example targets, CI regression mode, clearer public docs.
  • Not a hosted scanner. You run it against systems you are allowed to test.

Use it or commission an assessment

Star the repository, run a campaign on a lab target, or talk about a scoped red team of an agent you ship. Findings stay written so a defender can reproduce and close them.