0
votes

How to use dotfuscator to obfuscate Windows service?

We have created windows service application that includes multiple DLLs (custom as well as third party dlls) and we use installshield to create exe and we distribute the same.

We would like to know on how to start with obfuscate using dotfuscator.

As far as we reviewed, it looks like we will not be able to obfuscate the entire windows service exe and we will be able to individually obfuscate each dll. But not sure how to add these dlls while creating the service exe.

If someone can guide on how to obfuscate the windows service exe created using the install shield.

When we tried to all the exe file created using the installshield, we are getting the following error.

Invalid input assembly C:... . This is not a managed module. (C:...)

But when I tried a individual DLL it is able to obfuscate but the ouptut is in different folder. So we are not sure how to automated this entire process.

Environment: Visual Studio professional 2012, Dotfuscator version - 5.5.45x

We have not registered with Dotfuscator and we using the Dotfucator that is part of visual studio.

1

1 Answers

2
votes

I work on the Dotfuscator team and am answering as part of my job.

It sounds like the EXE generated by InstallShield is not a .NET assembly, but a native executable. You can verify this by trying to open the EXE in a .NET disassembler/decompiler like ildasm and seeing if that also gives you an error.

I'm not too familiar with the way InstallShield operates when creating a Windows Service, but it sounds like you create the DLLs first, and then InstallShield takes those DLLs to create the installer package? In that case, you should run Dotfuscator after you create the DLLs, but before InstallShield consumes those DLLs. Then is it possible to configure InstallShield to use those obfuscated DLLs instead of the original ones?

With Visual Studio 2012 you have to run a Dotfuscator Project's build from the Dotfuscator Community Edition (CE) user interface (that you open from Visual Studio's Tools menu). Newer versions of Dotfuscator CE Visual Studio 2015 and Visual Studio 2017 can build from the command line interface once you've set up a Dotfuscator Project in the user interface. For automation, you could set up your build scripts to call this interface.