ExamGecko
Home Home / CompTIA / PT0-002

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

Question list
Search
Search

List of questions

Search

Related questions











A penetration tester issues the following command after obtaining a low-privilege reverse shell: wmic service get name,pathname,startmode

Which of the following is the most likely reason the penetration tester ran this command?

A.
To search for passwords in the service directory
A.
To search for passwords in the service directory
Answers
B.
To list scheduled tasks that may be exploitable
B.
To list scheduled tasks that may be exploitable
Answers
C.
To register a service to run as System
C.
To register a service to run as System
Answers
D.
To find services that have unquoted service paths
D.
To find services that have unquoted service paths
Answers
Suggested answer: D

Explanation:

The command wmic service get name,pathname,startmode is used by penetration testers to enumerate services and their configurations, specifically looking for services with unquoted paths. If a service's path contains spaces and is not enclosed in quotes, it can be exploited by placing a malicious executable along the path, leading to privilege escalation. For example, if the service path is C:\Program Files\My Service\service.exe and is unquoted, an attacker could place a malicious Program.exe in C:\, which would then be executed with the same privileges as the service when the service starts. Identifying such services allows penetration testers to highlight potential security risks that could be exploited for privilege escalation.

Which of the following tools can a penetration tester use to brute force a user password over SSH using multiple threads?

A.
CeWL
A.
CeWL
Answers
B.
John the Ripper
B.
John the Ripper
Answers
C.
Hashcat
C.
Hashcat
Answers
D.
Hydra
D.
Hydra
Answers
Suggested answer: D

Explanation:

Hydra is a powerful tool for conducting brute-force attacks against various protocols, including SSH. It is capable of using multiple threads to perform concurrent attempts, significantly increasing the efficiency of the attack. This capability makes Hydra particularly suited for brute-forcing user passwords over SSH, as it can quickly try numerous combinations of usernames and passwords. The tool's ability to support a wide range of protocols, its flexibility in handling different authentication mechanisms, and its efficiency in managing multiple simultaneous connections make it a go-to choice for penetration testers looking to test the strength of passwords in a target system's SSH service.

A penetration tester is taking screen captures of hashes obtained from a domain controller. Which of the following best explains why the penetration tester should immediately obscure portions of the images before saving?

A.
To maintain confidentiality of data/information
A.
To maintain confidentiality of data/information
Answers
B.
To avoid disclosure of how the hashes were obtained
B.
To avoid disclosure of how the hashes were obtained
Answers
C.
To make the hashes appear shorter and easier to crack
C.
To make the hashes appear shorter and easier to crack
Answers
D.
To prevent analysis based on the type of hash
D.
To prevent analysis based on the type of hash
Answers
Suggested answer: A

Explanation:

When a penetration tester captures screen images that include hashes from a domain controller, obscuring parts of these images before saving is crucial to maintain the confidentiality of sensitive data. Hashes can be considered sensitive information as they represent a form of digital identity for users within an organization. Revealing these hashes in full could lead to unauthorized access if the hashes were to be cracked or otherwise misused by malicious actors. By partially obscuring the images, the penetration tester ensures that the data remains confidential and reduces the risk of compromising user accounts and the integrity of the organization's security posture.

Which of the following types of information would most likely be included in an application security assessment report addressed to developers? (Select two).

A.
Use of non-optimized sort functions
A.
Use of non-optimized sort functions
Answers
B.
Poor input sanitization
B.
Poor input sanitization
Answers
C.
Null pointer dereferences
C.
Null pointer dereferences
Answers
D.
Non-compliance with code style guide
D.
Non-compliance with code style guide
Answers
E.
Use of deprecated Javadoc tags
E.
Use of deprecated Javadoc tags
Answers
F.
A cyclomatic complexity score of 3
F.
A cyclomatic complexity score of 3
Answers
Suggested answer: B, C

Explanation:

An application security assessment report aimed at developers typically includes information critical to understanding and improving the security and stability of the application. Poor input sanitization and null pointer dereferences are two such issues that are directly related to application security and can lead to significant vulnerabilities such as injection attacks or crashes. Poor input sanitization exposes the application to various forms of injection attacks, where an attacker could supply malicious input to gain unauthorized access or disrupt application services. Null pointer dereferences, on the other hand, can lead to application crashes or unexpected behavior, which can be exploited to compromise application security or availability. Highlighting these issues helps developers focus on areas that need immediate attention to enhance the application's security posture.

A penetration tester is conducting an assessment for an e-commerce company and successfully copies the user database to the local machine. After a closer review, the penetration tester identifies several high-profile celebrities who have active user accounts with the online service. Which of the following is the most appropriate next step?

A.
Contact the high-profile celebrities.
A.
Contact the high-profile celebrities.
Answers
B.
Delete the high-profile accounts.
B.
Delete the high-profile accounts.
Answers
C.
Immediately contact the client.
C.
Immediately contact the client.
Answers
D.
Record the findings in the penetration test report.
D.
Record the findings in the penetration test report.
Answers
Suggested answer: C

Explanation:

Upon discovering sensitive information, such as high-profile celebrities' user accounts, the most appropriate and ethical next step is to immediately contact the client. This allows the client to take necessary actions to secure the data and mitigate any potential risks. It is important for a penetration tester to maintain confidentiality and integrity, and directly contacting the celebrities (option A), deleting the accounts (option B), or merely recording the findings without immediate notification (option D) would not be appropriate professional responses.

