Courseiva

EC-Council Certified Penetration Testing Professional (CPENT) (CPENT) (CPENT) — Questions 226–254

254 questions total · 4 pages · All types, answers revealed

Page 3

Page 4 of 4

226
MCQmedium

In a hybrid enterprise environment, an organization uses Azure AD Seamless Single Sign-On (Seamless SSO). During a penetration test, an attacker compromises a domain-joined workstation and attempts to abuse Seamless SSO. What is the mechanism by which Seamless SSO authenticates users, and what is a known security consideration?

A.It requires all users to store their plaintext Active Directory passwords in Azure Key Vault.
B.It bypasses all Conditional Access policies for users connecting from corporate networks.
C.It forces the domain controllers to export NTLMv1 hashes to the Azure cloud directory.
D.It uses a computer account (AZUREADSSOACC$) in on-premises AD to generate Kerberos tickets for users authenticating to cloud services via browser redirection.
AnswerD

Seamless SSO creates the AZUREADSSOACC$ computer account in on-premises AD, whose Kerberos decryption key Microsoft Entra ID shares. Domain-joined users obtain a Kerberos service ticket for that account, which the browser presents for cloud authentication. Compromising the account's key enables forging tickets for any user, satisfying the hybrid SSO constraint.

Why this answer

Seamless SSO uses a computer account named AZUREADSSOACC$ in on-premises AD whose Kerberos decryption key is shared with Azure AD. When a user on a domain-joined machine accesses a Microsoft 365 resource, the browser is redirected to Azure AD, which returns a Kerberos challenge; the local machine requests a service ticket for AZUREADSSOACC$ from the on-prem DC, and the browser presents it to Azure AD, which decrypts it with the shared key to authenticate the user without re-entering credentials.

Exam trap

The trap is that candidates confuse Seamless SSO with Password Hash Synchronization or Pass-through Authentication, or assume it bypasses Conditional Access, when it actually uses Kerberos tickets via the AZUREADSSOACC$ account.

How to eliminate wrong answers

Option A is wrong because Seamless SSO never stores plaintext passwords in Azure Key Vault — it relies on Kerberos tickets, not password synchronization. Option B is wrong because Seamless SSO does not bypass Conditional Access; CA policies still evaluate sign-in risk, device compliance, and location. Option C is wrong because Seamless SSO does not export NTLMv1 hashes to Azure AD; that describes neither its mechanism nor a real behavior.

227
Multi-Selectmedium

A CPENT tester is assessing a building automation system that uses BACnet over IP. The tester needs to perform active discovery to enumerate BACnet devices and their objects on the network. Which TWO of the following approaches are valid for active BACnet/IP device enumeration? (Choose two.)

Select 2 answers
A.Use the BACnet ReadProperty service to query the object-list property of each discovered device to enumerate its objects
B.Perform a BACnet WriteProperty to set the device's object-list to a known value, then read it back to confirm enumeration
C.Send a BACnet Who-Has broadcast to retrieve the firmware version and vendor ID of every device
D.Send a BACnet Who-Is broadcast and collect I-Am responses to identify device instance numbers and addresses
E.Use the BACnet SubscribeCOV service to force every device to continuously report all object values
AnswersA, D

Once devices are discovered, the ReadProperty service can retrieve the object-list property, which enumerates all BACnet objects (analog inputs, binary outputs, schedules, etc.) on the device. This is a read-only operation that maps the device's exposed points. It is a core active enumeration technique for understanding what is controllable or monitorable on the BACnet network.

Why this answer

Active BACnet/IP enumeration starts with a Who-Is broadcast to collect I-Am responses, yielding device instance numbers and addresses. From there, ReadProperty against each device's object-list reveals all exposed objects. Together these read-only services provide a complete device and object inventory without writing to the system, which is essential for safe OT assessment.

Exam trap

The trap here is confusing read-only BACnet services like Who-Is and ReadProperty with write or subscription services like WriteProperty and SubscribeCOV, which are not enumeration tools.

228
MCQeasy

A penetration tester is analyzing a Linux system and finds that the binary /bin/ping has the SUID bit set along with root ownership. What is the security implication of this finding?

A.It allows remote attackers to execute system calls over ICMP tunneling.
B.Any local user can execute commands as root by passing malicious arguments to the SUID binary.
C.The system is immune to local privilege escalation because SUID is disabled by SELinux.
D.It allows the binary to execute with the privileges of the file owner (root), which can be exploited if the binary has flaws or drops to a shell.
AnswerD

The SUID bit makes /bin/ping run as root regardless of the invoking user, so any flaw permitting command execution or shell escape yields a root shell. This satisfies the scenario's implication: privilege escalation risk from owner-privilege execution.

Why this answer

The SUID bit causes /bin/ping to execute with the effective UID of its owner (root) rather than the invoking user, which is why unprivileged users can open raw ICMP sockets. If the binary contains a vulnerability — buffer overflow, command injection, or an unsafe system()/exec() call — or if it can be coerced into spawning a shell, the attacker inherits root privileges, making it a classic local privilege escalation vector.

Exam trap

The trap is assuming SUID automatically equals instant root — the correct reasoning is that SUID elevates the binary's privileges, and exploitation requires a flaw or unsafe behavior in that specific binary.

How to eliminate wrong answers

