llm-api-testing
LLM and agent API security testing over HTTP — prompt injection, system-prompt disclosure, tool-calling SSRF, cross-tenant conversation access, unbounded…
by VigilOSS★ 35 GitHub stars
Install llm-api-testing in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
LLM / Agent API Testing
vigil assess kaliaudit flags: use--technique RECON --probe-kind fingerprintto map the endpoint shape and provider dialect;--technique PROMPT-INJECTIONfor injection and system-prompt-extraction payloads; and the sink's OWN class when an injected instruction reaches a downstream sink —SSRFfor a tool/retrieval fetch,IDORfor cross-tenant conversation reads,INFO-DISCLOSUREfor leaked context.
When to Activate
- A route matching the
llm_apigf-bucket surfaces in the work buffer (/v1/chat/completions,/embeddings,/inference, or amessages/system_prompt/max_tokens/tool_choiceparameter). A bare?prompt=is NOT one of them — OIDC Core §3.1.2.1 definesprompt, so on an authorize route it is an SSO parameter, not an LLM one; judge it by the rest of the request. - A response streams
text/event-streamchunks whose payload is model output, or carries provider-shaped fields (choices[].delta,content[].type,usage.prompt_tokens). - The application exposes a chat widget, a "summarize / draft / explain" action, an agentic workflow that calls tools, or a RAG search over documents the tester can write into.
- Source or JS analysis reveals a provider SDK (
openai,@anthropic-ai/sdk,langchain,llamaindex) or a server-side proxy to a provider host.
The distinction that decides severity
An LLM saying something embarrassing is not a finding. A finding needs a security boundary
crossed: another tenant's data read, a request made from the server, a privileged tool invoked, a
secret returned, or a bill run up without limit. Establish which boundary the model sits behind
before writing anything up — that is the same prove-or-kill discipline
agent/rules/hunting.md §2 demands of every class, and it is what separates a real report from
"I made the chatbot swear".
Tools
vigil assess kali exec -- curl ...— all target-facing requests go through the wrapper.vigil oob mint/vigil oob poll— attribution for tool-calling and retrieval fetches: place the exact minted host in the prompt or the retrieved document, then poll (agent/references/offensive-tactics/frp-tunneling.md"OOB Procedure (mint→poll→correlate)"). A callback shows a fetch happened, not SSRF: a fetch tool fetching a URL is its feature, and the request may come from the provider's tool-execution egress (out of scope, below). SSRF needs the source address to be the target's infrastructure plus internal reach or cross-tenant data (agent/skills/ssrf-testing/SKILL.md).- Hand-shaped JSON bodies through
curl; the request body is the attack surface here, so work at the JSON level rather than through the app's own UI.
Methodology
1. Fingerprint the endpoint
- Identify the dialect: OpenAI-compatible (
messages[],model,max_tokens), Anthropic (systemtop-level,content[]blocks), or bespoke ({"prompt": "..."}). - Send a malformed body and read the error — provider SDK errors leak the upstream model name, the proxy's own system prompt length, and sometimes the provider API base URL.
- Note whether
modelis attacker-selectable. A caller-chosen model is a cost lever and often an authorization gap (a cheap tier's key reaching an expensive model). - Record whether the response is streamed; streaming responses frequently bypass the output filter the non-streaming path applies.
2. System-prompt and context disclosure
- Ask directly, then indirectly (translate, summarize, base64, "repeat the text above").
- Look for the system prompt echoed in error paths, in
usageaccounting, or in a debug field. - Check whether a client-supplied
system/system_promptparameter is ACCEPTED — a server-side guardrail the client can overwrite is not a guardrail. - Probe for retrieved-context bleed: ask for "the documents you were given" and check whether any belongs to another tenant.
3. Prompt injection — direct and indirect
- Direct: instructions in the user turn that override the system policy.
- Indirect (the one that matters): plant instructions in content the model will retrieve —
an uploaded document, a profile field, a web page the agent fetches, a support-ticket body —
and confirm they execute on a request made by a second identity you own (after the
side-effect preflight,
agent/shared-constraints.md§2d, when the content reaches staff). Indirect injection is the variant with a real victim and the one most often left untested. - Confirm the boundary crossed, not merely that the model complied.
4. Tool calling and agent actions
- Enumerate the tools: ask the model to list them, or read
tools/tool_choiceoff the request schema. - For each tool, ask what it would take to invoke it with attacker-chosen arguments. A fetch / browse / webhook tool is SSRF; a dat
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the llm-api-testing skill do?
LLM and agent API security testing over HTTP — prompt injection, system-prompt disclosure, tool-calling SSRF, cross-tenant conversation access, unbounded token spend
How do I install the llm-api-testing skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the llm-api-testing skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…