Skip to content

Generating a Stageless .NET Assembly

byt3bl33d3r edited this page Aug 14, 2019 · 7 revisions

Generating a Stageless .NET Assembly

It's possible to generate stageless payloads although as of writing the process is not automated and a little tedious.

  • Download ILMerge & the latest Boolang release to a Windows box

  • Open stage.boo in any text editor

  • Open the desired C2 channel from the teamserver/comms directory in any text editor

  • Replace line 63 in the stage.boo file with the previously opened C2 Channel

  • Compile stage.boo using the Boo Compiler with the following command (depending on the selected C2 Channel you might have to add more assembly references to the -r parameter):

    • booc.exe -r:System.Web.Extensions stage.boo
  • Create a new executable with ILMerge so the resulting assembly will have the Boolang Dlls necessary for it to run with the following command:

ILMerge.exe /out:stageless.exe /v4 stage.exe Boo.Lang.dll Boo.Lang.Compiler.dll Boo.Lang.Extensions.dll Boo.Lang.Parser.dll