.net reactor用法详解

    学无止境 ImbaQ 56132次浏览 0个评论

    .net的混淆工具,百度了网上大部分的用法看起来都是同一个copy/paste的,而且大多讲的是如何用这货进行授权管理,显然这不是我要找的答案。

    用法介绍一图流:

    .net reactor用法详解

    设置选项中英对照:

    NecroBit:把程序集转为非托管代码(就是加一个壳,运行时还是必须的。)

    Native Exe File:生成本机 exe 文件

    Anti ILDASM:防止反编译

    Obfuscation:混淆

    Create Mapping File:创建地图文件

    Anti Tampering:防篡改

    String Encryption:加密字符

    Compress & Encrypt Resources:压缩并加密资源

    Control FlowObfuscation:混淆控制流级别设置

    如果不知道该勾选那几个net reactor提供了一些预设的选项:

    .net reactor用法详解

    分别是各类型的标准及最强的加密方案,点击选用即可。

    最后点右侧的Protect就完成了混淆保护。会在你保护的项目同级文件夹下生成一个XXXXXX_Secure文件夹,里面的文件就是已经混淆过的。

    要是每次新生成之后都要打开net reactor执行一遍如上操作那还不蛋疼的要死,我最初找这货用法教程时就是想在生成项目的同时混淆保护也就完成了,无赖没有一个答案啊。

    自己折腾后发现Help菜单里面有各个版本VS的Add-In,我用的VS2013先安装上,然后打开VS工具菜单会多出一个.Net Reactor:

    .net reactor用法详解

    选择你要保护的项目,勾选Enabled,当你生成或者运行项目时,net reactor就同时完成了它的工作。详细的功能是通过Command Line Parameters完成的,至于具体的命令行参数可以在chm里面找到:

    Command Line Parameters
     

    You can also access the functionality of .NET Reactor through command-line parameters.

    General Arguments Description
    -file <file> Filename of the main assembly.
    -icon <file> If you want to use a different icon for an application you need to set the path for the icon here.
    -masterkey <text>Master Key (used ONLY for Lock settings).
    -masterkeyfile <file>Path to a Master Key file (used ONLY for Lock settings).
     -embed [1/0]Embed assemblies.
    [1] = Enable
    [0] = Disable {default}
     -merge [1/0]Merge assemblies.
    [1] = Enable
    [0] = Disable {default}
     -mono [1/0]Enable this option if your assembly targets Mono.
    [1] = Enable
    [0] = Disable {default}
    -project <file> Path to a .NET Reactor project file (contains the Master Key as well).
    -q[uiet]Specifies quiet mode; suppresses the display of success messages
    -satellite_assemblies <lib/lib> Please define additional files here. If ‘-embed 1’ or ‘-merge 1’ is set, the additonal files are embedded into your application or they are directly merged with the main assembly. In case neither ‘-embed 1’ nor ‘-merge 1’ is set the Additional Files (*.dll and *.exe files only) are protected separately.
    [library / library] for example “C:\lib1.dll/C:\lib2.dll/C:\lib3.dll”
    -snkeypair <file> Strong Name Key Pair file (.snk/.pfx)
    -snpassword <text> Strong Name Key Pair file password
    -targetfile <file> Target File should be left blank, unless you want to specify the location of the protected output.
    Arguments 
    1. General Settings 
      Application Settings  
         Automatic Exception Handling  
          -exception_handling [1/0] If you don’t want your protected application to catch exceptions automatically, set this option to False(“0”).
    [1] = Enable {default}
    [0] = Disable
         Compression 
         -compression [1/0] If set to True(“1”), .NET Reactor will compress your .exe file and embedded files saving space on disk and bandwidth if you provide your code for internet download.
    [1] = Enable {default}
    [0] = Disable
         Show Loading Screen  
          -showloadingscreen [1/0]Enable/Disable the LoadingScreen
    [1] = Enable
    [0] = Disable {default}
      Digital Certificate  
         PVK Filename  
          -pvkfile <file>Private Key File.
         PFX/PVK Password  
          -pvkpassword <text>Private Key File Password.
         PFX/SPC File Name  
          -spcfile <file>Software Publisher Certificate File.
      Enable Visual Styles  
      -visualstyles [1/0]If you wish to use visual styles (which are a feature of Windows Xp and Windows Vista), you will need to set this option to True. If set to false, any attempt in your assembly to enable visual styles will be ineffective.
    [1] = Enable {autoselect}
    [0] = Disable {autoselect}
      Force Admin Privileges  
      -admin [1/0]If your software requires administrator privileges under Windows Vista/7 you need to set this option to true. In this case a consent dialog is shown in Windows Vista/7.
    [1] = Enable
    [0] = Disable {default}
      Merge Assemblies  
      -merge [1/0] Merge Assemblies
    [1] = Enable
    [0] = Disable {default}
      Pack Assemblies 
      -embed [1/0] Embed Assemblies
    [1] = Enable
    [0] = Disable {default}
      Strong Name 
         KeyPair File  
          -snkeypair <file><file>Strong Name Key Pair file (.snk/.pfx)
         KeyPair Password  
          -snpassword <text>Strong Name Key Pair file password
      Target File  
      -targetfile <file> .NET Reactor creates a new file containing your protected assembly. This field allows you to specify the path and name of that file. If left blank, .NET Reactor will write the new file to a default location.
    2. Protection Settings 
      Anti Tampering 
      -antitamp [1/0]This option prevents your protected assembly from being tampered by hacker tools.
    [1] = Enable
    [0] = Disable {default}
      Control Flow Obfuscation  
      -control_flow_obfuscation [1/0]Enable “Control Flow Obfuscation” to mangle program flow, making it extremely difficult for humans to follow the program logic. Most decompiler are unable to decompile control flow obfuscated methods.
    [1] = Enable
    [0] = Disable {default}
      Control Flow Obfuscation Level  
          -flow_level [1/2/3/4/5/6/7/8/9]This option enables you to control the level of Control Flow Obfuscation. While “1” represents the lowest level of Control Flow Obfuscation, “9” {default} represents the strongest level.
      Native EXE File 
      -nativeexe [1/0].NET Reactor is able to generate a native x86 EXE file stub for your application. This way it is not possible to directly open your protected application in a decompiler. The decompiler recognizes your protected application as a native EXE file.
    [1] = Enable
    [0] = Disable {default}
      NecroBit Protection 
      -necrobit [1/0]Enable this option to use NecroBit protection. NecroBit can be used with both Application and Library protection mode. In Library protection mode an additional file will be created.
    [1] = Enable
    [0] = Disable {default}
      NecroBit/Reflection Compatibility Mode 
      -necrobit_comp [1/0]If you have problems with reflection on NecroBit protected libraries you should enable this option.
    [1] = Enable
    [0] = Disable {default}
      Obfuscation 
         Create Mapping File  
          -mapping_file [1/0]Enable Mapping file to create a file which cross reference unobfuscated names with obfuscated ones, which is used by the Stack Trace Deobfuscator.
    [1] = Enable
    [0] = Disable {default}
         Enabled 
          -obfuscation [1/0]Enable this to obfuscate all non public class and member names.
    [1] = Enable {default}
    [0] = Disable
         Incremental Obfuscation  
          -incremental_obfuscation [1/0]If you want .NET Reactor always to generate the same obfuscation strings for your type and member names, you need to enable this option.
    [1] = Enable
    [0] = Disable {default}
         Exclusions 
          -exclude_enums [1/0]Exclusions – Enums
    [1] = Enable
    [0] = Disable {default}
          -exclude_events [1/0]Exclusions – Events
    [1] = Enable
    [0] = Disable {default}
          -exclude_fields [1/0]Exclusions – Fields
    [1] = Enable
    [0] = Disable {default}
          -exclude_methods [1/0]Exclusions – Methods
    [1] = Enable
    [0] = Disable {default}
          -exclude_properties [1/0]Exclusions – Properties
    [1] = Enable
    [0] = Disable {default}
          -exclude_types [1/0]Exclusions – Types
    [1] = Enable
    [0] = Disable {default}
          -exclude_serializable_types [1/0]Disable this option to prevent serializable types from obfuscation.
    [1] = Enable
    [0] = Disable {default}
          -regularexpressions <text>Exclusions – Regular Expressions
         Obfuscate Public Types  
          -obfuscate_public_types [1/0]Enable this to obfuscate all type and member names in an assembly.
    [1] = Enable
    [0] = Disable {default}
         Use Uprintable Characters  
          -unprintable_characters [1/0]Unprintable characters uses unprintable strings to obfuscate type and member names, but cannot be used if your assembly must run as safe code.
    [1] = Enable
    [0] = Disable {default}
      Pre-JIT Methods 
      -prejit [1/0]In combination with the Native EXE File feature and NecroBit, .NET Reactor is able to convert managed methods into REAL x86 native code. Only methods which doesn’t affect the runtime and platform behavior (mostly small methods like property getters/setters…) are converted into native code. By nature this feature has an built-in protection against assembly modification.
    [1] = Enable
    [0] = Disable {default}
      Resource Encryption & Compression 
      -resourceencryption [1/0]Enable this option to compress and encrypt embedded resources.
    [1] = Enable
    [0] = Disable {default}
      String Encryption  
      -stringencryption [1/0]String Encryption disguises internalized text, making it all the more difficult to decipher the interaction of your CIL.
    [1] = Enable {default}
    [0] = Disable
      Strong Name Removal Protection  
      -antistrong [1/0]This option enables anti Strong Name removal techniques which prevents your protected assembly from being tampered by hacker tools. Warning, this option can impact the runtime performance of your protected assembly!
    [1] = Enable
    [0] = Disable {default}
      Anti ILDASM/Suppress Decompilation 
      -suppressildasm [1/0]Enable this option to suppress disassembly to IL using the ildasm.exe tool. Even if this option it set to FALSE your source code is still secure!
    [1] = Enable {default}
    [0] = Disable
    3. Lock Settings 
      Expire When All Expired 
      -licensing_behaviour[1/0]When set to True(“1”)  causes the expiration of the assembly only when all other enabled locks have expired. When set to False the assembly expires when any one of the locks expires.
    [1] = Enable {default}
    [0] = Disable
      Inbuilt Lock – Eveluation Period 
         Enabled 
          -evaluationenable [1/0]The Evaluation period lock enables the creation of trial versions of your application, limiting the use of your trial in a variety of ways(Trial or Runtime).
    [1] = Enable
    [0] = Disable {default}
          Evaluation Type 
          -evaluationtype [trial/runtime]Choose between Trial and Runtime
    [trial] = Trial {default}
    [runtime] = Runtime
        Time 
          -time <number>Specify the number of days or minutes for the evaluation period.
         Dialog 
           Enabled 
              -showevaluationperiodscreen [0/1]Enable this to show a message screen when evaluation period is expired.
              Message 
           -evaluationmessage <text> Evaluation period expired message.
      Inbuilt Lock – Expiration Date 
          Enabled 
          -expirationdate_enable[1/0]The Expiration Date lock allows you to specify the exact date on which your application should expire.
    [1] = Enable
    [0] = Disable {default}
          Expiration Date  
          -expirationdate<y/m/d>Choose a day. Your inbuilt license will be valid up to this day. After this day your customer will need a new license file.
    [year/month/day] for example ‘2008/1/15’
          Dialog 
              Enabled 
              -showexpirationdatescreen[1/0]Specifies whether a dialog box should be displayed to the user when the Expiration Date is reached.
              Message 
           -expirationdatemessage <text> Message
      Inbuilt Lock – Number Of Uses  
          Enabled 
          -number_of_uses_enable[1/0]This lock, if enabled, causes your application to expire after the specified number of uses.
    [1] = Enable
    [0] = Disable {default}
          Uses  
          -number_of_uses <number>Specify the number of times the user can run your application before it expires.
          Dialog 
           Enabled 
              -showenumberofusesscreen[1/0]Specifies whether a dialog box should be displayed to the user when your application has been used the specified number of times.
    [1] = Enable {default}
    [0] = Disable
              Message 
           -expirationdatemessage <text> Message
      License Not Found Screen  
          Enabled 
          -shownotfoundscreen [1/0]Enable/Disable Screen
    [1] = Enable {default}
    [0] = Disable
          Message  
          -invalidlicensemessage <text>The text of the message which is issued when a license file is not found (if “Run Without License” is set to false), is found but is corrupt or otherwise invalid.
      Max Number Of Instances  
          Enabled 
          -number_of_instances_enable[1/0]The max number of instances lock allows you to specify the maximum number of copies of your application the user is allowed to start at the same time. Please note that exceeding the specified number of instances does NOT cause your application to expire.
    [1] = Enable
    [0] = Disable {default}
          Instances  
          -number_of_instances <number>The maximum number of instances.
          Dialog 
           Enabled 
              -numberofinstancesscreen[1/0]Specifies whether a dialog box should be displayed to the user when they attempt to run more than the specified number of instances of your application.
    [1] = Enable {default}
    [0] = Disable
              Message 
           -numberofinstancesmessage <text> Message
      Nag Screen  
          Enabled 
          -shownagscreen [1/0]Enable/Disable NagScreen
    [1] = Enable
    [0] = Disable {default}
          Message  
          -nagmessage <text>Here you can set the message for the nag screen.
          XDays  
          -xdays <number>.NET Reactor can either display the nag screen every time the application is started (in which case set the value of this option to -1{default}), or a specified number of days before the end of the Evaluation Period or Expiry Date.
      Run Another Process After Expiration  
      -run_another_process <text>Opens or launches another application, file, or web site upon expiration. Usually used to send evaluation users to a web page.
      Run Without License File  
      -run_without_licensefile [1/0]Set to false(0) to require a valid license for operation. If true, enabled Inbuilt Locks are honored. If a valid license file is found the Inbuilt Locks settings are overriden with the license file settings.
    [1] = Enable {default}
    [0] = Disable
      Shutdown Process After Expiration  
      -shutdown_process [1/0]Terminates the running process upon expiration.
    [1] = Enable {default}
    [0] = Disable
      Static License FileName  
      -staticlicensefilename <filename>Specifies a license file name or extension (*.myextension). Leave blank to allow .NET Reactor to determine a *.license file name from your assembly name. To avoid conflicts with optional methods of extending license behavior, binary .NET Reactor licenses do not use the .LIC extension reserved to .NET license classes.
      V3 Licensing Mode  
      -v3mode[1/0].NET Reactor v3.x uses a new encryption technique which is not backward compatible with previous versions of .NET Reactor. Set this option to True to use .NET Reactor v3 license encryption technique, or False to use the V2.x compatible encryption method.
    4. Dialog Settings 
      Dialog Box Interface  
      -dialogbox_interface <file>Uses a customizable dialog box you may build with the SDK. Please set the FullName of your Dialog Box here(e.g. MyNamespace.MyDialogBox). Please check the SDK for more information.
      Dialog Caption  
      -messagecaption <text> This is the title of all message forms which can be shown.
      Gradient Color Begin  
      -gradcolorbegin <r/g/b> Gradient Color of the message windows.
    <red/green/blue> for example ‘212/15/128’
      Gradient Color End  
      gradcolorend <r/g/b>Gradient Color of the message windows.
    <red/green/blue> for example ‘212/15/128’

    iHomeSoft, 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明!
    .net reactor用法详解