Option A is wrong because SUID on ping has nothing to do with ICMP tunneling; ICMP tunneling is a covert-channel technique that abuses the protocol itself, not the SUID bit. Option B is wrong because SUID does not automatically let any user run arbitrary commands as root — it only elevates the binary's own execution context, and exploitation requires a flaw or unsafe behavior in that specific binary. Option C is wrong because SELinux does not 'disable' SUID; it may confine the binary with a policy (e.g., ping_t), but the statement is a blanket false claim and SELinux is not even guaranteed to be enabled or enforcing.

229
MCQeasy

A penetration tester is evaluating an AWS environment and discovers that an IAM role attached to an Amazon EC2 instance has an overly permissive trust policy allowing any user in the account to assume it via the sts:AssumeRole API without external conditions. Which specific remediation step should the cloud administrator apply to fix this risk?

A.Modify the IAM role trust policy to include a Condition block restricting the principal or requiring multi-factor authentication.
B.Rotate the AWS account root user access keys immediately.
C.Attach an explicit Deny policy to the EC2 instance metadata service version 2 configuration.
D.Disable the AWS Security Token Service endpoint globally across the AWS organization.
AnswerA

The trust policy's Principal element is what permits any account user to call sts:AssumeRole. Adding a Condition block — restricting the principal or demanding MFA via aws:MultiFactorAuthPresent — closes that gap while preserving legitimate role assumption, directly addressing the overly permissive trust relationship.

Why this answer

The overly permissive trust policy allows any user in the account to assume the role, which is a significant risk. The remediation is to modify the trust policy to include a Condition block that restricts the principal (e.g., specific IAM users or roles) or requires multi-factor authentication. This ensures that only authorized entities can assume the role, following the principle of least privilege.

Exam trap

The trap is thinking that rotating keys or disabling STS endpoints fixes the issue, when the core problem is the trust policy's Principal and Condition elements.

How to eliminate wrong answers

Option B is wrong because rotating root user access keys does not address the trust policy issue; the root user is not necessarily involved. Option C is wrong because attaching a Deny policy to the EC2 instance metadata service version 2 configuration is not a valid remediation; IMDSv2 is a security enhancement, but denying it would not fix the trust policy. Option D is wrong because disabling the AWS STS endpoint globally would break many services and is not a targeted fix for the trust policy.

230
MCQmedium

You have compromised a dual-homed Linux host that sits between a DMZ and an internal network. From this host you need to reach internal web servers on TCP/8080 that are not routable from your attack machine, and you want to route all your tooling traffic through the pivot using SOCKS. Which approach correctly establishes the pivot?

A.Run ssh -L 8080:internal-web:8080 user@pivot and point your tools at localhost:8080.
B.Use nmap --proxies socks4://pivot:1080 to route scans through the pivot's SOCKS service.
C.Run ssh -R 1080:localhost:1080 user@pivot to create a reverse SOCKS proxy on the pivot host.
D.Run ssh -D 1080 user@pivot and configure your tools to use the local SOCKS5 proxy on port 1080.
AnswerD

The -D flag on the SSH client starts a dynamic SOCKS proxy that forwards arbitrary TCP connections through the SSH server. Because the compromised host is dual-homed, connections to internal web servers on TCP/8080 originate from its internal interface, reaching hosts that are not routable from the attack machine. Pointing tools at the local SOCKS5 listener routes all their traffic through the pivot correctly.

Why this answer

A dynamic SSH forward with -D creates a SOCKS proxy on the attack machine that tunnels arbitrary TCP connections through the dual-homed host. Because the pivot has an internal interface, those connections reach internal web servers that are otherwise unroutable. Static local forwards reach only one destination, reverse forwards run in the wrong direction, and a proxy option alone does not establish the tunnel.

Exam trap

The trap here is confusing a single static port forward with a dynamic SOCKS proxy that can carry arbitrary tooling traffic to many internal destinations.

231
MCQhard

A penetration tester is assessing an AWS environment where an EC2 instance is associated with an IAM role that trusts an external third-party AWS account in its trust policy, but the external account ID was mistyped or left overly broad (e.g., condition missing external ID or using an insecure principal). What vulnerability does this introduce?

A.The EC2 instance is vulnerable to local root privilege escalation via kernel module injection.
B.AWS CloudTrail logs for the instance are permanently deleted.
C.The third-party account gains direct SSH access to the EC2 instance filesystem.
D.The trusted external account can assume the role, and without an ExternalID condition, it is vulnerable to cross-account confusion or unauthorized assumption.
AnswerD

The role's trust policy names the external account as principal, so any identity in that account can call sts:AssumeRole. Absent an ExternalID condition, the confused-deputy weakness lets that account assume the role without proving it is the intended tenant.

Why this answer

When an IAM role trust policy allows an external AWS account to assume the role without an ExternalID condition, any principal in that account with sts:AssumeRole permissions can assume the role. If the external account ID is mistyped or overly broad, it could allow unintended accounts to assume the role, leading to unauthorized access. The ExternalID is a best practice to prevent the confused deputy problem, especially when third-party vendors are involved.

Exam trap

CPENT often tests the confused deputy problem and the importance of ExternalID in cross-account trust policies, so candidates must recognize that missing ExternalID is a vulnerability.

How to eliminate wrong answers

