跳到正文
Skillpedia
智能体35k · #7876

detecting-sql-injection-via-waf-logs

它能做什么

这个工具可以分析你网站的安全日志(WAF日志),找出SQL注入攻击的尝试。它会识别常见的攻击模式,帮你了解谁在攻击你的网站,以及他们是怎么攻击的。

适用场景

  • ✓当你怀疑网站遭到攻击时。
  • ✓想检查你的安全防护是否生效时。
  • ✓在调查安全事件的时候。

技能链接

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-sql-injection-via-waf-logs/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“分析我的WAF日志,找出SQL注入攻击。”

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

工作原理

工具会读取你的WAF日志,查找已知的攻击代码(比如'UNION SELECT'或'OR 1=1'),并把来自同一来源的攻击归为一组。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Detecting SQL Injection via WAF Logs

When to Use

  • When investigating security incidents that require detecting sql injection via waf 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

  1. Install dependencies: pip install requests
  2. Collect WAF logs (ModSecurity audit log, AWS WAF JSON logs, or Cloudflare firewall events).
  3. Run the agent to parse and analyze:
    • Detect SQLi payloads via 15+ regex patterns
    • Classify attacks by OWASP injection type (classic, blind, time-based, UNION-based)
    • Identify persistent attackers by IP clustering
    • Correlate multi-request injection campaigns
    • Calculate attack success probability based on response codes
python scripts/agent.py --log-file /var/log/modsec_audit.log --format modsecurity --output sqli_report.json

Examples

ModSecurity SQLi Detection

Rule 942100 triggered: SQL Injection Attack Detected via libinjection
URI: /api/users?id=1' UNION SELECT username,password FROM users--
Source IP: 203.0.113.42 (47 requests in 5 minutes)
Classification: UNION-based SQLi campaign
常见问题

什么是WAF日志?

这是记录谁访问了你的网站、做了什么操作的文件,其中包括攻击尝试等信息。

什么是SQL注入?

这是一种攻击方式,攻击者通过网站的输入框等位置,试图把恶意命令插入你的数据库中。

什么是OWASP?

这是一个组织,负责制定Web应用的安全标准,包括如何对攻击进行分类。

详情

作者的原始描述

Analyze WAF (ModSecurity/AWS WAF/Cloudflare) logs to detect SQL injection attack campaigns. Parses ModSecurity audit logs and JSON WAF event logs to identify SQLi patterns (UNION SELECT, OR 1=1, SLEEP(), BENCHMARK()), tracks attack sources, correlates multi-stage injection attempts, and generates incident reports with OWASP classification.

repo: mukul975/Anthropic-Cybersecurity-Skills

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能