Web Security Quiz
Test your knowledge of web security including Cross-Site Scripting (XSS), input validation, cookie security, and general security best practices for web applications.
Questions
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
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
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
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