Option A is wrong because the trust policy vulnerability does not grant local root privilege escalation via kernel module injection; that is a separate host-level vulnerability unrelated to IAM trust policies. Option B is wrong because AWS CloudTrail logs are not deleted by a trust policy misconfiguration; CloudTrail is a separate service and would continue to log API activity unless explicitly tampered with. Option C is wrong because assuming an IAM role does not grant direct SSH access to an EC2 instance filesystem; SSH access requires network access and key-based authentication, not IAM role assumption.

232
MCQmedium

A penetration tester is analyzing a proprietary IoT device protocol that operates over UDP. The tester has captured raw binary network traffic and wants to write a custom dissector script to parse the packet structure in Wireshark. What scripting language does Wireshark natively support for writing lightweight protocol dissectors?

A.Bash
B.PowerShell
C.Lua
D.Ruby
AnswerC

Lua is embedded in Wireshark as its scripting engine for lightweight, user-written dissectors, letting the tester parse the proprietary UDP binary structure without recompiling C code. This satisfies the stem's requirement for a natively supported scripting language.

Why this answer

Wireshark supports Lua natively for writing post-dissection scripts, custom dissectors, and heuristic analyzers without needing to recompile the source code in C.

233
Multi-Selectmedium

During an Azure subscription review, a security assessor checks for role-based access control and resource configuration best practices. Which TWO of the following findings represent high-severity security risks? (Choose TWO)

Select 2 answers
A.Enabling Azure Defender for SQL on all Azure SQL databases.
B.Assigning the Owner role to external guest users at the root management group level without justification.
C.Configuring Azure Monitor alerts for failed sign-in attempts.
D.Enabling soft-delete and purge protection on Azure Key Vaults.
E.Storage account access keys remaining unchanged for over a year with broad data access.
AnswersB, E

Owner at root management group scope grants external guests full control over every subscription and resource, including RBAC changes. This violates least privilege at the broadest possible scope, making it a high-severity finding in the stem's review.

Why this answer

Option B is correct because assigning the Owner role to external guest users at the root management group level grants them full control over every subscription and resource in the tenant, violating least-privilege and creating a severe privilege-escalation and data-exfiltration risk. Option E is correct because long-lived, unchanged storage account access keys with broad data access effectively act as permanent shared secrets; if leaked, they allow full access to the storage account's data, and key rotation is a core configuration best practice. Option A is not a risk but a recommended defense, since Azure Defender for SQL provides threat detection and vulnerability assessment for Azure SQL databases.

Option C is not a risk because Azure Monitor alerts on failed sign-in attempts improve detection of brute-force or credential-stuffing activity. Option D is not a risk because soft-delete and purge protection on Azure Key Vaults are recommended safeguards that prevent accidental or malicious permanent deletion of secrets, keys, and certificates.

234
MCQmedium

During an OT assessment, you capture network traffic on the plant floor and notice that a Siemens S7-1200 PLC responds to read/write requests on TCP port 102 without requiring any authentication. You want to interact with the PLC to read its current process values and verify whether an attacker could manipulate the logic. Which tool is specifically designed to communicate with Siemens S7 PLCs over the S7comm protocol for this purpose?

A.Wireshark with the s7comm dissector
B.Snap7
C.Modbus Poll
D.Nmap with the s7-info script
AnswerB

Snap7 is an open-source Ethernet communication suite specifically designed for Siemens S7 PLCs. It implements the S7comm protocol and allows a tester to connect to S7-1200/1500/300/400 PLCs over TCP port 102, read/write memory areas, and even manipulate the PLC program. It is the correct tool for actively interacting with the S7-1200 in this scenario.

Why this answer

Siemens S7 PLCs use the proprietary S7comm protocol over TCP port 102. To actively read/write process values or modify logic, a tool that implements S7comm is required. Snap7 is an open-source library and set of tools that provides this capability, allowing direct interaction with S7-1200, S7-1500, S7-300, and S7-400 PLCs.

Other options either target different protocols or are passive/information-gathering tools.

Exam trap

The trap here is confusing information-gathering tools like Nmap scripts with active exploitation tools that can read and write PLC memory.

235
Multi-Selectmedium

During an AWS security review, a penetration tester identifies several identity and storage policies. Which TWO of the following configurations are considered insecure? (Choose TWO)

Select 2 answers
A.An IAM role trust policy that permits assumption by any AWS account across the entire AWS partition without external ID checks.
B.Enabling Amazon S3 Object Versioning on critical document storage buckets.
C.Enabling AWS KMS key rotation for all customer-managed cryptographic keys annually.
D.An AWS KMS key policy granting kms:* permissions to the root user and trusted admin roles only.
E.An S3 bucket policy utilizing a wildcard principal ("Principal": "*") combined with an Allow action without sufficient condition constraints.
AnswersA, E

A trust policy allowing any AWS account in the partition to assume the role, with no ExternalId condition, enables the confused deputy problem: any third party can obtain the role's credentials. This is the insecure cross-account assumption configuration the review seeks.

Why this answer

Option A is insecure because an IAM role trust policy whose Principal allows any AWS account in the partition (for example, "AWS": "arn:aws:iam::*:root" or a wildcard account) lets arbitrary external accounts assume the role; without a sts:ExternalId condition, this enables the confused deputy problem and unauthorized cross-account access. Option E is insecure because an S3 bucket policy with "Principal": "*" and an Allow effect lacking restrictive conditions (such as aws:SourceArn, aws:SourceAccount, or aws:PrincipalOrgID) exposes the bucket to anonymous or unintended public access. Option B is not insecure: enabling S3 Object Versioning protects against overwrites and deletions and aids recovery, so it is a security best practice.

