/

Desktop Application Installation

Install ByteHide Monitor in your .NET desktop application for runtime protection against debuggers, VM detection, tampering, and more.


Requirements

  • .NET 6.0+ or .NET Framework 4.6.2+
  • NuGet: ByteHide.Monitor package
  • Application type: Console, WPF, WinForms, or any standalone .NET application

Step 1: Install the Package

Bash
dotnet add package ByteHide.Monitor

Step 2: Configure Monitor

Console Application

C#
using Bytehide.Monitor.Core.Actions;
using Bytehide.Monitor.Core.Protection;

class Program
{
    static async Task Main(string[] args)
    {
        await Bytehide.Monitor.Payload.ConfigureAsync(config =>
        {
            config.EnableDesktopProtections(ActionType.Close, intervalMs: 60000);
        });

        // Your application logic
        Console.WriteLine("Application running with Monitor protection");
        Console.ReadKey();
    }
}

WPF Application

C#
using Bytehide.Monitor.Core.Actions;

public partial class App : Application
{
    protected override async void OnStartup(StartupEventArgs e)
    {
        base.OnStartup(e);

        await Bytehide.Monitor.Payload.ConfigureAsync(config =>
        {
            config.EnableDesktopProtections(ActionType.Close, intervalMs: 60000);
        });
    }
}

WinForms Application

C#
using Bytehide.Monitor.Core.Actions;

static class Program
{
    [STAThread]
    static async Task Main()
    {
        await Bytehide.Monitor.Payload.ConfigureAsync(config =>
        {
            config.EnableDesktopProtections(ActionType.Close, intervalMs: 60000);
        });

        ApplicationConfiguration.Initialize();
        Application.Run(new MainForm());
    }
}

Step 3: Run

Bash
dotnet run

Monitor is now active and running background detection checks at the configured interval.


C#
config.AddProtection(ProtectionModuleType.DebuggerDetection, ActionType.Close, intervalMs: 30000);
config.AddProtection(ProtectionModuleType.VirtualMachineDetection, ActionType.Close, intervalMs: 120000);
config.AddProtection(ProtectionModuleType.TamperingDetection, ActionType.Close, intervalMs: 60000);
config.AddProtection(ProtectionModuleType.ProcessInjection, ActionType.Close, intervalMs: 60000);
config.AddProtection(ProtectionModuleType.MemoryDumpDetection, ActionType.Close, intervalMs: 60000);
config.AddProtection(ProtectionModuleType.RemoteDesktop, ActionType.Log, intervalMs: 60000);

Next Steps

Previous
ASP.NET Framework