मुख्य सामग्री पर जाएँ
Skillpedia
एजेंट35k · #7923

exploiting-sql-injection-vulnerabilities

यह क्या करती है

यह टूल वेबसाइट्स में 'SQL Injection' नाम की सुरक्षा खामियां ढूंढने और उनका फायदा उठाकर जांचने में मदद करता है। यह जांचता है कि क्या form fields में खतरनाक commands डालकर database का डेटा देखा या बदला जा सकता है, और यह हमेशा अनुमति लेकर किया जाता है।

कब इस्तेमाल करें

  • ✓वेबसाइट के लाइव होने से पहले उसकी सुरक्षा जांचने के लिए।
  • ✓यह जांचने के लिए कि वेबसाइट पर डाली गई जानकारी ठीक से सुरक्षित है या नहीं।
  • ✓यह दिखाने के लिए कि वेबसाइट हैक होकर डेटा चोरी होने का खतरा कितना है।

Skill का लिंक

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-sql-injection-vulnerabilities/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-sql-injection-vulnerabilities/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“जांचो कि क्या इस वेबसाइट का लॉगिन form SQL Injection के प्रति कमज़ोर है।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

टूल वेबसाइट के अलग-अलग हिस्सों, जैसे text fields और URLs, में छोटे-छोटे commands डालने की कोशिश करता है, ताकि देखा जा सके कि database अप्रत्याशित तरीके से जवाब देता है या नहीं। अगर ऐसा होता है, तो यह खामी का संकेत है।

तकनीकी सामग्री (मूल 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--
  • 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 BY incrementing (' 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 EXTRACTVALUE or UPDATEXML to 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 Injection क्या है?

यह एक तरह का हमला है जिसमें हमलावर वेबसाइट के input fields में खतरनाक commands डालता है। अगर वेबसाइट सुरक्षित नहीं है, तो ये commands database पर चल सकते हैं, जिससे हमलावर जानकारी देख, बदल या चुरा सकता है।

क्या इस टूल को इस्तेमाल करने के लिए अनुमति चाहिए?

हां, किसी भी जांच से पहले वेबसाइट के मालिक से लिखित अनुमति लेना ज़रूरी है। बिना अनुमति इसका इस्तेमाल गैर-कानूनी है।

क्या यह टूल वेबसाइट को नुकसान पहुंचा सकता है?

गलत तरीके से या बिना अनुमति इस्तेमाल करने पर हां। यह नियंत्रित सुरक्षा जांच के लिए बना है, और स्पष्ट अनुमति के बिना लाइव वेबसाइट पर इसका इस्तेमाल नहीं करना चाहिए, क्योंकि इससे डेटा खराब हो सकता है।

जानकारी

लेखक का मूल विवरण

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

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

GitHub स्टार
35k
रैंकिंग में स्थान
#7923
लाइसेंस
Apache-2.0
अपडेट की गई
31/8/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills