Re: Problem using obfuscation



Hi Nicole

I'm using Dotfuscator that comes along with the Visual studio.Net. and yes
I've made a single dotfuscator project and obfuscating all the assemblies in
a single go, i.e I first compile all the code and then run dotfuscator on
all of them. I suppose this should be the correct way.Also I'm not using
reflection anywhere in my code.

For checking I created a Test .Net Class library and used it in a .Net
console application. It ran fine when the exe was run with the original
class library (dll). But when I placed the obfuscated dll, the console
application crashed with the TypeLoadException exception with description as
unable to locate that class in that dll of which I had created an object in
console application.

Hope you can try simmilarly with your dotfuscator tool. Also note that I'm
not using the professional or purchased version of dotfuscator instead using
community edition that comes free with Visual studio.Net

Regards

Usman Jamil

"Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
news:3B66CE26-21D2-4CE4-A8AD-CFBCCD8CB428@xxxxxxxxxxxxxxxx
"Usman Jamil" <usman@xxxxxxxxxxx> wrote in message
news:OnihjgKsGHA.5100@xxxxxxxxxxxxxxxxxxxxxxx
Hi Marcello

I'm using obfuscation for the first time, so not sure how to use it
properly. May be I'm missing something. What should be done if I have to
obfuscate multiple assemblies which are using each other's public
classes.

You would usually obfuscate the entire set of dependant assemblies
together as a group. Different obfuscators have different capabilities
with respect to tracking renamings and applying them after an initial
obfuscation run (for example, when upgrading only one assembly from an
obfuscated set). Your obfuscator's documentation and/or support forums
would probably be the best source of information on the product-specific
details.


Currently obfuscation would rename the public/private classes of my
assemblies and I guess this is the reason that crashes the
assemblies/applications that are using them.

Are you obfuscating the assemblies one-by-one, or together in a single
obfuscation run?


I'm not aware of reflection. If its a solution, can u please explain it.

It's not a solution--it's an additional problem which you may or may not
be encountering. The main issue with reflection is that it references
types and members by name at runtime, and most (all?) obfuscators do not
accomodate this. If you are using reflection (or taking advantage of
built-in framework code that uses reflection), you would usually need to
manually omit from obfuscation the types and/or members that are used via
reflection.



Regards

Usman

"Marcello Cantelmo" <marcello@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:ec8ppJ8rGHA.2124@xxxxxxxxxxxxxxxxxxxxxxx
Hi

Hi Usman,

I'm working on a project that has multiple modules. Most of the modules
(windows services, Class libraries) are coded in C#. There are multiple
class libraries which use each other's classes too having refrence
added in them. To avoid exact code decompilation, I tried using
obfuscation on all the compiled libraries(dlls). But now when I run my
project, it just crashes since the obfuscation has renamed the classes
inside those class libraries, so where ever these classes are being
refrenced, i'm getting exception.


very strange! if the classes are public do not have to be renamed! the
public field must be always visible.

What I had in mind was to compile all the code and in the end obfuscate
all the output assemblies and ship them. Does obfuscation works this
way that after obfuscating a dll we have to change the code with the
name of updated classes whereever its being refrenced or am I missing
something.


you make use of reflection?

Regards

Usman

best regards,
Marcello Cantelmo
www.cantelmosoftware.com








.



Relevant Pages

  • Re: Dotfuscator and ClickOnce
    ... I was able to apply a strong name to the application's executable by not doing it in Visual Studio ... but as part of the script I was using to run Dotfuscator. ... This occurs because obfuscation changes the binary by renaming all of the ... Authenticode signing of assemblies that you wish to obfuscate. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Problem using obfuscation
    ... with output as Helper.dll and a console application using its classes named ... I've made a single dotfuscator project and obfuscating all the assemblies ... I'm using obfuscation for the first time, so not sure how to use it ... class libraries which use each other's classes too having refrence ...
    (microsoft.public.dotnet.security)
  • Re: Dotfuscator disassociates derived class when base class is lin
    ... I tried Dotfuscator in the early days I think way back in .NET 1.1 and could ... never get it to behave and I think many other developers have found the same ... any dependency assemblies the input assembly is dependent on. ... obvioously this then defeats the purpose of obfuscation. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Dotfuscator disassociates derived class when base class is lin
    ... any dependency assemblies the input assembly is dependent on. ... become disassocarted and calls to override functions in the base class ... obvioously this then defeats the purpose of obfuscation. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Problem using obfuscation
    ... I'm using Dotfuscator that comes along with the Visual studio.Net. ... I'm using obfuscation for the first time, so not sure how to use it ... obfuscate multiple assemblies which are using each other's public ... class libraries which use each other's classes too having refrence ...
    (microsoft.public.dotnet.security)