飘云阁

 找回密码
 加入我们

QQ登录

只需一步,快速开始

查看: 3763|回复: 8

[Other] 源码级代码保护工具——ASObfuscator (26.03.2020)

[复制链接]

该用户从未签到

发表于 2020-6-24 16:10:32 | 显示全部楼层 |阅读模式
ASPack Software releases new product for protection of C and C++ source code – ASObfuscator

Dear customers,
we are happy to introduce to you our new product – ASObfuscator.
It is designed to obfuscate (transform) the source code of C/C++ programs (supports standards C++98 and C++03) to protect them against reverse engineering.
After obfuscation, the code is reliably protected against potential analysis performed by man or machine.
We recommend ASObfuscator to those who wish to ensure their software with enhanced tamper resistance. For example, our obfuscator will be useful for providing security of DRM keys, protecting games from added external source code, and keeping source code safe during transfer/purchase operations.
HomePage: http://www.aspack.com/asobfuscator.html


ASObfuscator features
  • Game protection from tampering and malicious reverse engineering.
  • Source code protection when it is delivered to a third party.
  • Protection from loss of standard DRM keys.
  • Protection of a standard DRM client side.
  • Securing the implementation of custom DRM from reverse engineering.

ASObfuscator benefits
  • The high level of protection is provided by obfuscation of both the source code and the binary code.
  • The obfuscator supports more than 30 obfuscation methods. These methods can be enabled, disabled and adjusted independently. The most effective methods are the following:
    • conversion of C++ code into virtual machine code;
    • encryption of strings and arrays;
    • code conversion into a state machine;
    • insertion of dummy links;
    • merging of code sections.
  • An option to set different obfuscation rules for different parts of code.
  • ASObfuscator is a stand-alone application that is installed at the customer’s site.
  • Runs from the command line.

ASObfuscator can run on the following operating systems:
  • Windows 7 32/64-bit.
  • Windows 8/8.1 32/64-bit.
  • Windows 10 32/64-bit.
  • Windows Server 2008 R2.
  • Windows Server 2012.
  • Windows Server 2012 R2.
  • Windows Server 2016.
  • Windows Server 2019.
ASObfuscator can obfuscate source code for the following target platforms:


Example:

  1. #include <stdio.h>

  2. // Euclidian algorithm for calculating greatest common divisor (before obfuscation)
  3. int **( int n, int m )
  4. {
  5.         if( n < 1 || m < 1 ) return -1;
  6.         while( n != m )
  7.         {
  8.                 if( n > m ) n -= m;
  9.                 else m -= n;
  10.         }
  11.         return n;
  12. }

  13. // Tests in triplets { n, m, expected_**( n, m ) }
  14. int tests[][ 3 ] = {
  15.         { 1, 2, 1 },
  16.         { 3, 3, 3 },
  17.         { 42, 56, 14 },
  18.         { 249084, 261183, 111 },
  19. };

  20. // Perform tests
  21. int main( int, char*[] )
  22. {
  23.         printf( "Performing tests of ** function:\n" );
  24.         bool passed = true;
  25.         for( int i = 0; i < sizeof( tests ) / sizeof( tests[ 0 ] ); i++ )
  26.         {
  27.                 int n = tests[ i ][ 0 ];
  28.                 int m = tests[ i ][ 1 ];
  29.                 int expected_** = tests[ i ][ 2 ];
  30.                 int calculated_** = **( n, m );
  31.                 printf( "  %d. **( %d, %d ) = %d, ", i + 1, n, m, calculated_** );
  32.                 if( calculated_** == expected_** )
  33.                 {
  34.                         printf( "OK.\n" );
  35.                 }
  36.                 else
  37.                 {
  38.                         printf( "error.\n" );
  39.                         passed = false;
  40.                 }
  41.         }
  42.         printf( "Tests %s.\n", passed ? "passed" : "failed" );
  43.         return passed ? 0 : 1;
  44. }
