Practice Exam Flashcards
Charles has compromised a Linux system and wants to capture traffic from the command line. What tool should he select?
A. Wireshark
B. netcat
C. grep
D. tcpdump
tcpdump
Charles will be most successful with tcpdump. Although you can capture packets with netcat, it provides far fewer built‐in functions and wouldn’t be the first choice for most penetration testers if they have a better option. Wireshark is a graphical tool, and grep is used for text searching, not packet capture.
Karen wants to use a wireless security tool to create a fake access point. Which of the common wireless security tools is best suited to this?
A. Aircrack‐ng
B. Kismet
C. WiFite
D. AirShark
Aircrack‐ng
Aircrack‐ng provides all of the tools required to conduct an evil‐twin attack. Wifite and Kismet both have other useful wireless security tools, and AirShark was made up for this question.
Kismet
Kismet is a wireless network detector, sniffer, and intrusion detection system used for penetration testing.
WiFite
WiFite is a tool designed to automate wireless attacks against various encryption types, including WEP, WPA, and WPS. It simplifies the process of testing the security of wireless networks by chaining together multiple attacks.
mdk4
MDK4 is a Wi-Fi testing tool used to perform various wireless network attacks, such as deauthentication, beacon flooding, and other stress tests. It is commonly utilized for penetration testing of wireless networks to identify vulnerabilities.
Fern
Fern WiFi Cracker is a penetration testing tool designed for discovering and exploiting vulnerabilities in wireless networks. It provides capabilities for network discovery, cracking WEP/WPA/WPS keys, and performing other Wi-Fi security assessments.
John has been asked to notify his target organization of the specific times that his tests will occur during an unknown environment penetration test. After testing with limited success, he discovers that the system and security administrators were notified that he would be testing during that timeframe. What concern should John express to his employer?
A. The test should be conducted after hours to test staff responses outside the business day.
B. The system administrators may not accept the results of the test.
C. The test may not represent typical behavior due to the administrators knowing about it.
D. The test is valid and will provide more useful information about response capabilities due to the notification.
The test may not represent typical behavior due to the administrators knowing about it.
Penetration testers who discover that their target was notified of their testing when notification was not previously discussed may have to worry about their testing being spoiled. Administrators may have changed specific settings during the time the test occurred, and restored them after the fact—the authors of this book have seen this happen, with administrators turning firewalls on during the testing time to make systems “invisible,” and then turning them back off as soon as the test was over!
Maria is preparing to conduct a penetration test and wants to follow a penetration testing standard. Which of the following standards is most useful for her to base her process and procedures on?
A. OWASP
B. OSSTMM
C. ATT&CK
D. NIST
Explanation
The Open Source Security Testing Methodology Manual is the only standard from this list that is a penetration testing methodology. NIST is the National Institute for Standards and Technology and provides standards but isn’t a standard itself. ATT&CK is a framework and knowledgebase used to track and classify adversary tactics and techniques. OWASP is the Open Web Application Security Project, a foundation that works to improve the security of software, particularly web applications.
OSSTMM
The Open Source Security Testing Methodology Manual is the only standard from this list that is a penetration testing methodology. NIST is the National Institute for Standards and Technology and provides standards but isn’t a standard itself. ATT&CK is a framework and knowledgebase used to track and classify adversary tactics and techniques. OWASP is the Open Web Application Security Project, a foundation that works to improve the security of software, particularly web applications.
OSSTMM
The OSSTMM (Open Source Security Testing Methodology Manual) is a comprehensive framework for conducting security testing and analysis. It provides standardized guidelines for evaluating the operational security of systems, networks, and processes. The OSSTMM emphasizes verifiable and measurable results to ensure the reliability of the security assessment process.
Shen is conducting a penetration test and discovers signs of a past intrusion on the system. What action should she take first?
A. Document the evidence in her report.
B. Notify management.
C. Review the attack evidence and incorporate techniques in her own test.
D. Eradicate all traces of the attack from the system.
Notify management.
Shen is ethically obligated to immediately report the signs of a prior attack or criminal activity to management. She should do this prior to conducting any other activity and should await instructions before resuming the test.
Cameron is negotiating with a penetration testing organization and wants to create a document that details the deliverables and timelines that the vendor will use while providing the service. What type of document is he creating?
A. An EULA
B. An SOW
C. An NDA
D. An MSA
An SOW
Cameron is creating a statement of work, which describes what will be done and the amount of time it will take to complete it. A EULA is an end‐user license agreement, often associated with software. An NDA is a nondisclosure agreement, and an MSA is a master services agreement.
Which one of the following is an example of a process control that might be suggested to remediate a penetration test finding?
A. Firewall rule change
B. Security awareness campaign
C. DLP implementation
D. Two‐person control
Two‐person control
Two‐person control is an example of a business process that might be implemented as a security control. Firewall rule changes, and the implementation of a DLP system are examples of technical controls. A security awareness campaign is an example of a personnel control.
Victor is attempting to penetrate a web application and sends the following input to the application:
Victor’ AND 1=2;–
What type of SQL injection attack is Victor attempting?
A. Standard SQL injection
B. Blind content‐based SQL injection
C. Blind timing‐based SQL injection
D. Privileged SQL injection
Blind content‐based SQL injection
The use of the statement 1=2, which always evaluates to false, is a sign of a content‐based SQL injection attack. Standard SQL injection would not need to include this technique. Timing‐based attacks would include a command that triggers a delay. Privileged SQL injection is not a normal category of exploit.
Tim recently wrote a Bash script called passwordcracker.sh to perform password cracking. When he tried to execute the script during a penetration test, he received a permission denied error message. What command can Tim execute to correct this permission and allow only him, as the file’s owner, to execute the script?
A. chmod o+x passwordcracker.sh
B. chmod u+x passwordcracker.sh
C. chmod g+x passwordcracker.sh
D. chmod a+x passwordcracker.sh
chmod u+x passwordcracker.sh
The chmod u+x command adds execute permission for the file’s owner. The other commands all grant different permissions. The g+x argument provides execute permission to members of the file’s group. The o+x argument to chmod grants execute permission to everyone other the file’s user or group. The a+x argument provides execute permission to everyone.
Christopher is conducting a penetration test of an organization as part of an unknown environment assessment. He is currently testing a public‐facing web application. Which one of the following software testing techniques will not be available to him?
A. Static analysis
B. Dynamic analysis
C. Fuzz testing
D. Vulnerability scanning
Static analysis
Christopher can easily conduct vulnerability scanning using a web application testing tool because the website is public‐facing. This tool should be able to assist him with fuzz testing, which is a form of dynamic analysis. Christopher cannot, however, perform static analysis of the source code because he does not have access to that inside information as part of an unknown environment test.
MCDS, Inc. uses Microsoft’s Azure cloud to host their primary website and e‐commerce infrastructure. Steve has been asked to include both cloud‐hosted environments in a penetration test he is conducting. What step is critical to ensuring he has proper authorization to conduct scans of the cloud‐hosted systems?
A. He needs administrative rights for the Azure environment.
B. He needs sign‐off from the lead or manager of the infrastructure team.
C. He needs authorization from the third‐party provider.
D. He needs authorization from the organization’s ISP.
He needs authorization from the third‐party provider.
Steve needs authorization from the cloud service provider. In most cases, third‐party providers require prior authorization for penetration testing or other efforts that may cause issues for other users of their shared infrastructure or that may register as attacks against systems or services they host. Some simply don’t allow penetration tests, whereas others may have specific requirements for penetration testers.
Tiffany wants to gather OSINT data about the services that specific systems run in her target organization. Which of the following tools will not allow her to do this?
A. Censys
B. nmap
C. Shodan
D. theHarvester
nmap
Censys, Shodan, and theHarvester will all allow Tiffany to conduct OSINT information gathering that does not actively scan her target. Nmap is an active scanning tool and will not allow her to gather this type of information without connecting to the target systems and networks.
Censys
OSINT tool
Censys is an Open Source Intelligence (OSINT) tool used for discovering and analyzing devices connected to the internet. It collects data about servers, networks, and websites, allowing penetration testers to gather valuable information such as open ports, SSL certificates, and software versions. This makes it particularly useful for identifying potential vulnerabilities during the reconnaissance phase.
Shodan
OSINT Tool
Shodan is a search engine designed to locate and provide details about internet-connected devices and systems, such as servers, webcams, routers, and industrial control systems. It allows penetration testers to gather information on exposed devices, open ports, services, and vulnerabilities. Shodan is widely used for passive reconnaissance during penetration testing.
theHarvester
OSINT tool
theHarvester is a reconnaissance tool used to gather information about a target organization from publicly available sources. It automates the collection of data such as email addresses, subdomains, IPs, and URLs by querying search engines, public databases, and other resources. It is commonly employed during the passive reconnaissance phase of penetration testing.
Jack performs a scan using the command nmap 10.11.45.0/24. How many TCP ports will he scan?
A. 512
B. 1,000
C. 1,024
D. 65,535
1,000
By default, nmap will scan the most 1,000 most common TCP and UDP ports if it is not used with a command flag that provides it with a range of ports.
What happens in a double‐tagging attack after the tagged packet arrives at the first switch?
A. The switch reads both tags and forwards the packet to the VLAN listed in the first tag.
B. The switch reads both tags and forwards the packet to the VLAN listed in the second tag.
C. The switch forwards the packet to the VLAN listed in the first tag and removes it.
D. The switch forwards the packet to the VLAN listed in the second tag and removes it.
The switch forwards the packet to the VLAN listed in the first tag and removes it.
Double tagging relies on the fact that trunking is enabled on the target switch and that it will read the first tag and forward the packet to that VLAN after removing the tag. The next switch will see only the second tag (now the only tag) and will treat it like a normally tagged packet for that VLAN.
Which one of the following methods is not used to obtain user session cookies during a penetration test?
A. On‐path attack
B. Malware
C. Network eavesdropping
D. Tailgating
Tailgating
Tailgating is used to obtain physical access to a facility and can’t be used to obtain session cookies. Penetration testers seeking to obtain a session cookie may steal it by performing an on‐path attack, conducting network eavesdropping, or installing malware on the target user’s system.
Ann is performing a kerberoasting attack and has scanned for user accounts with SPNs set and had requested service tickets using SPNs. What should she do next?
A. Send service tickets to the server.
B. Extract the service tickets from memory and save them.
C. Insert NTLM hashes into the service tickets to authenticate.
D. Conduct an offline brute‐force attack against the SPNs.
Extract the service tickets from memory and save them.
The next step in Ann’s attack is to extract the service tickets from memory and to save them to a file. Then she can use an offline brute‐force attack against the passwords in the service tickets.
Keberoasting
Kerberoasting is an attack method used to exploit vulnerabilities in the Kerberos authentication protocol to obtain and potentially crack service account credentials.
This attack relies on weak passwords for service accounts, making strong password policies essential to defend against it
Steps of Keberoasting
Kerberoasting is an attack method used to exploit vulnerabilities in the Kerberos authentication protocol to obtain and potentially crack service account credentials.
Steps:
* Request a Service Ticket: The attacker, authenticated as a domain user, requests a service ticket (TGS) for a service principal name (SPN) of a target service account.
* Receive the Encrypted Ticket: The domain controller provides the TGS, which is encrypted using the service account’s NTLM hash.
* Extract the Ticket: The attacker extracts the TGS from memory using tools such as Mimikatz or PowerShell scripts.
* Crack the Ticket: The attacker uses offline brute force or dictionary attacks against the encrypted ticket to recover the plaintext password of the service account.
This attack relies on weak passwords for service accounts, making strong password policies essential to defend against it
Which one of the following combinations of authentication techniques is an example of multifactor authentication?
A. Username and password
B. Security question and PIN
C. ID card and fingerprint
D. ID card and smartphone app
ID card and fingerprint
An ID card is an example of “something you have” and a fingerprint is “something you are,” so that scheme qualifies as multifactor authentication. A username is an identification mechanism, not an authentication mechanism. Security questions and PINs are both “something you know,” so they do not constitute multifactor authentication when used together. ID cards and smartphone apps are both examples of “something you have.”
Richard is conducting network reconnaissance as part of a penetration test and would like to use a tool that allows him to scan the entire network and identify potential vulnerabilities on servers in the target organization. Which one of the following tools would meet Richard’s needs?
A. Nmap
B. Metasploit
C. Nessus
D. Kismet
Nessus
Nessus is a popular network vulnerability scanning tool that would meet Richard’s requirements. The other tools listed do not perform network vulnerability scanning. Nmap is a port scanner that only reports open ports, not vulnerabilities. Metasploit is an exploitation framework useful in later phases of the penetration test.
The company that Greg works for has recently undergone a penetration test, and the pentesters discovered that employees did not have appropriate separation of duties. Which of the following operational controls is not helpful when attempting to address this finding?
A. Job rotation
B. Time‐of‐day restrictions
C. Mandatory vacation
D. User training
Time‐of‐day restrictions
Separation of duties is intended to ensure that a single individual cannot take inappropriate actions. Time‐of‐day restrictions do not help with separation of duties, but they do help prevent staff or members or penetration testers from using credentials after hours. That means that job rotation and mandatory vacations are useful because they can offer a chance for malfeasance to be discovered. User training can also help by ensuring that staff members know what is expected of them and what is not allowed.
Examine the following code snippet, used to create a URL:
$ip = “10.5.5.2”
$port = “80”
$url = “http://” + $ip + “:” + $port
What language is being used?
A. Python
B. Ruby
C. PowerShell
D. Bash
PowerShell
The use of dollar signs to prefix variable names signals that this is code written in PowerShell. Ruby and Python also use the + operator for concatenation.
Matthew is writing the report from a penetration test and would like to communicate his results using standard language. Which one of the following components of the NIST Security Content Automation Protocol (SCAP) can he use to describe security flaws in a standardized way?
A. CPE
B. CVSS
C. CCE
D. CVE
CVE
The Common Vulnerabilities and Exposures (CVE) standard provides a consistent way to describe security flaws. The Common Vulnerability Scoring System (CVSS) also involves vulnerabilities but provides a standardized way to discuss vulnerability severity, not the vulnerabilities themselves. Common Platform Enumeration (CPE) is used to provide a standard nomenclature for describing product names and versions. Common Configuration Enumeration (CCE) provides a standard nomenclature for discussing system configuration issues.
PowerShell script identifiers
- Uses cmdlet-based syntax like Get-, Set-, and Invoke-.
- Often includes .ps1 file extensions.
- May use Write-Output or Write-Host for displaying text.
- Variables are prefixed with a $ (e.g., $VariableName).
Bash script identifiers
- Often includes #!/bin/bash as a shebang line at the start of scripts.
- Uses shell commands like echo, ls, and cat.
- Variable assignment does not use a $ but references variables with $ (e.g.,
- myVar=value and echo $myVar).
- Includes control structures like if [ … ]; then.
Python script identifiers
- Uses indentation to define blocks instead of braces or keywords.
- File extensions are .py.
- Common syntax includes print(), def for functions, and import for libraries.
- Variables are untyped and not prefixed.
Ruby script identifiers
- File extensions are .rb.
- Uses puts or print for output.
- Commonly uses def to define methods and end to close blocks.
- Includes symbols like : (e.g., :symbolName) and often uses do … end for blocks.
Perl script identifiers
- File extensions are .pl.
- Variables are prefixed with $ (scalars), @ (arrays), or % (hashes).
- Uses print for output.
- Frequently uses regular expressions, indicated by =~ or /…/.
JavaScript script identifiers
- May use .js as file extensions.
- Frequently includes function keyword or arrow syntax (=>).
- Uses {} for blocks and console.log() for output.
- Variables are defined using var, let, or const.
CPE
CPE stands for Common Platform Enumeration, a standardized method of naming software, hardware, and operating systems. It provides a consistent way to identify technology products, enabling easier integration and analysis of vulnerability information.
CVSS
CVSS, or Common Vulnerability Scoring System, is a standardized framework for assessing the severity of software vulnerabilities. It provides a numerical score (ranging from 0.0 to 10.0) and corresponding qualitative ratings (e.g., Low, Medium, High, Critical) to help organizations prioritize remediation efforts