A penetration tester is reviewing the logs of a proxy server and discovers the following URLs:

https://test.comptia.com/profile.php?userid=1546

https://test.cpmptia.com/profile.php?userid=5482

https://test.comptia.com/profile.php?userid=3618

Which of the following types of vulnerabilities should be remediated?

A.
Insecure direct object reference
A.
Insecure direct object reference
Answers
B.
Improper error handling
B.
Improper error handling
Answers
C.
Race condition
C.
Race condition
Answers
D.
Weak or default configurations
D.
Weak or default configurations
Answers
Suggested answer: A

Explanation:

Insecure Direct Object Reference (IDOR) occur when an application provides direct access to objects based on user-supplied input. In the provided URLs, the userid parameter is directly referenced, which can allow attackers to manipulate these references to access unauthorized data. This vulnerability can lead to unauthorized access to other users' profiles by simply changing the userid parameter value. The other vulnerabilities listed (Improper error handling, Race condition, Weak or default configurations) do not directly relate to the issue demonstrated by the URLs.

Given the following user-supplied data:

www.comptia.com/info.php?id=1 AND 1=1

Which of the following attack techniques is the penetration tester likely implementing?

A.
Boolean-based SQL injection
A.
Boolean-based SQL injection
Answers
B.
Time-based SQL injection
B.
Time-based SQL injection
Answers
C.
Stored cross-site scripting
C.
Stored cross-site scripting
Answers
D.
Reflected cross-site scripting
D.
Reflected cross-site scripting
Answers
Suggested answer: A

Explanation:

The user-supplied data www.comptia.com/info.php?id=1 AND 1=1 is indicative of a Boolean-based SQL injection attack. In this attack, the attacker manipulates a SQL query by inserting additional SQL logic that will always evaluate to true (in this case, AND 1=1) to gain unauthorized access to database information. This type of attack exploits improper input validation in web applications to manipulate database queries. The other attack techniques listed (Time-based SQL injection, Stored cross-site scripting, Reflected cross-site scripting) involve different methodologies and are not demonstrated by the given user-supplied data.

A penetration tester is conducting an assessment of an organization that has both a web and mobile application. While testing the user profile page, the penetration tester notices that additional data is returned in the API response, which is not displayed in the web user interface. Which of the following is the most effective technique to extract sensitive user data?

A.
Compare PI I from data leaks to publicly exposed user profiles.
A.
Compare PI I from data leaks to publicly exposed user profiles.
Answers
B.
Target the user profile page with a denial-of-service attack.
B.
Target the user profile page with a denial-of-service attack.
Answers
C.
Target the user profile page with a reflected XSS attack.
C.
Target the user profile page with a reflected XSS attack.
Answers
D.
Compare the API response fields to GUI fields looking for PH.
D.
Compare the API response fields to GUI fields looking for PH.
Answers
Suggested answer: D

Explanation:

When additional data is returned in the API response that is not displayed in the web user interface, it indicates that there might be sensitive data being transmitted that is not intended for user display. By comparing the fields returned in the API response to those that are visible in the GUI, a penetration tester can identify any Personally Identifiable Information (PII) or other sensitive data that might be exposed unintentionally. This method is direct and does not involve attacking the system but rather analyzing the data being transmitted. The other options do not directly address the identification of sensitive data in API responses.

During an assessment, a penetration tester discovers the following code sample in a web application:

'(&(userid=*)(userid=*))(I(userid=*)(userPwd=(SHAl}a9993e364706816aba3e25717850c26c9cd0d89d==))

Which of the following injections is being performed?

A.
Boolean SQL
A.
Boolean SQL
Answers
B.
Command
B.
Command
Answers
C.
Blind SQL
C.
Blind SQL
Answers
D.
LDAP
D.
LDAP
Answers
Suggested answer: D

Explanation:

The code sample provided involves LDAP (Lightweight Directory Access Protocol) query syntax, not SQL or command injection syntax. LDAP injections occur when user-supplied inputs are not properly sanitized before being incorporated into LDAP queries. The given code demonstrates a potential LDAP injection point, where an attacker might manipulate the (userid=*) part to execute unauthorized queries or access unauthorized information within the LDAP directory. Boolean and Blind SQL injections, as well as Command injections, do not apply to LDAP query syntax.

Which of the following tools would be best to use to conceal data in various kinds of image files?

A.
Kismet
A.
Kismet
Answers
B.
Snow
B.
Snow
Answers
C.
Responder
C.
Responder
Answers
D.
Metasploit
D.
Metasploit
Answers
Suggested answer: B

Explanation:

Snow is a tool designed for steganography, which is the practice of concealing messages or information within other non-secret text or data. In this context, Snow is specifically used to hide data within whitespace of text files, which can include the whitespace areas of images saved in formats that support text descriptions or metadata, such as certain PNG or JPEG files. While the other tools listed (Kismet, Responder, Metasploit) are powerful in their respective areas (network sniffing, LLMNR/NBT-NS poisoning, and exploitation framework), they do not offer functionality related to data concealment in image files or steganography.

Total 422 questions
Go to page: of 43