Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Obfuscate Assembly and Reflection

I want to obfuscate my assembly files (*.dll, *.exe) by Dotfuscator. my question is if I do this, can I still use classes and types that are in those assemblies by their original names (I mean names before obfuscation) and using System.Reflection methods to work with them?

If you need more detail,please tell me

like image 500
amirhosseinab Avatar asked Sep 15 '11 14:09

amirhosseinab


People also ask

What is assembly code obfuscation?

Code Obfuscation is the act of making the assembly code or machine code of a program more difficult to disassemble or decompile. The term "obfuscation" is typically used to suggest a deliberate attempt to add difficulty, but many other practices will cause code to be obfuscated without that being the intention.

What are obfuscation techniques?

Obfuscation is an umbrella term for a variety of processes that transform data into another form in order to protect sensitive information or personal data. Three of the most common techniques used to obfuscate data are encryption, tokenization, and data masking.

Why should programmers avoid obfuscated code?

While obfuscation can make reading, writing, and reverse-engineering a program difficult and time-consuming, it will not necessarily make it impossible. It adds time and complexity to the build process for the developers. It can make debugging issues after the software has been obfuscated extremely difficult.

What does it mean to obfuscate a script?

Obfuscation means to make something difficult to understand. Programming code is often obfuscated to protect intellectual property or trade secrets, and to prevent an attacker from reverse engineering a proprietary software program. Encrypting some or all of a program's code is one obfuscation method.


Video Answer


1 Answers

Obfuscation are Reflection can cause you some problem. Even if you take the suggestion to use option to not obfuscate public method, some of the reflected code may call private method. The problem is that obfuscation will change name of some code that you may need to stay the same.

If you know or can locate the region that is susceptible to be used with reflection you can use

[global::System.Reflection.Obfuscation(Exclude=true, Feature="renaming")]

This will tell the obfuscator to keep the name.

Running obfuscation with reflection require more testing that's for sure but still possible...

like image 184
Patrick Desjardins Avatar answered Oct 09 '22 23:10

Patrick Desjardins