/

License Binding Detection

Protection Module: LicenseBinding

Detects changes in hardware fingerprint to prevent license key sharing and unauthorized hardware transfers.

Available for:

  • Desktop Applications
  • Mobile Applications
  • Server Applications

How It Works

License Binding creates a unique hardware fingerprint and validates it on each application start or on-demand.

Fingerprint Components:

  • CPU Information - Processor ID, core count, features
  • Motherboard - Serial number, manufacturer, model
  • MAC Addresses - Primary network adapter
  • Hard Drive - Serial numbers, volume IDs
  • BIOS/UEFI - Serial number, version
  • GPU - Device ID (optional)
  • Mobile Device ID - IMEI, Android ID, IDFV (iOS)

Detection Scenarios:

  • License key transferred to different machine
  • Hardware component replacement (motherboard, CPU)
  • Virtual machine cloning
  • License sharing between multiple devices

Configuration

JSON Configuration

JSON
{
  "protections": {
    "LicenseBinding": {
      "enabled": true,
      "action": "close",
      "config": {
        "allowedChanges": 2,
        "strictMode": false,
        "components": ["cpu", "motherboard", "mac", "hdd"]
      }
    }
  }
}

Code-Based Configuration

C#
await Payload.ConfigureAsync(config =>
{
    config.AddProtection(
        ProtectionModuleType.LicenseBinding,
        ActionType.Close,
        new
        {
            allowedChanges = 2,
            strictMode = false,
            components = new[] { "cpu", "motherboard", "mac", "hdd" }
        }
    );
});

Available Actions

ActionBehaviorRecommended For
CloseTerminate applicationStrict licensing
CustomExecute validation logicReactivation prompts
LogRecord change and continueAnalytics

Configuration Parameters

ParameterDescriptionDefault
allowedChangesNumber of components that can change2
strictModeRequire exact match (0 changes)false
componentsHardware components to trackAll
cloudValidationValidate with backend serverfalse
gracePeriodDaysDays to allow after change0

Fingerprint Components

JSON
{
  "components": [
    "cpu",        // Processor ID
    "motherboard", // Motherboard serial
    "mac",        // Network adapter MAC
    "hdd",        // Hard drive serial
    "bios",       // BIOS serial
    "gpu",        // Graphics card (optional)
    "deviceId"    // Mobile device ID
  ]
}

When to Use

Recommended for:

  • Commercial desktop software with node-locked licenses
  • Enterprise applications with hardware binding
  • Development tools (IDEs, compilers)
  • Professional creative software
  • Server applications with CPU-based licensing

Not recommended for:

  • Consumer apps without licensing
  • Free/open-source software
  • Web applications (use different validation)

Code Examples

Basic License Validation

C#
config.RegisterCustomAction("license-validation", async (threat) =>
{
    var changedComponents = threat.Metadata["changedComponents"] as string[];
    var changeCount = (int)(threat.Metadata["changeCount"] ?? 0);

    await LogSecurityEventAsync("license_binding_violation", new
    {
        ChangedComponents = changedComponents,
        ChangeCount = changeCount,
        MachineId = Environment.MachineName
    });

    var result = await ShowLicenseDialog(
        "Hardware Change Detected",
        $"Your hardware configuration has changed ({changeCount} components). " +
        "Please reactivate your license or contact support."
    );

    if (result == DialogResult.Reactivate)
    {
        await ReactivateLicenseAsync();
    }
    else
    {
        Environment.Exit(-1);
    }
});

Cloud-Based Validation

C#
config.RegisterCustomAction("cloud-license-check", async (threat) =>
{
    var currentFingerprint = threat.Metadata["currentFingerprint"]?.ToString();
    var storedFingerprint = threat.Metadata["storedFingerprint"]?.ToString();

    // Validate with backend
    var response = await LicenseApiClient.ValidateHardwareAsync(new
    {
        LicenseKey = CurrentLicense.Key,
        CurrentFingerprint = currentFingerprint,
        StoredFingerprint = storedFingerprint
    });

    if (response.IsValid)
    {
        // Update stored fingerprint
        await UpdateStoredFingerprintAsync(currentFingerprint);
        return;
    }

    if (response.CanReactivate)
    {
        await ShowReactivationDialogAsync();
    }
    else
    {
        await ShowLicenseViolationMessageAsync(
            "This license key is already in use on another device. " +
            "Please purchase an additional license or deactivate the other device."
        );
        Environment.Exit(-1);
    }
});

