跳到正文
Skillpedia
安全35k · #7597

analyzing-api-gateway-access-logs

它能做什么

这个工具用于分析 API 网关的访问日志,找出入侵尝试、攻击等可疑活动。

适用场景

  • ✓当你需要调查针对 API 的潜在攻击时使用。
  • ✓在编写针对 API 威胁的检测规则时使用。
  • ✓用于检查你的 API 安全措施是否有效。

技能链接

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-api-gateway-access-logs/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-api-gateway-access-logs/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“分析我的 API 访问日志,找出入侵尝试。”

每周 5 个新技能,1 分钟读完。

工作原理

这个工具会读取日志,查找异常模式,例如同一用户尝试访问大量不同的数据,或者同一来源出现大量登录失败。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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.

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

# 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]
常见问题

什么是“访问日志”?

它是记录所有发送到你 API 的请求的记录,包括谁访问了系统、什么时候访问,以及请求了什么内容。

什么是 BOLA/IDOR 攻击?

这是一类攻击,攻击者试图访问本不该访问的数据,利用的是 API 在检查“谁可以看什么”时存在的缺陷。

我需要会编程才能使用这个工具吗?

不需要,你只要知道希望工具在日志中查找什么内容即可。

详情

作者的原始描述

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. '

repo: mukul975/Anthropic-Cybersecurity-Skills

热度

GitHub 星标
35k
排名
#7597
许可证
Apache-2.0
更新时间
2026/8/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能