Option C is not insecure: annual AWS KMS key rotation for customer-managed keys is a recommended practice that limits the blast radius of key compromise. Option D is not insecure: granting kms:* to the account root and trusted admin roles is the standard KMS key policy pattern, since the root principal is constrained by IAM policies and does not by itself grant broad access.

Exam trap

CPENT often tests whether candidates can distinguish secure-by-default configurations (versioning, key rotation, scoped KMS policies) from genuinely risky ones (wildcard principals, missing ExternalId) — the trap is flagging best practices as insecure.

236
MCQmedium

A CPENT tester is assessing a water treatment plant's OT network. The tester has captured traffic on the plant's control VLAN and wants to enumerate all Modbus/TCP devices and their supported function codes without disrupting operations. Which Nmap NSE script should the tester run against the subnet to perform this discovery safely?

A.nmap -p 502 --script modbus-discover <subnet>
B.nmap -sU -p 502 --script modbus-discover <subnet>
C.nmap -p 502 --script modbus-write <subnet>
D.nmap -p 502 --script modbus-discover --script-args modbus-discover.force=true <subnet>
AnswerA

The modbus-discover NSE script sends a safe Modbus Read Device Identification request to TCP port 502 and parses the response to list slave IDs, vendor, and supported function codes. Running it with a normal TCP scan on port 502 is non-intrusive and ideal for enumerating PLCs on a live control VLAN without writing coils or registers.

Why this answer

Modbus/TCP devices listen on TCP port 502, and the modbus-discover NSE script performs read-only device identification and function-code enumeration by sending safe Read Device Identification requests. Running a standard TCP scan against port 502 with this script enumerates PLCs without issuing writes, which meets the requirement to discover devices without disrupting plant operations.

Exam trap

The trap here is assuming Modbus/TCP uses UDP or that a write-capable NSE script is needed to enumerate device details, when read-only discovery on TCP 502 is sufficient.

237
MCQeasy

Which Active Directory right or permission allows a security principal to perform a DCSync attack, thereby replicating domain secrets?

A.GenericAll over thekrbtgt account
B.DS-Replication-Get-Changes and DS-Replication-Get-Changes-All
C.FullControl over the Domain Controllers OU
D.WriteDACL on the builtin Administrators group
AnswerB

DS-Replication-Get-Changes and DS-Replication-Get-Changes-All extended rights permit a principal to invoke directory replication, letting it pull password hashes and other secrets directly from a domain controller without touching its filesystem. Granting both satisfies the replication requirement that makes DCSync possible, unlike ordinary read or logon rights.

Why this answer

DCSync abuses the Directory Replication Service (DRS) Remote Protocol by impersonating a domain controller and requesting replication of directory changes. The specific rights required are the extended rights DS-Replication-Get-Changes and DS-Replication-Get-Changes-All (GUIDs 1131f6aa-9c07-11d1-f79f-00c04fc2dcd2 and 1131f6ad-9c07-11d1-f79f-00c04fc2dcd2), typically granted to Domain Admins, Enterprise Admins, and the DC computer accounts themselves.

Exam trap

CPENT often tests the confusion between generic AD permissions (GenericAll, WriteDACL) and the specific extended replication rights — candidates assume any high privilege enables DCSync, but only the DS-Replication-Get-Changes* rights do.

How to eliminate wrong answers

Option A is wrong because GenericAll over the krbtgt account allows password reset or attribute modification of that account but does not grant the replication extended rights needed to pull secrets via DRS. Option C is wrong because FullControl over the Domain Controllers OU is an organisational-unit permission that does not itself confer the DS-Replication extended rights on the domain naming context. Option D is wrong because WriteDACL on the builtin Administrators group only lets you modify that group's ACL — it does not grant the replication rights required to invoke DRS GetNCChanges.

238
MCQeasy

A penetration tester needs to perform a stealthy TCP SYN scan against a target network using Nmap to avoid triggering simple stateless packet filters. Which command-line flag should be used?

A.-sA
B.-sU
C.-sT
D.-sS
AnswerD

The -sS flag performs a half-open TCP SYN scan, sending SYN packets and never completing the three-way handshake. This satisfies the stealth requirement because no full connection is established, so stateless packet filters see only unsolicited SYNs rather than completed sessions, reducing logging and detection compared with a full connect scan.

Why this answer

The -sS flag tells Nmap to perform a TCP SYN scan, which sends a SYN packet and waits for a SYN-ACK response, never completing the full 3-way handshake, thus remaining stealthier.

239
MCQhard

An attacker is performing a man-in-the-middle attack against an industrial control network utilizing the S7comm protocol between a Siemens S7-300 PLC and an engineering station. The attacker wants to inject malicious logic into the PLC memory. Which tool can be used to craft and send malicious S7comm packets to manipulate the PLC operating mode?

A.Snap7 library scripts
B.Aircrack-ng
C.Hydra
D.Wireshark
AnswerA

Snap7 is an open-source library exposing S7comm client functions, letting an attacker craft packets that read and write PLC memory and change the operating mode. This satisfies the requirement to inject malicious logic into the S7-300.

Why this answer

