XSS, SQLi, CSRF & More - Detection from the SOC Perspective
The Shield House web security modules teach attack mechanics. This module focuses on how to detect these attacks in logs, WAF alerts, and SIEM as a SOC analyst.
Master attack fundamentals before learning detection patterns.
Users acting outside intended permissions. IDOR, privilege escalation, path traversal.
Weak encryption, plaintext data exposure, deprecated algorithms.
SQL, NoSQL, OS command, LDAP injection attacks through untrusted data.
Missing or ineffective security controls in application design.
Default configs, open cloud storage, verbose errors, missing patches.
Using libraries with known vulnerabilities (Log4j, Struts, etc.)
Broken authentication, weak credentials, session hijacking.
Insecure deserialization, CI/CD pipeline compromises.
Insufficient logging, missing alerts, no incident response.
Server-Side Request Forgery - forcing server to make requests.
Attacker inserts malicious SQL commands into input fields to manipulate database queries.
' OR '1'='1 -- Always true condition'; DROP TABLE users;-- -- Destructive query' UNION SELECT username,password FROM users-- -- Data extractionadmin'-- -- Comment out password check
OR.*=.* (Boolean injection)UNION.*SELECT-- or # (Comment chars)'; .*-- (Chained queries)Attacker injects malicious scripts that execute in victims' browsers to steal session data or perform actions.
<script>alert('XSS')</script> -- Basic test<img src=x onerror=alert(1)> -- Event handler<svg onload=alert(1)> -- SVG vectorjavascript:alert(document.cookie) -- Cookie theft
<script.*>on\w+= (Event handlers)javascript:<.*on\w+=.*>Tricks authenticated users into performing unwanted actions on sites where they're logged in.
<img src="https://bank.com/transfer?to=attacker&amount=10000"><form action="https://bank.com/transfer" method="POST"> <input type="hidden" name="to" value="attacker"> <input type="hidden" name="amount" value="10000"></form><script>document.forms[0].submit()</script>
Attacker executes arbitrary system commands through vulnerable web applications.
; cat /etc/passwd -- Linux password file| whoami -- Current user& dir C:\ -- Windows directory`id` -- Backtick execution$(cat /etc/shadow) -- Command substitution
[;&|`$] (Shell metacharacters)/etc/passwdcmd\.exe|powershell\$\(.*\) (Command substitution)Paste a log entry or URL to identify potential web attack patterns.
| Attack Type | Immediate Actions | Long-term Remediation |
|---|---|---|
| SQL Injection | Block IP, check for data exfil, audit DB | Parameterized queries, input validation, WAF rules |
| XSS | Remove malicious content, notify affected users | Output encoding, CSP headers, sanitize input |
| CSRF | Invalidate sessions, review transaction logs | CSRF tokens, SameSite cookies, Referer check |
| Command Injection | Isolate server, forensic imaging, check persistence | Remove shell access, input whitelist, sandboxing |
Test your ability to identify and respond to web application attacks.