agentleFS
kaandgnshkaandgnsh/Claude-Blue/skills/api-security/api-abuse-detection/SKILL.md

api-abuse-detection

Skill0 starsChanged 11 days agoMITView on GitHub

Detect and investigate API abuse and data exposure — enumeration/scraping, BOLA exploitation, token misuse, excessive data retrieval, unrestricted business flows — from gateway/WAF/application logs, and scope affected records. Use when an API shows anomalous traffic, a researcher reports an API data leak, or you need detections for OWASP API risks in production.

The file

Files
SKILL.md

API Abuse Detection and Investigation

Log fields you need

Timestamp, client IP, authenticated principal (user ID / client ID / API key ID), tenant, method, route template (/orders/{id}) and concrete path, object IDs, status code, response size, latency, user agent, request ID. Without principal and object ID, BOLA scoping is impossible — fix logging first.

Detection patterns

AbuseSignal
BOLA enumerationOne principal accessing many distinct object IDs not owned by them; sequential ID walks; high ratio of 403/404 then 200s
ScrapingHigh request rate per principal/IP across list endpoints; many pages; non-browser UAs; rotating IPs with same token
Token misuseSame token from many IPs/ASNs/countries; token used after user offboarding; API key from unexpected networks
Excessive dataResponse sizes far above baseline for an endpoint; limit=10000 parameters
Business-flow abuse (API6)Mass account creation, coupon redemption, ticket purchase bursts
Credential stuffing against auth APIscredential-stuffing-defense

Splunk example (BOLA candidate):

index=api route="/api/v2/orders/{id}" status=200 earliest=-24h
| stats dc(object_id) as objects dc(owner_id) as owners by principal_id
| where objects > 200 AND owners > 20 | sort -objects

Sentinel (APIM / App Gateway logs, columns depend on diagnostic category):

ApiManagementGatewayLogs
| where TimeGenerated > ago(1d)
| summarize requests=count(), distinctUrls=dcount(Url), avgBytes=avg(ResponseSize) by CallerIpAddress, ApimSubscriptionId
| where distinctUrls > 500

Incident scoping

  1. Identify the vulnerable endpoint and the abusing principals/IPs.
  2. Enumerate every object returned to those principals (object IDs + response sizes) → affected records and data fields.
  3. Determine time window (first abusive request to fix deployment) and whether other principals exploited it.
  4. Hand off to privacy-incident-assessment with counts and data types.

Related skills

api-authorization-testing, waf-rule-tuning, credential-stuffing-defense, data-exposure-investigation

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.