Frequently Asked Questions

Share:

Native

  • The AxProtector option '-a' was used in the past to place the AxEngine at a previously reserved area during encryption.
    This was necessary when the application did not provide enough space to accommodate the AxEngine.
    Since AxProtector version 10.20 this option is no longer supported. An alternative way to still add the AxEngine to an application is described in KB-0322.
  • AxProtector offers various options for debugging protected applications.


    AxProtector Option -cce
    To examine a dump file of an encrypted application/dll compared to the original code, you should use the AxProtector -cce option when encrypting to preserve the storage addresses.

    In most cases, using the AxProtector -cce option is sufficient.

    AxProtector Option -ccn
    The AxProtector Option -ccn is necessary to debug a protected application. For this purpose the "Structure Exception Handling" is switched off during debugging. For security reasons, however, you can only use the AxProtector option -ccn, if you have a corresponding license in your FSB (Firm Security Box). This license is available from Support on request.

    Please make sure that all anti-debugger mechanisms are disabled when encrypting with AxProtector. Use the -cag0 option to do this.

    For security reasons, you should only use an application encrypted with the -ccn option for tests in your company and never give it to third parties. To avoid this, we recommend not to use the -ccn option.
  • Problem:
    Using an encrypted "fat binary", i.e. an application that contains 32-bit and 64-bit components, can cause problems on macOS.

    Solution:
    The application should be split for use/encryption to create "pure" 32-bit applications and pure 64-bit applications.
  • This message occurs during encryption with AxProtector, if there is not enough space in the application to accommodate the AxEngine.

    To fix this, you need to create your application with a larger FileAlignment.
    To set the Linker option 'FileAlignment' in the Visual Studio development environment, please proceed as follows:
    1.Open the project's Properties Pages dialog.
    For detailed information, see Working with Project Properties.
    2. Select the "Command Line" property page in the "Linker" directory.
    3. Enter the option name "/filealign:" and the size in the "additional options" field, e.g. /filealign:4096.
    4. Rebuild the application and repeat the encryption.
  • AxProtectorLin can be called for the evaluation Universal Firm Code 6000010 as follows - for further options see the AxProtector help):

    AxProtectorLin -x -kcm -f6000010 -p13 -cf0 -d:6.20 -fw:3.00 -sl -nl -cav -cas100 -car30,3 -v -cag17 -# -o: "encrypted_test.app" "test.app"

    -x links the static library of the license system with the application to be protected.
    -kcm Specifies the licensing system (CodeMeter) .
    -f Specifies the Firm Code (x) to use.
    -p Specifies the product code (x) to use.
    -cf Specifies the function code (x) of the function overview to be used.
    -d Specifies the minimum driver version (v).
    -fw Defines the minimum firmware version (v).
    -sl Specifies the search order of the subsystem when searching for licenses (local).
    -nl Specifies the access mode (Normal User Limit).
    -cav Adds a code integrity check to the automatically encrypted application.
    -cag Enables anti-debugging mechanisms (Anti-Debugging Checks, ADC).
    -cas Specifies the size of the protected application to be encrypted. You enter the length in percent from 0 to 100%.
    -# This option stands for automatic output to the AxProtector.log [//Documents and Settings\User] file.
    -car30,3 Adds a runtime check to the automatic encryption.
    -v Enables verbose mode.
    -o Specifies the path and name of the encrypted target file.
  • Please proceed as follows:
    1. Export the created AxProtector project.
    You will receive a *.wbc file.
    2. Edit the file, i.e. add functions or DLLs to be
    excluded, e.g.
    [WIBU-SYSTEMS Control File]
    Guid={00090000-0000-1100-8005-0000C06B5161}
    ...
    [Commandline]
    ...
    [Exclude Functions]
    Function1=getc
    Function2=putc
    Function3=fread
    Function4=fwrite
    ...
    [Exclude DLLs]
    Dll1=KERNEL32.dll
    Dll2=USER32.dll
    Dll3=GDI32.dll
    ...
    3. Calling AxProtector with adjusted
    AxProtector parameters of the *.wbc file, e.g.
    AxProtector.exe @test.wbc
  • To be able to mark certain functions for IxProtector, the function must be exported during compilation. Only then can IxProtector find the function in the binary.
    For marking the macro WUPIDECLFUNC from the wibuixap.h can be used.

    Also, if you compile with C++, the exported name may be more complicated than the one in the original source code. This happen because of "name mangeling" (also called "name decoration") where the compiler adds additional information to the function name.
    Here extern "C" can help.
    For example: extern "C" WUPIDECLFUNC wchar_t* HexConversion(wchar_t* ctext);

    To read the exported symbols once from a compiled binary, you can use the "dumpbin" application on Windows that is available in the Visual Studio command line.
    E.g.: dumpbin /exports SamplePlugin.dll

    Dump of file SamplePlugin.dll
    File Type: DLL
    Section contains the following exports for SamplePlugin.dll

    00000000 characteristics
    5CA39B12 time date stamp Tue Apr 2 19:25:38 2019
    0.00 version
    1 ordinal base
    3 number of functions
    3 number of names

    ordinal hint RVA name

    1 0 00001030 ??0CSamplePlugInApp@@QAE@XZ
    2 1 00001040 ??4CSamplePlugInApp@@QAEAAV0@ABV0@@@Z (<- Example for "name mangeling")
    3 2 00001EA0 HexConversion
To top