Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-api-gateway-access-logs -a claude-code
Open on GitHub

What 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.json for BOLA/IDOR using user_id, endpoint, and resource_id.
  • Inspect api_gateway_logs.json for 401 surges and list suspicious source_ip values.
  • 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-code

2Manually: put the files in place

~/.claude/skills/analyzing-api-gateway-access-logs/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/analyzing-api-gateway-access-logs/

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

Similar skills

Everything for Security →

From the same set89

testing-api-security-with-owasp-top-10 Walks an agent through OWASP API Security Top 10 (2023) checks on REST, GraphQL and gRPC endpoints. Useful for authorized pentests and pre-release endpoint reviews. CX Codex +1 769installs acquiring-disk-image-with-dd-and-dcfldd A skill that walks the agent through bit-for-bit disk imaging with dd or dcfldd, hashing the source and the copy for forensic work. CX Codex +1 675installs analyzing-android-malware-with-apktool Performs static analysis of suspicious Android APKs without executing them. It inspects permissions, manifest components, and API calls to assist SOC triage and rule creation. CX Codex +1 675installs performing-web-application-penetration-test Guides step-by-step penetration testing of web applications following the OWASP WSTG methodology with Burp Suite. Used for pre-production security assessments and verifying fixes. CX Codex +1 660installs testing-for-xss-vulnerabilities Tests web applications for reflected, stored, and DOM XSS. Use it when reviewing input handling, output encoding, and CSP coverage. CX Codex +1 647installs conducting-api-security-testing This skill tests REST, GraphQL, and gRPC APIs for access-control, authentication, validation, and business-logic flaws. Use it for authorized API assessments. CX Codex +1 643installs analyzing-email-headers-for-phishing-investigation Parses email headers, traces Received hops, and validates SPF, DKIM, and DMARC to expose phishing sources and sender spoofing. CX Codex +1 612installs analyzing-cyber-kill-chain Maps intrusion activity to the Lockheed Martin Cyber Kill Chain and exposes defensive gaps. Use it for incident review and prevention-focused control planning. CX Codex +1 606installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor