Web and Database Attacks Flashcards

1
Q

What types of attacks are typically found where there are insecure user-controlled values?

A

Injection attacks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What kind of attack often involves abuse of application programming interfaces (API) functions with names like exec, eval, cmd, or system?

A

Command Injection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are some common commands used when performing a command injection attack?

A

whoami, ls, dir

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Name some remediation methods for Command Injection attacks

A
  1. Avoid having the application call commands directly in the OS
  2. Use programming options to escape the command for the underlaying OS before sending the command
  3. Parameterize and perform input validation by using an allowlist for characters
  4. Run applications at the lowest possible privilege
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are two common methods to troubleshoot queries in a blind SQLi?

A

1) Boolean-based and 2) time-based

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the two types of time-based searches in a blind SQLi?

A

Linear search and Binary search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is sqlmap?

A

A penetration testing tool for SQL injection (SQLi). It automates the detection and exploitation of SQLi flaws and database server hijacking

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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.

A

Union Query SQL Injection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What kind of SQL attack works by terminating the original query and then executing another query?

A

Stacked Queries SQL Injection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are some remediation techniques against SQL attacks?

A
  1. Parameterize queries and perform input validation by using an allowlist for characters
  2. Use stored procedures
  3. Escape all user input
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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?

A

LDAP Injection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are some ways to remediate against LDAP Injection attacks?

A
  1. Escape all variables using LDAP encoding functions
  2. Use language-specific built-in safe frameworks for interacting with LDAP
  3. Run applications at the lowest possible privilege
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What type of attack involves attackers injecting client-side scripts or HTML code into other web pages to steal information or bypass authentication?

A

Cross-site Scripting (XSS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the three types of XSS (Cross-site Scripting) attacks?

A
  1. Reflect
  2. Stored
  3. DOM-based
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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?

A

NoScript

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How can you recognize XSS (Cross-site Scripting) attacks?

A

They typically involve HTML tags, with symbols such as <, >, =, and quotes.

17
Q

What kind of client-side injection attack involves a user performing an action they do not intend against a trusted website?

A

Cross-site Request Forgery (CSRF)

18
Q

What is the free software that runs like a web application and is susceptible to many kinds of web-based attacks?

A

DVWA (Damn Vulnerable Web Application)

19
Q

What is a common tool used for web and web application penetration testing?

A

Burp Suite Pro

20
Q

Session-based authentication for most web frameworks are stateful. What does this mean?

A

This means each that the server and the client both keep a record of the session.

21
Q

What are some Set-Cookie attributes that can be included in a response header from a server to a client’s browser?

A
  1. HTTPOnly - The cookie cannot be accessed via JavaScript, such as cookie theft through XSS attacks
  2. Path - This defines the URL where the cookie is valid
  3. Domain - Defines the domain where the cookie is valid
  4. Expires - This tells the browser to save the cookie locally for persistent storage and that it will be used by the browser for future requests until the expiration date
  5. Secure - This is used to ensure the cookie never makes its way over a nonencrypted connection, like HTTP
22
Q

What are two ways to protect against Session Hijack attacks?

A
  1. invalidate a session as soon as user logs out 2. Web applications should assign a new session ID upon authentication
23
Q

What is a well-known open-source product used for hosting and deploying Java-based web applications?

A

Apache Tomcat

24
Q

What policy defines the requirement for how access to a resource should be managed and controlled based on the rule of least privilege?

A

Access Control Policy

25
Q

Sensitive data exposure can come in the form of an error message or a reference to an internal function that inadvertently reveals the true nature of the request. An example would be exposing a database record as a referenced object within a web parameter or URL. What is this called?

A

An insecure direct object reference (IDOR)

26
Q

what kind of attacks are a form of injection that enables a malicious actor to access content that would not normally be available by using shortcuts to browse outside of the web server’s root folder?

A

Directory and path traversal attacks

27
Q

What is the difference between file inclusion vulnerability and a path or directory traversal attack?

A

With a traversal attack, you only have the ability to read the contents of a local resource, but with file inclusion the resource can be loaded and executed within the context of the application (providing code execution)

28
Q

What kind of web or database attack is characterized by the ability to load arbitrary content within a web page?

A

Inclusion attack

29
Q

What are the two types of file inclusion attacks?

A

LFI (Local File Inclusion) - includes files outside the web root and renders the contents of local operating system files to the browser window, such as the password fle.
RFI (Remote File Inclusion) - allows files or even whole pages to be displayed inside the vulnerable web page.

30
Q

How can you mitigate against file inclusion attacks like LFI and RFI?

A

Input validation

31
Q

What is it called when two or more application logic components have co-dependent data, do not have appropriate concurrency protections, and execute simultaneously?

A

Race condition

32
Q

What is the purpose of the Document Object Model (DOM) within a user’s web browser?

A

During runtime, the application will pass the DOM to help structure content within the browser. DOM modules may include JavaScript code that can execute locally within the user’s browser.