ExamGecko
Home Home / CompTIA / PT0-002

CompTIA PT0-002 Practice Test - Questions Answers, Page 22

Question list
Search
Search

List of questions

Search

Related questions











A penetration tester is able to use a command injection vulnerability in a web application to get a reverse shell on a system After running a few commands, the tester runs the following:

python -c 'import pty; pty.spawn("/bin/bash")'

Which of the following actions Is the penetration tester performing?

A.
Privilege escalation
A.
Privilege escalation
Answers
B.
Upgrading the shell
B.
Upgrading the shell
Answers
C.
Writing a script for persistence
C.
Writing a script for persistence
Answers
D.
Building a bind shell
D.
Building a bind shell
Answers
Suggested answer: B

Explanation:

The penetration tester is performing an action called upgrading the shell, which means improving the functionality and interactivity of the shell. By running the python command, the penetration tester is spawning a new bash shell that has features such as tab completion, command history, and job control. This can help the penetration tester to execute commands more easily and efficiently.

A penetration tester opened a shell on a laptop at a client's office but is unable to pivot because of restrictive ACLs on the wireless subnet. The tester is also aware that all laptop users have a hardwired connection available at their desks. Which of the following is the BEST method available to pivot and gain additional access to the network?

A.
Set up a captive portal with embedded malicious code.
A.
Set up a captive portal with embedded malicious code.
Answers
B.
Capture handshakes from wireless clients to crack.
B.
Capture handshakes from wireless clients to crack.
Answers
C.
Span deauthentication packets to the wireless clients.
C.
Span deauthentication packets to the wireless clients.
Answers
D.
Set up another access point and perform an evil twin attack.
D.
Set up another access point and perform an evil twin attack.
Answers
Suggested answer: C

Explanation:

The best method available to pivot and gain additional access to the network is to span deauthentication packets to the wireless clients. This will cause them to disconnect from their wireless access point and reconnect using their hard-wired connection, which may have less restrictive ACLs. The penetration tester can then capture their traffic or attempt to compromise their systems.

A tester who is performing a penetration test discovers an older firewall that is known to have serious vulnerabilities to remote attacks but is not part of the original list of IP addresses for the engagement. Which of the following is the BEST option for the tester to take?

A.
Segment the firewall from the cloud.
A.
Segment the firewall from the cloud.
Answers
B.
Scan the firewall for vulnerabilities.
B.
Scan the firewall for vulnerabilities.
Answers
C.
Notify the client about the firewall.
C.
Notify the client about the firewall.
Answers
D.
Apply patches to the firewall.
D.
Apply patches to the firewall.
Answers
Suggested answer: C

Explanation:

The best option for the tester to take is to notify the client about the firewall. The firewall is not part of the original list of IP addresses for the engagement, which means it is out of scope and should not be tested without permission. The tester should inform the client about the existence and potential risks of the firewall, and ask if they want to include it in the scope or not.

A penetration tester is looking for vulnerabilities within a company's web application that are in scope. The penetration tester discovers a login page and enters the following string in a field:

1;SELECT Username, Password FROM Users;

Which of the following injection attacks is the penetration tester using?

A.
Blind SQL
A.
Blind SQL
Answers
B.
Boolean SQL
B.
Boolean SQL
Answers
C.
Stacked queries
C.
Stacked queries
Answers
D.
Error-based
D.
Error-based
Answers
Suggested answer: C

Explanation:

The penetration tester is using a type of injection attack called stacked queries, which means appending multiple SQL statements separated by semicolons in a single input field. This can allow the penetration tester to execute arbitrary SQL commands on the database server, such as selecting username and password from users table.

Which of the following can be used to store alphanumeric data that can be fed into scripts or programs as input to penetration-testing tools?

A.
Dictionary
A.
Dictionary
Answers
B.
Directory
B.
Directory
Answers
C.
Symlink
C.
Symlink
Answers
D.
Catalog
D.
Catalog
Answers
E.
For-loop
E.
For-loop
Answers
Suggested answer: A

Explanation:

A dictionary can be used to store alphanumeric data that can be fed into scripts or programs as input to penetration-testing tools. A dictionary is a collection of key-value pairs that can be accessed by using the keys. For example, a dictionary can store usernames and passwords, or IP addresses and hostnames, that can be used as input for brute-force or reconnaissance tools.

