Think You're Ready?

Your Final Exam Before the Final Exam.
Dare to Take It?

During a penetration test, a tester attempts to pivot from one Windows 10 system to another Windows system. The penetration tester thinks a local firewall is blocking connections. Which of the following command-line utilities built into Windows is most likely to disable the firewall?

A. certutil.exe

B. bitsadmin.exe

C. msconfig.exe

D. netsh.exe

D.   netsh.exe

Explanation:

When pivoting between Windows systems, if a local firewall is suspected of blocking connections, the built-in utility most commonly used to configure or disable the firewall is netsh.exe.

netsh.exe → A powerful Windows command-line tool for managing network configurations, including enabling/disabling the firewall, modifying firewall rules, and configuring networking parameters. Attackers and penetration testers often abuse it to disable or alter firewall settings to allow lateral movement.

Other options explained:

A. certutil.exe
Used for certificate management and file transfers (often abused for downloading payloads), but not for firewall control.

B. bitsadmin.exe
Used for background file transfers, not firewall management.

C. msconfig.exe
A GUI tool for system configuration, not a command-line utility for firewall control.

Thus, the most likely utility to disable the firewall is netsh.exe.

Reference
CompTIA PenTest+ PT0-003 Exam Objectives: Domain 3.0 – Attacks and Exploits (covers pivoting and firewall evasion).
MITRE ATT&CK Technique T1562.004: Impair Defenses – Disable or Modify System Firewall (netsh.exe abuse).

During a penetration testing engagement, a tester targets the internet-facing services used by the client. Which of the following describes the type of assessment that should be considered in this scope of work?

A. Segmentation

B. Mobile

C. External

D. Web

C.   External

Explanation:

An External penetration test focuses on assets that are visible and accessible over the internet. These typically include the client's perimeter defenses and public-facing services such as mail servers, VPN endpoints, and DNS servers. Since the question explicitly mentions targeting internet-facing services, an external assessment is the most accurate description of this scope.

Incorrect Answers

A: Segmentation
Reasoning: A segmentation test is a specific type of internal assessment designed to verify that security controls (like VLANs or firewalls) are effectively preventing communication between different network zones (e.g., ensuring a Guest Wi-Fi cannot reach the Corporate Database zone). It does not specifically describe an internet-facing engagement.

B: Mobile
Reasoning: A mobile assessment focuses specifically on the security of mobile applications (iOS/Android) and their interaction with backend APIs. While these apps may interact with the internet, Mobile describes a specific platform rather than the general category of internet-facing network services.

D: Web
Reasoning: This is a common distractor. While many internet-facing services are web-based (HTTP/HTTPS), a Web Application test is highly specialized and focuses on application-level flaws (like SQL injection or XSS). An External test is a broader term that encompasses all services on the perimeter, including non-web protocols like SSH, FTP, and SMTP.

References
CompTIA PenTest+ (PT0-003) Objective 1.2: Explain the importance of scoping and the organizational/customer requirements (differentiating between assessment types).
NIST SP 800-115: Section 2.5 (External vs. Internal Testing).
OWASP Testing Guide: Distinguishes between infrastructure testing and application testing.

After a recent penetration test was conducted by the company's penetration testing team, a systems administrator notices the following in the logs:

2/10/2023 05:50AM C:\users\mgranite\schtasks /query
2/10/2023 05:53AM C:\users\mgranite\schtasks /CREATE /SC DAILY

Which of the following best explains the team's objective?

A. To enumerate current users

B. To determine the users' permissions

C. To view scheduled processes

D. To create persistence in the network

D.   To create persistence in the network

Explanation:

The log entries show the penetration testing team using schtasks.exe:

At 05:50AM, they queried existing scheduled tasks (schtasks /query).
At 05:53AM, they created a new scheduled task (schtasks /CREATE /SC DAILY).

This sequence indicates they were not just enumerating tasks but actively creating a scheduled task. Scheduled tasks are a well-known persistence mechanism in Windows: they ensure that malicious payloads or backdoors are executed automatically at regular intervals or system startup, allowing attackers (or testers simulating them) to maintain access even after reboots or user logouts.

Other options explained:

A. To enumerate current users → Not related; schtasks deals with scheduled tasks, not user accounts.
B. To determine the users' permissions → Permissions are not checked with schtasks; that would involve tools like whoami or net user.
C. To view scheduled processes → The /query command does this, but the subsequent /CREATE shows the intent was persistence, not just viewing.

Reference:
CompTIA PenTest+ PT0-003 Exam Objectives: Domain 3.0 – Attacks and Exploits (covers persistence techniques).
MITRE ATT&CK Technique T1053.005: Scheduled Task/Job – Scheduled Task (attackers use schtasks.exe to maintain persistence).

A penetration tester would like to leverage a CSRF vulnerability to gather sensitive details from an application's end users. Which of the following tools should the tester use for this task?