Snap7 is an open-source Siemens S7 communication library that allows developers and testers to interact with Siemens PLCs. Wireshark is passive, Metasploit has limited industrial modules, and Scapy can craft raw packets but Snap7 is the standard library for S7comm manipulation.

240
MCQmedium

During a penetration test, you have compromised a workstation and obtained the NTLM hash of a domain user who is logged in. You want to move laterally to a server where this user has administrative rights. Which technique would allow you to authenticate to the server without knowing the plaintext password?

A.Pass-the-Hash (PtH) using the NTLM hash.
B.Pass-the-Ticket (PtT) using the user's Kerberos TGT.
C.Overpass-the-Hash to convert the NTLM hash into a Kerberos ticket.
D.Kerberoasting to obtain a service ticket for the server.
AnswerA

Pass-the-Hash allows an attacker to authenticate using the NTLM hash directly, without needing the plaintext password. This works because NTLM authentication can use the hash as proof of identity. Tools like Mimikatz or Impacket's psexec can leverage the hash to access remote systems where the user has administrative privileges.

Why this answer

Pass-the-Hash is the most direct method to authenticate using an NTLM hash without the plaintext password. It exploits the NTLM challenge-response protocol, allowing the hash to be used as a credential. This technique is widely used in lateral movement when administrative rights are present on the target.

Exam trap

The trap here is confusing Pass-the-Hash with Overpass-the-Hash, which converts the hash to a Kerberos ticket and requires additional steps.

241
MCQmedium

During an Azure assessment, an attacker discovers that an App Service web application has Managed Identity enabled and the underlying application code is vulnerable to Server-Side Request Forgery (SSRF). How can the attacker chain these vulnerabilities?

A.By extracting the plaintext storage account keys from the kudu SCM debug console logs.
B.By using the SSRF vulnerability to query the Azure Instance Metadata Service (IMDS) and retrieve access tokens for the Managed Identity.
C.By forcing the App Service to downgrade its TLS version to SSLv3.
D.By injecting malicious PowerShell commands into the Azure Active Directory synchronization pipe.
AnswerB

SSRF lets the attacker reach the link-local IMDS endpoint (169.254.169.254), which issues OAuth2 access tokens for the assigned Managed Identity via its metadata endpoint. This satisfies the stem's chaining constraint, escalating from a web request forgery to authenticated access to Azure resources.

Why this answer

An attacker exploiting SSRF can query the Azure Instance Metadata Service (IMDS) endpoint at 169.254.169.254 to acquire OAuth access tokens for the managed identity.

242
MCQmedium

A penetration tester has gained access to a workstation and wants to move laterally to a server using a Golden Ticket. The tester has the KRBTGT hash and the domain SID. Which tool from the Impacket suite should be used to forge and inject the Golden Ticket?

A.psexec.py
B.ticketer.py
C.getTGT.py
D.secretsdump.py
AnswerB

ticketer.py is specifically designed to create Golden and Silver tickets. It takes the KRBTGT hash and domain SID as input to forge a TGT that can be used for authentication. This tool allows the tester to generate a ticket file that can be injected into the session, enabling lateral movement with domain admin privileges.

Why this answer

The correct answer is ticketer.py because it is the Impacket tool specifically designed to forge Golden and Silver tickets. It takes the KRBTGT hash and domain SID to create a TGT that can be used for authentication, enabling lateral movement. Other tools like getTGT.py only request legitimate tickets, while secretsdump.py extracts secrets but does not forge tickets.

Exam trap

The trap here is confusing tools that obtain tickets with those that forge them; getTGT.py requests legitimate tickets, while ticketer.py creates forged ones.

243
MCQeasy

A tester discovers that an internal Windows host has the AlwaysInstallElevated registry key set to 1 in both HKCU and HKLM. How can the tester leverage this misconfiguration to escalate privileges?

A.Run a batch script that directly modifies the SAM database registry hive.
B.Execute a local exploit targeting the Print Spooler service via named pipes.
C.Generate a malicious MSI file using msfvenom and execute it using msiexec /quiet /qn /i exploit.msi.
D.Extract plaintext credentials from the lsass.exe process memory.
AnswerC

AlwaysInstallElevated set in both HKCU and HKLM lets any user install MSI packages with SYSTEM privileges. A crafted MSI executed via msiexec with /quiet /qn runs its payload as SYSTEM, escalating from the current user to full administrative control.

Why this answer

AlwaysInstallElevated allows MSI packages to be installed with elevated (NT AUTHORITY\SYSTEM) privileges. The tester can generate a malicious MSI file using msfvenom and install it silently.

244
MCQmedium

A penetration tester is performing post-exploitation on a Linux system and wants to exploit an NFS share with the 'no_root_squash' option enabled. Which of the following steps must the tester perform from their attacking machine to successfully write a SUID shell to the share?

A.Mount the NFS share using sudo privileges, copy /bin/bash to the share, and set the SUID permission using chmod +s.
B.Modify the /etc/exports file on the remote target directly via standard FTP.
C.Mount the NFS share using standard user privileges and create a standard user shell script.
D.Log into the NFS server directly via SSH using the exported share credentials.
AnswerA

With no_root_squash, the client's root UID is preserved on the share, so mounting as root and copying bash lets the tester chmod +s it, creating a root-owned SUID binary. This satisfies the requirement to write a SUID shell to the NFS export.

Why this answer

