ExamGecko
Home Home / CompTIA / PT0-002

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

Question list
Search
Search

List of questions

Search

Related questions











Using the output, identify potential attack vectors that should be further investigated.

A.
See below.
A.
See below.
Answers
Suggested answer: A

Explanation:

1:

Null session enumeration

Weak SMB file permissions

Fragmentation attack

2:

nmap

-sV

-p 1-1023

192.168.2.2

3:

#!/usr/bin/python

export $PORTS = 21,22

for $PORT in $PORTS: try: s.connect((ip, port)) print(“%s:%s – OPEN” % (ip, port)) except socket.timeout print(“%:%s – TIMEOUT” % (ip, port)) except socket.error as e: print(“%:%s – CLOSED” % (ip, port)) finally s.close()

port_scan(sys.argv[1], ports)

During an assessment, a penetration tester inspected a log and found a series of thousands of requests coming from a single IP address to the same URL. A few of the requests are listed below.

Which of the following vulnerabilities was the attacker trying to exploit?

A.
..Session hijacking
A.
..Session hijacking
Answers
B.
..URL manipulation
B.
..URL manipulation
Answers
C.
..SQL injection
C.
..SQL injection
Answers
D.
..Insecure direct object reference
D.
..Insecure direct object reference
Answers
Suggested answer: C

Explanation:

The vulnerability that the attacker was trying to exploit is SQL injection, which is a type of attack that exploits a vulnerability in a web application that allows an attacker to execute malicious SQL statements on a database server. SQL injection can allow an attacker to perform various actions on the database, such as reading, modifying, deleting, or creating data, or executing commands on the underlying OS. The log shows that the attacker was sending thousands of requests to the same URL with different parameters, such as id=1' OR 1=1;-, id=1' AND 1=2;-, or id=1' UNION SELECT * FROM users;-. These parameters are examples of SQL injection payloads, which are crafted SQL statements that are designed to manipulate or bypass the intended SQL query. For example, id=1' OR 1=1;-- is a payload that terminates the original query with a single quote and a semicolon, appends an OR condition that is always true (1=1), and comments out the rest of the query with two dashes (-). This payload can cause the web application to return all records from the database table instead of just one record with id=1. The other options are not vulnerabilities that match the log entries. Session hijacking is a type of attack that exploits a vulnerability in a web application that allows an attacker to take over an active session of another user by stealing or guessing their session identifier or cookie.

URL manipulation is a type of attack that exploits a vulnerability in a web application that allows an attacker to modify parameters or values in the URL to access unauthorized resources or functions.

Insecure direct object reference is a type of attack that exploits a vulnerability in a web application that allows an attacker to access objects or resources directly by modifying their identifiers or references in the URL or request.

ion tester is attempting to get more people from a target company to download and run an executable. Which of the following would be the.. :tive way for the tester to achieve this objective?

A.
Dropping USB flash drives around the company campus with the file on it
A.
Dropping USB flash drives around the company campus with the file on it
Answers
B.
Attaching the file in a phishing SMS that warns users to execute the file or they will be locked out of their accounts
B.
Attaching the file in a phishing SMS that warns users to execute the file or they will be locked out of their accounts
Answers
C.
Sending a pretext email from the IT department before sending the download instructions later
C.
Sending a pretext email from the IT department before sending the download instructions later
Answers
D.
Saving the file in a common folder with a name that encourages people to click it
D.
Saving the file in a common folder with a name that encourages people to click it
Answers
Suggested answer: C

Explanation:

The most effective way for the tester to achieve this objective is to send a pretext email from the IT department before sending the download instructions later. A pretext email is an email that uses deception or impersonation to trick users into believing that it is from a legitimate source or authority, such as the IT department. A pretext email can be used to establish trust or rapport with the users, and then persuade them to perform an action or provide information that benefits the attacker. In this case, the tester can send a pretext email from the IT department that informs users about an important update or maintenance task that requires them to download and run an executable file later. The tester can then send another email with the download instructions and attach or link to the malicious executable file. The users may be more likely to follow these instructions if they have received a prior email from the IT department that prepared them for this action. The other options are not as effective ways for the tester to achieve this objective. Dropping USB flash drives around the company campus with the file on it may not reach many users, as they may not find or pick up the USB flash drives, or they may be suspicious of their origin or content.

Which of the following tools would be best suited to perform a cloud security assessment?

A.
OpenVAS
A.
OpenVAS
Answers
B.
Scout Suite
B.
Scout Suite
Answers
C.
Nmap
C.
Nmap
Answers
D.
ZAP
D.
ZAP
Answers
E.
Nessus
E.
Nessus
Answers
Suggested answer: B

