Application and Web Security Fundamentals
Covers essential security concepts including input validation, common vulnerabilities (XSS, SQL injection, buffer overflow), access control, authentication, and secure coding practices.
Questions
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
With a successful format string attack against the web application, the attacker is able to …
- Read only certain memory areas using the %s token
- Write only certain areas using other tokens
- Read and write to memory at will
- None 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
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