With no_root_squash enabled, the NFS server maps the root user on the client to root on the server, so a client that mounts the share as root can create files owned by root with the SUID bit set. Copying /bin/bash to the share and running chmod +s on it produces a root-owned SUID shell that, when executed on the target, grants root privileges. This is the classic no_root_squash privilege escalation.

Exam trap

CPENT often tests whether candidates understand that no_root_squash only helps if the client mounts as root; candidates frequently assume any user can exploit the share, missing the UID-mapping requirement.

How to eliminate wrong answers

Option B is wrong because /etc/exports is a server-side configuration file that controls which shares are exported and with what options; it cannot be edited over FTP, and doing so would not be the exploitation step for no_root_squash. Option C is wrong because mounting as a standard user means the client's UID is not root, so files created on the share are owned by that unprivileged UID and the SUID bit will not yield root — no_root_squash specifically requires the client to be root. Option D is wrong because NFS exports do not provide SSH credentials, and logging in via SSH is unrelated to exploiting the share's export options.

245
Multi-Selectmedium

A CPENT tester is targeting a hybrid cloud environment that uses AWS IAM Identity Center (successor to AWS Single Sign-On) to federate with an on-premises Active Directory. The tester has obtained read-only access to the AWS Organizations management account. Which TWO actions should the tester perform to enumerate potential privilege escalation paths into member accounts? (Choose two.)

Select 2 answers
A.Call organizations:ListPolicies to retrieve all service control policies and infer which actions are denied.
B.Call organizations:ListAccounts to identify all member accounts and their IDs.
C.Call iam:ListRoles in the management account to find roles with AdministratorAccess.
D.Call sso-admin:ListPermissionSets and sso-admin:ListAccountAssignments for each account.
E.Call sts:GetCallerIdentity to confirm the current role and then attempt sts:AssumeRole on every role ARN discovered.
AnswersB, D

ListAccounts enumerates every account in the organization along with its ID, ARN, email, and status. From the management account, this provides the target list of member accounts that could be reachable through identity center permission sets or cross-account roles. Without this enumeration, the tester cannot know which accounts exist or where to focus escalation attempts, making it a necessary first step.

Why this answer

To map escalation from a management account into member accounts via IAM Identity Center, the tester must first enumerate the accounts with ListAccounts, then inspect the permission sets and their assignments with ListPermissionSets and ListAccountAssignments. Together these reveal which federated identities can assume which roles in which accounts. IAM role listing, GetCallerIdentity, and SCP retrieval do not expose the identity center assignment graph.

Exam trap

The trap here is focusing on IAM roles and SCPs within the management account while overlooking that IAM Identity Center permission set assignments are the actual bridge to member accounts.

246
MCQmedium

An operator captures a valid Ticket Granting Ticket (TGT) for a domain user from memory and wants to inject it into their current session to access network resources without re-authenticating. Which tool and command syntax should be used to import this ticket into the local LSASS session on Windows?

A.Rubeus: golden /ticket:ticket.kirbi
B.PowerView: Invoke-TicketInjection -Path ticket.kirbi
C.Mimikatz: kerberos::ptt ticket.kirbi
D.Impacket: ticketer.py -nthash ...
AnswerC

Mimikatz's `kerberos::ptt` passes the ticket into the current logon session by injecting it into LSASS, satisfying the requirement to import a captured TGT without re-authentication. The `.kirbi` file holds the Kerberos ticket; `ptt` (pass-the-ticket) loads it so the session presents it for network resource access.

Why this answer

Pass-the-Ticket involves injecting exported ticket files (such as .kirbi or .ccache format) into memory. Mimikatz uses the 'kerberos::ptt' command to inject a ticket into the current Windows logon session.

247
MCQmedium

During an internal penetration test, you successfully compromise a Linux host with two network interfaces: eth0 (10.10.10.50) connected to the initial segment, and eth1 (192.168.100.10) connected to an isolated internal subnet. To route subsequent Nmap TCP SYN scans through this compromised host into the 192.168.100.0/24 network using Metasploit, which post-exploitation module must you configure and run first?

A.auxiliary/scanner/portscan/tcp
B.post/multi/manage/autoroute
C.exploit/windows/local/payload_inject
D.auxiliary/server/socks_proxy
AnswerB

Autoroute reads the compromised host's routing table and injects routes into Metasploit's session, so TCP SYN scans traverse eth1 into 192.168.100.0/24. It satisfies the pivot constraint: reaching an isolated subnet through a dual-homed host without manual proxy configuration.

Why this answer

The post/multi/manage/autoroute module in Metasploit adds routes to the Meterpreter session's routing table, enabling the framework to pivot through the compromised host into the 192.168.100.0/24 subnet. Once autoroute is configured with the target subnet, subsequent Metasploit modules (including scanners) automatically route traffic through the session. This is the prerequisite step before running any scan against the isolated network.

Exam trap

CPENT often tests the ordering of pivot setup — candidates pick the scanner or SOCKS proxy because they focus on the end goal (scanning), forgetting that autoroute must be configured first to establish the route through the compromised host.

How to eliminate wrong answers

Option A is wrong because auxiliary/scanner/portscan/tcp is the scanning module itself — it cannot reach the 192.168.100.0/24 network until a route is established through the pivot host; running it first would fail to reach the target subnet. Option C is wrong because exploit/windows/local/payload_inject is a Windows local privilege escalation/payload injection module, irrelevant to a Linux pivot host and to routing traffic. Option D is wrong because auxiliary/server/socks_proxy sets up a SOCKS proxy for external tools (like proxychains), but it is not the Metasploit-native routing mechanism and is typically used alongside or instead of autoroute depending on the tooling; the question specifically asks for the module to configure first for Metasploit's own routing.

