SQLmap-GUI

Detection Tab - SQL Injection Detection Configuration

The Detection tab controls how SQLmap detects and confirms SQL injection vulnerabilities, including detection levels, risk levels, and specific injection techniques.

📋 Overview

The Detection tab contains three main sections:

  1. Detection Level - How thorough the detection should be
  2. Risk Level - How aggressive the payloads should be
  3. Techniques - Which injection techniques to use

🎯 Detection Level Options

Detection Level

Parameter: --level=LEVEL Description: Level of tests to perform (1-5) Default: 1 (fastest, least thorough)

Level Details:

Level 1 (Fastest):

Level 2:

Level 3:

Level 4:

Level 5 (Slowest):

Risk Level

Parameter: --risk=RISK Description: Risk of tests to perform (1-3) Default: 1 (safest, least intrusive)

Risk Details:

Risk 1 (Safest):

Risk 2:

Risk 3 (Most Aggressive):

💉 Injection Techniques

Boolean-Based Blind

Parameter: --technique=B Description: Use boolean-based blind SQL injection How it works: Compares true/false responses Examples:

Error-Based

Parameter: --technique=E Description: Use error-based SQL injection How it works: Forces database errors to leak information Examples:

Union Query-Based

Parameter: --technique=U Description: Use union query SQL injection How it works: Appends UNION SELECT to original query Examples:

Stacked Queries

Parameter: --technique=S Description: Use stacked queries SQL injection How it works: Executes multiple queries in one request Examples:

Time-Based Blind

Parameter: --technique=T Description: Use time-based blind SQL injection How it works: Uses time delays to infer information Examples:

Inline Queries

Parameter: --technique=Q Description: Use inline query SQL injection How it works: Injects subqueries within the main query Examples:

🔧 Advanced Detection Options

Page Comparison

Parameter: --string=STRING Description: String to match when query is evaluated to True Example: --string="Welcome back" Use Case: Custom true condition detection

Page Comparison (False)

Parameter: --not-string=STRING Description: String to match when query is evaluated to False Example: --not-string="Access denied" Use Case: Custom false condition detection

Page Comparison (Regular Expression)

Parameter: --regexp=REGEXP Description: Regular expression to match when query is evaluated to True Example: --regexp="Welcome.*admin" Use Case: Pattern-based detection

Page Comparison (Regular Expression - False)

Parameter: --not-regexp=REGEXP Description: Regular expression to match when query is evaluated to False Example: --not-regexp="Error.*denied" Use Case: Pattern-based false detection

HTTP Code to Match When Query is Evaluated to True

Parameter: --code=CODE Description: HTTP status code indicating true condition Example: --code=200 Use Case: Status code-based detection

Titles to Match When Query is Evaluated to True

Parameter: --titles Description: Match HTML page titles for true conditions Use Case: Title-based blind detection

Texts to Match When Query is Evaluated to True

Parameter: --texts Description: Match HTML body text for true conditions Use Case: Content-based blind detection

📝 Usage Examples

Basic Detection Configuration

Detection Level: 3
Risk Level: 2
Techniques: BEUSTQ (All enabled)

Generated Command:

sqlmap -u "http://example.com/page.php?id=1" --level=3 --risk=2 --technique=BEUSTQ

Conservative Production Testing

Detection Level: 2
Risk Level: 1
Techniques: BEU (Boolean, Error, Union)

Generated Command:

sqlmap -u "http://example.com/product.php?id=1" --level=2 --risk=1 --technique=BEU

Aggressive Penetration Testing

Detection Level: 5
Risk Level: 3
Techniques: BEUSTQ (All enabled)

Generated Command:

sqlmap -u "http://example.com/admin.php?id=1" --level=5 --risk=3 --technique=BEUSTQ

Custom Response Detection

Detection Level: 3
Risk Level: 2
String Match: "Welcome admin"
Not String Match: "Access denied"
Techniques: BT (Boolean, Time-based)

Generated Command:

sqlmap -u "http://example.com/login.php?id=1" --level=3 --risk=2 --string="Welcome admin" --not-string="Access denied" --technique=BT

Time-Based Only Detection

Detection Level: 4
Risk Level: 2
Techniques: T (Time-based only)

Generated Command:

sqlmap -u "http://example.com/search.php?q=test" --level=4 --risk=2 --technique=T

⚠️ Important Considerations

Detection Level Selection

Risk Level Selection

Technique Selection

Custom Detection Strings

🔧 Troubleshooting

No Vulnerabilities Detected

Problem: SQLmap reports no injection points Solutions:

  1. Increase detection level: --level=5
  2. Enable more techniques: --technique=BEUSTQ
  3. Increase risk level: --risk=3
  4. Check custom strings: --string="unique content"

False Positives

Problem: SQLmap reports vulnerabilities that don’t exist Solutions:

  1. Decrease risk level: --risk=1
  2. Use specific techniques: --technique=BEU
  3. Add exclusion strings: --not-string="error"
  4. Verify manually with different tools

Slow Detection

Problem: Detection phase takes too long Solutions:

  1. Reduce detection level: --level=2
  2. Limit techniques: --technique=BE
  3. Use batch processing: --batch
  4. Focus on specific parameters: -p param

WAF Blocking Detection

Problem: Web Application Firewall blocks detection payloads Solutions:

  1. Use tamper scripts: --tamper=space2comment
  2. Reduce detection level temporarily
  3. Try different techniques
  4. Use custom prefix/suffix

Time-Based Detection Issues

Problem: Time-based detection unreliable or slow Solutions:

  1. Adjust time delays: --time-sec=10
  2. Check network latency
  3. Use different time functions
  4. Switch to other techniques
/home/devil/Desktop/SQLmap-GUI-Advanced-SQL-Injection-Testing-Interface/docs/tabs/detection.md