Web Application Security
Quiz covering web security topics including input validation, XSS attacks, authentication, error handling, and secure coding practices
Questions
Which of the following is appropriate for customer emails regarding a limited time promotional offer?
- Request that the user authenticate him/herself by replying to the email with their account credentials.
- Personalized greeting line
- Providing easy access to the customer's account via a “Click Here” style link
- Sending the email from a domain set up specifically for the special offer
Credit card numbers should be logged into the log file during exception
- No. Because leads to insecure storage of private information of the customer
- Yes. Because it is a good logging practice to log all relevant information during an exception
- Yes. Because it will help in troubleshooting specific customer problems
- No. Because its an additional over head
A race condition in a web server can cause …
- Resources to become unavailable to legitimate users
- Cross Site Tracing
- Server Instability
- Both A and B
Cross Site Scripting is an attack against
- Client (Browser)
- Database
- Web Application
- Web Server
Which cookie flag, when set, will prevent their transmission over non secure channel?
- Secure
- Domain
- Expires
- Static
The main risk to a web application in a cross site scripting attack is …
- Compromise of users
- Loss of data integrity
- Destruction of data
- None of the above
Out of the following which can be considered as user input for which validation is not required
- Host Header
- Cookie
- Referrer Header
- None of the above
It is a leading practice to suppress detailed errors in the following places:
- Web Server configuration files
- Application configuration files
- Application error handlers
- All of the above
Which of the following is true regarding reverse engineering of compiled Java code
- Java sand box environment provides protection against decompilation
- Java is compiled into ELF binaries and cannot be decompiled
- Java byte code can always be decompiled, code obfuscators can make the reverse engineering process more time confusing but cannot prevent it
- Java is difficult to decompile because the Just-In-Time compiler automatically perform string encryption by default
Requirements for administrator authentication should be
- Equivalent to normal users
- Less than those of normal users as all administrators are trustworthy
- No authentication is required for administrators
- Greater than those of normal users
Account lockouts should
- Only be used on administrator accounts to ensure continuous access to users
- Only be used on user accounts to ensure that administrators are not locked out of the application
- Only be used when there is a secure process to unlock the account
- None of the above
Hard Coding credentials
- Cannot be treated as a secure practice
- Is a good way to hide passwords from hackers
- Is perfectly fine for internal applications
- Is perfectly fine for external user facing applications
Which languages are vulnerable to Cross Site Scripting attacks ?
- Java
- ASP.Net
- Perl
- All of the above
What does “White List” data validation means?
- Data is validated against a list of values that are known to be valid
- Data is validated against a list of values that are known to be invalid
- Both of the above
- None of the above
Failing to properly validate uploaded files could result in:
- Arbitrary code execution
- Inadequate caching headers
- Distributed Denial of Service Attack against clients
- None of the above
In which of the following exploits does an attacker insert malicious code into a link that appears to be from a trustworthy source?
- Cross-Site Scripting
- Buffer over flows
- Command injection
- Path traversal attack
Why is “Black List” input validation considered a weak validation method ?
- Because the validation settings are hard coded.
- Susceptible to bypass using various forms of character encoding
- Because it's difficult to implement a black list filter that also takes into account data sent using the POST method
- Because it is typically implemented using regular expressions to match known good data patterns
Once an input data validation flags an input as “invalid” what would be the most secure response ?
- Escape the invalid characters and continue processing the input data
- Accept the input data without modifying it and log the validation error
- Delete the invalid characters and continue processing the input data
- Reject the entire input data and send an error message back to the user
A Buffer over flow occurs when …
- The application does not have enough memory allocated to handle the large amount of input
- The Operating System does not have enough RAM to handle large amount of input
- The client does not have enough memory allocated to handle the large amount of input
- A variable in the program does not have enough memory allocated to handle the amount of input
Web server will log which part of a GET request?
- Hidden tags
- Query Strings
- Header
- Cookies