248
Multi-Selectmedium

A penetration tester is assessing a Microsoft Azure environment and discovers that a virtual machine (VM) has a system-assigned managed identity enabled. The VM is running a web application that is vulnerable to server-side request forgery (SSRF). The tester wants to exploit the SSRF to gain access to Azure resources. Which TWO of the following actions can the tester perform to leverage the managed identity? (Choose two.)

Select 2 answers
A.Query the Azure Instance Metadata Service (IMDS) endpoint at http://169.254.169.254/metadata/identity/oauth2/token to obtain an access token for the managed identity.
B.Modify the managed identity's role assignments by sending a PATCH request to the IMDS endpoint to add the Contributor role.
C.Retrieve the managed identity's certificate from the IMDS endpoint and use it to authenticate as the managed identity to any Azure service.
D.Use the managed identity's credentials to authenticate to Azure Active Directory (Azure AD) and enumerate all users and groups in the tenant.
E.Use the obtained access token to call the Azure Resource Manager API and list all resources in the subscription, provided the managed identity has Reader permissions on the subscription.
AnswersA, E

The IMDS endpoint is accessible from within the VM and provides OAuth2 tokens for the managed identity when requested with the appropriate header. By exploiting SSRF, an attacker can make the web application send a request to this endpoint and retrieve the token. This token can then be used to authenticate to Azure services that the managed identity has access to, such as Azure Resource Manager or Key Vault.

Why this answer

The two correct actions are querying the IMDS endpoint to obtain an access token and using that token to call Azure Resource Manager if the managed identity has Reader permissions. These steps allow an attacker to leverage SSRF to steal the managed identity's token and then access Azure resources. The other options are incorrect because they assume capabilities that IMDS does not provide, such as retrieving certificates or modifying role assignments, or they require permissions not typically granted to managed identities.

Exam trap

The trap here is assuming that the IMDS endpoint can be used to modify role assignments or retrieve certificates, when it only provides OAuth2 tokens.

249
MCQhard

During an internal penetration test, you compromise a Windows host that sits on a management VLAN. The network is segmented, and the host has two interfaces: one on the management VLAN (10.10.10.0/24) and one on the corporate VLAN (192.168.1.0/24). You want to reach a database server at 172.16.5.20 on a third VLAN, but your compromised host has no route to that subnet. You have administrative privileges on the compromised host. Which of the following is the most reliable technique to pivot to the 172.16.5.0/24 network?

A.Configure a VPN connection from your attack machine to the compromised host and enable Internet Connection Sharing on the corporate VLAN interface.
B.Use a tool such as Metasploit's autoroute or a SOCKS proxy to route traffic through the compromised host, then use proxychains to reach the target.
C.Use ARP spoofing to impersonate the database server and redirect traffic from the management VLAN to your attack machine.
D.Enable IP forwarding on the compromised host and add a static route for 172.16.5.0/24 pointing to the default gateway of the management VLAN.
AnswerB

When a compromised host has multiple interfaces but no direct route to the target subnet, you can leverage it as a pivot by configuring a route through the host and a SOCKS proxy. Metasploit's autoroute adds a route in the Meterpreter session, and proxychains directs tools through the SOCKS proxy. This allows traffic to be forwarded from your attack machine through the compromised host to the target network, assuming the host can reach it via one of its interfaces.

Why this answer

The compromised host has multiple interfaces but no direct route to the target subnet. To pivot, you must route traffic through the host using a tool like Metasploit's autoroute or a SOCKS proxy, then direct your attack tools through that proxy. This is a standard CPENT pivot technique.

Simply adding a static route or using ICS does not create a functional pivot when the host lacks a route to the target network.

Exam trap

The trap here is assuming that enabling IP forwarding or adding a static route on the compromised host will magically provide a path to a network the host cannot reach.

250
Multi-Selectmedium

Which TWO native Windows tools or Sysinternals utilities can be used by an operator during post-exploitation to dump credentials from the LSASS process memory?

Select 2 answers
A.tasklist.exe /v
B.Sysinternals ProcDump.exe
C.gpresult.exe /h report.html
D.rundll32.exe comsvcs.dll, MiniDump
E.netstat.exe -ano
AnswersB, D

ProcDump.exe captures a full memory dump of a running process, and targeting lsass.exe yields credential material such as NTLM hashes and Kerberos tickets for offline extraction. It satisfies the scenario's requirement for a Sysinternals utility usable post-exploitation, since it runs natively on Windows without installing additional agents.

Why this answer

Sysinternals ProcDump.exe (option B) is correct because it can create a memory dump of a running process, including lsass.exe, using syntax such as procdump -ma lsass.exe lsass.dmp, which can then be parsed offline with Mimikatz to extract credentials. Option D is also correct because rundll32.exe can invoke the native comsvcs.dll MiniDump export, e.g. rundll32.exe C:\Windows\System32\comsvcs.dll, MiniDump <LSASS_PID> C:\lsass.dmp full, producing an LSASS memory dump without external tooling. Option A (tasklist.exe /v) only lists running processes with verbose details and cannot dump memory.

