7

I'm trying to obfuscate a .net project with eazfuscator.net. The problem is that, when I decompile it using .NET Reflector you can see to much of the code. All the private members are obfuscated, but the public members give to much information about the program.

Is it possible to also obfuscate the public members of my library? I know that this isn't done by the program because the public members are usually accessed from other assemblies. But shouldn't it be possible to obfuscate the whole solution so that those accesses from other assemblies are also renamed from the tool?

I have already tried to use the ObfuscationAttribute

[assembly: Obfuscation(Feature = "Apply to type * when public: renaming", 
                       Exclude = false)]

but it didn't really make any difference.

So is it possible to do something like that with eazfuscator or maybe another tool?

crthompson
  • 15,653
  • 6
  • 58
  • 80

1 Answers1

3

In general, obfuscators will not obfuscate public/protected members.

They do it for a reason, Assume you have a public member in a assembly(lets say a dll). Usually assemblies are created to share code, what if the obfuscator changed the member and class names? How this is going to work when another assembly depends on it?

If at all you want to obfuscate a class, why it is public in first place? You can always make it internal if it is not intended to use outside the assembly.

Obfucsators are good in handling internal types/members. Not only it obfuscates members of the class, it will go one step further to rename the class itself.

You may consider using Phoenix protector. I hope it is configurable to obfuscate public members too.

Update:

One option is to merge all the dependent assemblies to a single giant assembly(exe), then obfuscate the merged assembly with obfuscate public members option. In that way, you can obfuscate public members at the same time not breaking anything.

Sriram Sakthivel
  • 72,067
  • 7
  • 111
  • 189
  • So Phoenix protector is configurable for public members too, but well it breaks the funktionality, cause there are assemblys that depend on that library. I just thought that it should be possible to obfuscate those assemblys together so that the names in both assemblys are changed the same way so the program works. – Daniel Waidele Sep 26 '14 at 06:25
  • @DanielWaidele I don't think you'll get such feature in free obfuscation tools. You may get it in commercial tools, though am not sure. – Sriram Sakthivel Sep 26 '14 at 06:31
  • You may consider merging all the assemblies to one, and then obfuscate the public members. – Sriram Sakthivel Sep 26 '14 at 06:32
  • 2
    Eazfuscator has a mergin feature. Works good with that in my test project. Thx for your help – Daniel Waidele Sep 26 '14 at 08:26
  • @DanielWaidele I'm glad that it helped you. I'll add that in my answer as well. – Sriram Sakthivel Sep 26 '14 at 08:28