Web and Database Attacks Flashcards
What types of attacks are typically found where there are insecure user-controlled values?
Injection attacks
What kind of attack often involves abuse of application programming interfaces (API) functions with names like exec, eval, cmd, or system?
Command Injection
What are some common commands used when performing a command injection attack?
whoami, ls, dir
Name some remediation methods for Command Injection attacks
- Avoid having the application call commands directly in the OS
- Use programming options to escape the command for the underlaying OS before sending the command
- Parameterize and perform input validation by using an allowlist for characters
- Run applications at the lowest possible privilege
What are two common methods to troubleshoot queries in a blind SQLi?
1) Boolean-based and 2) time-based
What are the two types of time-based searches in a blind SQLi?
Linear search and Binary search
What is sqlmap?
A penetration testing tool for SQL injection (SQLi). It automates the detection and exploitation of SQLi flaws and database server hijacking
What type of SQL attack builds two or more SELECT() statements that already exist within an application to create a single result in the application response? To be successful, both queries must return the same number of columns and the data types in each column have to match.
Union Query SQL Injection
What kind of SQL attack works by terminating the original query and then executing another query?
Stacked Queries SQL Injection
What are some remediation techniques against SQL attacks?
- Parameterize queries and perform input validation by using an allowlist for characters
- Use stored procedures
- Escape all user input
What kind of attack often involves an ou, cn, or dc, and can be distinguished by looking for key-value pairs in injeccted filters using parentheses and comparison characters?
LDAP Injection
What are some ways to remediate against LDAP Injection attacks?
- Escape all variables using LDAP encoding functions
- Use language-specific built-in safe frameworks for interacting with LDAP
- Run applications at the lowest possible privilege
What type of attack involves attackers injecting client-side scripts or HTML code into other web pages to steal information or bypass authentication?
Cross-site Scripting (XSS)
What are the three types of XSS (Cross-site Scripting) attacks?
- Reflect
- Stored
- DOM-based
What is a browser extension in Mozilla-based browsers that can help block unwanted scripts from executing in your browser and limit execution to only trusted websites?
NoScript