Blankman
Blankman

Reputation: 267320

How to write your own .net obfuscator

I am very curious as to how people write their own obfuscator.

How hard would it be to simply do the following:

  1. rename all public methods with GUID type names.

Where would I start? How would I go about reading the .net dll assemby, pulling the public methods out and renaming them?

Upvotes: 7

Views: 6273

Answers (3)

Jb Evain
Jb Evain

Reputation: 17509

You can check those two projects that are using Cecil to write an open-source obfuscator:

Upvotes: 7

ctacke
ctacke

Reputation: 67198

If you're starting with source, it's pretty simple to do text replacements and then run the code through a compiler. If you are starting with a compiled assembly, then you need to use the stuff in the System.Reflection namespace to load the assembly and System.CodeDom to generate compilable code units.

Upvotes: 1

Related Questions