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。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 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
- Install dependencies:
pip install requests - Collect WAF logs (ModSecurity audit log, AWS WAF JSON logs, or Cloudflare firewall events).
- 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.
热度
- GitHub 星标
- 35k
- 排名
- #7876
- 许可证
- Apache-2.0
- 更新时间
- 2026/8/31
评论
- …
同一仓库的更多技能
abusing-dpapi-for-credential-access
35k为你的 AI 智能体提供针对特定任务的现成指令,让它完成得更好、更快。
abusing-shadow-credentials-for-privesc
35k教你的 AI 智能体写出清晰、结构良好的文本。
achieving-cmmc-level-2-compliance
35k帮助你的智能体搭建符合 CMMC Level 2 合规要求的环境。它会落实安全要求,并管理必要的文档。
acquiring-disk-image-with-dd-and-dcfldd
35k帮助你的智能体创建硬盘的精确副本。这能确保调查过程中信息不丢失、不被篡改。