Option C (gpresult.exe /h report.html) generates a Group Policy Resultant Set of Policy HTML report and has no credential-dumping capability. Option E (netstat.exe -ano) only displays network connections with owning PIDs and cannot read LSASS memory.

Exam trap

CPENT often tests whether candidates confuse process enumeration or network inspection tools (tasklist, netstat) with actual credential-dumping techniques, so the trap is selecting any tool that merely lists processes or connections instead of one that reads LSASS memory.

251
MCQmedium

During a CPENT engagement, a tester gains a low-privileged shell on a Windows Server 2019 host. The tester runs 'whoami /priv' and sees SeImpersonatePrivilege enabled. The host is running IIS with a service account that has this privilege. Which tool is most appropriate to escalate privileges by leveraging this token privilege?

A.Juicy Potato
B.PrintSpoofer
C.RoguePotato
D.Sweet Potato
AnswerB

PrintSpoofer exploits SeImpersonatePrivilege by abusing the Print Spooler service to create a named pipe and impersonate a SYSTEM token. It works reliably on Windows Server 2019 without needing external redirects, making it ideal for this scenario where the privilege is enabled.

Why this answer

SeImpersonatePrivilege allows a process to impersonate a token, and PrintSpoofer leverages this by coercing the Print Spooler service to authenticate to a controlled named pipe, resulting in SYSTEM impersonation. Unlike older tools, it does not rely on port binding or remote redirects, making it highly effective on modern Windows Server 2019.

Exam trap

The trap here is assuming that any SeImpersonatePrivilege exploit will work universally, but newer Windows builds patched many COM-based techniques, making PrintSpoofer a more reliable choice.

252
MCQmedium

An operator has discovered a computer object with Unconstrained Delegation enabled in Active Directory. How can this configuration be abused if a Domain Administrator account can be coerced to authenticate to it?

A.Extract the NTLM hash of the domain controller directly from the SYSVOL share.
B.Forge a Kerberos ticket using the machine account's local SAM database.
C.Modify group policy objects via unauthenticated LDAP queries.
D.Capture the coerced Domain Admin's TGT from the machine's memory to impersonate them across the domain.
AnswerD

Unconstrained Delegation lets the host cache any authenticating user's TGT in LSASS. Coercing a Domain Administrator to authenticate deposits their TGT there, which the operator extracts and injects to impersonate them domain-wide — satisfying the scenario's requirement to abuse the delegation flag for full-domain privilege escalation.

Why this answer

When Unconstrained Delegation is enabled on a computer, the machine caches the TGT of any user who authenticates to it in LSASS memory so it can reuse that TGT for downstream services. If a Domain Admin is coerced (e.g., via PrinterBug/SpoolSample or PetitPotam) into authenticating to that host, the attacker can extract the DA's TGT and inject it to impersonate the administrator domain-wide.

Exam trap

The trap is assuming unconstrained delegation yields password hashes or GPO write access; in reality it yields cached Kerberos TGTs, which are used for ticket injection (Pass-the-Ticket), not hash extraction.

How to eliminate wrong answers

Option A is wrong because SYSVOL contains Group Policy files and scripts, not domain controller NTLM hashes — those live in NTDS.dit and are extracted via DCSync, not SYSVOL. Option B is wrong because the local SAM database only holds local account hashes, not domain machine-account Kerberos keys, and SAM cannot be used to forge domain Kerberos tickets. Option C is wrong because modifying GPOs requires authenticated LDAP write privileges (typically Domain Admin or delegated rights), not unauthenticated LDAP queries — and it is unrelated to unconstrained delegation abuse.

253
MCQhard

During an internal penetration test, an operator wants to perform lateral movement using PsExec. Which underlying Windows mechanism does PsExec rely on to deploy and execute its service binary on the remote target?

A.Initiating an RDP cliprdr channel file transfer.
B.Writing a payload to the target's startup folder via FTP.
C.Injecting shellcode into the lsass.exe process over WinRM.
D.Copying an executable to the ADMIN$ share and creating a remote Windows service via the Service Control Manager (SCM).
AnswerD

PsExec copies its service executable to the target's ADMIN$ share, then instructs the Service Control Manager over remote RPC to register and start that binary as a Windows service. The SCM launches the payload under SYSTEM context, satisfying the remote execution requirement.

Why this answer

PsExec connects to the remote ADMIN$ share, uploads a service executable (such as Psexecsvc.exe), and then creates and starts a Windows service using the Service Control Manager (SCM) via RPC.

254
MCQhard

A pentester is performing a security review of a smart meter that utilizes an unencrypted CoAP (Constrained Application Protocol) service running over UDP. Using Python and Scapy, the tester crafts a packet to interact with the device. Which default UDP port should the tester target for standard unencrypted CoAP communications?

A.UDP 1900
B.UDP 5353
C.UDP 5060
D.UDP 5683
AnswerD

UDP 5683 is the IANA-assigned default port for unencrypted CoAP, matching the stem's plaintext constraint. CoAP's encrypted variant, CoAPs, uses UDP 5684 with DTLS instead. Targeting 5683 lets the Scapy packet reach the smart meter's standard CoAP endpoint without TLS interception.

Why this answer

CoAP is designed for resource-constrained internet devices and typically operates over UDP port 5683 for unencrypted traffic and port 5684 for secure DTLS traffic.

Page 3

Page 4 of 4

All pages