A. Browser Exploitation Framework

B. Maltego

C. Metasploit

D. theHarvester

A.   Browser Exploitation Framework

Explanation:

The key part of the question is:
“leverage a CSRF vulnerability to gather sensitive details from an application's end users.”

A Cross-Site Request Forgery (CSRF) attack works by:
Targeting authenticated users’ browsers
Forcing the victim’s browser to send unauthorized requests
Exploiting trust between the browser and the web application

To successfully exploit CSRF and collect user data, the tester needs a tool that can interact directly with and control victim browsers.

✅ A. Browser Exploitation Framework (BeEF) — Correct
The Browser Exploitation Framework (BeEF) is specifically designed to:
Hook victim browsers via injected JavaScript
Exploit browser-based vulnerabilities
Perform CSRF attacks automatically
Steal session data and sensitive information
Execute actions as the authenticated user

BeEF is commonly used in scenarios involving:
CSRF
XSS-assisted attacks
Session hijacking
Client-side exploitation

Perfect match for targeting end users through their browsers.

❌ Why the Other Options Are Wrong

B. Maltego
OSINT and relationship-mapping tool.
Used for reconnaissance and intelligence gathering.
Does not exploit web vulnerabilities or browsers.

C. Metasploit
Excellent exploitation framework for hosts and services.
Can assist with web attacks, but it is not specialized for browser control/CSRF exploitation like BeEF.

D. theHarvester
Passive reconnaissance tool.
Collects emails, domains, and public information.
No exploitation capability.

PenTest+ Exam Tip
When CompTIA mentions:
CSRF
End users
Browser interaction
Client-side attacks

Think immediately:
BeEF (Browser Exploitation Framework)

Quick mapping often tested:
Attack Type — Common Tool
CSRF / XSS browser attacks — BeEF
OSINT — Maltego / theHarvester
Exploitation framework — Metasploit

A tester runs an Nmap scan against a Windows server and receives the following results:

Nmap scan report for win_dns.local (10.0.0.5)
Host is up (0.014s latency)
Port State Service
53/tcp open domain
161/tcp open snmp
445/tcp open smb-ds
3389/tcp open rdp

Which of the following TCP ports should be prioritized for using hash-based relays?

A. 53

B. 161

C. 445

D. 3389

C.   445

Explanation:

This question asks specifically about hash-based relays. In Windows networking, this refers to attacks like SMB Relay or NTLM Relay, where an attacker captures or forwards NTLM authentication attempts to another system to authenticate without knowing the password.

Understanding the attack:
Hash-based relay attacks (such as SMB Relay or Pass-the-Hash) rely on protocols that use NTLM authentication and can forward those authentication attempts to other systems. The most common protocol for this is SMB (Server Message Block), which runs on port 445.

Analysis of the ports:

A. 53 (TCP)
This is DNS (Domain Name System). DNS does not use NTLM authentication and cannot be used for hash-based relaying. Incorrect.

B. 161 (TCP)
This is SNMP (Simple Network Management Protocol). SNMP uses community strings for authentication, not NTLM hashes. It is not used for hash relaying. Incorrect.

C. 445 (TCP)
This is SMB (Server Message Block) over TCP, the primary protocol for Windows file sharing and network communication. SMB uses NTLM authentication, making it the perfect target for SMB relay attacks, Pass-the-Hash, and other hash-based relay techniques. Correct.

D. 3389 (TCP)
This is RDP (Remote Desktop Protocol). While RDP can use NTLM authentication, modern versions of Windows have protections (like Restricted Admin mode) and it is generally not the primary target for hash relaying attacks. SMB (port 445) is the classic and most effective protocol for these attacks. Incorrect.

Conclusion:
Port 445 (SMB) is the standard port used for hash-based relay attacks in Windows environments.

Correct Answer: C. 445

A penetration tester is getting ready to conduct a vulnerability scan as part of the testing process. The tester will evaluate an environment that consists of a container orchestration cluster. Which of the following tools should the tester use to evaluate the cluster?

A. Trivy

B. Nessus

C. Grype

D. Kube-hunter

D.   Kube-hunter

Explanation:

