PoSHMagiC0de Posted December 3, 2019 Share Posted December 3, 2019 So, somewhere on here I posted an example that you can compile GoLang to arm native for the bashbunny. What that means is if you want to create an advanced payload component without using ruby, bash or python then you can. If you wanted to use go to create a web api to deliver payloads via network then there you go. Welp, been playing around and updated to .Net Core 3.0. It includes a feature to cross compile to a single binary and the binary is native to the arch you compiled it for. Like with GoLang, the binary is bigger than a C binary but it gives you C# people an extra option. If you don't know .Net Core and want to try this then go get used to .Net Core first. For those who have been using it, update to .Net Core 3.0. The magic is in your csproj file. Below is an example excerpt from simple "Hello World" default app. First, here is a link to MS page listing runtimeidentifiers. https://docs.microsoft.com/en-us/dotnet/core/rid-catalog Here is the csproj file from default hello world that I modified to produce a single executable, trimmed for linux x64. <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>netcoreapp3.0</TargetFramework> <RuntimeIdentifier>linux-x64</RuntimeIdentifier> <PublishSingleFile>true</PublishSingleFile> <PublishTrimmed>true</PublishTrimmed> </PropertyGroup> </Project> After the change is made then just running "dotnet publish" will produce the binary. If you are on linux and run "file" on it, it will show up as an ELF32 binary. Changing the runtimeidentifier to "linux-arm" will compile it for the pi and bashbunny. Enjoy. Link to comment Share on other sites More sharing options...
kuyaya Posted December 10, 2019 Share Posted December 10, 2019 Nice. Great Work! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.