Explanation:

The tool that would be best suited to perform a cloud security assessment is Scout Suite, which is an open-source multi-cloud security auditing tool that can evaluate the security posture of cloud environments, such as AWS, Azure, GCP, or Alibaba Cloud. Scout Suite can collect configuration data from cloud providers using APIs and assess them against security best practices or benchmarks, such as CIS Foundations. Scout Suite can generate reports that highlight security issues, risks, or gaps in the cloud environment, and provide recommendations for remediation or improvement. The other options are not tools that are specifically designed for cloud security assessment. OpenVAS is an open-source vulnerability scanner that can scan hosts and networks for vulnerabilities and generate reports with findings and recommendations. Nmap is an open-source network scanner and enumerator that can scan hosts and networks for ports, services, versions, OS, or other information1. ZAP is an open-source web application scanner and proxy that can scan web applications for vulnerabilities and perform attacks such as SQL injection or XSS. Nessus is a commercial vulnerability scanner that can scan hosts and networks for vulnerabilities and generate reports with findings and recommendations.

Penetration tester is developing exploits to attack multiple versions of a common software package.

The versions have different menus and )ut.. they have a common log-in screen that the exploit must use. The penetration tester develops code to perform the log-in that can be each of the exploits targeted to a specific version. Which of the following terms is used to describe this common log-in code example?

A.
Conditional
A.
Conditional
Answers
B.
Library
B.
Library
Answers
C.
Dictionary
C.
Dictionary
Answers
D.
Sub application
D.
Sub application
Answers
Suggested answer: B

Explanation:

The term that is used to describe the common log-in code example is library, which is a collection of reusable code or functions that can be imported or called by other programs or scripts. A library can help simplify or modularize the code development process by providing common or frequently used functionality that can be shared across different programs or scripts. In this case, the penetration tester develops a library of code to perform the log-in that can be imported or called by each of the exploits targeted to a specific version of the software package. The other options are not valid terms that describe the common log-in code example. Conditional is a programming construct that executes a block of code based on a logical condition or expression, such as if-else statements.

Dictionary is a data structure that stores key-value pairs, where each key is associated with a value, such as a Python dictionary. Sub application is not a standard programming term, but it may refer to an application that runs within another application, such as a web application.

Which of the following documents describes activities that are prohibited during a scheduled penetration test?

A.
MSA
A.
MSA
Answers
B.
NDA
B.
NDA
Answers
C.
ROE
C.
ROE
Answers
D.
SLA
D.
SLA
Answers
Suggested answer: C

Explanation:

The document that describes activities that are prohibited during a scheduled penetration test is ROE, which stands for rules of engagement. ROE is a document that defines the scope, objectives, methods, limitations, and expectations of a penetration test. ROE can specify what activities are allowed or prohibited during the penetration test, such as which targets, systems, networks, or services can be tested or attacked, which tools, techniques, or exploits can be used or avoided, which times or dates can be scheduled or excluded, or which impacts or risks can be accepted or mitigated.

ROE can help ensure that the penetration test is conducted in a legal, ethical, and professional manner, and that it does not cause any harm or damage to the client or third parties. The other options are not documents that describe activities that are prohibited during a scheduled penetration test. MSA stands for master service agreement, which is a document that defines the general terms and conditions of a contractual relationship between two parties, such as the scope of work, payment terms, warranties, liabilities, or dispute resolution. NDA stands for non-disclosure agreement, which is a document that defines the confidential information that is shared between two parties during a business relationship, such as trade secrets, intellectual property, or customer data. SLA stands for service level agreement, which is a document that defines the quality and performance standards of a service provided by one party to another party, such as availability, reliability, responsiveness, or security.

Penetration tester who was exclusively authorized to conduct a physical assessment noticed there were no cameras pointed at the dumpster for company. The penetration tester returned at night and collected garbage that contained receipts for recently purchased networking :. The models of equipment purchased are vulnerable to attack. Which of the following is the most likely next step for the penetration?

A.
Alert the target company of the discovered information.
A.
Alert the target company of the discovered information.
Answers
B.
Verify the discovered information is correct with the manufacturer.
B.
Verify the discovered information is correct with the manufacturer.
Answers
C.
Scan the equipment and verify the findings.
C.
Scan the equipment and verify the findings.
Answers
D.
Return to the dumpster for more information.
D.
Return to the dumpster for more information.
Answers
Suggested answer: C

Explanation:

