Chapter 43 Quiz: Network Penetration Testing¶
Test your knowledge of Nmap scanning techniques, SMB enumeration, Kerberos attacks, LLMNR/NBT-NS poisoning, lateral movement, and credential harvesting.
Questions¶
1. A penetration tester runs nmap -sV -sC -p 445 10.10.10.5 and receives the output 445/tcp open microsoft-ds Windows Server 2019 Standard 17763. What do the -sV and -sC flags accomplish together?
- A)
-sVperforms a SYN scan and-sCenables stealth mode - B)
-sVprobes open ports to determine service version and-sCruns default NSE scripts for enumeration - C)
-sVscans for vulnerabilities and-sCgenerates a compliance report - D)
-sVenables verbose output and-sCchecks for CVEs
Answer
B — -sV probes open ports to determine service version and -sC runs default NSE scripts for enumeration
The -sV flag performs service version detection by sending probes to open ports and analyzing responses to identify the running service and version. The -sC flag is equivalent to --script=default and runs Nmap Scripting Engine (NSE) scripts in the default category, which perform safe enumeration tasks like SMB OS discovery, HTTP title extraction, and SSL certificate analysis.
2. During internal network testing, a penetration tester captures NTLMv2 hashes using Responder by poisoning LLMNR and NBT-NS requests. What network condition enables this attack?
- A) The network uses DNSSEC, which allows hash interception
- B) Hosts broadcast LLMNR/NBT-NS name resolution requests when DNS fails, and an attacker on the same network segment can respond with a spoofed answer to capture authentication hashes
- C) The domain controller is configured with Kerberos pre-authentication disabled
- D) The network's DHCP server assigns the attacker's IP as the DNS server
Answer
B — Hosts broadcast LLMNR/NBT-NS name resolution requests when DNS fails, and an attacker on the same network segment can respond with a spoofed answer to capture authentication hashes
LLMNR (Link-Local Multicast Name Resolution) and NBT-NS (NetBIOS Name Service) are fallback name resolution protocols used when DNS resolution fails. These protocols broadcast queries on the local network, allowing any host to respond. Responder exploits this by answering these queries with its own IP address, causing victims to send NTLMv2 authentication hashes to the attacker's machine.
3. A tester discovers SMB signing is disabled on multiple hosts during an internal assessment. What attack does this misconfiguration specifically enable?
- A) Brute-force attacks against SMB credentials
- B) SMB relay attacks, where captured NTLMv2 authentication can be forwarded to another host to gain unauthorized access
- C) Direct extraction of the NTDS.dit database
- D) Remote code execution via EternalBlue
Answer
B — SMB relay attacks, where captured NTLMv2 authentication can be forwarded to another host to gain unauthorized access
When SMB signing is not required, an attacker can intercept NTLMv2 authentication (e.g., via LLMNR poisoning) and relay it to another host where the victim has administrative access. Tools like ntlmrelayx (Impacket) automate this process. SMB signing ensures message integrity and prevents relay attacks by cryptographically binding authentication to the specific session.
4. What is the primary difference between Pass-the-Hash (PtH) and Pass-the-Ticket (PtT) attacks in an Active Directory environment?
- A) PtH uses Kerberos tickets; PtT uses NTLM hashes
- B) PtH uses NTLM hashes to authenticate without knowing the plaintext password; PtT uses stolen Kerberos TGT or TGS tickets to access services
- C) PtH works only on Linux; PtT works only on Windows
- D) PtH requires domain admin privileges; PtT works with standard user access
Answer
B — PtH uses NTLM hashes to authenticate without knowing the plaintext password; PtT uses stolen Kerberos TGT or TGS tickets to access services
Pass-the-Hash exploits NTLM authentication by submitting the hash directly instead of the password. Pass-the-Ticket extracts Kerberos tickets (TGT for broader access or TGS for specific services) from memory and injects them into another session. Both techniques enable lateral movement without knowing plaintext credentials, but they target different authentication protocols.
5. A penetration tester uses CrackMapExec to execute crackmapexec smb 10.10.10.0/24 -u admin -p Password1 --shares. What is the purpose of the --shares flag?
- A) It creates new SMB shares on accessible hosts
- B) It enumerates all accessible SMB shares on hosts where the provided credentials successfully authenticate
- C) It shares the credentials with other team members via a secure channel
- D) It mounts all discovered shares to the attacker's filesystem
Answer
B — It enumerates all accessible SMB shares on hosts where the provided credentials successfully authenticate
CrackMapExec (now NetExec) is a post-exploitation tool for network-wide credential validation and enumeration. The --shares flag lists all SMB shares accessible with the provided credentials on every host in the target range. This reveals sensitive shares like SYSVOL, NETLOGON, IT department shares, and misconfigured shares with excessive permissions.
6. During a Kerberoasting attack, which specific Kerberos message type does the attacker request from the domain controller, and why is this message vulnerable to offline cracking?
- A) AS-REQ — it contains the user's plaintext password
- B) TGS-REP — it contains a service ticket encrypted with the target service account's NTLM hash, which can be brute-forced offline
- C) TGT — it contains the krbtgt hash
- D) AP-REQ — it contains the session key in plaintext
Answer
B — TGS-REP — it contains a service ticket encrypted with the target service account's NTLM hash, which can be brute-forced offline
Kerberoasting exploits the fact that any authenticated domain user can request a TGS (Ticket Granting Service) ticket for any service with a registered SPN. The TGS-REP contains the service ticket encrypted with the service account's NTLM hash. Since the attacker possesses this encrypted ticket, they can attempt offline brute-force or dictionary attacks against the service account's password without generating additional network traffic or failed logon events.
7. A tester has compromised a workstation and wants to extract credentials from memory. Which tool and technique combination would extract NTLM hashes and Kerberos tickets from the LSASS process?
- A) Wireshark capturing network traffic on port 88
- B) Mimikatz using
sekurlsa::logonpasswordsandsekurlsa::tickets - C) John the Ripper with the SAM database file
- D) Nmap NSE scripts targeting port 445
Answer
B — Mimikatz using sekurlsa::logonpasswords and sekurlsa::tickets
Mimikatz is the standard tool for extracting credentials from LSASS (Local Security Authority Subsystem Service) process memory. The sekurlsa::logonpasswords module dumps NTLM hashes, plaintext passwords (when available via WDigest), and Kerberos keys. The sekurlsa::tickets module exports Kerberos TGT and TGS tickets from memory. Both require local administrator or SYSTEM privileges on the compromised host.
8. What Nmap scan technique is specifically designed for firewall evasion by fragmenting probe packets into smaller pieces?
- A)
nmap -sS— SYN scan - B)
nmap -f— fragment packets into 8-byte fragments - C)
nmap -sN— NULL scan - D)
nmap -sI— idle scan
Answer
B — nmap -f — fragment packets into 8-byte fragments
The -f flag fragments Nmap probe packets into 8-byte IP fragments (using -f once) or 16-byte fragments (using -ff). This technique can evade packet inspection firewalls and IDS/IPS that do not reassemble fragmented packets before inspection. While modern security appliances typically handle fragmentation, this technique remains effective against legacy or misconfigured devices.
9. During lateral movement, a penetration tester uses PsExec to execute commands on a remote Windows host. What underlying protocol and authentication mechanism does PsExec rely on?
- A) SSH with public key authentication
- B) SMB (port 445) to copy a service binary, then the Windows Service Control Manager (SCM) to execute it using NTLM or Kerberos authentication
- C) RDP (port 3389) with NLA authentication
- D) WinRM (port 5985) with Basic authentication
Answer
B — SMB (port 445) to copy a service binary, then the Windows Service Control Manager (SCM) to execute it using NTLM or Kerberos authentication
PsExec (both Sysinternals and Impacket versions) connects to the target's ADMIN$ share via SMB, copies a service executable, and uses the Service Control Manager API to create and start a Windows service that executes the desired command. This requires administrative credentials and SMB access (port 445). The technique generates Windows Event ID 7045 (service installation) and is a well-known indicator of lateral movement.
10. A penetration tester discovers that the target network uses 802.1X port-based network access control. Which technique could potentially bypass this control to gain network access?
- A) ARP spoofing to redirect traffic through the tester's machine
- B) MAC address cloning of an authenticated device combined with hub-based or transparent bridge insertion between an authenticated device and the switch port
- C) Changing the tester's IP address to match an internal server
- D) Connecting to an open wireless access point on the same network
Answer
B — MAC address cloning of an authenticated device combined with hub-based or transparent bridge insertion between an authenticated device and the switch port
802.1X authenticates devices at the switch port level. Bypass techniques include cloning the MAC address of an already-authenticated device and inserting a transparent bridge (or hub) between the authenticated device and the switch port to piggyback on the existing authentication session. More sophisticated bypasses exploit the fact that 802.1X often authenticates only at port link-up and allows additional MAC addresses afterward.
11. During an internal assessment, a tester finds that SNMP v1/v2c is enabled on network infrastructure devices with default community strings. What is the security impact of this finding?
- A) No impact — SNMP is a monitoring-only protocol
- B) Full device configuration disclosure (with read community strings) and potential configuration modification (with write community strings), all transmitted in cleartext
- C) Denial-of-service against the network devices only
- D) Access to encrypted management traffic
Answer
B — Full device configuration disclosure (with read community strings) and potential configuration modification (with write community strings), all transmitted in cleartext
SNMP v1/v2c transmits community strings (effectively passwords) in cleartext and provides no encryption. Default or easily guessable community strings (public/private) allow attackers to enumerate complete device configurations, routing tables, ARP caches, interface details, and — with write access — modify device configurations. This can enable VLAN hopping, route injection, and ACL modification.
12. What is the purpose of running enum4linux -a 10.10.10.5 during a penetration test?
- A) To exploit EternalBlue vulnerability on the target
- B) To perform comprehensive SMB/NetBIOS enumeration including users, groups, shares, password policies, and OS information
- C) To launch a brute-force attack against four user accounts simultaneously
- D) To enumerate IPv4 and IPv6 addresses on the target network
Answer
B — To perform comprehensive SMB/NetBIOS enumeration including users, groups, shares, password policies, and OS information
enum4linux is a Linux-based SMB enumeration tool that wraps smbclient, rpcclient, and net commands. The -a flag performs all enumeration checks: user listing via RID cycling, share enumeration, group membership, password policy extraction, OS identification, and workgroup/domain information. It is a standard first-step tool after discovering SMB services during internal network assessments.
13. A penetration tester performs an LLMNR poisoning attack and captures an NTLMv2 hash. The hash resists dictionary and rule-based cracking. What alternative technique can the tester use to leverage this hash without cracking it?
- A) Convert the NTLMv2 hash to an NTLMv1 hash for easier cracking
- B) Relay the NTLMv2 hash to another service using ntlmrelayx if SMB signing is not enforced on the target
- C) Submit the hash directly in a Pass-the-Hash attack
- D) Use the hash to generate a Kerberos golden ticket
Answer
B — Relay the NTLMv2 hash to another service using ntlmrelayx if SMB signing is not enforced on the target
NTLMv2 hashes captured via LLMNR/NBT-NS poisoning contain a server challenge component that makes them specific to that authentication session — they cannot be directly used in Pass-the-Hash attacks (which require NT hashes). However, in real-time relay attacks, the captured authentication can be forwarded to another service (SMB, LDAP, HTTP, MSSQL) if that service does not require signing.
14. What is the significance of discovering port 88 (Kerberos) open during an Nmap scan of an internal network host?
- A) The host is running a web server with a non-standard port
- B) The host is likely a domain controller, making it a high-value target for attacks such as DCSync, Kerberoasting, and credential extraction
- C) The host is running a VPN concentrator
- D) The host is an NTP server providing time synchronization
Answer
B — The host is likely a domain controller, making it a high-value target for attacks such as DCSync, Kerberoasting, and credential extraction
Port 88 (Kerberos KDC) is a hallmark of Active Directory domain controllers. Identifying domain controllers early in an internal assessment is critical because they store all domain credentials (NTDS.dit), manage Group Policy, and are the target for high-impact attacks including DCSync (credential replication), Golden Ticket creation, and domain-level persistence.
15. A penetration tester has local administrator access on a compromised host and discovers that Windows Defender Credential Guard is enabled. How does Credential Guard impact the tester's ability to extract credentials from LSASS?
- A) No impact — Credential Guard only protects stored passwords on disk
- B) Credential Guard isolates NTLM hashes and Kerberos tickets in a Virtualization-Based Security (VBS) protected container, preventing Mimikatz from extracting them from LSASS memory
- C) Credential Guard encrypts network traffic, preventing hash interception
- D) Credential Guard only blocks Pass-the-Hash but allows Kerberoasting
Answer
B — Credential Guard isolates NTLM hashes and Kerberos tickets in a Virtualization-Based Security (VBS) protected container, preventing Mimikatz from extracting them from LSASS memory
Windows Defender Credential Guard uses hardware virtualization (VBS) to create an isolated memory region (LSAIso) where NTLM hashes and Kerberos TGT/TGS tickets are stored. Even with SYSTEM privileges, Mimikatz cannot access this isolated container. Testers must use alternative credential harvesting techniques such as keylogging, DCSync (if domain admin), or targeting systems where Credential Guard is not enabled.
Scoring¶
| Score | Performance |
|---|---|
| 14–15 | Expert — Network penetration testing concepts fully internalized |
| 11–13 | Proficient — Ready to conduct internal network assessments |
| 8–10 | Developing — Review Chapter 43 Nmap, SMB, and Kerberos sections |
| <8 | Foundational — Re-read Chapter 43 before proceeding |
Return to Chapter 43 | Next: Chapter 44 Quiz