Re: Protecting code

From: Richard Grimes [MVP] (read)
Date: 08/13/03


Date: Wed, 13 Aug 2003 21:00:13 +0100


Sky Fly wrote:
> Hi,
>
> I know that when an .NET exe is run, the CLR loads
> the exe (along with dependent assemblies),
> compiles them to native code then runs the code.

No. Code is JIT compiled on a method by method basis. The *first* time a
method is called it is JIT compiled and the native code is cached in memory.
After that, when the same method is called the cached native code is used.
This means that if a method is not called, it is not JIT compiled.

> Assuming the assemblies are loaded from a remote
> inaccessible location, is it possible that during
> any of the stages of loading the exe into memory,
> a person with malicious intent could attach a
> debugger and serialise the exe and assemblies
> to disk so that she can disassemble/decompile them?

When the library is downloaded it is stored in the Downloads folder, so that
on future runs it is not downloaded again. If you use the command console
you can locate the actual folder where the assembly is stored and
disassemble it.

Richard

-- 
my email evpuneqt@zicf.bet is encrypted with ROT13 (www.rot13.org)


Relevant Pages

  • Protecting code
    ... I know that when an .NET exe is run, ... compiles them to native code then runs the code. ... Assuming the assemblies are loaded from a remote ... aknak at aksoto dot idps dot co dot uk ...
    (microsoft.public.dotnet.security)
  • Re: huge array
    ... into your exe - then you don't have to ship IL. ... simply compiles the il on the target machine at install and stores the native ... There are 3rd party native code compilers however - and with the ... it is possible (using 3rd party apps) to ship without your exe ...
    (microsoft.public.vb.general.discussion)
  • Re: Displaying Version Number
    ... In the Setup Project I can add a registry entry, ... to avoid using the setup program version to as the version of my main EXE ... version numbers on all the different assemblies (of course they can do ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Please help - getting error when open program - "Type Mismatch"
    ... Also I can make it an exe. ... compiles ok... ... 20 b = InputBox("Enter an integer to divide by") ... You may have to compile several debug versions of your app in order to ...
    (microsoft.public.vb.general.discussion)
  • Re: Please help - getting error when open program - "Type Mismatch"
    ... Also I can make it an exe. ... compiles ok... ... 20 b = InputBox("Enter an integer to divide by") ... You may have to compile several debug versions of your app in order to ...
    (microsoft.public.vb.general.discussion)