复制代码


  1. #include <stdio.h>

  2. // Euclidian algorithm for calculating greatest common divisor (after obfuscation)
  3. int **( int n_0, int m_1 )
  4. {
  5.     bool temp_12;
  6.     unsigned int temp_13;
  7.     unsigned int temp_14;
  8.     unsigned int temp_15;
  9.     unsigned int temp_17;
  10.     int temp_26;
  11.     int temp_35;
  12.     bool temp_36;
  13.     unsigned int temp_37;
  14.     bool temp_38;
  15.     int temp_39;
  16.     int temp_40;
  17.     int temp_41;
  18.     int temp_42;
  19.     bool state0_43;
  20.     bool state1_44;
  21.     bool state2_45;
  22.     bool state3_46;
  23.     bool state4_47;
  24.     bool state5_48;
  25.     bool state6_49;
  26.     bool state7_50;

  27.     L1:
  28.     L0:
  29.     state0_43 = (bool)1;
  30.     state1_44 = (bool)state0_43;
  31.     state2_45 = (bool)state1_44;
  32.     state3_46 = (bool)state2_45;
  33.     goto L126;

  34.     L6:
  35.     temp_37 = ( unsigned int )(temp_17);
  36.     temp_38 = ( bool )( temp_36 == 0 );
  37.     if (state0_43) goto L158; else goto L40;

  38.     L14:
  39.     temp_41 = ( int )(temp_17);
  40.     temp_38 = ( bool )( temp_36 == 0 );
  41.     if (state0_43) goto L160; else goto L128;

  42.     L22:
  43.     temp_26 = ( int )(temp_41);
  44.     if (state4_47) goto L70; else goto L72;

  45.     L24:
  46.     temp_41 = (int)state6_49;
  47.     temp_42 = temp_41 - temp_40;
  48.     temp_26 = (int)temp_42;
  49.     temp_35 = temp_39 + temp_42;
  50.     temp_39 = (int)temp_35;
  51.     if (state1_44) goto L30; else goto L26;

  52.     L26:
  53.     temp_42 = ( int )( state0_43 == 0 );
  54.     temp_26 = temp_42 - temp_39;
  55.     temp_41 = (int)temp_26;
  56.     temp_35 = temp_40 + temp_26;
  57.     temp_40 = (int)temp_35;
  58.     goto L30;

  59.     L30:
  60.     temp_36 = temp_39 != temp_40;
  61.     if (temp_36) goto L22; else goto L82;

  62.     L38:
  63.     state1_44 = ( bool )( state5_48 == 0 );
  64.     temp_26 = temp_39 + temp_35;
  65.     temp_42 = ( int )( state5_48 == 0 );
  66.     temp_42 = temp_42 - temp_35;
  67.     temp_40 = temp_26 + temp_42;
  68.     temp_41 = (int)1495809726u;
  69.     // The next string is really just an assignment on 32bit platform
  70.     temp_41 = ( int )( ( size_t )( temp_41 ) + ( ( ( size_t )( temp_41 ) << 31 ) << 1 ) + ( ( ( ( size_t )( temp_41 ) << 31 ) << 1 ) >> 15 ) );
  71.     goto L44;

  72.     L40:
  73.     goto L128;

  74.     L42:
  75.     if (state3_46) goto L82; else goto L84;

  76.     L44:
  77.     temp_35 = temp_40 ^ temp_41;
  78.     temp_42 = (int)1495809726u;
  79.     if (state1_44) goto L6; else goto L100;

  80.     L46:
  81.     temp_41 = ( int )( state4_47 == 0 );
  82.     if (state3_46) goto L22; else goto L98;

  83.     L48:
  84.     // The next string is really just an assignment on 32bit platform
  85.     temp_41 = ( int )( ( size_t )( temp_41 ) + ( ( ( size_t )( temp_41 ) << 31 ) << 1 ) + ( ( ( ( size_t )( temp_41 ) << 31 ) << 1 ) >> 15 ) );
  86.     if (state7_50) goto L66; else goto L96;

  87.     L52:
  88.     temp_35 = temp_41 + temp_42;
  89.     if (state2_45) goto L76; else goto L94;

  90.     L54:
  91.     // The next string is really just an assignment on 32bit platform
  92.     temp_26 = ( int )( ( size_t )( temp_26 ) + ( ( ( size_t )( temp_26 ) << 31 ) << 1 ) + ( ( ( ( size_t )( temp_26 ) << 31 ) << 1 ) >> 15 ) );
  93.     if (state2_45) goto L14; else goto L102;

  94.     L56:
  95.     temp_36 = temp_39 <= temp_41;
  96.     temp_26 = ( int )(temp_17);
  97.     if (state5_48) goto L80; else goto L92;

  98.     L58:
  99.     temp_37 = (unsigned int)state6_49;
  100.     temp_42 = ( int )(temp_38);
  101.     if (state2_45) goto L48; else goto L90;

  102.     L60:
  103.     state2_45 = ( bool )( state6_49 == 0 );
  104.     temp_38 = (bool)0u;
  105.     if (temp_36) goto L74; else goto L146;

  106.     L62:
  107.     temp_35 = (int)0;
  108.     if (state3_46) goto L26; else goto L104;

  109.     L64:
  110.     temp_41 = ( int )(temp_17);
  111.     state3_46 = ( bool )( state6_49 == 0 );
  112.     state4_47 = ( bool )( state6_49 == 0 );
  113.     temp_35 = (int)state6_49;
  114.     temp_36 = temp_40 <= temp_35;
  115.     if (state0_43) goto L162; else goto L154;

  116.     L66:
  117.     state7_50 = (bool)state6_49;
  118.     state5_48 = (bool)state2_45;
  119.     temp_39 = (int)-1;
  120.     temp_40 = (int)1495809726u;
  121.     if (state6_49) goto L22; else goto L42;

  122.     L68:
  123.     temp_39 = (int)-1;
  124.     if (state7_50) goto L88; else goto L86;

  125.     L70:
  126.     temp_36 = temp_39 > temp_40;
  127.     temp_17 = ( unsigned int )(temp_36);
  128.     if (temp_36) goto L24; else goto L62;

  129.     L72:
  130.     temp_42 = temp_35 | temp_26;
  131.     temp_41 = temp_35 & temp_26;
  132.     temp_17 = ( unsigned int )(temp_42);
  133.     temp_37 = ( unsigned int )(temp_41);
  134.     temp_38 = temp_17 < temp_37;
  135.     if (temp_38) goto L154; else goto L148;

  136.     L74:
  137.     temp_35 = temp_39 - temp_40;
  138.     if (state3_46) goto L106; else goto L14;

  139.     L76:
  140.     temp_41 = ( int )( state0_43 == 0 );
  141.     temp_26 = temp_41 - temp_39;
  142.     temp_35 = temp_40 + temp_26;
  143.     temp_40 = (int)temp_35;
  144.     temp_36 = temp_39 != temp_40;
  145.     if (state2_45) goto L154; else goto L40;

  146.     L80:
  147.     temp_42 = temp_39 + temp_35;
  148.     temp_26 = (int)temp_42;
  149.     temp_40 = temp_42 - temp_35;
  150.     temp_13 = ( unsigned int )(state7_50);
  151.     temp_14 = (unsigned int)131u;
  152.     temp_13 = temp_13 * temp_14;
  153.     temp_14 = (unsigned int)1495809857u;
  154.     temp_13 = temp_14 - temp_13;
  155.     temp_41 = ( int )( ( ptrdiff_t )( ( temp_13 ) & 0xFFFFFFFF ) );
  156.     // The next string is really just an assignment on 32bit platform
  157.     temp_41 = ( int )( ( size_t )( temp_41 ) + ( ( ( size_t )( temp_41 ) << 31 ) << 1 ) + ( ( ( ( size_t )( temp_41 ) << 31 ) << 1 ) >> 15 ) );
  158.     if (state3_46) goto L164; else goto L152;

  159.     L82:
  160.     temp_17 = ( unsigned int )(temp_42);
  161.     // The next string is really just an assignment on 32bit platform
  162.     temp_40 = ( int )( ( size_t )( temp_40 ) + ( ( ( size_t )( temp_40 ) << 31 ) << 1 ) + ( ( ( ( size_t )( temp_40 ) << 31 ) << 1 ) >> 15 ) );
  163.     temp_35 = temp_39 ^ temp_40;
  164.     if (state7_50) goto L38; else goto L108;

  165.     L84:
  166.     // The next string is really just an assignment on 32bit platform
  167.     temp_40 = ( int )( ( size_t )( temp_40 ) + ( ( ( size_t )( temp_40 ) << 31 ) << 1 ) + ( ( ( ( size_t )( temp_40 ) << 31 ) << 1 ) >> 15 ) );
  168.     temp_35 = temp_39 ^ temp_40;
  169.     temp_41 = (int)1495809726u;
  170.     if (state5_48) goto L68; else goto L64;

  171.     L86:
  172.     // The next string is really just an assignment on 32bit platform
  173.     temp_41 = ( int )( ( size_t )( temp_41 ) + ( ( ( size_t )( temp_41 ) << 31 ) << 1 ) + ( ( ( ( size_t )( temp_41 ) << 31 ) << 1 ) >> 15 ) );
  174.     temp_17 = ( unsigned int )(temp_42);
  175.     if (state7_50) goto L68; else goto L110;

  176.     L88:
  177.     state7_50 = ( bool )( state0_43 == 0 );
  178.     temp_40 = (int)1495809726u;
  179.     state5_48 = ( bool )( state6_49 == 0 );
  180.     goto L42;

  181.     L90:
  182.     temp_38 = (bool)state2_45;
  183.     temp_17 = ( unsigned int )(temp_37);
  184.     goto L150;

  185.     L92:
  186.     state2_45 = (bool)state5_48;
  187.     temp_37 = (unsigned int)0u;
  188.     temp_17 = (unsigned int)0u;
  189.     state4_47 = ( bool )( state7_50 == 0 );
  190.     temp_26 = ( int )(temp_39);
  191.     goto L58;

  192.     L94:
  193.     temp_26 = (int)836078487u;
  194.     goto L156;

  195.     L96:
  196.     temp_39 = temp_35 ^ temp_41;
  197.     temp_17 = ( unsigned int )(temp_36);
  198.     return temp_39;

  199.     L98:
  200.     state2_45 = (bool)state6_49;
  201.     temp_42 = (int)836078487u;
  202.     // The next string is really just an assignment on 32bit platform
  203.     temp_42 = ( int )( ( size_t )( temp_42 ) + ( ( ( size_t )( temp_42 ) << 31 ) << 1 ) + ( ( ( ( size_t )( temp_42 ) << 31 ) << 1 ) >> 15 ) );
  204.     goto L52;

  205.     L100:
  206.     temp_36 = ( bool )(temp_39);
  207.     // The next string is really just an assignment on 32bit platform
  208.     temp_42 = ( int )( ( size_t )( temp_42 ) + ( ( ( size_t )( temp_42 ) << 31 ) << 1 ) + ( ( ( ( size_t )( temp_42 ) << 31 ) << 1 ) >> 15 ) );
  209.     state6_49 = (bool)state2_45;
  210.     temp_39 = temp_35 ^ temp_42;
  211.     return temp_39;

  212.     L102:
  213.     temp_41 = temp_35 - temp_26;
  214.     state2_45 = ( bool )( state3_46 == 0 );
  215.     state5_48 = ( bool )( state7_50 == 0 );
  216.     goto L56;

  217.     L104:
  218.     temp_42 = ( int )(temp_17);
  219.     state3_46 = (bool)state2_45;
  220.     temp_36 = temp_40 <= temp_35;
  221.     state4_47 = (bool)state0_43;
  222.     state5_48 = ( bool )( state6_49 == 0 );
  223.     if (temp_36) goto L54; else goto L30;

  224.     L106:
  225.     temp_17 = ( unsigned int )(temp_40);
  226.     temp_41 = temp_35 + temp_26;
  227.     goto L152;

  228.     L108:
  229.     temp_41 = (int)1495809726u;
  230.     goto L148;

  231.     L110:
  232.     temp_39 = temp_35 ^ temp_41;
  233.     return temp_39;

  234.     L122:
  235.     temp_39 = temp_41 - temp_26;
  236.     goto L30;

  237.     L126:
  238.     state4_47 = (bool)state3_46;
  239.     state5_48 = (bool)state4_47;
  240.     state6_49 = ( bool )( state5_48 == 0 );
  241.     state7_50 = ( bool )( state6_49 == 0 );
  242.     goto L40;

  243.     L128:
  244.     state3_46 = ( bool )( state7_50 == 0 );
  245.     temp_40 = (int)m_1;
  246.     temp_39 = (int)n_0;
  247.     goto L46;

  248.     L144:
  249.     temp_36 = temp_39 > temp_40;
  250.     if (temp_36) goto L146; else goto L52;

  251.     L146:
  252.     temp_36 = ( bool )(temp_37);
  253.     temp_42 = ( int )(temp_17);
  254.     temp_41 = ( int )(temp_39);
  255.     temp_17 = ( unsigned int )(temp_40);
  256.     if (state3_46) goto L74; else goto L44;

  257.     L148:
  258.     if (state7_50) goto L144; else goto L58;

  259.     L150:
  260.     if (state2_45) goto L44; else goto L60;

  261.     L152:
  262.     temp_38 = ( bool )(temp_17);
  263.     temp_37 = ( unsigned int )(temp_41);
  264.     temp_36 = ( bool )(temp_38);
  265.     if (state4_47) goto L122; else goto L62;

  266.     L154:
  267.     temp_17 = ( unsigned int )(temp_36);
  268.     if (temp_36) goto L156; else goto L56;

  269.     L156:
  270.     if (state2_45) goto L46; else goto L54;

  271.     L158:
  272.     if (temp_38) goto L152; else goto L64;

  273.     L160:
  274.     if (temp_38) goto L48; else goto L86;

  275.     L162:
  276.     state5_48 = ( bool )( state6_49 == 0 );
  277.     if (temp_36) goto L14; else goto L30;

  278.     L164:
  279.     state1_44 = ( bool )( state3_46 == 0 );
  280.     goto L150;

  281. }

  282. // Tests in triplets { n, m, expected_**( n, m ) }
  283. int tests[][ 3 ] = {
  284.         { 1, 2, 1 },
  285.         { 3, 3, 3 },
  286.         { 42, 56, 14 },
  287.         { 249084, 261183, 111 },
  288. };

  289. // Perform tests
  290. int main( int, char*[] )
  291. {
  292.         printf( "Performing tests of ** function:\n" );
  293.         bool passed = true;
  294.         for( int i = 0; i < sizeof( tests ) / sizeof( tests[ 0 ] ); i++ )
  295.         {
  296.                 int n = tests[ i ][ 0 ];
  297.                 int m = tests[ i ][ 1 ];
  298.                 int expected_** = tests[ i ][ 2 ];
  299.                 int calculated_** = **( n, m );
  300.                 printf( "  %d. **( %d, %d ) = %d, ", i + 1, n, m, calculated_** );
  301.                 if( calculated_** == expected_** )
  302.                 {
  303.                         printf( "OK.\n" );
  304.                 }
  305.                 else
  306.                 {
  307.                         printf( "error.\n" );
  308.                         passed = false;
  309.                 }
  310.         }
  311.         printf( "Tests %s.\n", passed ? "passed" : "failed" );
  312.         return passed ? 0 : 1;
  313. }
