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.Monitorpackage - Application type: Console, WPF, WinForms, or any standalone .NET application
Step 1: Install the Package
Bash
dotnet add package ByteHide.Monitordotnet add package ByteHide.MonitorStep 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();
}
}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);
});
}
}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());
}
}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 rundotnet runMonitor is now active and running background detection checks at the configured interval.
Recommended Protections for Desktop
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);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);