Skip to content
Back to skills

Api Penetration Testing

ASecurity

Use when testing API security and endpoints.

  • 2 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 10, 2026
securitypythongosqlawstestingapisecurity

Works with

  • api

Security analysis

A96/100
  • mediumUses curl or wget to download content

Pro shows the line behind each finding and how to fix it

Scanned September 10, 2026

npx -y skills add LoopyLuci/Skills --skill api-penetration-testing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Penetration Testing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Penetration Testing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/loopyluci-api-penetration-testing/badge)](https://www.skillsdirectory.com/skills/loopyluci-api-penetration-testing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: api-penetration-testing
description: "Use when testing API security and endpoints."
version: 1.0.0
author: Hermes Agent
license: MIT
metadata:
  hermes:
    tags: [API-pentest, REST, GraphQL, JWT, OAuth, rate-limiting, injection]
    related_skills: [webapp-penetration-testing, sql-injection-exploitation, web-security-patterns, oauth-authentication-patterns]
---

# API Penetration Testing

Testing API security — from REST and GraphQL endpoint testing through authentication bypass, injection, rate limiting, and business logic flaws.

## When to Use

- Testing REST API security
- Testing GraphQL API security
- Finding API authentication and authorization flaws
- Testing API rate limiting and abuse cases
- API-specific vulnerabilities (mass assignment, IDOR)

## API Testing Techniques

```python
API_TESTS = {
    'auth_bypass': 'Test missing/weak JWT, OAuth misconfig, API key in URL, default tokens',
    'injection': 'Test SQL/NoSQL injection in params, headers, request bodies',
    'idor': 'Test object ID manipulation (user/123 → user/124)',
    'mass_assignment': 'Test extra fields in request body (is_admin=true)',
    'rate_limiting': 'Test without auth headers, IP-based limiting bypass (X-Forwarded-For)',
    'graphql_introspection': 'Test if introspection is enabled (query __schema)',
    'graphql_batching': 'Test batch queries for rate limit bypass',
}

# REST API testing with curl
API_TESTS_CURL = {
    'jwt_none_algorithm': "curl -H 'Authorization: Bearer [REDACTED]' https://api.example.com/admin",
    'idor_test': "curl https://api.example.com/users/123",
    'mass_assignment': "curl -X PUT https://api.example.com/users/me -d '{\"role\":\"admin\"}'",
}

# GraphQL query depth testing
GRAPHQL_DEPTH = """
query DeepQuery {
  user(id: 1) {
    posts { comments { author { posts { comments { author { name } } } } } }
  }
}
"""
```

## Verification Checklist

- [ ] Authentication tested (JWT none algo, token in URL, missing auth)
- [ ] Authorization tested (IDOR, horizontal/vertical privilege esc)
- [ ] Injection tested (SQL, NoSQL, command injection in params)
- [ ] Rate limiting tested (brute force, resource exhaustion)
- [ ] Mass assignment tested (extra fields in request)
- [ ] GraphQL: introspection, query depth, batching attacks
- [ ] Input validation tested (XSS, SSRF, XXE)
- [ ] API versioning and deprecation tested
- [ ] CORS configuration reviewed

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.