0% found this document useful (0 votes)
7 views2 pages

SQL Injection Techniques and Tools

The document provides a comprehensive overview of SQL Injection (SQLi), detailing various methods, tools, and techniques for both executing and preventing SQLi attacks. It covers manual SQLi, automation with sqlmap, error-based and blind SQLi, as well as strategies for bypassing filters and dumping data. Additionally, it emphasizes the importance of secure coding practices and offers resources for further learning and practice.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

SQL Injection Techniques and Tools

The document provides a comprehensive overview of SQL Injection (SQLi), detailing various methods, tools, and techniques for both executing and preventing SQLi attacks. It covers manual SQLi, automation with sqlmap, error-based and blind SQLi, as well as strategies for bypassing filters and dumping data. Additionally, it emphasizes the importance of secure coding practices and offers resources for further learning and practice.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

📘 PART 1: Introduction to SQL Injection

📚 Understand what SQL Injection is


💉 Injecting malicious queries into SQL-based inputs
🔗 Tutorial: [Link]
📌 Practice Lab: DVWA (Low Security)
#sqlinjection #infosec #sqli
---

📘 PART 2: Manual SQLi (Classic GET Method)

🧪 URL Example: `?id=1' OR '1'='1`


💡 Try in: DVWA / bWAPP
🔗 Watch: [Link]
#sqli #ctf #manual
---

📘 PART 3: Using sqlmap for Automation

🧰 Tool: sqlmap
🔧 Command: `sqlmap -u "[Link] --dbs`
📌 Tip: Use `--risk=3 --level=5` for deeper scan
#sqlmap #automation #recon
---

📘 PART 4: Error-Based SQLi

🧠 Payload: `' ORDER BY 10--` or `' AND 1=convert(int,(SELECT @@version))--`


📌 Find injection by observing errors
🔗 Guide: [Link]
#sqlerror #mssql #mysql
---

📘 PART 5: Blind SQLi (True/False Logic)

🧪 Test: `' AND 1=1--` vs `' AND 1=2--`


💬 Response changes = injectable
📌 Use `sqlmap --technique=B` for blind injection
#blindsqli #injection
---

📘 PART 6: Time-Based Blind SQLi

⏳ Payload: `' OR IF(1=1, SLEEP(5), 0)--`


Used when no error/output is returned
📌 Practice on: Juice Shop → Login
#timebased #mysql #sqli
---

📘 PART 7: Bypassing Filters & WAF

Techniques: URL encoding, case swap, comment injection


🔧 `'UnIoN/**/SeLeCt` or `%27%20UNION%20SELECT%20`
📌 Use BurpSuite + Repeater
#wafbypass #sqlfilter #webappsec
---

📘 PART 8: Dumping Data


🧰 sqlmap Command:
`sqlmap -u URL --dump-all`
📌 Add `--tables`, `--columns`, `--dbs` for control
⚠️ LABS ONLY
#dataextraction #sqlmap
---

📘 PART 9: SQLi in JSON / Headers / POST

🧪 Inject in custom headers: `X-Forwarded-For` or JSON


📌 Intercept with BurpSuite → Test all inputs
📚 Learn: [Link]
#jsonsqli #headersqli
---

📘 PART 10: Prevention Techniques

Use prepared statements / parameterized queries


✅ Validate input on server-side
❌ NEVER trust user input
📘 OWASP Guide: [Link]
#securecode #owasp #webdefense
---

You might also like