6. Hackers often gather a multitude of seemingly sma ll, innocuous pieces of configuration
about a website that, when combined, can help exploit the site. Which of the following
error messages is typically considered NOT safe to display to the user?
A. A message that states that the system is down for maintenance and tells what time it
is expected to be back up. E.g.: Our site is down. We're sorry for the inconvenience.
We are doing maintenance on our servers. The site should be up by 12h00.
B. An error message that says there was an internal error message and displays the call
stack to assist in debugging and reporting of the error. E.g.: There was an internal error,
please copy and paste this page to the sysadmin.
C. A message that says that there was an error logging in mentioning the username. E.g.:
User "JoeUser" could not be logged in with the information you provided.
D. An error message that says there was an internal error but does not provide any details
to assist in debugging or reporting of the error. E.g.: There was an internal error. Please
report this to the sysadmin.
7. Which of the following techniques is an effective way to mitigate against SQL Injection
attacks on a web application?
A. Using prepared statements.
B. Using Username and password authentication method.
C. Reducing the amount of data in HTTP responses.
D. Implementing strict password policies.
8. How does the server validate authentication in token-based authentication?
A. Looks up the session ID in a database
B. Decrypts and verifies the token's signature
C. Matches the token with a user record in the server database
D. Relies on cookies sent by the client
9. The attacker has intercepted the user's session and was able to retrieve the session token.
What is likely to happen while the attacker is in possession of a valid token?
A. The attacker can perform session hijacking
B. The server will refuse the valid token
C. The server immediately invalidates the token
D. Tokens self-destruct instantly after interception
10. Which method allows immediate server-side user logout by invalidating session data?
A. Token-based authentication
B. Session-based authentication
C. Both token and session-based authentication
2