detecting-sql-injection-via-waf-logs
できること
このツールは、Webサイトのセキュリティログ(WAF)を分析して、SQLインジェクション攻撃の試みを見つけます。よくある攻撃パターンを特定し、誰がどのように攻撃しているのかを把握する助けになります。
使う場面
- ✓Webサイトが攻撃を受けたかもしれないと感じたとき。
- ✓セキュリティ対策が機能しているかを確認したいとき。
- ✓セキュリティインシデントを調査するとき。
スキルのリンク
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-sql-injection-via-waf-logs/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。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のログとは何ですか?
Webサイトにどのような人がアクセスし、どんな操作をしたかを記録したものです。攻撃の試みも含まれます。
SQLインジェクションとは何ですか?
Webサイトの入力欄などを通じて、攻撃者が悪意のあるコマンドをデータベースに送り込もうとする攻撃の一種です。
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
35kAIエージェントに、明確で構成のしっかりした文章の書き方を教えます。
achieving-cmmc-level-2-compliance
35kエージェントがCMMC Level 2への準拠に向けた環境を整えられるようにします。セキュリティ要件を実装し、必要なドキュメントを管理します。
acquiring-disk-image-with-dd-and-dcfldd
35kエージェントがハードディスクの完全なコピーを作成できるようにします。調査中に情報が失われたり改変されたりしないようにするのに役立ちます。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。