| name | testing-api-authentication-weaknesses |
| description | Tests API authentication mechanisms for weaknesses including broken token validation, missing authentication on endpoints, weak password policies, credential stuffing susceptibility, token leakage in URLs or logs, and session management flaws. The tester evaluates JWT implementation, API key handling, OAuth flows, and session token entropy to identify authentication bypasses. Maps to OWASP API2:2023 Broken Authentication. Use when working with testing api authentication weaknesses. |
| domain | cybersecurity |
| tags | ["api-security","owasp","authentication","jwt","session-management","credential-security"] |
| subdomain | api-security |
| version | 1.0.0 |
| author | oyi77 |
| license | Apache-2.0 |
| nist_csf | ["PR.PS-01","ID.RA-01","PR.DS-10","DE.CM-01"] |
Testing Api Authentication Weaknesses
Overview
Cybersecurity skill for testing api authentication weaknesses. Follows industry best practices and security standards.
When to Use
Trigger phrases:
-
"testing api authentication weaknesses"
-
"Tests API authentication mechanisms for weaknesses including broken token valida"
-
Assessing REST API authentication mechanisms for bypass vulnerabilities before production deployment
-
Testing JWT token implementation for common weaknesses (none algorithm, key confusion, missing expiration)
-
Evaluating whether all API endpoints enforce authentication or if some are unintentionally exposed
-
Testing API key generation, storage, and rotation mechanisms for predictability or leakage
-
Validating session management including token expiration, revocation, and refresh token security
Do not use without written authorization. Authentication testing involves attempting to bypass security controls.
When NOT to Use
- When you lack proper authorization for testing
- For production systems without change management
- When the task requires legal or compliance expertise beyond technical scope
Prerequisites
- Written authorization specifying target API and authentication mechanisms in scope
- Valid test credentials for at least two user roles (regular user, admin)
- Burp Suite Professional with JWT-related extensions (JSON Web Tokens, JWT Editor)
- Python 3.10+ with
requests, PyJWT, and jwt libraries
- Wordlists for credential testing (SecLists authentication wordlists)
- API documentation or OpenAPI specification
Workflow
import re
IOC_PATTERNS = {
"ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
"domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",
"hash_md5": r"\b[a-f0-9]{32}\b",
"hash_sha256": r"\b[a-f0-9]{64}\b",
}
def () -> :
{k: re.findall(v, text) k, v IOC_PATTERNS.items()}