Skip to main content

Overview

Rubeus is designed to be compiled from source rather than distributed as pre-built binaries. This approach helps avoid signature-based detection and allows for customization based on specific operational requirements.
Pre-compiled binaries are intentionally not provided to reduce signature-based detection and encourage understanding of the tool’s functionality.

Prerequisites

Required Software:
  • Visual Studio 2017 or later
  • .NET Framework 3.5+ or .NET Core
  • Git for source code management
Optional Tools:
  • Visual Studio Code (alternative IDE)
  • MSBuild command line tools
  • NuGet package manager
Framework Options:
  • .NET Framework 3.5 - Maximum compatibility
  • .NET Framework 4.0 - Balanced compatibility
  • .NET Framework 4.5+ - Modern features
  • .NET Core - Cross-platform support
Compatibility Considerations:
  • .NET 3.5 works on Windows 7+ systems
  • .NET 4.0+ provides better performance
  • .NET Core enables Linux/macOS compilation

Compilation Steps

1

Clone Repository

2

Open in Visual Studio

  • Open Rubeus.sln in Visual Studio
  • Select appropriate build configuration
  • Choose target framework if needed
3

Build Solution

4

Locate Output

Compiled binary will be in:
  • bin\Release\Rubeus.exe (Release build)
  • bin\Debug\Rubeus.exe (Debug build)

Build Configurations

Release Configuration:
  • Optimized for size and performance
  • No debug symbols included
  • Recommended for operational use
  • Smaller file size
Debug Configuration:
  • Includes debug symbols
  • Easier troubleshooting
  • Larger file size
  • Useful for development
Modify Target Framework:
  1. Open project properties
  2. Select “Application” tab
  3. Change “Target framework” dropdown
  4. Rebuild solution
Framework-Specific Considerations:

Command Line Compilation

Basic Compilation:
Advanced Options:
Basic Commands:
Framework-Specific:

Building as a Library

Purpose:
  • Integrate Rubeus functionality into other tools
  • Create custom wrappers
  • Embed in larger frameworks
Configuration:
  1. Change output type to “Class Library”
  2. Remove Main() method or make conditional
  3. Expose public methods for external use
  4. Build as .dll instead of .exe
Reference Assembly:
NuGet Package Creation:

Cross-Platform Compilation

Linux Targeting:
macOS Targeting:
Windows Targeting:

Optimization and Customization

Reduce Binary Size:
Remove Unused Features:
  • Comment out unused command classes
  • Remove unnecessary dependencies
  • Strip debug information
Branding Changes:
  • Modify banner text in Program.cs
  • Change assembly metadata
  • Update version information
Feature Modification:
  • Add custom commands
  • Modify existing functionality
  • Integrate with other tools
Obfuscation:
  • Use .NET obfuscators
  • Modify string constants
  • Change method names and signatures

PowerShell Integration

Load Assembly:
Execute Commands:
Remote Execution:
Limitations:
  • PowerShell execution policy restrictions
  • AMSI interference
  • Constrained language mode
  • Network connectivity requirements

Troubleshooting

Missing Dependencies:
Framework Issues:
NuGet Package Issues:
Framework Not Installed:
  • Install required .NET Framework version
  • Use self-contained deployment
  • Check Windows version compatibility
Permission Issues:
  • Run as administrator when required
  • Check antivirus interference
  • Verify code signing if required

Operational Considerations

Compiled binaries may be detected by antivirus software. Consider operational security implications before deployment.
Build Variations:
  • Compile with different frameworks
  • Modify source code slightly
  • Use different build configurations
  • Apply obfuscation techniques
Deployment Methods:
  • In-memory execution via PowerShell
  • DLL injection techniques
  • Reflective loading methods
  • Process hollowing approaches