Web Application Security Fundamentals
Quiz covering core web application security concepts including input validation, XSS, SQL injection, access control, and secure data handling practices
Questions
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
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
How can we prevent dictionary attacks on password hashes ?
- Hashing the password twice
- Encrypting the password using the private key
- Use an encryption algorithm you wrote your self so no one knows how it works
- Salting the hash
Implementing Access Control based on a hard coded IP address
- Can be done as it as an internal IP
- Can be done for internet facing servers as there are no chances of IP conflicts
- Is a good security practice
- Is a bad security practice
Temporary files
- Should be placed securely in a folder called “temp” in the web root
- Can be placed anywhere in the web root as long as there are no links to them
- Should be completely removed from the server
- Can be placed anywhere after changing the extension
What is the preferred medium for backing up log files ?
- Print the logs to a paper
- Create a copy of data in your laptop/desktop
- Copy the files to CD-R's
- None of the above
What is the common cause of buffer over flows, cross-site scripting, SQL injection and format string attacks?
- Unvalidated input
- Lack of authentication
- Improper error handing
- Insecure configuration management
Out of the following which one can be considered as a possible solutions for SQL injection vulnerability?
- Data Validation
- Secure Cookies
- Encryption
- Comprehensive exception handling
Which of the following should be stored in the cookie?
- Session ID
- Account Privileges
- UserName
- Password
What should be considered the most while doing data classification
- The type of users who would be accessing the data
- Availability, Integrity and Confidentiality
- The threat level the company faces
- Access controls protecting the data
What are the fundamental principles of Security?
- Availability, Integrity, Confidentiality
- Usability, Reliability, Accountability
- Quality, Accountability, Integrity
- None of the above