L’interface est localisée ; les présentations et documents des Skills sont traduits automatiquement par IA dans votre langue. Le code, les commandes, chemins et termes techniques restent en version originale, et le document de l’auteur fait foi.
Explorer les Skills
Déploiement et opérations · SKILL.md

detecting-sql-injection-via-waf-logs

detecting-sql-injection-via-waf-logs

分析 WAF(Web 应用防火墙,ModSecurity/AWS WAF/Cloudflare)日志,检测 SQL 注入(SQL Injection)攻击活动。 解析 ModSecurity 审计日志和 JSON WAF 事件日志,识别 SQLi 模式(UNION SELECT、OR 1=1、SLEEP()、BENCHMARK()), 追踪攻击源,关联多阶段注入尝试,并生成带 OWASP 分类的事件报告。

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentation de la Skill

GitHub

name: detecting-sql-injection-via-waf-logs description: >- 分析 WAF(Web 应用防火墙,ModSecurity/AWS WAF/Cloudflare)日志,检测 SQL 注入(SQL Injection)攻击活动。 解析 ModSecurity 审计日志和 JSON WAF 事件日志,识别 SQLi 模式(UNION SELECT、OR 1=1、SLEEP()、BENCHMARK()), 追踪攻击源,关联多阶段注入尝试,并生成带 OWASP 分类的事件报告。 domain: cybersecurity subdomain: security-operations tags: [detecting, sql, injection, via] version: "1.0" author: mahipal license: Apache-2.0

使用说明

  1. 安装依赖:pip install requests
  2. 收集 WAF 日志(ModSecurity 审计日志、AWS WAF JSON 日志或 Cloudflare 防火墙事件)。
  3. 运行 Agent 进行解析和分析:
    • 通过 15+ 正则模式检测 SQLi 载荷(Payload)
    • 按 OWASP 注入类型分类攻击(经典型、盲注型、时间盲注型、UNION 联合查询型)
    • 通过 IP 聚类识别持续攻击者
    • 关联多请求注入活动
    • 根据响应状态码计算攻击成功概率
python scripts/agent.py --log-file /var/log/modsec_audit.log --format modsecurity --output sqli_report.json

示例

ModSecurity SQLi 检测

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
Skills enregistrées