Exploiting Application Vulnerabilities Flashcards

1
Q

Which one of the following approaches, when feasible is the most effective way to defeat injection attacks?

a. Browser-based input validation
b. Input whitelisting
c. Input blacklisting
d. Signature detection

A

b. Input whitelisting approaches define the specific input type or range that users may provide. When developers can write clear business rules defining allowable user input, whitelisting is definitely the most effective way to prevent injection attacks.

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

Examin the following network diagram. What is the most appropriate location for a web application firewall (WAF) on this network?

Internet, A, B, C, Internal Network
DMZ
D
Web Server

a. Location A
b. Location B
c. Location C
d. Location D

A

d. Web application firewalls must be placed n front of web servers. This rules out location C as an option. The next consideration is placing the WAF so that it can filter all traffic headed for the web server but where it sees a minimum amount of extraneous traffic. This makes location D the best option for placing a WAF

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

Joe is examining the logs for his web server and discovers that a user sent input to a web application that contained the string WAITFOR. What type of attack was the user likely attempting?

a. Timing-based SQL injection
b. HTML injection
c. Cross-site scripting
d. Content-based SQL injection

A

a. The use of the SQL WAITFOR command is a signature characteristic of a timing-based SQL injection attack.

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

Which one of the following function calls is closely associated with Linux command injection attacks?

a. system()
b. sudo()
c. mkdir()
d. root()

A

a. The system() function executes a command string against the operating system from within an application and may be used in command injection attacks.

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

Tina is conducting a penetration test and is trying to gain access to a user account. Which of the following is a good source for obtaining user account credentials?

a. Social engineering
b. Default account lists
c. Password dumps from compromised sites
d. All of the above

A

d. Penetration testers may use a wide variety of sources when seeking to gain access to individual user accounts. These may include conducting social engineering attacks against individual users, obtaining password dumps from previously compromised sites, obtaining default account lists, and conducting password cracking attacks

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

What type of credential used in Kerberos is often referred to as the “golden ticket” because of its potential for widespread reuse?

a. Session ticket
b. Ticket-granting ticket (TGT)
c. Service ticket
d. User ticket

A

b. TGTs are incredibly valuable and can be created with extended life spans. When attackers succeed in acquiring TGTs, the TGTs are often call “golden tickets” because they allow complete access to the Kerberos connected systems, including creation of new tickets, account changes, an even falsification of accounts or services.

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

Wendy is a penetration tester who wishes to engage in a session hijacking attack. What information is crucial for Wendy to obtain to ensure that her attack will be successful?

a. Session ticket
b. Session cookie
c. Username
d. Username password

A

b. Websites use HTTP cookies to maintain sessions over time. If Wendy is able to obtain a copy of the user’s session cookie, she can use that cookie to impersonate the user’s browser and hijack the authenticated session.

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

Sherry is concerned that a web application in her organization supports unvalidated redirects. Which one of the following approaches would minimize the risk of this attack?

a. Requiring HTTPS
b. Encrypting session cookies
c. Implementing multifactor authentication
d. Restricting redirects to her domain

A

d. Unvalidated redirects instruct a web application to direct users t an arbitrary site at the conclusion of their transaction. This approach is quite dangerous because it allows an attacker to send users to a malicious site through a legitimate site that they trust. Sherry should restrict redirects so that they only occur within her trusted domains(s).

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

Joe checks his web server logs and sees that someone sent the following query string to an application running on the server: http://www.mycompany.com/servicestatus.php?serviceID=892&serviceID=892’ ; DROP TABLE Services;–. What type of attack was most likely attempted?

a. Cross-site scripting
b. Session hijacking
c. Parameter pollution
d. Man-in-the-middle

A

c. This query string is indicative of a parameter pollution attack. In this case, it appears that the attacker was waging a SQL injection attack and tried to use parameter pollution to slip the attack past content filtering technology. The two instances of the seviceID parameter in the query string indicate a parameter pollution attempt.

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

Upon further inspection, Joe finds a series of thousands of requests to the same URL coming from a single IP address. Here are a few examples:
http://www.mycompany.com/servicestatus.php?serviceID=1
http://www.mycompany.com/servicestatus.php?serviceID=2
http://www.mycompany.com/servicestatus.php?serviceID=3
http://www.mycompany.com/servicestatus.php?serviceID=4