A penetration tester is trying to restrict searches on Google to a specific domain. Which of the following commands should the penetration tester consider?

A.
inurl:
A.
inurl:
Answers
B.
link:
B.
link:
Answers
C.
site:
C.
site:
Answers
D.
intitle:
D.
intitle:
Answers
Suggested answer: C

Explanation:

The site: command can be used to restrict searches on Google to a specific domain. For example, site:company.com will return only results from the company.com domain. This can help the penetration tester to find information or pages related to the target domain.

A client would like to have a penetration test performed that leverages a continuously updated TTPs framework and covers a wide variety of enterprise systems and networks. Which of the following methodologies should be used to BEST meet the client's expectations?

A.
OWASP Top 10
A.
OWASP Top 10
Answers
B.
MITRE ATT&CK framework
B.
MITRE ATT&CK framework
Answers
C.
NIST Cybersecurity Framework
C.
NIST Cybersecurity Framework
Answers
D.
The Diamond Model of Intrusion Analysis
D.
The Diamond Model of Intrusion Analysis
Answers
Suggested answer: B

Explanation:

The MITRE ATT&CK framework is a methodology that should be used to best meet the client's expectations. The MITRE ATT&CK framework is a knowledge base of adversary tactics, techniques, and procedures (TTPs) that are continuously updated based on real-world observations. The framework covers a wide variety of enterprise systems and networks, such as Windows, Linux, macOS, cloud, mobile, and network devices. The framework can help the penetration tester to emulate realistic threats and identify gaps in defenses.

During a web application test, a penetration tester was able to navigate to https://company.com and view all links on the web page. After manually reviewing the pages, the tester used a web scanner to automate the search for vulnerabilities. When returning to the web application, the following message appeared in the browser: unauthorized to view this page. Which of the following BEST explains what occurred?

A.
The SSL certificates were invalid.
A.
The SSL certificates were invalid.
Answers
B.
The tester IP was blocked.
B.
The tester IP was blocked.
Answers
C.
The scanner crashed the system.
C.
The scanner crashed the system.
Answers
D.
The web page was not found.
D.
The web page was not found.
Answers
Suggested answer: B

Explanation:

The most likely explanation for what occurred is that the tester IP was blocked by the web server. The web server may have detected the web scanner as a malicious or suspicious activity and blocked the tester's IP address from accessing the web application. This could result in an unauthorized to view this page message in the browser.

A red team completed an engagement and provided the following example in the report to describe how the team gained access to a web server:

x' OR role LIKE '%admin%

Which of the following should be recommended to remediate this vulnerability?

A.
Multifactor authentication
A.
Multifactor authentication
Answers
B.
Encrypted communications
B.
Encrypted communications
Answers
C.
Secure software development life cycle
C.
Secure software development life cycle
Answers
D.
Parameterized queries
D.
Parameterized queries
Answers
Suggested answer: D

Explanation:

The best recommendation to remediate this vulnerability is to use parameterized queries in the web application. Parameterized queries are a way of preventing SQL injection attacks by separating the SQL statements from the user input. This way, the user input is treated as a literal value and not as part of the SQL statement. For example, instead of using x' OR role LIKE '%admin%, the user input would be passed as a parameter to a prepared statement that would check if it matches any value in the database.

The following output is from reconnaissance on a public-facing banking website:

Based on these results, which of the following attacks is MOST likely to succeed?

A.
A birthday attack on 64-bit ciphers (Sweet32)
A.
A birthday attack on 64-bit ciphers (Sweet32)
Answers
B.
An attack that breaks RC4 encryption
B.
An attack that breaks RC4 encryption
Answers
C.
An attack on a session ticket extension (Ticketbleed)
C.
An attack on a session ticket extension (Ticketbleed)
Answers
D.
A Heartbleed attack
D.
A Heartbleed attack
Answers
Suggested answer: D

Explanation:

Based on these results, the most likely attack to succeed is a Heartbleed attack. The Heartbleed attack is a vulnerability in the OpenSSL implementation of the TLS/SSL protocol that allows an attacker to read the memory of the server and potentially steal sensitive information, such as private keys, passwords, or session tokens. The results show that the website is using OpenSSL 1.0.1f, which is vulnerable to the Heartbleed attack1.

Total 422 questions
Go to page: of 43