exploiting-sql-injection-vulnerabilities
하는 일
이 도구는 웹사이트에서 ‘SQL 인젝션’이라 불리는 보안 결함을 찾아 악용하는 데 도움을 줍니다. 항상 허가를 받은 상태에서, 입력 양식에 악성 명령을 넣어 데이터베이스 정보에 접근하거나 바꿀 수 있는지 확인합니다.
사용하는 경우
- ✓웹사이트를 공개하기 전에 보안을 테스트할 때.
- ✓웹사이트에 입력한 정보가 올바르게 보호되는지 확인할 때.
- ✓웹사이트가 해킹되어 데이터가 도난당할 위험을 보여 줄 때.
스킬 링크
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-sql-injection-vulnerabilities/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 웹사이트의 로그인 양식이 SQL 인젝션에 취약한지 확인해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 도구는 웹사이트의 여러 부분(텍스트 입력란과 URL 등)에 작은 명령을 넣어, 데이터베이스가 예상치 못하게 반응하는지 살펴봅니다. 그렇다면 취약점이 있다는 뜻입니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Exploiting SQL Injection Vulnerabilities
When to Use
- Testing web application input parameters for SQL injection vulnerabilities during an authorized penetration test
- Validating that parameterized queries and input sanitization are properly implemented across all database interactions
- Demonstrating the business impact of a confirmed SQL injection vulnerability by extracting sensitive data
- Verifying that WAF rules and input validation controls effectively block SQL injection payloads
- Testing stored procedures, dynamic SQL, and ORM bypass scenarios in enterprise applications
Do not use against databases without written authorization, for extracting or exfiltrating actual customer data beyond what is needed for proof of concept, or against production databases where exploitation could corrupt data integrity.
Prerequisites
- Written authorization specifying the target application and permissible level of exploitation (detection only vs. full exploitation)
- Burp Suite Professional configured as an intercepting proxy to capture and modify HTTP requests
- sqlmap installed with current version for automated detection and exploitation
- Knowledge of the target database engine (MySQL, PostgreSQL, MSSQL, Oracle) or ability to fingerprint it
- Test accounts at various privilege levels to test injection in authenticated contexts
Workflow
Step 1: Injection Point Discovery
Identify parameters that interact with the database:
- Map all input vectors: Catalog every parameter in URLs (GET), request bodies (POST), HTTP headers (Cookie, Referer, User-Agent, X-Forwarded-For), and JSON/XML API payloads
- Error-based detection: Inject a single quote (
') into each parameter and observe the response. SQL errors (e.g., "You have an error in your SQL syntax", "unterminated quoted string", "ORA-01756") confirm the parameter reaches the database unsanitized. - Boolean-based detection: Inject
' AND 1=1--(true condition) and' AND 1=2--(false condition). If the responses differ (different content length, different data returned, different HTTP status), the parameter is injectable. - Time-based detection: Inject
'; WAITFOR DELAY '0:0:5'--(MSSQL),' AND SLEEP(5)--(MySQL), or'; SELECT pg_sleep(5)--(PostgreSQL). A 5-second response delay confirms injection. - Out-of-band detection: Use payloads that trigger DNS or HTTP requests to a Burp Collaborator domain to confirm injection in scenarios where responses are not directly observable.
- Second-order injection: Test for injection where input is stored and later used in a different SQL query (e.g., username stored at registration, used in a query on the profile page).
Step 2: Database Fingerprinting
Determine the database engine and version to select appropriate exploitation techniques:
- Error-based fingerprinting: Each database produces distinctive error messages. MySQL includes "MySQL", MSSQL mentions "SQL Server", PostgreSQL references "PG", Oracle contains "ORA-".
- Function-based fingerprinting: Inject database-specific functions:
- MySQL:
' AND VERSION()--or' AND @@version-- - MSSQL:
' AND @@version--or' AND DB_NAME()-- - PostgreSQL:
' AND version()-- - Oracle:
' AND banner FROM v$version--
- MySQL:
- String concatenation differences: MySQL uses
CONCAT('a','b')or'a' 'b', MSSQL uses'a'+'b', PostgreSQL uses'a'||'b', Oracle uses'a'||'b' - Comment syntax: MySQL supports
#and--, MSSQL uses--, PostgreSQL uses--, Oracle uses--
Step 3: Manual Exploitation Techniques
Exploit confirmed injection points using technique-appropriate methods:
- UNION-based extraction: Determine the number of columns with
ORDER BYincrementing (' ORDER BY 1--,' ORDER BY 2--, etc. until an error occurs). Then construct UNION SELECT to extract data:' UNION SELECT NULL,username,password,NULL FROM users-- - Error-based extraction (MySQL): Use
EXTRACTVALUEorUPDATEXMLto force data into error messages:' AND EXTRACTVALUE(1,CONCAT(0x7e,(SELECT @@version),0x7e))-- - Blind boolean extraction: Extract data one character at a time by testing character values:
' AND SUBSTRING((SELECT password FROM users WHERE username='admin'),1,1)='a'-- - Time-based blind extraction: Same character-by-character approach using time delays:
…
자주 묻는 질문
SQL 인젝션이란 무엇인가요?
공격자가 웹사이트 입력란에 악성 명령을 넣는 공격 유형입니다. 웹사이트가 보호되지 않으면 이 명령이 데이터베이스에서 실행되어, 공격자가 정보를 보거나, 바꾸거나, 훔칠 수 있습니다.
이 도구를 사용하려면 허가가 필요한가요?
네, 테스트를 하기 전에 웹사이트 소유자의 서면 허가가 필수입니다. 허가 없이 사용하면 불법입니다.
이 도구가 웹사이트를 손상시킬 수 있나요?
잘못 사용하거나 허가 없이 사용하면 그럴 수 있습니다. 이 도구는 통제된 보안 테스트를 위해 설계되었으며, 명시적인 허가 없이 운영 중인 웹사이트에서 사용하면 데이터가 손상될 수 있으므로 사용하면 안 됩니다.
상세 정보
작성자의 원본 설명
Identifies and exploits SQL injection vulnerabilities in web applications during authorized penetration tests using manual techniques and automated tools like sqlmap. The tester detects injection points through error-based, union-based, blind boolean, and time-based blind techniques across all major database engines (MySQL, PostgreSQL, MSSQL, Oracle) to demonstrate data extraction, authentication
인기도
- GitHub 스타
- 35k
- 순위
- #7923
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.