3.5 Attacks & exploits: Application attacks Flashcards

1
Q

Directory Traversals: what Directory Traversal type of attack and what information can you retrieve from it?

A

▪ Allows access to files, directories, or commands that may or may not be connected to the web document root directory
▪ In a directory traversal, an attacker tries to navigate upwards and out of the web document root directory
▪ Directory traversals may be used to access any file on a system with the right permissions
▪ Attackers may try to use %2E%2E%2F instead of ../

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

Directory Traversals: what File Inclusion type of attack and what are the different type of file inclusion that exists (2)?

A

▪ Allows an attacker to download a file from an arbitrary location or upload an executable or script file to open a backdoor
▪ Remote File Inclusion: Executes a script to inject a remote file into the web app or the website
▪ Local File Inclusion: Adds a file to the web app or website that already exists on the hosting server

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

Cross-Site Scripting (XSS): what is XSS attack?

A

▪ Injects a malicious script into a trusted site to compromise the site’s visitors
▪ Cross-site scripting (XSS) is a powerful input validation exploit
▪ XSS breaks the browser’s security and trust model

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

Cross-Site Scripting (XSS): explain the process to perform this attack as an attacker (4)

A

● Attacker identifies input validation vulnerability within a trusted website
● Attacker crafts a URL to perform code injection against the trusted website
● The trusted site returns a page containing the malicious code injected
● Malicious code runs in the client’s browser with permission level as the trusted site

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

Cross-Site Scripting (XSS): what are the 2 types of XSS attack?

A

● Non-Persistent XSS: Happens once
● Persistent XSS: Embedded code

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

Cross-Site Scripting (XSS): what is Document Object Model (DOM) XSS?

A

▪ Exploits the client’s web browser using client-side scripts to modify the content and layout of the web page
▪ DOM XSS runs with the logged in user’s privileges of the local system

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

Cross-Site Request Forgery (CSRF): what is Session Management for ?

A

Enables web applications to uniquely identify a user across several different actions and requests

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

Cross-Site Request Forgery (CSRF): what is Cookie for and what are the different types of cookies that exists (2)?

A

Text file used to store information about a user when they visit a website. Cookie type:
● Non-Persistent Cookie (Session Cookie): Reside in memory
● Persistent Cookie: Stored in browser cache

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

Cross-Site Request Forgery (CSRF): explain Session Hijacking type of attack and vectors that you can use to do the attack (2)

A

Disconnects a host and then replaces it with his or her own machine by spoofing the original host IP address. Vector for this attack:
● Session cookie theft
● Non-random tokens

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

Cross-Site Request Forgery (CSRF): explain Session Prediction type of attack

A

▪ Predicts a session token to hijack the session
▪ Session tokens must be generated using non-predictable algorithm and must not reveal any info about the session’s client

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

Cross-Site Request Forgery (CSRF): explain CSRF type of attack

A

Exploits a session that was started on another site and within the same web browser

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

Cross-Site Request Forgery (CSRF): how to prevent from CSRF type of attack (3)

A

● Ensure user-specific tokens are used in all form submissions
● Add randomness and prompt for additional information for password resets
● Require users to enter their current password when changing it

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

SQL Injections: list the most common SQL commands (4) and explain them

A

SELECT = Read
INSERT = Write
DELETE = Remove
UPDATE = Overwrite

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

SQL Injections: what is a code injection?

A

Inserts additional information or code through a data input form from a client to an application

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

SQL Injections: what is SQL injection and what vectors can you use to do it (5)?

A

Injects an SQL query through the input form a client uses to send data to a web application. Vectors for SQLi:
● URL parameters
● Form fields
● Cookies
● POST data
● HTTP headers

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

SQL Injections: how to prevent SQLi (2)?

A

● Use input validation and sanitize any data received from users
● Web application firewall

17
Q

SQL Injections: how to spot SQLi (2)?

A

If you see ‘OR 1=1; on the exam, it’s an SQL injection

18
Q

XML Injections/Exploitation/Vulnerability: what is Extensible Markup Language (XML)?

A

▪ Used by web apps for authentication, authorization, and other types of data exchange
▪ Conduct input validation and sanitization of the data received

19
Q

XML Injections/Exploitation/Vulnerability: what XML vulnerable to (3)?

A

● Spoofing
● Request forgery
● Code injection

20
Q

XML Injections/Exploitation/Vulnerability: what is XML Bomb (Billion Laughs Attack)?

A

XML encodes entities that expand to exponential sizes, consuming memory on the host and potentially crashing it

21
Q

XML Injections/Exploitation/Vulnerability: what is XML External Entity (XXE) Attack?

A

Attempts to embed a request for a local resource

22
Q

XML Injections/Exploitation/Vulnerability: how to prevent those attacks?

A

To prevent XML vulnerabilities from being exploited, use proper input validation. Unlike XML, HTML or JavaScript use defined keywords for each bracketed entry

23
Q

Other Injection Attacks: what is LDAP Injection?

A

Lightweight Directory Access Protocol (LDAP): Protocol for accessing and maintaining distributed directory information services over an Internet Protocol network

24
Q

Other Injection Attacks: how to prevent LDAP Injection (2)?

A

● Input validation
● Input sanitization

25
Q

Other Injection Attacks: what is Command Injection?

A

Occurs when a threat actor executes arbitrary shell commands on a host via a vulnerable web application

26
Q

Other Injection Attacks: how to prevent Command Injection (1)?

A

Input validation: Only accept an IP address or a domain name as input

27
Q

Process Injection: what is it?

A

A method of executing arbitrary code in the address space of a separate live process

28
Q

Process Injection: what are the methods to do a process injection (6)?

A
  • Injection through DLLs
  • Thread Execution Hijacking
  • Process Hollowing
  • Process Doppelganging
  • Asynchronous procedure calls
  • Portable executable injections
29
Q

Process Injection: how to prevent a process injection (3)?

A

● Endpoint security
● Security kernel module
● Least privilege