Secure Programming
Dll Security May 06 2005 07:17PM
VP (pelasaco gmail com) (3 replies)
RE: Dll Security May 09 2005 07:55AM
Slavisa Dojcinovic (slavisa dojcinovic bravostudio com) (1 replies)
Re: Dll Security May 10 2005 08:59PM
Slashroot (slashroot free fr)
Re: Dll Security May 08 2005 11:34PM
Valdis Kletnieks vt edu
On Fri, 06 May 2005 16:17:30 -0300, VP said:
> Hi, i have a dll and i want to encrypt it to hide (obfuscate ??) an
> important algorithm used here.

Good luck. You're probably better off making the customer sign an NDA
or other document that has some teeth in it, so that you can sue them if
they rip your code off. I have more faith in a good lawyer being able
to bulletproof the problem than a good programmer...

> I'm encrypting the dll with a program, then when i want to loadlibrary() it,
> i decrypt it to a plain-text file, then i loadlibrary the plain-text file.
> So i have my encrypted dll and i have a plain-text version either. To
> mitigate this vulnerability, i'm using EFS to protect my plain-text dll.

So far so good, except....

> I'm wondering if using the PE format i can do some kind of "on-the-fly
> encrypt and decrypt". Is it possible ? There is any example ? Is it a good
> solution ?

The first guy who comes along with a debugger will have little to no problem
getting your code extracted. Note that even loading the encrypted form, then
checking if you're being debugged, then decrypting and calling the code won't
work, because there's a race condition - they can attach the debugger after
your test. And they can make the timing hole arbitrarily large - a bunch
of 'for(;;)' loops will slow things down. You can't even raise your priority
by a notch, as the attacker can raise the priority of their cycle-suckers by
2 notches and the debugger by 3.

This is *really* a "You can't win this one" game. You *might* be able
to if there's proper hardware support - but note that even the now-emerging
"trusted computing" chipsets probably can be subverted....

[ reply ]
Re: Dll Security May 07 2005 07:13PM
Keith Oxenrider (koxenrider sol-biotech com) (1 replies)
Re: Dll Security May 10 2005 01:54PM
VP (pelasaco gmail com) (1 replies)
RE: Dll Security May 10 2005 06:03PM
Chris Matthews (cmatthews xn com)


 

Privacy Statement
Copyright 2010, SecurityFocus