analyzing-api-gateway-access-logs — Claude Code skill: API logs
This skill parses API Gateway access logs and flags BOLA/IDOR, rate-limit bypass, credential scanning, and injection attempts.
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-api-gateway-access-logs -a claude-codeWhat analyzing-api-gateway-access-logs does
The skill reads access logs from AWS API Gateway, Kong, or Nginx and looks for recognizable attack patterns. It checks for sequential resource ID enumeration, header manipulation used to bypass rate limits, 401 surges from one source, and SQL or NoSQL injection in query parameters. It also flags unusual HTTP methods such as DELETE or PATCH on read-only endpoints.
Analysis uses Python and pandas. The logs are loaded from api_gateway_logs.json as JSON Lines, then grouped by fields such as user_id, endpoint, resource_id, or source_ip. This produces candidates for users accessing many resource IDs and sources generating repeated authentication failures.
Have Python 3.8+, the required dependencies, and authorization for the test or lab environment before running it. That authorization matters because the skill is intended for security investigation and related testing.
What it helps with
- find sequential resource ID enumeration
- spot rate-limit bypass through header changes
- trace credential scanning from repeated 401 responses
- check query parameters for SQL or NoSQL injection
- flag unusual HTTP methods on read-only endpoints
Example prompts for the agent
- Analyze
api_gateway_logs.jsonfor BOLA/IDOR usinguser_id,endpoint, andresource_id. - Inspect
api_gateway_logs.jsonfor 401 surges and list suspicioussource_ipvalues. - Turn the patterns in these logs into detection rules for rate-limit bypass, injection attempts, and unusual HTTP methods.
How to install analyzing-api-gateway-access-logs
1Skills CLI (Vercel)
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-api-gateway-access-logs -a claude-code2Manually: put the files in place
~/.claude/skills/analyzing-api-gateway-access-logs/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/analyzing-api-gateway-access-logs/
1Skills CLI (Vercel)
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-api-gateway-access-logs -a codex2Manually: put the files in place
.agents/skills/analyzing-api-gateway-access-logs/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-api-gateway-access-logs -a cursor2Manually: put the files in place
.cursor/skills/analyzing-api-gateway-access-logs/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install mukul975/Anthropic-Cybersecurity-Skills analyzing-api-gateway-access-logs2Manually: put the files in place
.github/skills/analyzing-api-gateway-access-logs/SKILL.md1Skills CLI (Vercel)
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-api-gateway-access-logs -a gemini-cli2Platform CLI
gemini skills install https://github.com/mukul975/Anthropic-Cybersecurity-Skills --path skills/analyzing-api-gateway-access-logsManually: put the files in place
.devin/skills/analyzing-api-gateway-access-logs/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-api-gateway-access-logs -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about analyzing-api-gateway-access-logs
How do I install analyzing-api-gateway-access-logs in Claude Code?
Run npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-api-gateway-access-logs -a claude-code, then run npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-api-gateway-access-logs -a claude-code again. The skill file is at ~/.claude/skills/analyzing-api-gateway-access-logs/SKILL.md.
What does analyzing-api-gateway-access-logs do?
It parses API Gateway access logs and looks for BOLA/IDOR, rate-limit bypass, credential scanning, injection attempts, and unusual HTTP methods.
What data and dependencies does the skill need?
Use AWS API Gateway, Kong, or Nginx logs with Python 3.8+ and the required dependencies, including pandas. Work on testing activities only with appropriate authorization.
Source text
SKILL.md · Apache-2.0
---
name: analyzing-api-gateway-access-logs
description: 'Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect
BOLA/IDOR attacks, rate limit bypass, credential scanning, and injection attempts.
Uses pandas for statistical analysis of request patterns and anomaly detection.
Use when investigating API abuse or building API-specific threat detection rules.
'
domain: cybersecurity
subdomain: security-operations
tags:
- api-security
- access-log-analysis
- aws-api-gateway
- kong
- nginx
- bola-detection
- rate-limit-bypass
- security-operations
version: '1.0'
author: mahipal
license: Apache-2.0
nist_csf:
- DE.CM-01
- RS.MA-01
- GV.OV-01
- DE.AE-02
mitre_attack:
- T1190
- T1110.004
- T1078.004
- T1119
---
# Analyzing API Gateway Access Logs
## When to Use
- When investigating security incidents that require analyzing api gateway access logs
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
## Prerequisites
- Familiarity with security operations concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities
## Instructions
Parse API gateway access logs to identify attack patterns including broken object
level authorization (BOLA), excessive data exposure, and injection attempts.
```python
import pandas as pd
df = pd.read_json("api_gateway_logs.json", lines=True)
# Detect BOLA: same user accessing many different resource IDs
bola = df.groupby(["user_id", "endpoint"]).agg(
unique_ids=("resource_id", "nunique")).reset_index()
suspicious = bola[bola["unique_ids"] > 50]
```
Key detection patterns:
1. BOLA/IDOR: sequential resource ID enumeration
2. Rate limit bypass via header manipulation
3. Credential scanning (401 surges from single source)
4. SQL/NoSQL injection in query parameters
5. Unusual HTTP methods (DELETE, PATCH) on read-only endpoints
## Examples
```python
# Detect 401 surges indicating credential scanning
auth_failures = df[df["status_code"] == 401]
scanner_ips = auth_failures.groupby("source_ip").size()
scanners = scanner_ips[scanner_ips > 100]
```
© mahipal · Apache-2.0 · mukul975/Anthropic-Cybersecurity-Skills