New to Claude Skills? Learn how to install them →

mukul975 on GitHub

Detecting SQL Injection via WAF Logs

Free

Identify SQL injection attacks through WAF log analysis.

Get this skill

Free · Opens the source repo

What Detecting SQL Injection via WAF Logs does

This skill provides a methodical approach to detecting SQL injection (SQLi) attacks by analyzing Web Application Firewall (WAF) logs, specifically those generated by ModSecurity, AWS WAF, or Cloudflare. By parsing these logs, the skill can identify various SQLi patterns, such as ‘UNION SELECT’ and ‘OR 1=1’, which are commonly used in attack campaigns. The agent tracks the sources of these attacks and correlates multi-stage injection attempts, allowing security professionals to gain insights into the nature and complexity of the threats they face.

The skill is designed for security operations center (SOC) analysts and cybersecurity professionals who need to investigate security incidents or validate their monitoring coverage against SQL injection techniques. It offers a structured process for analyzing WAF logs, making it easier to build detection rules or threat-hunting queries tailored to this specific attack vector. Additionally, it can generate incident reports that classify attacks according to OWASP standards, enhancing the overall security posture of an organization.

To use the skill, users must have a familiarity with security operations and access to a test environment. After installing the necessary Python dependencies, users can run the agent to parse their WAF logs and produce detailed reports on SQL injection attempts. This functionality is crucial for organizations aiming to strengthen their web application security and respond effectively to potential SQL injection threats.

When to use it

Use this skill when investigating security incidents related to SQL injection or when developing detection rules for WAF log analysis.

When not to use it

This skill may not be suitable for environments without WAF logs or for detecting other types of attacks not related to SQL injection.

What you can build with it

Incident Investigation

Use this skill to analyze WAF logs during a security incident investigation to identify SQL injection attempts.

Rule Development

Leverage the skill to build detection rules and threat-hunting queries focused on SQL injection attacks.

Security Monitoring Validation

Validate your security monitoring coverage by using the skill to check for SQL injection attack techniques.

How to install Detecting SQL Injection via WAF Logs

View source

1. Install with the skills CLI

npx skills add mukul975/anthropic-cybersecurity-skills/detecting-sql-injection-via-waf-logs --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by mukul975

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

Frequently asked questions about Detecting SQL Injection via WAF Logs

Similar skills