Compilation Instructions
Compile Instructions
We are not planning on releasing binaries for Rubeus, so you will have to compile yourself :)
Rubeus has been built against .NET 3.5 and is compatible with Visual Studio 2019 Community Edition. Simply open up the project .sln, choose "Release", and build.
Targeting other .NET versions
Rubeus' default build configuration is for .NET 3.5, which will fail on systems without that version installed. To target Rubeus for .NET 4 or 4.5, open the .sln solution, go to Project -> Rubeus Properties and change the "Target framework" to another version.
Sidenote: Building Rubeus as a Library
To build Rubeus as a library, under Project -> Rubeus Properties -> change Output type to Class Library. Compile, and add the Rubeus.dll as a reference to whatever project you want. Rubeus functionality can then be invoked as in a number of ways:
You can then use ILMerge to merge the Rubeus.dll into your resulting project assembly for a single, self-contained file.
Sidenote: Running Rubeus Through PowerShell
If you want to run Rubeus in-memory through a PowerShell wrapper, first compile the Rubeus and base64-encode the resulting assembly:
Rubeus can then be loaded in a PowerShell script with the following (where "aa..." is replaced with the base64-encoded Rubeus assembly string):
The Main() method and any arguments can then be invoked as follows:
Or individual functions can be invoked:
Sidenote Sidenote: Running Rubeus Over PSRemoting
Due to the way PSRemoting handles output, we need to redirect stdout to a string and return that instead. Luckily, Rubeus has a function to help with that.
If you follow the instructions in Sidenote: Running Rubeus Through PowerShell to create a Rubeus.ps1, append something like the following to the script:
You should then be able to run Rubeus over PSRemoting with something like the following:
Alternatively, Rubeus' /consoleoutfile:C:\FILE.txt
argument will redirect all output streams to the specified file.
Last updated