What type of vulnerability was the attacker likely trying to exploit?

a. Insecure direct object reference
b. File upload
c. Unvalidated redirect
d. Session hijacking

A

a. The series of thousands of requests incrementing a variable indicate that the attacker was most likely attempting to exploit an insecure direct object reference vulnerability.

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

Joe’s adventures in web server log analysis are not yet complete. As he continues to review the logs, he finds the request: http://www.mycompany.com/../../../etc/passwd. What type of attack was most likely attempted?

a. SQL injection
b. Session hijacking
c. Directory traversal
d. File upload

A

c. In this case, the .. operators are the telltale giveaway that the attacker was attempting to conduct a directory traversal attack. This particular attack sought to break out of the web server’s root directory and access the /etc/passwd file on the server.

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

What type of attack depends on the fact that users are often logged into many websites simultaneously in the same browser?

a. SQL injection
b. Cross-site scripting
c. Cross-site request forgery (XSRF)
d. File inclusion

A

c. XSRF attacks work by making the reasonable assumption that users are often logged into many different websites at the same time. Attackers then embed code in one website that sends a command to a second website.

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

What type of cross-site scripting attack would not be visible to a security professional inspecting the HTML source code in a browser?

a. Reflected XSS
b. Stored XSS
c. Persistent XSS
d. DOM-based XSS

A

d. DOM-based XSS attacks hide the attack code within the Document Object Model. This code would not be visible to someone viewing the HTML source of the page. Other XSS attacks would leave visible traces in the browser.

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

Which one of the following attacks is an example of a race condition exploitation?

a. XSRF
b. XSS
c. TOCTTOU
d. SQLi

A

c. The time-of-check-to-time-of-use TOCTTOU issue is a race condition that occurs when a program checks access permission to far in advance of a resource request.

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

Tom is a software developer who creates code for sale to the public. He would like to assure his users that the code they receive actually came from him. What technique can he use to best provide this assurance?

a. Code signing
b. Code endorsement
c. Code encryption
d Code obfuscation

A

a. Code signing provides developers with a way to confirm the authenticity of their code to end users. Developers use a cryptographic function to digitally sign their code with their own private key, and then browsers can use the developer’s public key to verify that signature and ensure the code is legitimate and was not modified by unauthorized individuals.

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

Which one of the following tools may be used to debug application written on a Mac platform?

a. IDA
b. OlllyDbg
c. GDB
d. Covenant

A

a. Interactive Disassembler (IDA) is a commercial debugging tool that works on Windows, Mac, and Linux platforms. OllyDbg and Covenant are Windows-specific tools, and GNU Debugger (GDB) is a widely used open source debugger for Linux that works with a variety of programming languages

17
Q

Norm is performing a penetration test of a web application and would like to manipulate the input sent to the application before it leaves his browser. Which one of the following tools would assist him with this task?

a. AFL
b. ZAP
c. GDB
d. DOM

A

b. ZAP is an interception proxy developed by the Open Web Application Security Project OWASP. Users of ZAP can intercept requests sent from any web browser and alter them before passing them to the web server.

18
Q

What control is most commonly used to secure access to API interfaces?

a. API keys
b. Passwords
c. Challenge-response
d. Biometric authentication

A

a. API use may be restricted by assigning legitimate users unique API keys that grant them access, subject to their own authorization constraints and bandwidth limitations.

19
Q

Which one of the following is a debugging tool compatible with Linux systems?

a. WinDbg
b. GDB
c. OllyDbg
d. SonarQube

A

b. GDB is a widely used open source debugger for the Linux platform. WinDbg and OllyDbg are also debuggers, but they are only available for Windows systems. SonarQube is a continuous security assessment tool and is not a debugger.

20
Q

During a penetration test, Bonnie discovers in a web server log that the testers attempted to access the following URL: http://www.mycompany.com/sortusers.phpfile=C:\uploads\attack.exe. What type of attack did they most likely attempt?

a. Reflected XSS
b. Persistent XSS
c. Local file inclusion
d. Remote file inclusion

A

c. This URL contains the address of a local file passed to a web application as an argument. It is most likely a local file inclusion exploit, attempting to execute a malicious file that the testers previously uploaded to the server.