复制代码


PYG19周年生日快乐!
  • TA的每日心情
    开心
    2024-3-27 22:26
  • 签到天数: 387 天

    [LV.9]以坛为家II

    发表于 2020-6-24 20:58:40 | 显示全部楼层
    高手啊,看不明白,先学习了,谢谢
    PYG19周年生日快乐!
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    无聊
    2024-1-8 11:54
  • 签到天数: 112 天

    [LV.6]常住居民II

    发表于 2020-6-27 00:40:47 | 显示全部楼层
    高手啊,看不明白,先学习了,谢谢
    PYG19周年生日快乐!
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    昨天 09:27
  • 签到天数: 2091 天

    [LV.Master]伴坛终老

    发表于 2020-6-27 01:23:08 | 显示全部楼层
    看不懂,大体猜到这软件在程序代码里面加入了一些没有用的代码。
    PYG19周年生日快乐!
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    昨天 23:16
  • 签到天数: 1407 天

    [LV.10]以坛为家III

    发表于 2020-6-27 23:15:12 | 显示全部楼层
    高大上, 可惜看不明白,先标识一下
    PYG19周年生日快乐!
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2021-7-27 17:21
  • 签到天数: 9 天

    [LV.3]偶尔看看II

    发表于 2020-6-28 10:56:28 | 显示全部楼层
    从当前代码保护效果上看,应该只是个虚假控制流而已
    PYG19周年生日快乐!
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2024-4-16 21:13
  • 签到天数: 498 天

    [LV.9]以坛为家II

    发表于 2020-6-28 11:12:29 | 显示全部楼层
    只有官方介绍???
    PYG19周年生日快乐!
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    昨天 10:25
  • 签到天数: 851 天

    [LV.10]以坛为家III

    发表于 2020-6-28 11:55:48 | 显示全部楼层
    看不懂就先标记下                                    
    PYG19周年生日快乐!
    回复 支持 反对

    使用道具 举报

  • TA的每日心情

    2020-9-20 14:30
  • 签到天数: 38 天

    [LV.5]常住居民I

    发表于 2020-6-28 16:41:52 | 显示全部楼层
    太难了,vm到处都是了
    PYG19周年生日快乐!
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 登录 | 加入我们

    本版积分规则

    快速回复 返回顶部 返回列表