Web Application Security Fundamentals

Comprehensive quiz covering web security concepts including vulnerability assessment, penetration testing, common attacks (SQL injection, XSS, buffer overflow), encryption, input validation, and secure coding practices.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

In which of the following exploits does an attacker insert malicious code into a link that appears to be from a trustworthy source?

  1. Cross-Site Scripting
  2. Buffer over flows
  3. Command injection
  4. Path traversal attack
Question 2 Multiple Choice (Single Answer)

Why is “Black List” input validation considered a weak validation method ?

  1. Because the validation settings are hard coded.
  2. Susceptible to bypass using various forms of character encoding
  3. Because it's difficult to implement a black list filter that also takes into account data sent using the POST method
  4. Because it is typically implemented using regular expressions to match known good data patterns
Question 3 Multiple Choice (Single Answer)

Once an input data validation flags an input as “invalid” what would be the most secure response ?

  1. Escape the invalid characters and continue processing the input data
  2. Accept the input data without modifying it and log the validation error
  3. Delete the invalid characters and continue processing the input data
  4. Reject the entire input data and send an error message back to the user
Question 4 Multiple Choice (Single Answer)

A Buffer over flow occurs when …

  1. The application does not have enough memory allocated to handle the large amount of input
  2. The Operating System does not have enough RAM to handle large amount of input
  3. The client does not have enough memory allocated to handle the large amount of input
  4. A variable in the program does not have enough memory allocated to handle the amount of input
Question 5 Multiple Choice (Single Answer)

An intruder manipulates the URL which causes the web server to either execute a file or reveal the contents of a file which could be lying anywhere in the file system even out side the document root directory. What type of attack is this?

  1. Cross-Site Scripting
  2. SQL injection
  3. Command injection
  4. Directory traversal
Question 6 Multiple Choice (Single Answer)

Web server will log which part of a GET request?

  1. Hidden tags
  2. Query Strings
  3. Header
  4. Cookies
Question 7 Multiple Choice (Single Answer)

How can we prevent dictionary attacks on password hashes ?

  1. Hashing the password twice
  2. Encrypting the password using the private key
  3. Use an encryption algorithm you wrote your self so no one knows how it works
  4. Salting the hash
Question 8 Multiple Choice (Single Answer)

Implementing Access Control based on a hard coded IP address

  1. Can be done as it as an internal IP
  2. Can be done for internet facing servers as there are no chances of IP conflicts
  3. Is a good security practice
  4. Is a bad security practice
Question 9 Multiple Choice (Single Answer)

Temporary files

  1. Should be placed securely in a folder called “temp” in the web root
  2. Can be placed anywhere in the web root as long as there are no links to them
  3. Should be completely removed from the server
  4. Can be placed anywhere after changing the extension
Question 10 Multiple Choice (Single Answer)

What is the preferred medium for backing up log files ?

  1. Print the logs to a paper
  2. Create a copy of data in your laptop/desktop
  3. Copy the files to CD-R's
  4. None of the above
Question 11 Multiple Choice (Single Answer)

What is the common cause of buffer over flows, cross-site scripting, SQL injection and format string attacks?

  1. Unvalidated input
  2. Lack of authentication
  3. Improper error handing
  4. Insecure configuration management
Question 12 Multiple Choice (Single Answer)

Configuration Management Security principles apply to

  1. Commercial applications
  2. Custom built applications
  3. In house developed applications
  4. All of the above
Question 13 Multiple Choice (Single Answer)

Which of the following can you reveal without compromising the security of the encrypted data

  1. Encrypted data itself
  2. Asymmetric private key
  3. Symmetric key
  4. Asymmetric public key
Question 14 Multiple Choice (Single Answer)

Out of the following which one can be considered as a possible solutions for SQL injection vulnerability?

  1. Data Validation
  2. Secure Cookies
  3. Encryption
  4. Comprehensive exception handling
Question 15 Multiple Choice (Single Answer)

Which of the following should be stored in the cookie?

  1. Session ID
  2. Account Privileges
  3. UserName
  4. Password
Question 16 Multiple Choice (Single Answer)

Data hashing will

  1. Ensure that the data has not been tampered with
  2. Ensure that the session is valid
  3. Ensure that the user is valid
  4. All of the above
Question 17 Multiple Choice (Single Answer)

If the characters %00%0A (CR+LF) are detected at the end of an input string this is most likely which of the following attacks?

  1. Cross Site Scripting
  2. Phishing
  3. SQL Injection
  4. HTTP Response Splitting
Question 18 Multiple Choice (Single Answer)

Which of the following best describes the difference between white-box testing and black-box testing?

  1. White-box testing is performed by an independent programmer team
  2. Black-box testing uses the bottom-up approach
  3. Black-box testing involves the business units
  4. White-box testing examines the program internal logical structures
Question 19 Multiple Choice (Single Answer)

Scanning underlying source code with a database of regular expressions to quickly identify suspicious code, application inputs, outputs etc primarily relates to ..

  1. Grey-box testing
  2. Black-box testing
  3. White-box testing
  4. None of these
Question 20 Multiple Choice (Single Answer)

What is the difference between network vulnerability assessment and a penetration test?

  1. A penetration test enumerates resources, and a vulnerability assessment enumerates vulnerabilities
  2. They are one and the same
  3. A penetration test identifies running services, and vulnerability assessments provide a more in-depth understanding of vulnerabilities
  4. A penetration test exploits vulnerabilities, and a vulnerability assessment finds vulnerabilities