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.
Questions
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
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?
- Cross-Site Scripting
- SQL injection
- Command injection
- Directory traversal
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
Configuration Management Security principles apply to
- Commercial applications
- Custom built applications
- In house developed applications
- All of the above
Which of the following can you reveal without compromising the security of the encrypted data
- Encrypted data itself
- Asymmetric private key
- Symmetric key
- Asymmetric public key
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
Data hashing will
- Ensure that the data has not been tampered with
- Ensure that the session is valid
- Ensure that the user is valid
- All of the above
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?
- Cross Site Scripting
- Phishing
- SQL Injection
- HTTP Response Splitting
Which of the following best describes the difference between white-box testing and black-box testing?
- White-box testing is performed by an independent programmer team
- Black-box testing uses the bottom-up approach
- Black-box testing involves the business units
- White-box testing examines the program internal logical structures
Scanning underlying source code with a database of regular expressions to quickly identify suspicious code, application inputs, outputs etc primarily relates to ..
- Grey-box testing
- Black-box testing
- White-box testing
- None of these
What is the difference between network vulnerability assessment and a penetration test?
- A penetration test enumerates resources, and a vulnerability assessment enumerates vulnerabilities
- They are one and the same
- A penetration test identifies running services, and vulnerability assessments provide a more in-depth understanding of vulnerabilities
- A penetration test exploits vulnerabilities, and a vulnerability assessment finds vulnerabilities