Skip to content
Skillpedia
Agents35k · #5713

detecting-sql-injection-via-waf-logs

Helps your agent analyze WAF logs to detect SQL injection attacks.

What it does

This tool analyzes your website's security logs (WAF) to find SQL injection attack attempts. It identifies common attack patterns and helps understand who is attacking and how.

When to use it

  • ✓When you suspect your website has been attacked.
  • ✓To check if your security defenses are working.
  • ✓When investigating security incidents.

Example of what to ask your AI

“Analyze my WAF logs for SQL injections.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

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

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-sql-injection-via-waf-logs/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The tool reads your WAF logs, looks for known attack codes (like 'UNION SELECT' or 'OR 1=1'), and groups attacks coming from the same source.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill detecting-sql-injection-via-waf-logs

Or download just the file:

curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/detecting-sql-injection-via-waf-logs/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from 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
FAQ

What are WAF logs?

These are records that show who tried to access your website and what they did, such as attack attempts.

What is SQL injection?

It's a type of attack where an attacker tries to insert malicious commands into your database through website input fields.

What is OWASP?

It's an organization that sets security standards for web applications, including how to classify attacks.

Details

Original description by the author

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

Popularity

GitHub stars
35k
Ranking position
#5713
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills