A penetration tester wants to send a specific network packet with custom flags and sequence numbers to a vulnerable target. Which of the following should the tester use?
A.tcprelay
B.Bluecrack
C.ScapyCorrect
D.tcpdump
Explanation
Scapy is a Python packet-crafting tool that lets the tester set any field in any layer, including TCP flags and sequence numbers, and then send the packet. tcpdump only captures and displays traffic, tcprelay forwards existing connections, and Bluecrack is not a packet-crafting tool for IP networks.
Which of the following explains the reason a tester would opt to use DREAD over PTES during the planning phase of a penetration test?
A.The tester is conducting a web application test.
B.The tester is assessing a mobile application.
C.The tester is evaluating a thick client application.
D.The tester is creating a threat model.Correct
Explanation
DREAD (Damage, Reproducibility, Exploitability, Affected users, Discoverability) is a threat-modeling framework used to rate and prioritize threats, while PTES is a methodology describing the phases of a whole penetration test. Choosing DREAD therefore makes sense when the goal is to build a threat model. The type of application being tested (web, mobile or thick client) does not by itself call for DREAD instead of PTES.
A penetration tester is performing a security review of a web application. Which of the following should the tester leverage to identify the presence of vulnerable open-source libraries?
A.VM
B.IAST
C.DAST
D.SCACorrect
Explanation
Software composition analysis (SCA) inventories the third-party and open-source components an application uses and matches their versions against known vulnerabilities. DAST and IAST test the running application's behaviour rather than its dependency list, and VM (vulnerability management) is the broader process, not a technique for finding vulnerable libraries.
A penetration tester finds that an application responds with the contents of the /etc/passwd file when the following payload is sent:
```xml
<?xml version="1"?>
<!DOCTYPE data [ <!ENTITY foo SYSTEM "file:///etc/passwd" ]>
<test>&foo;</test>
```
Which of the following should the tester recommend in the report to best prevent this type of vulnerability?
A.Drop all excessive file permissions with chmod o-rwx.
B.Ensure the requests application access logs are reviewed frequently.
C.Disable the use of external entities.Correct
D.Implement a WAF to filter all incoming requests.
Explanation
The payload declares an external entity that points to file:///etc/passwd, so this is an XML external entity (XXE) injection. Configuring the XML parser to disable external entities and DTD processing removes the root cause. Changing file permissions would break the system since /etc/passwd must be world-readable, log review only detects the attack, and a WAF can be bypassed and does not fix the parser.
A penetration tester is conducting reconnaissance for an upcoming assessment of a large corporate client. The client authorized spear phishing in the rules of engagement. Which of the following should the tester do first when developing the phishing campaign?
A.Shoulder surfing
B.Recon-ng
C.Social mediaCorrect
D.Password dumps
Explanation
Spear phishing targets specific people, so the first step is to identify them and learn about their roles, relationships and interests, and social media is the richest passive source for that. Shoulder surfing requires physical presence and does not identify targets, password dumps are used for credential attacks rather than building the lure, and Recon-ng is a framework that automates gathering once the targets and sources are known.
A penetration tester needs to test a very large number of URLs for public access. Given the following code snippet:
```python
1 import requests
2 import pathlib
3
4 for url in pathlib.Path("urls.txt").read_text().split("\n"):
5 response = requests.get(url)
6 if response.status == 401:
7 print("URL accessible")
```
Which of the following changes is required?
A.The condition on line 6Correct
B.The method on line 5
C.The import on line 1
D.The delimiter in line 3
Explanation
HTTP 401 means Unauthorized, so the script reports exactly the URLs that are not publicly accessible; the condition on line 6 must check for success instead, for example response.status_code == 200 (the Requests library exposes the code as status_code). requests.get on line 5 is the right method for fetching each URL, the requests import is needed, and splitting the file on newlines correctly yields one URL per line.
During a penetration test, a tester captures information about an SPN account. Which of the following attacks requires this information as a prerequisite to proceed?
A.Golden Ticket
B.KerberoastingCorrect
C.DCShadow
D.LSASS dumping
Explanation
Kerberoasting requests Kerberos service tickets for accounts that have a service principal name (SPN) and cracks them offline, because those tickets are encrypted with the service account's password hash. A Golden Ticket needs the krbtgt hash, DCShadow needs rights to register a rogue domain controller, and LSASS dumping needs local administrative access to a host, none of which depends on knowing an SPN.
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
B.To perform common protocol scanning within the internal network
C.To perform password spraying on internal systemsCorrect
D.To execute a command in multiple endpoints at the same time
Explanation
The command tries one password (Summer123@) against every username in user.txt over SMB across the whole 192.168.1.0/24 subnet, which is password spraying. Pass-the-hash would use the -H option with an NTLM hash, command execution would use -x or -X, and the command authenticates rather than simply scanning for protocols.
A penetration testing team needs to determine whether it is possible to disrupt the wireless communications for PCs deployed in the client's offices. Which of the following techniques should the penetration tester leverage?
A.Port mirroring
B.Sidecar scanning
C.ARP poisoning
D.Channel scanningCorrect
Explanation
Channel scanning identifies which wireless channels and access points the client's PCs are using, which is the first step in testing whether those communications can be disrupted, for example with jamming or deauthentication on that channel. Port mirroring copies wired switch traffic for monitoring and does not disrupt anything. ARP poisoning is a layer 2 man-in-the-middle attack on a LAN, not a wireless disruption technique. Sidecar scanning relates to container environments, not Wi-Fi.
Which of the following tasks would ensure the key outputs from a penetration test are not lost as part of the cleanup and restoration activities?
A.Preserving artifactsCorrect
B.Reverting configuration changes
C.Keeping chain of custody
D.Exporting credential data
Explanation
Before tools, accounts and files are removed from the target environment, the tester preserves the artifacts (screenshots, logs, captured output, evidence of findings) so the results needed for the report survive the cleanup. Reverting configuration changes is part of the cleanup itself and does not protect the outputs. Chain of custody documents who handled evidence but does not stop it from being deleted. Exporting credential data covers only one narrow output and handling credentials that way is itself a risk.
A tester gains initial access to a server and needs to enumerate all corporate domain DNS records. Which of the following commands should the tester use?
A zone transfer (AXFR, defined in RFC 5936) asks the DNS server for a full copy of the zone, returning every record in the domain at once, and dig requests one with the axfr query type against a chosen server. dig +short A AAAA returns only the address records for a single name. nslookup local.domain resolves just that one name. The nslookup command with a wildcard is not valid syntax for listing a whole zone.
A penetration tester is performing network reconnaissance. The tester wants to gather information about the network without causing detection mechanisms to flag the reconnaissance activities. Which of the following techniques should the tester use?
A.SniffingCorrect
B.Banner grabbing
C.TCP/UDP scanning
D.Ping sweeps
Explanation
Sniffing is passive: the tester only listens to traffic already on the network and sends no packets, so intrusion detection systems have nothing to flag. Banner grabbing, TCP/UDP port scanning and ping sweeps all actively send probes to hosts, and those probes are exactly what IDS and firewall logs are designed to detect.
A penetration tester reviews a SAST vulnerability scan report. The following lines of code have been reported as vulnerable:
```
Issue 40 of 126
Language: Java
Severity: Medium
Call:
try {
// ...
} catch (SomeException e) {
e.printStackTrace();
}
```
Which of the following is the best method to remediate this vulnerability?
A.Implementing a logging frameworkCorrect
B.Removing the five code lines reported with issues
C.Initiating a secure coding-awareness program with all the developers
D.Documenting the vulnerability as a false positive
Explanation
Calling e.printStackTrace() writes the full stack trace to standard error, which can expose internal details to users or uncontrolled logs (information exposure through error messages). The fix is to route exceptions through a proper logging framework that records them securely at a controlled level and shows users only a generic message. Removing the lines would drop the exception handling altogether, an awareness program does not fix this code, and the finding is a real issue, not a false positive.
During a security assessment, a penetration tester uses a tool to capture plaintext log-in credentials on the communication between a user and an authentication system. The tester wants to use this information for further unauthorized access. Which of the following tools is the tester using?
A.Burp Suite
B.WiresharkCorrect
C.Zed Attack Proxy
D.Metasploit
Explanation
Wireshark captures packets passively on the network, so it can read credentials sent in plaintext (for example over HTTP, FTP or Telnet) between a user and an authentication server. Burp Suite and Zed Attack Proxy are intercepting web proxies that see only traffic routed through them by a browser, not arbitrary communication between a user and a system. Metasploit is an exploitation framework, not a traffic capture tool.
A penetration tester established an initial compromise on a host. The tester wants to pivot to other targets and set up an appropriate relay. The tester needs to enumerate through the compromised host as a relay from the tester's machine. Which of the following commands should the tester use to do this task from the tester's host?
Options:
A. attacker_host$ nmap -sT <target_cidr> | nc -n <compromised_host> 22
B. attacker_host$ mknod backpipe p
attacker_host$ nc -l -p 8000 | 0 <backpipe | nc <target_cidr> 80 | tee backpipe
C. attacker_host$ nc -nlp 8000 | nc -n <target_cidr>
attacker_host$ nmap -sT 127.0.0.1 8000
D. attacker_host$ proxychains nmap -sT <target_cidr>
Proxychains sends a program's TCP connections through a configured proxy, such as a SOCKS proxy opened on the compromised host, so running nmap -sT through it scans the internal targets with the compromised host as the relay. A TCP connect scan (-sT) is used because proxychains can relay only full TCP connections. Piping nmap output into netcat does not relay the scan. The netcat backpipe and listener options run on the attacker's own host and only forward one port, so they do not relay enumeration through the compromised host.
A penetration tester is unable to identify the Wi-Fi SSID on a client's cell phone. Which of the following techniques would be most effective to troubleshoot this issue?
A.Sidecar scanning
B.Channel scanningCorrect
C.Stealth scanning
D.Static analysis scanning
Explanation
If the SSID does not show up, the network may be on a channel or band the tester is not monitoring, so scanning across all wireless channels (channel hopping) finds the access point and its beacons or probe responses. Sidecar scanning concerns container environments, stealth scanning is a TCP port-scan technique, and static analysis scans source code; none of them find a wireless network.
During a web application assessment, a penetration tester identifies an input field that allows JavaScript injection. The tester inserts a line of JavaScript that results in a prompt, presenting a text box when browsing to the page going forward. Which of the following types of attacks is this an example of?
A.SQL injection
B.SSRF
C.XSSCorrect
D.Server-side template injection
Explanation
Injecting JavaScript that the page stores and runs for every later visitor is cross-site scripting (XSS), here a stored XSS because the prompt appears whenever the page is browsed. SQL injection targets database queries, SSRF makes the server send requests to other systems, and server-side template injection runs code inside the server's template engine rather than in the victim's browser.
A penetration tester attempts unauthorized entry to the company’s server room as part of a security assessment. Which of the following is the best technique to manipulate the lock pins and open the door without the original key?
A.Plug spinner
B.Bypassing
C.Decoding
D.RakingCorrect
Explanation
Raking is a lock-picking technique: a rake is moved quickly in and out of the keyway while tension is applied, setting the pin tumblers so the plug turns without the key. A plug spinner only turns an already-picked plug the other way, bypassing defeats the latch or mechanism without touching the pins, and decoding works out the key cuts rather than manipulating the pins to open the lock.
Which of the following technologies are most likely used with badge cloning? (Choose two.)
A.NFCCorrect
B.RFIDCorrect
C.Bluetooth
D.Modbus
E.Zigbee
F.CAN bus
Explanation
Access badges are contactless cards that use RFID (for example 125 kHz proximity cards) or NFC (13.56 MHz smart cards), and tools such as the Proxmark read and copy their identifiers onto blank cards. Bluetooth and Zigbee are wireless personal-area and IoT networking protocols, while Modbus and CAN bus are industrial and vehicle bus protocols; none of them is used by access badges.
During a penetration test of a web application, the tester gains full access to the application's source code. The application repository includes thousands of code files. Given that the assessment timeline is very short, which of the following approaches would allow the tester to identify hard-coded credentials most effectively?
A.Run TruffleHog against a local clone of the application.Correct
B.Scan the live web application using Nikto.
C.Perform a manual code review of the Git repository.
D.Use SCA software to scan the application source code.
Explanation
TruffleHog scans a Git repository, including its commit history, or a filesystem for leaked secrets such as API keys and passwords, so running it against a local clone finds hard-coded credentials across thousands of files quickly. Nikto scans a live web server for misconfigurations and cannot see source code, a manual review is far too slow for a short timeline, and SCA tools look for vulnerable third-party dependencies rather than secrets.
Verifying access...
Access Required
You need to purchase this exam to access practice mode
Unlock a few more questions every day for 300 points you earn free on
Godlike Academy. Everything you unlock with the Daily Climb stays open for 7 days after your last unlock.