The most likely next step for the penetration tester is to scan the equipment and verify the findings, which is a process of using tools or techniques to probe or test the target equipment for vulnerabilities or weaknesses that can be exploited. Scanning and verifying the findings can help the penetration tester confirm that the models of equipment purchased are vulnerable to attack, and identify the specific vulnerabilities or exploits that affect them. Scanning and verifying the findings can also help the penetration tester prepare for the next steps of the assessment, such as exploiting or reporting the vulnerabilities. Scanning and verifying the findings can be done by using tools such as Nmap, which can scan hosts and networks for ports, services, versions, OS, or other information1, or Metasploit, which can exploit hosts and networks using various payloads or modules2. The other options are not likely next steps for the penetration tester. Alerting the target company of the discovered information is not a next step, but rather a final step, that involves reporting the findings and recommendations to the client after completing the assessment. Verifying the discovered information with the manufacturer is not a next step, as it may not provide accurate or reliable information about the vulnerabilities or exploits that affect the equipment, and it may also alert the manufacturer or the client of the assessment. Returning to the dumpster for more information is not a next step, as it may not yield any more useful or relevant information than what was already collected from the receipts.

Penetration on an assessment for a client organization, a penetration tester notices numerous outdated software package versions were installed ...s-critical servers. Which of the following would best mitigate this issue?

A.
Implementation of patching and change control programs
A.
Implementation of patching and change control programs
Answers
B.
Revision of client scripts used to perform system updates
B.
Revision of client scripts used to perform system updates
Answers
C.
Remedial training for the client's systems administrators
C.
Remedial training for the client's systems administrators
Answers
D.
Refrainment from patching systems until quality assurance approves
D.
Refrainment from patching systems until quality assurance approves
Answers
Suggested answer: A

Explanation:

The best way to mitigate this issue is to implement patching and change control programs, which are processes that involve applying updates or fixes to software packages to address vulnerabilities, bugs, or performance issues, and managing or documenting the changes made to the software packages to ensure consistency, compatibility, and security. Patching and change control programs can help prevent or reduce the risk of attacks that exploit outdated software package versions, which may contain known or unknown vulnerabilities that can compromise the security or functionality of the systems or servers. Patching and change control programs can be implemented by using tools such as WSUS, which is a tool that can manage and distribute updates for Windows systems and applications1, or Git, which is a tool that can track and control changes to source code or files2. The other options are not valid ways to mitigate this issue. Revision of client scripts used to perform system updates is not a sufficient way to mitigate this issue, as it may not address the root cause of why the software package versions are outdated, such as lack of awareness, resources, or policies.

Remedial training for the client's systems administrators is not a direct way to mitigate this issue, as it may not result in immediate or effective actions to update the software package versions.

Refrainment from patching systems until quality assurance approves is not a way to mitigate this issue, but rather a potential cause or barrier for why the software package versions are outdated.


Given the following Nmap scan command:

[root@kali ~]# nmap 192.168.0 .* -- exclude 192.168.0.101


Which of the following is the total number of servers that Nmap will attempt to scan?

A.
1
A.
1
Answers
B.
101
B.
101
Answers
C.
255
C.
255
Answers
D.
256
D.
256
Answers
Suggested answer: C

Explanation:

The Nmap scan command given will scan all the hosts in the 192.168.0.0/24 subnet, except for the one with the IP address 192.168.0.101. The subnet has 256 possible hosts, but one of them is excluded, so the total number of servers that Nmap will attempt to scan is 255.Reference:

Nmap Commands - 17 Basic Commands for Linux Network, Section: Scan Multiple Hosts, Subsection: Excluding Hosts from Search

Nmap Cheat Sheet 2023: All the Commands and More, Section: Target Specification, Subsection: -exclude

A penetration tester is conducting an assessment on 192.168.1.112. Given the following output:

Which of the following is the penetration tester conducting?

A.
Port scan
A.
Port scan
Answers
B.
Brute force
B.
Brute force
Answers
C.
Credential stuffing
C.
Credential stuffing
Answers
D.
DoS attack
D.
DoS attack
Answers
Suggested answer: B

Explanation:

The output shows multiple login attempts with different passwords for the same username ''root'' on the IP address 192.168.1.112. This is indicative of a brute force attack, where an attacker systematically tries various password combinations to gain unauthorized access.Reference:The Official CompTIA PenTest+ Study Guide (Exam PT0-002), Chapter 4: Conducting Passive Reconnaissance; The Official CompTIA PenTest+ Student Guide (Exam PT0-002), Lesson 4: Conducting Active Reconnaissance.



Total 422 questions
Go to page: of 43