Grace Period Implementation

C#
config.RegisterCustomAction("license-grace-period", async (threat) =>
{
    var lastChangeDate = await GetLastHardwareChangeDateAsync();
    var gracePeriodDays = 7;

    if (lastChangeDate.HasValue)
    {
        var daysSinceChange = (DateTime.UtcNow - lastChangeDate.Value).TotalDays;

        if (daysSinceChange < gracePeriodDays)
        {
            var remainingDays = (int)(gracePeriodDays - daysSinceChange);

            await ShowWarningAsync(
                "Hardware Change Detected",
                $"Please reactivate your license within {remainingDays} days."
            );
            return;
        }
    }

    // Grace period expired
    await RecordHardwareChangeAsync();
    await ShowReactivationRequiredDialogAsync();
});

Strict vs Flexible Mode

Strict Mode (0 changes allowed)

JSON
{
  "config": {
    "strictMode": true,
    "allowedChanges": 0
  }
}

Use for:

  • High-value software
  • Per-device licensing
  • Preventing any hardware transfer

Flexible Mode (N changes allowed)

JSON
{
  "config": {
    "strictMode": false,
    "allowedChanges": 2
  }
}

Use for:

  • Consumer software
  • Allowing component upgrades (RAM, HDD)
  • Normal hardware maintenance

Mobile Device Binding

Android

C#
config.RegisterCustomAction("android-device-binding", async (threat) =>
{
    var storedDeviceId = await SecureStorage.GetAsync("device_id");
    var currentDeviceId = Android.Provider.Settings.Secure.GetString(
        context.ContentResolver,
        Android.Provider.Settings.Secure.AndroidId
    );

    if (storedDeviceId != currentDeviceId)
    {
        await ShowDialogAsync(
            "Device Mismatch",
            "This license is bound to a different device."
        );
        Environment.Exit(-1);
    }
});

iOS

C#
config.RegisterCustomAction("ios-device-binding", async (threat) =>
{
    var storedDeviceId = await SecureStorage.GetAsync("device_id");
    var currentDeviceId = UIDevice.CurrentDevice.IdentifierForVendor.AsString();

    if (storedDeviceId != currentDeviceId)
    {
        var alert = UIAlertController.Create(
            "Device Mismatch",
            "This license is bound to a different device.",
            UIAlertControllerStyle.Alert
        );

        alert.AddAction(UIAlertAction.Create("Exit", UIAlertActionStyle.Default,
            _ => Thread.CurrentThread.Abort()
        ));

        await PresentViewControllerAsync(alert, true);
    }
});

Platform Compatibility

PlatformSupportFingerprint Components
WindowsCPU, Motherboard, MAC, HDD, BIOS
LinuxCPU, MAC, HDD, DMI
macOSCPU, Serial Number, MAC
AndroidAndroid ID, IMEI (with permission)
iOSIDFV, Device Model

Best Practices

  1. Allow Component Upgrades
C#
// Don't bind to components users commonly upgrade
components = new[] { "cpu", "motherboard" }; // Exclude HDD, RAM
  1. Provide Reactivation Option
C#
// Always offer a way to reactivate after legitimate hardware changes
await ShowReactivationDialog();
  1. Use Cloud Validation for Critical Apps
C#
// Validate with your licensing server
var isValid = await LicenseServer.ValidateAsync(fingerprint, licenseKey);
  1. Grace Period for User Convenience
C#
// Allow 7 days for users to reactivate after hardware change
gracePeriodDays = 7;

Threat Detection Details

JSON
{
  "threatId": "LIC-2025-12-28-7890",
  "description": "Hardware fingerprint mismatch detected",
  "moduleType": "LicenseBinding",
  "detectedAt": "2025-12-28T19:00:00Z",
  "confidence": 1.0,
  "metadata": {
    "storedFingerprint": "ABC123DEF456",
    "currentFingerprint": "XYZ789GHI012",
    "changedComponents": ["motherboard", "cpu", "bios"],
    "changeCount": 3,
    "allowedChanges": 2,
    "strictMode": false
  }
}

Custom Actions

License validation logic

Actions

Configure responses

Previous
Network Tampering