"},{"@type":"Answer","text":"../../etc/passwd"},{"@type":"Answer","text":"%0d%0aSet-Cookie: x=1"}]},{"@type":"Question","eduQuestionType":"Multiple choice","text":"Which OWASP-recognised vulnerability allows an attacker to inject client-side scripts that execute in other users' browsers?","acceptedAnswer":{"@type":"Answer","text":"Cross-Site Scripting (XSS)","comment":"Cross-Site Scripting (XSS) injects malicious scripts into web pages that are then executed in the browsers of other users, enabling session theft and defacement."},"suggestedAnswer":[{"@type":"Answer","text":"SQL Injection"},{"@type":"Answer","text":"Cross-Site Request Forgery"},{"@type":"Answer","text":"Directory traversal"}]},{"@type":"Question","eduQuestionType":"Multiple choice","text":"What is the single most effective defence against SQL injection?","acceptedAnswer":{"@type":"Answer","text":"Using parameterized queries (prepared statements) with bound parameters","comment":"Parameterized queries separate code from data so user input is always treated as a value and never executed as SQL, neutralising injection attempts."},"suggestedAnswer":[{"@type":"Answer","text":"Increasing the session timeout"},{"@type":"Answer","text":"Hiding the database server behind a longer URL"},{"@type":"Answer","text":"Renaming the database tables"}]},{"@type":"Question","eduQuestionType":"Multiple choice","text":"Which tool is an intercepting proxy commonly used to capture, inspect, and modify HTTP/HTTPS requests during web-application testing?","acceptedAnswer":{"@type":"Answer","text":"Burp Suite","comment":"Burp Suite acts as an intercepting proxy between the browser and the web server, letting testers inspect and tamper with HTTP/HTTPS traffic."},"suggestedAnswer":[{"@type":"Answer","text":"Aircrack-ng"},{"@type":"Answer","text":"Ettercap"},{"@type":"Answer","text":"Responder"}]},{"@type":"Question","eduQuestionType":"Multiple choice","text":"A Cross-Site Request Forgery (CSRF) attack succeeds by abusing which property of the victim's browser?","acceptedAnswer":{"@type":"Answer","text":"Its automatic inclusion of the victim's session cookies with requests to the trusted site","comment":"CSRF tricks the victim's browser into sending a forged request to a site where the victim is authenticated; the browser automatically attaches the session cookie, so the request is honoured."},"suggestedAnswer":[{"@type":"Answer","text":"Its support for FTP only"},{"@type":"Answer","text":"Its inability to render JavaScript"},{"@type":"Answer","text":"Its lack of any cache"}]},{"@type":"Question","eduQuestionType":"Multiple choice","text":"A directory-traversal payload such as '../../../etc/passwd' is used to:","acceptedAnswer":{"@type":"Answer","text":"Access files outside the web root by manipulating the path","comment":"Directory (path) traversal uses sequences like ../ to step out of the intended directory and read files elsewhere on the file system, such as /etc/passwd."},"suggestedAnswer":[{"@type":"Answer","text":"Encrypt the web server's files"},{"@type":"Answer","text":"Brute-force the admin password"},{"@type":"Answer","text":"Flood the server with requests"}]}]}
PassNova has 28 free Certified Ethical Hacker (CEH) practice questions on Web, Application & SQL Injection Attacks, each with a clear explanation. Practise them in the browser with instant feedback — 100% free, no sign-up, on any device. Updated for 2026.
Sample questions
Web, Application & SQL Injection Attacks: example questions & answers
Here are 6 example questions from this topic. Practise the full set of 28 free in the browser.
Which input would most clearly indicate a tester is attempting a classic SQL injection on a login form?
A' OR '1'='1' --✓
B<script>alert(1)</script>
C../../etc/passwd
D%0d%0aSet-Cookie: x=1
Answer: The payload ' OR '1'='1' -- manipulates the SQL WHERE clause so the condition is always true and comments out the rest, a textbook authentication-bypass SQL injection.
Which OWASP-recognised vulnerability allows an attacker to inject client-side scripts that execute in other users' browsers?
ACross-Site Scripting (XSS)✓
BSQL Injection
CCross-Site Request Forgery
DDirectory traversal
Answer: Cross-Site Scripting (XSS) injects malicious scripts into web pages that are then executed in the browsers of other users, enabling session theft and defacement.
What is the single most effective defence against SQL injection?
AIncreasing the session timeout
BHiding the database server behind a longer URL
CUsing parameterized queries (prepared statements) with bound parameters✓
DRenaming the database tables
Answer: Parameterized queries separate code from data so user input is always treated as a value and never executed as SQL, neutralising injection attempts.
Which tool is an intercepting proxy commonly used to capture, inspect, and modify HTTP/HTTPS requests during web-application testing?
ABurp Suite✓
BAircrack-ng
CEttercap
DResponder
Answer: Burp Suite acts as an intercepting proxy between the browser and the web server, letting testers inspect and tamper with HTTP/HTTPS traffic.
A Cross-Site Request Forgery (CSRF) attack succeeds by abusing which property of the victim's browser?
AIts support for FTP only
BIts automatic inclusion of the victim's session cookies with requests to the trusted site✓
CIts inability to render JavaScript
DIts lack of any cache
Answer: CSRF tricks the victim's browser into sending a forged request to a site where the victim is authenticated; the browser automatically attaches the session cookie, so the request is honoured.
A directory-traversal payload such as '../../../etc/passwd' is used to:
AEncrypt the web server's files
BAccess files outside the web root by manipulating the path✓
CBrute-force the admin password
DFlood the server with requests
Answer: Directory (path) traversal uses sequences like ../ to step out of the intended directory and read files elsewhere on the file system, such as /etc/passwd.