The environment consists of a container orchestration cluster (most commonly Kubernetes, as it's the dominant orchestration platform). The tester needs a tool to evaluate the cluster itself — meaning assessing the security posture of the Kubernetes control plane, nodes, RBAC, exposed APIs, misconfigurations, and cluster-specific attack paths.

Kube-hunter (by Aqua Security) is a specialized penetration testing tool built exactly for this purpose:
It actively hunts for security issues in running Kubernetes clusters.
It simulates attacker behavior from remote, pod, or active (inside-cluster) perspectives.
It detects vulnerabilities like exposed API servers, insecure Kubelet, weak RBAC, open etcd, dashboard exposures, dangerous pod capabilities, and many other Kubernetes-specific misconfigurations/weaknesses.
It is explicitly designed for cluster-level evaluation, not just individual container images.

This aligns perfectly with PT0-003's coverage of container/orchestration security tools in vulnerability scanning.

Why not the other options?

A. Trivy
Trivy (also by Aqua Security) is excellent for scanning container images, filesystems, Git repos, IaC (like Kubernetes manifests/yaml), SBOMs, and some Kubernetes resources for vulnerabilities, misconfigs, and secrets. However, it is not primarily a tool for actively evaluating or pentesting a live running cluster (e.g., no remote hunting for exposed endpoints or exploitable cluster paths). Trivy is more static/artifact-focused.

B. Nessus
Nessus is a general-purpose vulnerability scanner great for hosts, networks, web apps, etc. It can detect some Kubernetes-related issues if plugins are updated, but it is not specialized for container orchestration clusters. It lacks deep Kubernetes-specific checks (e.g., RBAC analysis, pod escape paths) compared to dedicated tools.

C. Grype
Grype (by Anchore) is a vulnerability scanner focused on container images and filesystems (often using Syft-generated SBOMs). Like Trivy, it excels at finding CVEs in container packages but does not evaluate the orchestration cluster itself (no cluster-wide scanning, no misconfig hunting in live environments).

Learning Point
CompTIA PenTest+ PT0-003 objectives (Domain 2.0 – Vulnerability Scanning and Analysis): Covers container and orchestration security tools, explicitly including kube-hunter for Kubernetes cluster assessments (often contrasted with image scanners like Trivy/Grype).
MITRE ATT&CK for Containers: Many techniques (e.g., T1610 – Deploy Container, T1619 – Discover Cloud Infrastructure via exposed etcd) are directly testable with kube-hunter.

Bottom line:
For vulnerability scanning/evaluation of a container orchestration cluster (Kubernetes), use the dedicated cluster hunter: Kube-hunter.

A penetration tester assesses a complex web application and wants to explore potential security weaknesses by searching for subdomains that might have existed in the past. Which of the following tools should the penetration tester use?

A. Censys.io

B. Shodan

C. Wayback Machine

D. SpiderFoot

C.   Wayback Machine

Explanation:

The key requirement in the question is:
“searching for subdomains that might have existed in the past.”
The tester wants historical information about a web application — specifically older or forgotten subdomains that may no longer be publicly linked but could still exist or be vulnerable.

✅ C. Wayback Machine — Correct
The Wayback Machine (Internet Archive) stores historical snapshots of websites over time.
A penetration tester can use it to:

View older versions of websites
Discover previously used subdomains
Identify deprecated portals (dev, test, staging)
Find exposed admin panels or APIs that were once public

Example discoveries:

dev.company.com
oldvpn.company.com
beta.company.com

These legacy assets are common attack surfaces because they are often:

Forgotten
Unpatched
Poorly monitored

❌ Why the Other Options Are Wrong
A. Censys.io
Searches internet-exposed hosts and certificates.
Useful for current infrastructure discovery.
Not focused on historical website content.

B. Shodan
Finds currently exposed devices and services.
Provides live exposure data, not historical web pages.

D. SpiderFoot
OSINT automation tool aggregating many data sources.
Useful for reconnaissance, but not specifically designed for historical site snapshots.

🎯 PenTest+ Exam Tip
When CompTIA mentions:

Past infrastructure
Historical domains/subdomains
Old website versions
👉 Think Wayback Machine.

Quick recon mapping:

Goal_Tool
Historical web content_✅ Wayback Machine
Internet-exposed devices_ Shodan
Certificate & host intelligence_ Censys
Automated OSINT collection_ SpiderFoot

Which of the following protocols would a penetration tester most likely utilize to exfiltrate data covertly and evade detection?

A. FTP

B. HTTPS

C. SMTP

D. DNS

D.   DNS

Explanation:

Covert Channel: DNS is often overlooked by security filters because it is a fundamental protocol required for almost all network activity. Most organizations allow outbound DNS traffic (UDP port 53) to pass through firewalls relatively unchecked.
Evasion Technique: Data can be exfiltrated by encoding small chunks of information into subdomains of a domain controlled by the tester (e.g., encoded-data-part1.attacker.com). The tester's authoritative nameserver receives these queries and reconstructs the data. This "low and slow" approach is highly effective at bypassing DLP (Data Loss Prevention) systems that are tuned to look for large file transfers.

Why other options are incorrect

❌ A. FTP:
File Transfer Protocol is an unencrypted, "noisy" protocol. Large outbound transfers via FTP are easily flagged by firewalls and intrusion detection systems (IDS).
❌ B. HTTPS:
While HTTPS provides encryption (hiding the content of the data), modern Next-Generation Firewalls (NGFW) and Proxy servers often perform SSL inspection or flag unusual volumes of traffic to unknown external domains.
❌ C. SMTP:
Email protocols are heavily monitored for spam and data leakage. Sending large amounts of data via mail servers usually triggers alerts or attachment size limits, making it a poor choice for covert exfiltration.

A penetration tester performs a service enumeration process and receives the following result after scanning a server using the Nmap tool:

PORT STATE SERVICE
22/tcp open ssh
25/tcp filtered smtp
111/tcp open rpcbind
2049/tcp open nfs

Based on the output, which of the following services provides the best target for launching an attack?

A. Database

B. Remote access

C. Email

D. File sharing

D.   File sharing

Explanation:

This question asks which service, based on the Nmap output, provides the best target for launching an attack.

Let's analyze the Nmap output:

PORT---- STATE---- SERVICE
22/tcp---- open---- ssh
25/tcp---- filtered---- smtp
111/tcp---- open---- rpcbind
2049/tcp---- open---- nfs

Understanding the services:
22/tcp (SSH) : Secure Shell - used for remote administration and secure logins. This is a remote access service.
25/tcp (SMTP) : Simple Mail Transfer Protocol - used for email. The state is filtered, meaning a firewall is likely blocking access. This makes it a poor target because the tester cannot directly interact with it.
111/tcp (rpcbind) : This maps RPC (Remote Procedure Call) services to ports. It can be useful for enumeration but is not typically the primary attack vector.
2049/tcp (NFS) : Network File System - used for file sharing over a network. This is a file sharing service.

Which is the best target?
The tester is looking for a service to "launch an attack." This means they need a service that is:
Open (accessible)
Known to have vulnerabilities or misconfigurations
Valuable for gaining access or data

Between SSH and NFS:
SSH is generally secure if properly configured. Brute-forcing SSH is possible but noisy and slow.
NFS is notoriously prone to misconfigurations. Common issues include:
Exporting world-writable shares
No_root_squash (allowing root access to files)
Weak access controls
Exposing sensitive data

NFS misconfigurations often allow attackers to mount shares, access sensitive files, upload malicious files, or even gain remote access through SSH key theft.

Analysis of options:
A. Database: No database services (like MySQL on 3306, MSSQL on 1433) are shown. Incorrect.
B. Remote access: SSH is a remote access service, but it's generally more secure than NFS is often misconfigured. Possible but not best.
C. Email: SMTP is filtered, so it cannot be attacked directly. Incorrect.
D. File sharing: NFS is a file sharing service, and it is open and often misconfigured, making it an excellent target for attackers. Correct.

Conclusion:
NFS (port 2049) is an open file sharing service that is frequently misconfigured, making it the best target among the options.

Correct Answer: D. File sharing

During a penetration test, a junior tester uses Hunter.io for an assessment and plans to review the information that will be collected. Which of the following describes the information the junior tester will receive from the Hunter.io tool?

A. A collection of email addresses for the target domain that is available on multiple sources on the internet

B. DNS records for the target domain and subdomains that could be used to increase the external attack surface

C. Data breach information about the organization that could be used for additional enumeration

D. Information from the target's main web page that collects usernames, metadata, and possible data exposures

A.   A collection of email addresses for the target domain that is available on multiple sources on the internet

Explanation:

This question asks what information the junior tester will receive from Hunter.io.

Understanding Hunter.io:
Hunter.io (formerly called Email Hunter) is a specialized OSINT (Open-Source Intelligence) tool focused on email address discovery. It scans the internet and aggregates email addresses associated with a specific domain from various public sources, including:

Website pages
Public social media profiles
PDF documents
Online articles and press releases
GitHub repositories

What Hunter.io provides:
Hunter.io returns a list of email addresses for the target domain, often including:

The email address
The source URL where it was found
The likely name of the person
The confidence score (how likely it is to be valid)

This information is valuable for social engineering campaigns, password spraying, and phishing assessments.

Analysis of options:
A. A collection of email addresses for the target domain that is available on multiple sources on the internet: This accurately describes what Hunter.io does. Correct.
B. DNS records for the target domain and subdomains: Tools like dnsrecon, dig, or SecurityTrails are used for DNS enumeration, not Hunter.io. Incorrect.
C. Data breach information about the organization: Tools like HaveIBeenPwned or Dehashed provide breach data. Hunter.io focuses on publicly available emails, not breached credentials. Incorrect.
D. Information from the target's main web page that collects usernames, metadata, and possible data exposures: This describes web scraping or tools like FOCA (for metadata), not Hunter.io. Incorrect.

Conclusion:
Hunter.io is primarily an email discovery tool that aggregates publicly available email addresses for a target domain.

Correct Answer:
A. A collection of email addresses for the target domain that is available on multiple sources on the internet

Page 7 out of 28 Pages