Q1
Why does Parameterized Queries (Prepared Statements) stop SQL Injection (' OR 1=1--) completely, whereas basic regex keyword blacklists fail?
Blacklists (strip 'UNION') break on mixed case, URL encoding, comments (UN/**/ION), or hex literals! Prepared Statements transmit SQL structure and user data separately so the DB engine NEVER parses user input as executable SQL syntax.
Q2
How does SSRF (Server-Side Request Forgery) let an attacker compromise an AWS/GCP cloud server just from a 'Fetch Avatar URL' feature?
If the backend fetches arbitrary user URLs (http://169.254.169.254/latest/meta-data/iam/security-credentials/), it reaches the cloud internal IMDS metadata service and steals temporary IAM credentials! Block private RFC-1918/link-local IPs, enforce IMDSv2 (session header required), and whitelist allowed hostnames.
Q3
In Nmap reconnaissance, why does a SYN Half-Open Scan (`-sS`) require root privileges yet stay stealthier and faster than TCP Connect (-sT)?
-sS crafts raw SYN packets and immediately tears down via RST upon receiving SYN-ACK without finishing the 3-way TCP handshake—avoiding some application-layer socket connection logs and finishing rapidly.
Q4
Why is Stored XSS far more dangerous than Reflected XSS, and how does DOM-based XSS bypass Web Application Firewalls (WAF) completely?
Stored XSS persists inside the DB and executes automatically for every admin/visitor; Reflected requires tricking a click on a crafted URL. DOM-based XSS reads URL hash #payload exclusively inside client JS (innerHTML), never even sending the payload across the network to the server WAF!
Q5
When auditing JWT Authentication in Burp Suite, what are the classic alg: none and RS256 -> HS256 algorithm confusion attacks?
Poorly configured JWT libs trusting the token header's alg let attackers either forge unsigned alg: none tokens OR sign an HS256 token using the server's *public* RSA certificate as the symmetric HMAC secret! Always pin expected algorithms explicitly server-side (algorithms: ['RS256']).
Q6
How do Path Traversal payloads (../../../../etc/passwd) bypass naive str.replace('../', '') defenses?
Non-recursive replacement turns ....// cleanly back into ../! Always canonicalize paths via path.resolve(), verify resolved.startsWith(allowedBaseDir), and never concatenate raw filenames.
Q7
Why does Blind SQL Injection (Time-Based / Boolean-Based) require slow character-by-character inference when error messages are hidden?
Even with 500 stack traces suppressed, an attacker can ask true/false latency questions (IF(SUBSTR(pass,1,1)='a', SLEEP(3), 0)) and leak database contents bit by bit via response timing.
Q8
What is ARP Spoofing (MITM) on local unsegmented Wi-Fi/LANs—and how do Dynamic ARP Inspection (DAI) + HTTPS HSTS stop it?
Attackers broadcast forged ARP replies claiming their MAC owns the default gateway IP, intercepting local LAN frames. Switches with DHCP Snooping + DAI drop spoofed ARP replies, while TLS/HSTS rejects forged certificates.
Q9
In Privilege Escalation on Linux pentests, why do SUID binaries (find, vim, python) or sudo -l NOPASSWD entries give instant root shells?
An SUID executable runs with its file owner's (root) privileges; binaries supporting shell escapes (!sh in vim or find . -exec /bin/sh -p \;) inherit root EUID directly unless restricted cleanly.
Q10
Why is written Rules of Engagement (RoE) + Authorization Scope mandatory before running even passive-looking scans on client targets?
Scanning or testing outside authorized IPs/domains is illegal under IT/Cyber laws regardless of intent, and aggressive scanners can trigger outage alerts or WAF lockouts on shared third-party SaaS hosts.