logo_wupi_64x64px WupiCheckDebugger

WupiCheckDebugger checks if there is a debugging process attached to the protected application.

  • C, C++
  • C#

Syntax

int WupiCheckDebugger(int iLicenseList, int nLevel);

Parameters

•iLicenseList refers to the license list index.

•nLevel specifies the anti debugging level. The debug levels can be combined:

•Level 0: No debugger check.

•Level 1: Basic debugger check.

•Level 2: Kernel debugger check.

•Level 4: Advanced debugger check.

•Level 8: IDE debugger check. No debugger is allowed at all.

•Level 16: Entry is disabled if debugger is detected. The entry in CmContainer/WibuBox may have to be prepared for using this feature. See Remarks for details.

•Level 32: Generic debugger detection is activated.

information_weiss_klein26

Please note that this checking function makes sense only, if you defined the AxProtector encrypting option -cag32 (adds a mechanism to the application preventing the attachment of a debugger program to the application at runtime; generic debugger detection).

•Level 64: Virtual machine detection. It is not allowed to run the software within a virtual machine.

•Level 128: Hardware locking is only done if Firm Access Counter is not 65535 (0xffff). Can only be used in combination with Level 16; only respected for CmContainer. See Remarks for details.

•Level 256: Firm Access Counter is decreased by 1. Can only be used in combination with Level 16; only respected for CmContainer. See Remarks for details.

Return

This function returns TRUE (1), if a debugger was found, otherwise FALSE (0). If level 16 is included, the function will never return but the application will exit immediately after the entry has been disabled.

If a debugger is detected, error wibu::UpiErrorDebuggerDetected (-5) will by returned by WupiGetLastError

Notes on Hardware Locking

CodeMeter: For CmContainer there are three different possibilities to configure hardware locking:

•Automatic mode (Level 16): If Firmware is 1.14 or higher, the Firm Item is locked immediately by setting Firm Access Counter (FAC) to 0. For Firmware less 1.14 the FAC is decreased by 1, if FAC is activated (FAC <> 65535).

•Automatic mode only, if Firm Access Counter (FAC) is defined (Level 144=16+128): If FAC is activated (FAC <> 65535), it is tried to lock the hardware: If Firmware is 1.14 or higher, the Firm Item is locked immediately by setting FAC to 0. For Firmware less 1.14 the FAC is decreased by 1.

•Old mode: Reduce Firm Access Counter (FAC) (Level 272=16+256): If FAC is activated (FAC <> 65535), the Firm Access Counter is decreased by 1.

WibuKey: Hardware locking for WibuKey is realized by decrementing the Unit Counter of the entry. Therefore the entry must have a Unit Counter, recommended value is 1. If the Unit Counter is 0, the entry no longer can be used for standard encryption operations.

Not yet implemented in C#.