Obfuscator for compiled lbraries?
September 11, 2008 8:39 AM
Subscribe
Is there such a thing as an obfuscator for compiled libraries?
This sounds like a weird question, and one that's easily answered with a minute on the Google, but hear me out:
My company ships a Java application has to be activated (via internet or phone) within 30 days, or it stops running. About a year ago, we got wind of the fact that someone had started distributing a version that had been run through cavaj, and had been declawed by replacing the authentication routine with a simple "return true;". Thinking we could avoid that kind of shenaniganry down the road, I moved all the code handling authentication (which is essentially a state machine that relies on a system call to determine how long it's been installed) into a compiled C++ library, with a JNI call out to it for every function that involves sensitive content (we decrypt content at runtime based on user credentials).
That seemed like it was bullet-proof to all but the most dedicated of attacks, and I didn't figure anyone would want to invest the time it would take to decompile the library and step through the logic it uses to determine activation status. Turns out I was wrong... someone posted a modified DLL last week which declaws the activation check by replacing every conditional branch in the critical subroutine with NO-OPs, so the 30 day timer stops running. We're re-vamping most of the security features, and generally locking down everything we can with CRC checks and calls home whenever it's possible, but the final step I wanted to put into place would be making the sensitive functions really difficult to understand by stepping through them with a debugger. Since performance isn't hugely critical, I'd love for some easy way to make the function call go jumping merrily from hither to yon, building string variables that are never used, swapping registers and memory addresses, and generally creating the most complicated, ever-shifting memory environment that we can manage. Since it's probably a 15-year-old JavaScript hack who's decompiling the binaries, this might be enough of a deterrent to keep him from even trying to break the next version, and even if it's not, it ought to make it damned near impossible to figure out which variables are the important ones.
Is there a tool that latches onto your compiler and does that for you, based on not-crazy input source? All I've been able to find is source code obfuscators, which don't really help--I need something that complicates the actual compiled code.
posted by Mayor West to computers & internet (5 comments total)
1 user marked this as a favorite
posted by pmdboi at 9:22 AM on September 11, 2008