How to obfuscate a binary compile with .NET framework? Tools such as Ebowla and Pecloak.py will encrypt it but the program won't run. Even UPX can't pack it. Wondering are there any ways to obfuscate it?
There are many obfuscators around, free ones too, just google for ".NET obfuscators". Visual Studio, the IDE from Microsoft, has one integrated, too. If you want to start out, I would try this one first.
Typically these obfuscators take the IL (Intermediate language), rename variables, create obscure control structures, and use more functions to make things complicated to read.
However, the code will still be easily "decompileable" with the respective tools, it will just be less readable by humans. General consensus is, AFAIK, not to obfuscate, as this is something like "Security by obscurity".
Because code obfuscation is a subjective process i.e. the level of 'how difficult it is for a human to read and understand' is going to be different depending on what de-obfuscating tools are available, and because obfuscation might make things difficult to read but doesn't actually increase confidentiality to any real degree, perhaps it's better to think about what you're trying to achieve and start a question from there?
Is it to help with some kind of licensing/copying issue, or with hiding authentication mechanisms, or hiding hard-coded sensitive data?
There may be a better way to achieve your aims that code obfuscation which is not an effective control against a determined and knowledgeable adversary.