NOTE: The previous release of this addin was an alpha release, this release is feature complete and a 1.0.0.0 release.
Downloads
Reflector.Babel Addin: Dll Only or Source Code
Reflector.Ouput Addin (alpha): Dll Only
Babel Obfuscator: Project Home
.NET Reflector: Product Home
The addin
Reflector.Babel addin is a small Reflector addin written to provide a simple UI for the Babel Obfuscator. As is the case with several obfuscators and many other useful utilities – Babel is command line based. Being command line based is a huge advantage when it comes to integrating with your build cycle - once you’ve decided to use it. The purpose of this addin originally was to make it easier to demo obfuscation (for an internal presentation) – but in the end, the goal really became: to help make Babel more user friendly to get to test drive.
Once you figure out that you want to use Babel – then you need to dig into what it takes to integrate it into your build cycle (which is detailed on the project’s home site and in the downloaded content which installs with Babel).
Getting started
There are three things you will need to get started:
1. .NET Reflector
2. Babel Obfuscator
3. Reflector.Babel addin dll
I am only going to discuss #3 – getting started with the addin. Once you’ve downloaded the addin dll and saved it in the directory you have your Reflector.exe application, you will need to add it to Reflector by doing the following:
1. View Menu –> Add-Ins…
2. Click the add button and browse to the Reflector.Babel.dll file and click OK
3. Click Close
Once you’ve added the addin, you will need to configure the location of your Babel.exe (usually under “Program Files\Babel” but will depend on your install. To configure babel.exe location you need to do the following:
1. View Menu –> Options…
2. In the listbox on the left, choose “Babel Addin”. This should load the property page and look like the image below.
3. Once the Babel Addin property page is showing, you need to click on the “…” button in the upper right corner and browse to the location of your babel.exe (as mentioned above) and click OK.
4. Once your path to the exe is showing like in the image to the left (the text box with the red rectangle around it), you can now click OK.
NOTE: Each of the checkboxes on this property page are features provided by Babel. If you want to find out more about what each feature does – please refer to the Project Home … otherwise I suggest trying out different combinations and looking at the result in Reflector. The main thing this addin does is translate what is checked on this property page into the proper command line arguments for you and then just passes that to babel.
If you don’t connect the addin to the location of the babel.exe application, you will get a message warning you (shown to the left) that you need to do so the first time you try to obfuscate an assembly.
Now that you have connected the addin to the location of the babel.exe application, you should give it a try.
To start with, I would suggest using some dll or exe that you are familiar with – so load that into Reflector so it shows in the Assembly tree on the right side, now do the following:
1. On the Assembly tree, click the first plus sign next to your assembly, to get to the level showing the .dll or exe name.
2. Right click on the dll/exe name
3. On the context menu (shown to the left), click on the “Obfuscate with Babel” menu item and the command window will popup and run Babel like shown below. This runs babel.exe and creates the obfuscated output in a subdirectory of the assembly named BabelOut.
4. Once you close the command window, you will get a message box asking you whether you would like the new obfuscated assembly loaded into Reflector.
If you click No, then all is complete. If you click Yes, then the new obfuscated version of the assembly will be loaded into Reflector replacing the previous assembly in the tree.
The original assembly is unloaded from Reflector since it doesn’t like having Assemblies with the same names loaded. The original assembly is removed from the tree view in order to load the obfuscated one. I’ve found this is the most common thing I do after I obfuscate an assembly anyways … so I added the option (with a confirm) to do this.
Once you’ve gotten to this point, you can now start learning exactly what those checkboxes do to your assembly’s code when obfuscated with babel. This should help you decide what options you want to use and what you may not want to use. Happy obfuscating!
Optional Addin: Reflector.Output
Since writing the Reflector.Snippy Addin, I’ve been thinking about writing an addin that provides either an output window (like Visual Studio) or an addin that is more of a command window. I’m still in the process of deciding what functionality I want in this addin, but I will make the dll available for anyone wanting to use it with the Reflector.Babel addin.
Currently the Reflector.Babel addin is written to look for the Reflector.Output window and use it if it is loaded, otherwise it uses the command window like shown above. Honestly, I’m not 100% happy with the current implementation – so it might change in the future.
If you have the Reflector.Babel addin loaded and the Reflector.Output addin loaded (like shown to the left), then the babel.exe output will be redirected to an “Output” user control window within Reflector. This will look something like the image shown below. There is nothing you need to configure to make this work – other than load the addin (as you would any other addin).
Since this is an ‘alpha’ release of the Reflector.Output addin – the dll is obfuscated using Babel … so if you want to check out what it looks like, open it in Reflector and take a look!