Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Morphing Code to Prevent Reverse Engineering? 507

ptolemu writes "Cringely's latest article discusses a new obfuscation technique currently being researched called PSCP (Program State Code Protection). An informative read that concludes with some interesting insight on the software giants that heavily depend on this kind of technology."
This discussion has been archived. No new comments can be posted.

Morphing Code to Prevent Reverse Engineering?

Comments Filter:
  • Morphing code eh (Score:2, Interesting)

    by Epyn ( 589398 ) on Friday February 20, 2004 @02:38PM (#8341414)
    I seriously doubt this is anything special, just more code and more code to disguise the code that actually does something. I can't imagine you really CAN protect a program for instance, without completely screwing it up, performance loss etc. These companies should provide the kinds of services and support systems that make investing in their product viable. err yeah...
  • by meta-monkey ( 321000 ) * on Friday February 20, 2004 @02:40PM (#8341435) Journal
    There are reasons beyond "theft" for wanting to obfuscate your code.

    For instance, consider Quake. Quake is a great deal of fun, so long as everybody is playing fair. However, when somebody cracks the game and develops an aimbot (they're real), it's not fun anymore. Even if Quake were open source, some kind of run-time obfuscation would be great just to help prevent cheaters.

    I recall reading about an exploit for Age of Empires (or was it Age of Kings...) where in a networked game, you could run a monitor program that would let you see what resources your opponent had. Then, by watching changes in their resource supply, you could guess what units they were building. That was automated for you, of course. "Ah, they keep spending 45 wood and 25 gold, they must be building archers! I should build cavalry."

    Anyway, even when we're not talking about greedy corporations protecting their intellectual property rights, there are still good reasons for keeping what's going on in your program hidden from prying eyes.
  • the dark side (Score:5, Interesting)

    by musikit ( 716987 ) on Friday February 20, 2004 @02:40PM (#8341437)
    how come for every new technology that comes out that is suppose to "secure" us i can think of a way it can be used "malicously"

    ex. I write YourDoom.A and i write it using this new code morphing obfuscator. how exactly are Anti-virus programs 1. suppose to remove this? 2. identify this?

    Given the numberous amount of VB/Outlook bugs and considering that .NET is so "young" can't you see this used for creating a perpetual virus that can't be removed? you wouldn't even be able to ID the bug that caused this to virus to run itself.
  • by Didion Sprague ( 615213 ) on Friday February 20, 2004 @02:41PM (#8341441)
    I don't know the answer to what I'm about to ask. I'm a writer, not a programmer, but as I was reading Cringley's column -- especially toward the end when he talks about how PSCP can be used in DRM to really (really, really) obfuscate a watermark -- I got to thinking: couldn't this theory of PSCP be used to further obscure (or encrypt -- whatever you want to call it) P2P networking?

    And maybe this is already being done -- or maybe this is just pure stupidity on my part for asking the question -- but couldn't this sort of "morph-as-you-go" theory be used to obfuscate -- and essentially hide -- a network path used to get (or put) a piece of data? Kinda like BitTorrent -- but in a much more severe, much more shifty way? You getting the data -- eventually -- and you're both downloading and uploading as you go -- but the paths through which your current bit of data is being retrieved are both unknown until you visit it and obscured once you leave it?

  • I agree. With my experience at a company that develops in Java, those that use Java become lethargic and lazy such that the actual code itself is typically very uninteresting (as Java does all of the "optimizations" that a developer in other languages could tool around with). Beyond that, most of the developers in my company are obsessed with performance because Java crushes our performance.

    But then again, our software isn't on 90% of all computers or whatever, so I guess we're less worried about exploits.
  • by Tassach ( 137772 ) on Friday February 20, 2004 @02:44PM (#8341495)
    Java works best as a server-side language; it's well suited to that role.

    If you need a tamper-resistant client-side binary, don't use Java. It's that simple. A good engineer understands many different tools and selects the best one for the job.

  • by warlockgs ( 593818 ) on Friday February 20, 2004 @02:44PM (#8341508)
    Would code that was changing itself while running (polymorphic) be nailed by a heuristically-scanning anti-virus program? I would hate to de3velop something, and then all of a sudden get seriously bad press for releasing what seems to act like a virus. Just food for thought.
  • "Objective review?" (Score:2, Interesting)

    by Homology ( 639438 ) on Friday February 20, 2004 @02:49PM (#8341567)
    What a glowing article of a product from PreEmptive!

    It is, of course, very reassuring to know that :

    Understand that, as always, I have no stock in PreEmptive, I just like these people.

    Beeing a bit cynical, I find the article more like a sales plug than a journalistic piece.

  • by joekampf ( 715059 ) on Friday February 20, 2004 @02:51PM (#8341586)
    This is gonna make reproducing production bugs a bitch. Well which path did they take. What will this do to multithread debuging? UG! Besides Security by Obscurity is no Security at all.
  • Bah (Score:1, Interesting)

    by Anonymous Coward on Friday February 20, 2004 @02:52PM (#8341595)
    It's not like no one's ever written a virus before that included obfuscation through self-modifying binary code. The major virus companies already have techniques for identifying and working with such viruses. Those companies that don't already have such techniques are selling products that don't work. :P

    Second off, code obfuscators aren't magic. You can always still tell what's happening. It just takes longer and more effort.
  • Re:Won't work (Score:1, Interesting)

    by Anonymous Coward on Friday February 20, 2004 @02:54PM (#8341620)
    The writers of the GPL anticipated your point and so the GPL specifies that the source must be presented in "the form preferred for making modifications" or something like that.
  • by El ( 94934 ) on Friday February 20, 2004 @02:54PM (#8341625)
    It makes reverse engineering more difficult because you can't disassemble the whole program at once, only the currently running portion. And you don't know what the boundaries between the currently running portion and the obfuscated byte codes are. However, if you just TRACE the running code, you should get a pretty good idea of how it executes under normal operation -- it's not like the actual algorithm changes every iteration. Granted, you probably won't know how it handles most exceptions and boundary conditions, but who cares?
  • by El ( 94934 ) on Friday February 20, 2004 @03:00PM (#8341687)
    Actually, even stepping through the execution of your own code can give you insights into how the compiler operates, and allow you to write more efficient code. For example, I knew a C programmer who used to declare const strings and arrays local to each of his functions. I had to point out to him that these get copied onto the stack every time the function is entered, severely slowing program execution -- and he might want to consider making these static! Of course, I wouldn't have noticed this if I hadn't been stepping through his code in the first place.
  • Re:Won't work (Score:5, Interesting)

    by Deadstick ( 535032 ) on Friday February 20, 2004 @03:00PM (#8341690)
    I remember a primitive attempt at this in the copy protection routine for dBase III way back when the DMCA was but an industry wet dream. This was the ProLok Disk, the one with the laser burn.

    There was a section of code hidden by about forty layers of byte-by-byte XORing against bytes looked up in a table. At each level, it would intercept the Debug and Single Step interrupts, XOR the next layer, and jump into it. In those floppy-only days, it had to be reverse engineered a layer at a time, each step producing a disk with one less layer. Approximately the 40th disk had the actual copy-test code...which turned out to be pirated code!

    This was also before BIOS shadowing in RAM, and the BIOS executed straight from ROM. The test for the laser burn required hooking into it, which of course they couldn't do in ROM. Instead of working out their own shadowing routine they copied some 700 bytes of the IBM Fixed Disk BIOS, inserted their hooks, and then made a weaselly attempt to cover their tracks by interchanging logical-shift with arithmetic-shift instructions wherever it was guaranteed that nothing would go through the carry bit.

    And all that meshugass was there only to hide the publisher's own piracy...the copycrack consisted of a two-byte change elsewhere on the disk.

    rj
  • Re:Won't work (Score:5, Interesting)

    by mugnyte ( 203225 ) * on Friday February 20, 2004 @03:00PM (#8341691) Journal
    Well, that seems a bit simplistic. However, when I take a look at running code, there are several things that don't jive with the article:

    One forms logical boxes around things. For instance, a good cracker knows to identify the boundary between the JIT and the bytecode, know where the security check call is made, and what threads are monitoring the heap and garbage collector.

    When cracking, you initially "freeze" the code, the machine, the stack, and the registers. You're working at such a low level, it begins with a step-by-step of understanding how everything fits together.

    For example: Imagine the .NET framework itself in a sandbox. You watch as the OS is fed an EXE, it identifies the type and starts to run it. The CLR (potentially) starts up and checks permissions, loads all the JIT stuff, etc. Then, bytecode is churned. You are stepping one instruction at a time, interrupting at each of the CLR's instructions. One notices the buffer used for the JIT and the "feed" going into it. Tools are written that do this watching and drop items (portions of files, by instruction) into logical "components" and each pass becomes a little clearer. By running the application and matching behavior to component, you begin to learn how the application is designed.

    Also, you look at the program file itself. THIS is what the article seems to be saying: the bytecode is obsfucated...without context clues you're not going to discern how it works. But you can snap up context many times with a cracking tool. In this article, they seem to imply that each snapshot will be different by scrambling the variable names, or program locations. By seeing how all the names have been crammed, a pattern develops.

    Also, I take issue that .NET can be both "open" and yet "secure". Unless the bytecode SPEC is proprietary and unable to be reverse engineered (it is neither, hence the "open" nature of it), one can form a CLR that processes valid-yet-obsfucated code and rebuild a logical image of how the program is designed. I can take the MONO bytecode runtime have it start to partition the code into blocks and examine, for the calls each block makes to layer beneath it, what it is allegedly doing.

    Lastly, what makes these tools immune from reverse-engineering themselves? If I know the patterns this DASH-stuff uses, I can begin to reverse them. Unless there's one-way hashing or hardward/networked keys flying around, everything to solve the puzzle is right there, for me and my friends to examine at our leisure. This is done today by virus writers to try to avoid detection by checkers; they know how they work.

    If this tool becomes actually as valuable as he claims, then I expect it's own design (stolen or RE'd) to appear in the cracker circles like any other.

    But perhaps I'm missing something?
  • The two things probably work in coordination. From my experience, Java does generally represent a performance drop from, say, C++. And so I think that's true regardless.

    I think on top of that, Java does so much stuff, like garbage collection, that programmers don't need to worry about it. But the Java optimizations are always implemented conservatively. If I did my own garbage collection, I could free the memory as soon as I'm done with it, but under Java GC is done only periodically, and only sweeps items that fulfill certain qualities (so it might not get everything as soon as it should).

    But you're right, a big part of it is that under Java many developers might be able to code sloppily and not worry too much because they have the defense that "it's the Java that's making it slow".
  • Okay: for argument's sake we'll say that PSCP works like a charm to prevent nasty evil crackers from debugging my program effectively.

    We'll ignore the obvious problem presented by the fact that your .NET program's IL instructions are JITted into machine code at runtime, thereby making it pointless to modify the IL -- unless these people are invalidating the JITted code every time the IL code changes (is that even allowed?) or providing a translator between IL and machine code that inserts code-morphing instructions into the OUTPUT machine code (which I seriously doubt).

    We'll ignore the fact that instructions which modify other code are generally very easy to spot -- because they must refer to regions of a program's address space where code resides -- and it should be easy to find these code morphing instructions and turn them into no-ops.

    We'll set both of those tricky issues aside and focus on the crux of the matter. How does this PSCP protect the program *before* it starts running? When the cracker gets his hands on my juicy .NET assembly which is bursting with code, how does PSCP prevent him from taking the assembly apart and dissecting? Answer: PSCP *doesn't* provide any such protection.

    So, the school of crackers that likes to use a debugger to deduce program behavior may find themselves having trouble. But in the worst case, all I need to do is run the morphing code in a debugger, record the location of the program counter at the point in the program's execution in which I'm interested, and then consult the corresponding section of the program code that resides in the original .NET assembly. I may need to hunt back and forth for a little while to find the specific place I'm interested in, but I can't imagine that PSCP is able to change offsets or locations of instructions by very much.

    Think about it: if PSCP wanted to change the location of a jump target, for example, it would need to track down every other instruction in the program that jumped to that instruction, and modify the jump to point to the new location of the jump target.
  • Re:do what i do (Score:3, Interesting)

    by stratjakt ( 596332 ) on Friday February 20, 2004 @03:10PM (#8341794) Journal
    Never saw the unreadability of hungarian notation, myself. Like any syntax, it takes some getting used to, but I find it so useful to see a variable called giInstanceCount and know its a global integer.. or miInstanceCount for a class level, etc..

    The scope tag is probably more useful than the data type.
  • Re:Resource Waste (Score:2, Interesting)

    by Coaster-Sj ( 614973 ) <<aspenwind> <at> <hotmail.com>> on Friday February 20, 2004 @03:11PM (#8341801) Homepage
    But the whole program?

    I could see protecting any code that was a trade secret. But protecting you user interface code??? We all know what it looks like already.
  • Re:do what i do (Score:2, Interesting)

    by Ernest P Worrell ( 751050 ) on Friday February 20, 2004 @03:22PM (#8341974)

    Well, the idea is that, with strongly typed languages and a powerful IDE, you can quickly see the scope and type of any variable with a mouse over.

    I was a big fan of Hungarian, but the more I think about it, most variables (so long as their not named Tmp, i, j, etc), are pretty obviously typed. InstanceCount sounds like an integer, DateReceived sounds like a time, FirstName, a string. Now that i've switched to descriptive names, i haven't run into a problem yet of not knowing the scope/type.

  • by dr2chase ( 653338 ) on Friday February 20, 2004 @03:24PM (#8341995) Homepage
    Speaking as a former bytecode-to-native compiler writer, I can assure that if someone writes a compiler from Your Favorite Intermediate Language (YFIL) to native code, then someone can crack it. Every (stupid) obfuscator trick out there, the compiler has to tolerate in its quest for verifiable, compilable, optimizable code.

    Examples of Stupid Obfuscator Tricks include:

    • Scrambling exception ranges so they don't nest.
    • Inserting non-structured GOTOs
    • Inserting never-executed exits from synchronized blocks
    There are others, these are just the ones that I recall. A compiler (static or JIT, it does not matter) must deal with all of these.

    There are two outs that I know of. One is to only use interpreted code and morph it on the fly (still seems vulnerable to an observant interpreter, but perhaps the amount of necessary observations can be made extravagantly large), the other is to require use of a "trusted" compiler (which, in turn, requires use of a "trusted" OS to prevent substitution of an untrusted compiler, which in turn requires "trusted" hardware to prevent substitution of an untrusted OS).

  • by fatgeekuk ( 730791 ) on Friday February 20, 2004 @03:29PM (#8342085) Journal
    Ok, you are a member of a development department responsible for applications that need to be certified and tightly controlled. (maybe big pharma)

    The FDA come a knocking and start asking about the checks in place that ensure that the code that you write and document is the code that actually gets performed.

    FDA Auditor: So, this code specified in this document. Can you please show me how you ensure that this code is actually performed when you run the program here that you say is the one that this document references.

    IT Guy: Sorry, Cant

    FDA Auditor: Why isnt it?

    IT Guy: because the code that gets run is different every time it is run, and indeed during a single run it changes.

    FDA Auditor: So, What your saying is that you cannot guarantee that the applications specified in all these documents is the application code that actually runs.

    IT Guy: Yep, thats about it...

    Oh, now at this point in the discussion it gets serious.

    Who on this list actually thinks that dynamic code obfustication like they propose is actually worth a damn.

    What happens when this mutating mess gets it wrong?

    Who is to blame?

    Come on now, this is stupid, this is the worst form of pandering to corporate paranoia.

    This is true snakeoil.

    These are all just turing machines.
  • by tqbf ( 59350 ) on Friday February 20, 2004 @03:35PM (#8342180) Homepage

    Like Ultra-Wide-Band networking and enterprise XML integration, this column fits a Cringely mold of writing an entire article about the business plan of one small company most people haven't heard of, and passing it off as an important insight about the IT industry as a whole. It works for the most part because there are a lot of neat-sounding business plans out there. Every start-up company in the world has a story about how their vision, fully realized, would shake up the entire industry. It makes for great column-fodder, but provides poor analyses.

    If you read the whole column here twice, you immediately become aware of the fact that Cringely's entire "argument" turns on the idea that security rests on keeping source code secret. Because "interpeted" code "always" discloses code secrets, "interpreted" platforms like .NET will require the intellectual property wrapped up in schemes like PSCP. Therefore, the "inventors" or PSCP hold an important position on the chess-board of the entire IT industry. Microsoft and Sun will launch bidding wars to ensure they control the PSCP IP.

    Of course this is just crazy-talk. Just for a moment, leave aside the argument that something like PSCP can really prevent reverse engineering. In the post-PSCP world, all security rests in a distributed repository of millions of lines of source code "locked up" in an organization that spans 45 buildings and untold tens of thousands of people in Redmond. You can't keep source code secret. Closed source is a speed-bump to dedicated attackers, who will break into networks, find corrupt insiders, or even get janitor temp positions in order to get the code.

    Nobody working in security seriously believes that the source code for Windows 2000 wasn't floating around the computer underground years before the most recent disclosure. 'Twas ever thus: most of the SunOS and Solaris exploits that powered attackers in the mid-90's were derived from stolen Sun source code. Stolen source trees have always been the most stable currency in the computer underground for exactly that reason. What you do with the compiled product of that code makes no difference if the blueprints are already in enemy hands.

    I'm not sure it's even worth confronting Cringely's argument (that PSCP is a strategic technology that is crucial to .NET security) head-on, but I think I can make a decent response simply by evoking video game copy protection. Companies went through all sorts of contortion to devise copy-protection schemes. Kids with the Microsoft Macro Assembler bible thwarted them, because, just like in the DRM/Media battle, when you control the entire player architecture, it is impossible to completely secure the content. Regardless of whether PSCP makes it harder to grep out the cookie cutter exploit from the .NET IR, the payoff in the "battle" between code-obfuscation and exploit generation is much higher than the payoff to defeat copy protection, and nobody has ever won the copy protection battle.

    Cringley is right every once in awhile (business plans occasionally do pan out!), like with Eolas and Burst. I normally wouldn't care enough to comment, but this time he's inadvertantly promoting a damaging and popular misconception in his article.

  • by Tarwn ( 458323 ) on Friday February 20, 2004 @03:41PM (#8342259) Homepage
    I found myself less informed after reading that article, less intelligent perhaps as well.

    First of all, anyone that intends to write an article about a "new" software engineering theory or theoretical application needs to make sure they not only understand what they are talking about, but they also choose to collect quotes from people who know what they are talking about.
    Here's a hint, if the person says "leverages" in a serious tone of voice they are either a sales-person or only received information from the sales team.

    Now, beyond the other comments I could add, such as bad definitions of the framework, and the authors inability to name more than 2 examples of languages available to interact with that framework, there seems to be a large problem with the research content. There isn't any.

    I could likely spend 20 to 30 minutes researching background informaiton on the internet and still have a more solid article, simply because I would have real information.

    The information provided in this article appears to be the results of carefully skimming sales brochures. There is no real information on the processes involved, reverse engineering, or numbers invilved in terms of performance.
    We find out that there are "...billions of paths..." but this is just marketing talk, obvious for it's lack of detail. Reverse engineering is detailed as something used by hackers (in the newer, negative sense) to find holes in code. There is no mention of the other side, ie reverse engineering old software when the original developers are not available and no one felt documentation or up-to-date source code was necessary, among many other valid and legal reasons for reverse engineering. There is a brief comment about the extra resource usage, but it is considered negligable (in comparison to...?) and in fact this process is also mentioned as having no negative impact. tanstaffl.

    All in all this sounds like something that will be overhyped, overused, and in the end more of a pain than anything else. Clueless managers everywhere will demand all of the code use this new and impervious format when there are many easier ways to prevent security loss without the so far unknown problems with this new method (not to mention security holes in the obfuscation methods itself).

    Now when people try to reverse engineer code to look for security holes they won't find them because the holes were swept under the carpet. I may stand up for MS more often than deride them, but the kindest way I can say this is that this new method of obscurity is a little less than bright. Just as I wouldn't use anything beta from MS, you can bet that I won't be using this technology either. I prefer solid code, testing, and a solid license. By the time they have finished reverse engineering version 1, the next version will be underway, leaving them just as far behind as before.
  • Snake Oil (Score:3, Interesting)

    by roman_mir ( 125474 ) on Friday February 20, 2004 @03:52PM (#8342411) Homepage Journal
    What a load of crock, this is definitely aimed at the CIOs and the so called CTOs of some large corporate IT divisions and it for sure will be another big buzz in the next round of 'architectural' meetings. And some of the so-called architects (I have a few in mind) will without doubt will push this shit forward as another excuse for taking up space in their positions, when in fact they are totally useless and constantly still other peoples' ideas.....

    sorry, I am bitter :)

    On the other hand byte code obfuscators will not stop anyone who wants to disassemble. I remember about 9 or 8 years ago I was disassembling a simple DOS com file (anyone remembers inclogo.com, with a INCLOGO word being printed in a 320x200 graphics mode with some simple 256 byte coloring and shading that changed in a loop? It looked cool, so I wanted to find out how it worked.) Couldn't figure out the machine code for some reason, so loaded it into the Turbo Debugger :) good old days, and followed the trace. Well, duh, it was self-modifying. In a simple loop it would modify the entire execution tree by XORing every byte with the next byte. All of a sudden a portion of the code that was obfuscated was readable machine code again. So all I had to do was write a C program that read the com file and spat out the deobfuscated version.
    Ta da!

    done.

    How is this going to be any different? Code cannot be obscured to the hardware and a cracker works at the hardware level.

    Doesn't this sound to you like the commercials for the 'new and improved 1024 bit encryption' that sometime ago was put out by one Israeli company (there was an article on /. about this, anyone remembers?)

    This is snake oil.
  • by Tim Macinta ( 1052 ) * <twm@alum.mit.edu> on Friday February 20, 2004 @03:56PM (#8342489) Homepage
    Sure. But what will they learn? How the code processes MouseEvent.MOUSE_CLICKED? How you use sockets? How you show that nifty splash screen? I mean... who cares?
    "Super-secret" algorithms aside, it's not so much that I'm worried they will learn how to do what I did, it's more that I don't want people reusing my code without permission. I've found people who have copied pages from my website almost verbatim, and even one person who blatantly plagiarized a page of my and changed "Copyright Tim Macinta" to "Copyright his name"! Granted, that's a little easier to do with HTML than with Java, but if it's simple to protect against by using an obfuscator, then why not? I really wouldn't mind people learning from my code, it is actually reusing the code without permission and without attribution that I am protecting against. I'm not just being paranoid - I had somebody email me the source code to an applet I wrote once (which he apparently decompiled) with a note along the lines of "Ha, ha! Now I have your source!" I don't know what motivates these people, but there are enough of them out there that I have since started obfuscating almost everything as a basic precaution.
    Going off topic now, but, anyhow, nifty! [pensamos.com]
    Thanks. It's not as off-topic as you think. I used obfuscation with MMB (which is a client side Java app) to prevent plagiarism and reduce the siez (barely). Nothing about it is "super-secret", although it is a little more complex than just routing MouseEvents around.
  • by Bugmaster ( 227959 ) on Friday February 20, 2004 @04:02PM (#8342582) Homepage
    I agree that this real-time code-mutating thingy is pretty cool. But... why ? You take a moderate-to-major performance hit (all that code won't morph itself), and for what ? To stop people from reverse-engineering your program ? Why not just write it in a secure manner to begin with, so that reverse-engineering is not a threat ? It works for OpenSSH, after all, it can work for anyone else too.
  • Re:do what i do (Score:4, Interesting)

    by tmasssey ( 546878 ) on Friday February 20, 2004 @04:04PM (#8342627) Homepage Journal
    Sadly, most of the Indian programmers I've spoken with have better English than most programmers I've met (or comments on Slashdot I've read), never mind L337 HAX0R D00D$...

  • by JamesOfTheDesert ( 188356 ) on Friday February 20, 2004 @04:08PM (#8342692) Journal
    GNU/Linux is free software, and thus there is nothing to reverse-engineer.

    Unless you want to eat your cake and have it, too. Suppose you want to build on some OSS stuff, but don't want to have others be able to do the same with your own code. So, you follow the letter of the GPL and release the source, but make it so damn hard to decipher that it might just as well be binary.

  • by Anonymous Coward on Friday February 20, 2004 @04:21PM (#8342902)
    PSCP is fancy patent-speak for self modifying code, ala "Reflections on Trusting Trust" by Ken Thompson.

    This article has several glaring errors:
    1. Most of MS problems are due to buffer overflow problems in compiled code, not MSIL.

    2. He is really talking about protecting code from theft, not security from hackers. Must be that MS kool aid going to his head.

    3. There has to be non-trivial overhead with the PSCP process. If you are scrambling things at run-time, there has to be a run-time monitor doing the scrambling and something doing the unscrambling or translation for the processor. These scramblings have to have deterministic patterns, otherwise a computer wouldn't be able to execute instructions, load memory, etc. These patterns can be hacked. Also, these patterns are based on pseudorandom number generators, which can be hacked. The only thing this whole process will do is make core dumps harder to parse for the Indian technical help desk in Hyderabad.

    4. Setting all variable names to a single name (e.g., 'a') in a program is the dumbest description of an obfuscator I've ever read. I've studied them in depth and have never heard of this.
  • Re:Won't work (Score:2, Interesting)

    by Ann Elk ( 668880 ) on Friday February 20, 2004 @04:23PM (#8342941)

    Ah, ProLock, now there's a blast from the past.

    In a previous life, I worked in a group that tested third-party software, but my manager was too cheap to buy a separate copy for each tester. (The company will remain nameless to protect the guilty.) One of my "unoffical" job duties was breaking copy protection of new apps (mostly games) so we could all test them.

    One day, we were visited by a group of folks from ProLock. Of course, they claimed their protection scheme was completely unbreakable. As if.

    Their basic technique was pretty solid. By burning a hole (with frigin' lasers) in the floppy, they introduced physical changes in the media that absolutely could not be duplicated with software.

    As Deadstick mentioned, the crack consisted of a two-byte change somewhere on the disk. Basically, at some point the program called a routine to see if the special laser-blasted sector was present. If so, the program continued. The patch was just to pretend the sector was always there.

    As an analogy, the ProLock scheme was like putting a bank vault lock on a rice paper door. Instead of wasting time picking the lock, it's much easier to just rip another hole in the door.

  • Re:do what i do (Score:3, Interesting)

    by Dalcius ( 587481 ) on Friday February 20, 2004 @04:41PM (#8343158)
    That sounds pretty bad.

    The company I work for has some legacy code still in use... written in Fortran and originally developed on some old unix system. The compiler limited variables, function names, program names, etc. to 5 characters.

    5 characters.

    Combine that with the lovely syntax of Fortran 77, tons of gotos, pages of variable declarations, sparse comments, NO whitespace whatsoever, and then picture yourself debugging that for a living.

    And if that weren't enough, our sourcebase was purchased from a German company. Up until a few years ago, German comments could still be found.

    Yes. Laugh it up. :)
  • Re:do what i do (Score:1, Interesting)

    by Anonymous Coward on Friday February 20, 2004 @04:42PM (#8343171)
    That's because they don't learn from American schools. My son's lunch menu routinely offers "Taco's" as the Wednesday entree. My son is in fourth grade and already he'd like to know who Taco is and whether he brought enough food for the entire school. I'm not ready to try to explain CmdrTaco to him.

    And the poor results are hardly limited to programmers. I feel certain that the management did not consist of programmers at the restaurant I saw with a sign proclaiming that they were under "new management", complete with the scare quotes. I presume that means the same people, but they received some sort of training, or perhaps lobotomies.
  • by Anonymous Coward on Friday February 20, 2004 @04:58PM (#8343368)
    Reminds me of discussions way back when with C, Pascal and C++. People would not switch from assembler because C was too slow with too much overhead. The Pascal P-System was slow too. C programmers don't want to use C++ because it is so much less efficient than C.

    After you get through all this silliness you find out that particular implementations and programming techniques were the root cause of any real or perceived slowdown.

    Move forward a few years and Object Pascal is one of the most efficient, although less popular, implementation tools with faster compilation. Java is moving in that direction to.

    The bottom line is how well are things working now for you. JITs and AOTs compilers are being used with Java, C# and other OO languages with great results.
  • by Anonymous Coward on Friday February 20, 2004 @05:19PM (#8343664)
    ...this column is incoherent.

    Microsoft's security bugs are not due to .Net. Most of their own products are not managed code. They are C++. Getting buffer overflows in .Net is about as likely as getting them in Java programs.

    He claims .Net is insecure because you can read the source easier. But opensource is pretty secure, and the fact that C++ code is compiled doesn't help it a whole lot. Counter the weak protection of compilation with the built-in security policies that the .Net runtime can enforce, and I'd say managed code is more secure out of the box.

    The real kicker is when he advocates using an obfuscator to watermark opensource code. Um, yeah. That'll work.
  • Re:do what i do (Score:1, Interesting)

    by Anonymous Coward on Friday February 20, 2004 @06:32PM (#8344701)
    No, Indians speak much better English than we do. And they use it day to day in the business world.
  • I've coded projects in both Java and C++ (and benchmarked them, actually), and in my experience (which is just that) the C++ ran more quickly than Java. You're entitled to disagree. Where I work we use OptimizeIt which does help things out, but our software still runs absolutely dreadfully (I won't deny that likely much of it is the programming itself). But I still stand by my contention that C++ allows you to run faster than Java. It allows you greater control (directly) and doesn't impose any of the overhead of hierarchy that Java does.

    I enjoy Java and program in Java and will confess that the stuff they include is usually useful (our software would probably be fscked if we didn't have GC or any of these other features, they just degrade performance (and I believe they have to). I would love to hear your response.

    When I describe the mark and sweep method, it is the most common, and will likely be the most frequently used. However check here [javaperfor...tuning.com] for an analysis of the other types. If garbage collection were a lightweight, trivial process, then why would Java need to implement 6 different schemes?

    Incidentally, we tried testing the various different schemes here and it was a mess trying to get anything out of it.

    Yeah, all you have to do is null the object and it'll be collected. Keep in mind, though, that in C++ you just do a delete (or a dealloc) and it's gone, you don't need to scan the whole environment doing reference counts and then doing the corresponding deallocs.

    I agree that Java is fine, and it's sturdy, and it's a delight to use, it's just that (all the way up to the great-grandparent) I think that he got it right when Java programmers are (rightfully so) more concerned about all these optimizations (why do you think they're necessary?) than about any sort of run-time security.

    Again, just my opinion.
  • Re:do what i do (Score:3, Interesting)

    by darnok ( 650458 ) on Friday February 20, 2004 @08:12PM (#8345656)
    You don't have to be a non-English speaker to write code like that.

    Many years ago, I inherited control of a R&D team. A year or so earlier, they'd hired a contractor for a couple of months; this contractor had created a ~1000 line Perl module that had acquired "sacred code" status since he'd left.

    Any attempt to alter, extend or tweak the sacred code in any way resulted in it failing. It was totally bereft of comments, frequently had multiple commands within a single line of code, lots of "magic" regular expressions, and variable names that didn't make sense to any of us. Most variables had global scope, variables were frequently reused for no apparent reason and it didn't even have blank lines between functions.

    I know Perl is frequently a write-only language, but this was something else. I can't believe a human could actually produce code like this on purpose; he must have used some sort of Perl obfuscator.

    Everyone in my team was terrified of the sacred code, as they knew working on it was doomed to failure.

    One of the most enjoyable times I had on that job was when the guy who created the code came back and asked for more work...
  • by Anonymous Coward on Friday February 20, 2004 @09:12PM (#8346145)
    Nope, Basque isn't related to either of them, it's a true language isolate.

    Finnish and Hungarian are probably related, but not closely. Not like Danish and Norwegian, which are basically as different as British and American; not even as close as French and Spanish, which are recognisably cousins even though they're mutually incomprehensible. More like Japanese and Korean, in fact: some structural similarities that suggest a relationship, but basically no shared vocabulary.
  • by Anonymous Coward on Friday February 20, 2004 @10:00PM (#8346432)
    "There are probably some rare instances when a specialized software technique is developed and you want to keep its implementation specifics secret. I have yet to run into a single instance of this after many years in the industry."

    Interesting. I think the same. Games and music yes, they rave about copy protection and obfuscation, but in defence, well at least not the projects I worked on in ADA, the issue was never there. Surely that's a more serious application?

    Once there was a conversation about whether a missile could run a 'run-once' program that could not be recovered if it was a duff and didn't explode. I think the answer turned out to be yes but if and only if the trajectory is sequence(s) computed on launch - that is, if the program isn't going to encounter any unknowns that dont have a branch pre-run all the way to a sucessful hit. This takes up shitloads of memory but you can load it in RAM and it will erase itself as it goes.... a run once branched script that cleans up behind itself.

    The fatal flaw if you attempt to apply this to media copy protection is that in the missile the enemy has no opporunity to read the code while it is in flight, but with deleiverable media you have to present the whole code in its original entirety.

    This is not a subtle aspect of code. Its the deep implications of simple logic.
  • by GnrcMan ( 53534 ) * on Saturday February 21, 2004 @12:42AM (#8347265) Homepage
    Yeah, I hear you. I didn't even mention the problems with premise of reverse engineering causing security holes. If that were true, where does that leave open source software, where you get to see the actual source code? I seem to remember hearing him expound on the virtues of open source in some article or other. But in this one, he forgets all that, and goes after MS with what can, at best, be considered a red herring.

    His article seems to be primarily about byte code obfuscators. An interesting topic, but he muddles it completely with factual errors. Hmm... enough ranting, methinks. It's probably not worth it.
  • by Arker ( 91948 ) on Saturday February 21, 2004 @03:37AM (#8347886) Homepage

    You are aware that hungarian and finnish are closely related languages, right? And that basically no other language is closely related to either of them? (IIRC, basque is, but its chances to become an official UNO language are pretty slim either)

    Umm no. You're way off, sorry.

    Finnish and Hungarian are related, but not very closely. They're both Finno-Ugric languages, but the relation is roughly as distant as that between, say, German and Greek for instance. And probably less apparent, since German has quite a few Greek loan-words, particularly in scientific fields, but Hungarian and Finnish don't borrow from each other noticeably.

    Other Finno-Ugric languages include Mansi, Khanty, Udmurts, and Mordvin, the balto-finnic languages (or dialects, depending on who you ask) which includes Finnish, Estonian, Karelian, Izhora, Veps, Vod, and Liv; and the closely related Saami languages spoken in the far north of Sweden, Norway, Finland, and northwest Russia.

    This group is in turn more distantly related to the Samoyedic languages spoken in parts of Siberia.

    Basque isn't closely enough related to any of these for linguists to have established any relationship, although many have suspected there was one and put a lot of time and energy into trying to find evidence of one.

This file will self-destruct in five minutes.

Working...