Slashdot Mirror


New Encryption Method Fights Reverse Engineering

New submitter Dharkfiber sends an article about the Hardened Anti-Reverse Engineering System (HARES), which is an encryption tool for software that doesn't allow the code to be decrypted until the last possible moment before it's executed. The purpose is to make applications as opaque as possible to malicious hackers trying to find vulnerabilities to exploit. It's likely to find work as an anti-piracy tool as well. To keep reverse engineering tools in the dark, HARES uses a hardware trick that’s possible with Intel and AMD chips called a Translation Lookaside Buffer (or TLB) Split. That TLB Split segregates the portion of a computer’s memory where a program stores its data from the portion where it stores its own code’s instructions. HARES keeps everything in that “instructions” portion of memory encrypted such that it can only be decrypted with a key that resides in the computer’s processor. (That means even sophisticated tricks like a “cold boot attack,” which literally freezes the data in a computer’s RAM, can’t pull the key out of memory.) When a common reverse engineering tool like IDA Pro reads the computer’s memory to find the program’s instructions, that TLB split redirects the reverse engineering tool to the section of memory that’s filled with encrypted, unreadable commands.

215 comments

  1. Bring it on, folks! by aaaaaaargh! · · Score: 5, Insightful

    The crackers are going to love breaking this in 1, 2, 3 ...

    1. Re:Bring it on, folks! by halivar · · Score: 4, Funny

      Ah, but count-up's are indefinite. Now they won't find it until they count to a million or something. Should have counted down, but now it's too late...

    2. Re:Bring it on, folks! by Anonymous Coward · · Score: 5, Interesting

      I did a technological solution similar to this where the TLB split was done in ring -1 (VMX/SMM). Ridiculously easy to decrypt and execute on the fly only as a given page is executed. Really fast. Key exchange happens in ring -1 with an external licensing server. The only way to defeat my mechanism is to get into ring -1 before I did which of course is possible to do. No DRM system is perfectly secure. But this was orders of magnitude more difficult than your average system. If you attached a debugger to the protected process, you literally would see the encrypted opcodes. You could single step and execute as normal but the executable code was always encrypted from the user's perspective because data reads would always return the encrypted code whereas instruction reads would always be decrypted.

      The biggest problem I had with this technology actually happened to be the compiler. Some compilers like to mix read-only data into code segments. It wasn't an impossible solution to fix, but it was the biggest headache.

    3. Re:Bring it on, folks! by Anonymous Coward · · Score: 0

      Not if there is overflow.

    4. Re:Bring it on, folks! by fahrbot-bot · · Score: 1

      The crackers are going to love breaking this in 1, 2, 3 ...

      Better crackers are going to love breaking this in 3, 2, 1 ... :-)

      --
      It must have been something you assimilated. . . .
    5. Re: Bring it on, folks! by Anonymous Coward · · Score: 1

      If I ran your program in a VM, wouldn't it be easy to intercept your decryption routine?

    6. Re:Bring it on, folks! by wierd_w · · Score: 4, Interesting

      Sounds like all you need to analyze this, is a "fake" processor.

      EG, running this inside something like BOCHS, which has a built in x86 debugger, and runs a lot like a hypervisor. This encryption would need to be able to detect living inside a fully emulated system and simply refuse to operate in order to be safe from this kind of analysis. BOCHs will let you step through exactly what instructions the emulated CPU is actually doing, regardless of the data that is stored in the memory allocated to the emulator's process.

      Don't get me wrong-- this makes a nasty bump in the road for career data thieves, but forensic analysis of the encryption is not completely thwarted.

    7. Re:Bring it on, folks! by Anonymous Coward · · Score: 1

      So are count-downs. 3, 2, 1, 0, -1...

    8. Re:Bring it on, folks! by sexconker · · Score: 4, Funny

      So are count-downs. 3, 2, 1, 0, -1...

      So are count-tos.
      1, 2, 2 and a half, 2 and three quarters...

    9. Re: Bring it on, folks! by Anonymous Coward · · Score: 5, Interesting

      Well that depends a bit. It would be moderately difficult with VMware since there aren't good facilities to get after what you are looking for. It would be easier on Bochs which has integrated VM debugging. Although with good obfuscation it is still difficult. But as I mentioned above in my post, this kind of a system isn't impossible to break, just more difficult.

      Back before DVD drm was generally broken with DeCSS, I had my own mechanism for breaking DVDs It was cumbersome but it worked. I would use a software DVD player to unlock the DVD drive. I had hardware acceleration for the DVD decoding itself. This meant that 90% of the CPU time that was in use was mostly spent doing decryption. So I would attach a debugger, and randomly break in and statistically speaking it wouldn't take me long to catch the decryption function in action. From there it was trivial to find the key and once I had the key I could externally decrypt the DVD.

      You could do a similar thing for this kind of a problem. If you are in ring -1, statistically speaking there is a good chance you are running the decryption algorithm. Once you find that, it isn't too hard to trace back to the decrypt init function and extract the key.

      This is part of the reason I gave up on (making) DRM stuff. No matter how hard you make it, it's always easy to crack with the right know how and tools. ANYTHING drm and be cracked. Wanna play with my netflix downloader?

    10. Re:Bring it on, folks! by Anonymous Coward · · Score: 1

      Actually, bochs might not work in this case.

      Boch's debugger will honor paging, caches, and normal CPU mechanisms.
      Just recently I was running code on the very top of a stack, only a couple bytes from an unmapped page, and it was enough to confuse bochs's debugger. It would keep running normally, but the debugger won't show you what was actually running.
      My point being, the debugger isn't a special case that shows you directly what the CPU is doing, it's just a regular emulated memory access. I'm pretty sure in that case the debugger would show the encrypted instructions too.

    11. Re:Bring it on, folks! by TemporalBeing · · Score: 1

      Sounds like all you need to analyze this, is a "fake" processor.

      EG, running this inside something like BOCHS, which has a built in x86 debugger, and runs a lot like a hypervisor. This encryption would need to be able to detect living inside a fully emulated system and simply refuse to operate in order to be safe from this kind of analysis. BOCHs will let you step through exactly what instructions the emulated CPU is actually doing, regardless of the data that is stored in the memory allocated to the emulator's process.

      Don't get me wrong-- this makes a nasty bump in the road for career data thieves, but forensic analysis of the encryption is not completely thwarted.

      Not to mention that it is extremely hard for a program to detect that it is inside a VM like Bochs unless the VM exposes something that can be detected - e.g a BIOS string, hardware signature, etc. Even then, that's easy for a cracker to fix by modifying the VM to have a different string or hardware signature.

      --
      Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
    12. Re:Bring it on, folks! by Anonymous Coward · · Score: 0

      Oh, would you look at that? I can run code in an EMULATOR, and dissect it at will.

    13. Re:Bring it on, folks! by Anonymous Coward · · Score: 0

      And someone will just pay them off or give them a job to be quiet.

      It basically already happened with the new ReCaptcha system when that guy was cracking it and posting it on Git or something.

      No system is perfectly secure, but everything else around it is secure if the price is good enough.

    14. Re:Bring it on, folks! by Anonymous Coward · · Score: 0

      If you were truly serious about encrypting your data, you'd store your constants in Write Only segments ;-)

    15. Re:Bring it on, folks! by Anonymous Coward · · Score: 1

      So, what was the performance impact? It sounds like this would really mess with modern caching/prefetching procedures...

    16. Re:Bring it on, folks! by Anonymous Coward · · Score: 0

      I was literally looking into a similar solution just a few days ago. This technique has already been defeated.

      ring -1 with an external licensing server

      This implies network communication. this assumes some high speed bus interconnect, such as PCI-express. DMA is available to all high speed devices. Using DMA you can access and rewrite points of memory. In doing so your userland process can hijack the TLB and thus gain access to the key stored in cpu registers. This defeats methods such as limiting SSE or debug registers to ring 0, as your process was injected with the help of an external device. Easy fix: disable DMA, but that destroys performance. Slightly more difficult fix: enable authorization on your high speed interconnects. This requires a redesign of the compute platform and something that we will likely see over the coming months. There is some hackery with VTx/IOMMU that can be done, but this isn't natively supported everywhere yet.

      Just for an example of how easy this is to defeat, external firewire devices have DMA access. So you can just load up a laptop acting as a firewire device and break the system (traditional hacking tricks can gain userland access such as hijacking the bootloader and virtualizing specific systemcalls)

    17. Re:Bring it on, folks! by Anonymous Coward · · Score: 0

      same AC as above, just replying to myself (can't edit comments in 2015? come on slashdot)

      in a multicore system you could leverage the L1 cache of a core. this is basically the approach sony and microsoft took for the PS4 and xbox. since the L1 cache is only available to the processor and not directly addressable, you could store all of your keys there. of course this has performance implications but with 8x8 systems becoming the norm and more, we can afford to waste a cpu on cryptographic functions.

      we're slowly moving towards a digital fenced system, it won't be solved in the short-term by technical means but by shear brute force gorilla underhanded techniques (l1 cache of a cpu core)

    18. Re: Bring it on, folks! by tlambert · · Score: 4, Interesting

      Back before DVD drm was generally broken with DeCSS, I had my own mechanism for breaking DVDs It was cumbersome but it worked.

      Me too. I electrically emulated a LVDS flat panel and reconstructed the high resolution image from the LVDS.

      Works great for BluRay encryption, and for projectionist monitor screens in movie theaters, too, since the flat panels themselves are *after* the content decryption.

    19. Re:Bring it on, folks! by ranok · · Score: 1

      Here is a less FUD-y write-up by the author: http://blog.jacobtorrey.com/ha...

      --
      (>'.')>
    20. Re:Bring it on, folks! by Zardus · · Score: 1

      That's actually the opposite of true. Many techniques (http://static.usenix.org/event/woot09/tech/full_papers/paleari.pdf, http://roberto.greyhats.it/pro..., http://honeynet.asu.edu/morphe..., http://www.symantec.com/avcent...) exist to identify the presence of a CPU emulator, because these things aren't (and will likely never be) perfect. Most of those techniques don't even rely on timing attacks. Once you introduce timing attacks (*especially* if there's an external source of time information), all bets are off.

      --
      You can mod your friends, you can mod your nose, but you can't mod your friend's nose.
    21. Re:Bring it on, folks! by cb88 · · Score: 1

      Just detect if CPU performance is above a certain threshold.... Bochs is slow dead slow as is anything else that emulates adequately enough to make this vector of attach relevant even FPU x86 cpus are at 486 performance levels these days.

    22. Re:Bring it on, folks! by DMUTPeregrine · · Score: 1

      This is essentially just TRESOR with a different acronym. It's already been broken.

      --
      Not a sentence!
    23. Re:Bring it on, folks! by Anonymous Coward · · Score: 0

      model the processor in a large fpga. at that point you can create a simple probe to pull out the key.

    24. Re:Bring it on, folks! by TemporalBeing · · Score: 1

      That's actually the opposite of true. Many techniques (http://static.usenix.org/event/woot09/tech/full_papers/paleari.pdf, http://roberto.greyhats.it/pro..., http://honeynet.asu.edu/morphe..., http://www.symantec.com/avcent...) exist to identify the presence of a CPU emulator, because these things aren't (and will likely never be) perfect. Most of those techniques don't even rely on timing attacks. Once you introduce timing attacks (*especially* if there's an external source of time information), all bets are off.

      You do realize that Bochs does software emulation of each instruction, and that you can control every aspect of the emulated computer don't you?

      If you are running something under Bochs or something like it and don't care about the performance you can actually make it lie to the software underneath about timing so that the software still thinks it is running at the normal rate but in reality it isn't - Bochs after all implements the base system clock not relying on an external source. This is also why Bochs can be used to run x86 software on a non-x86 platform (f.e Sparc, PowerPC, ARM).

      Yes, Bochs is dog slow; but it's a matter of how you configure it. And to be truthful, because of how Bochs is implemented I'm sure that it can be made to fool any of those detections.

      --
      Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
    25. Re:Bring it on, folks! by TemporalBeing · · Score: 1

      Just detect if CPU performance is above a certain threshold.... Bochs is slow dead slow as is anything else that emulates adequately enough to make this vector of attach relevant even FPU x86 cpus are at 486 performance levels these days.

      Until you adjust the base clock so that the software running under bochs thinks it is running at 1GHz while in reality it may be running at 1 instruction per minute. Yes - it's possible to do since Bochs doesn't rely on host system for any hardware, unless you introduce the qemu module for Linux to bring it to near native speeds but someone employing this kind of reverse engineering wouldn't want to do so.

      This is possible because Bochs is a 100% software emulated computer. They emulate everything, and even have their own motherboard and video card (VGA) BIOS stacks.

      --
      Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
    26. Re:Bring it on, folks! by Anonymous Coward · · Score: 0

      wouldn't it be possible to make part of the chip execute encryption and decryption only after checking with a remote server owned by the suppliers of the software. Memory is getting large and cheap enough, that I would think one could build a pre-authentication chip with decryption keys stored in a part of the chip not accessible to the outside world that is meant for pre-authenticating only one application, subroutine or function in a large database. This part of the chip would be a black box with inputs and outputs but outside this instructions would be encrypted and randomized. The chip would have to be disassembled in order to see the output of the chip. In this case an emulator like BOCHS would do no good because the instructions of this part of the chip wouldn't be available to the BOCHS programmers to reverse engineer easily. Taking apart a chip in layers is close to an impossible task and to make it even harder with the advent of 3D chips it would be even more difficult to decipher function of the layers. I suppose this is generally the idea of DRM which everyone hates. If we can make smart cards that are nearly impossible except by the NSA to take apart and break in, why couldn't we do the same with the chips. Then again everyone would probably boycott such a chip with silly notions such as only a privileged few can know whats going on...wait current events would show that isn't such a silly notion ;-)

    27. Re:Bring it on, folks! by linuxrocks123 · · Score: 3, Interesting

      I am the author of Loop-Amnesia, a system similar to TRESOR, but more sophisticated in that it supports multiple encrypted volumes. After looking over the article, it does not appear that this is at all similar. It also does not appear to protect against the cold boot attack as claimed.

      The authors claim a 2% performance reduction. Such a reduction implies that the instructions are not being decrypted literally on-the-fly; the reduction would be much more severe then. They're using a tactic called a "TLB split", which corrupts the cached page table so that reading memory gets you different results from executing it. A page of executable code is likely decrypted with a key stored in the CPU, put in a different physical page, and then the TLB split is performed so that executes go to the other page while reads still go to the encrypted page.

      The cold boot attack dumps physical memory. This tactic corrupts virtual memory to frustrate analysis. The executable code is still stored in RAM somewhere, just not somewhere where you can get to it by reading from a virtual memory address. The cold boot attack would still work fine.

      Finally, TRESOR and Loop-Amnesia are not broken. TRESOR-HUNT only works if you enable DMA on your FireWire bus. You shouldn't be doing that anyway.

      --
      vi ~/.emacs # I'm probably going to Hell for this.
    28. Re: Bring it on, folks! by Anonymous Coward · · Score: 0

      >netflix downloader

      Can you give a short outline (no circumvention hints) how Netflix protects its content?

    29. Re: Bring it on, folks! by Anonymous Coward · · Score: 0

      How does Netflix go about content protection anyway?

    30. Re: Bring it on, folks! by Anonymous Coward · · Score: 0

      I'm jelly, I always wanted to try this. High end FPGA?

    31. Re:Bring it on, folks! by Anonymous Coward · · Score: 0

      Just detect if CPU performance is above a certain threshold.... Bochs is slow dead slow as is anything else that emulates adequately enough to make this vector of attach relevant even FPU x86 cpus are at 486 performance levels these days.

      I'm not sure how your application is going to know that code is executing slowly when I control the interfaces to performance counters, RTC, etc.

      Even if you create some kind of elaborate [query a secure external source over a network that you control] system, you still need code that acts on the knowledge that your application is being debugged. This isn't exactly hard to bypass if I have control over the flow of execution (which is pretty much the whole point of debugging).

    32. Re:Bring it on, folks! by Anonymous Coward · · Score: 1

      Zeno would have been so proud :)

    33. Re:Bring it on, folks! by penguinoid · · Score: 2

      The crackers are going to love breaking this in 1, 2, 3 ...

      Odds are the antivirus companies will beat them to it. Else how will they protect against encrypted viruses? Gotta at least maintain the pretense of protection, right?

      --
      Don't waste your vote! Vote for whoever you want, unless you live in a swing state it won't matter anyways
    34. Re: Bring it on, folks! by countach · · Score: 1

      That was my first thought too on reading this story. They've made it hard to see the program instructions, so just go back a step and reverse engineer the decrypting algorithm.

    35. Re:Bring it on, folks! by Anonymous Coward · · Score: 0

      TRESOR-HUNT only works if you enable DMA on your FireWire bus

      how about if you enable DMA on your PCI-X bus?

    36. Re: Bring it on, folks! by Jane+Q.+Public · · Score: 1

      But as I mentioned above in my post, this kind of a system isn't impossible to break, just more difficult.

      Yes, indeed. Soon after something like this is released, new tools are built to break them.

      While I don't doubt the HARES system adds another level of difficulty, anything that can be executed can be decrypted. The very worst that could happen is that it would have to be run through an ICE or software emulator that records the data and instructions as they are executed.

    37. Re:Bring it on, folks! by cb88 · · Score: 1

      Yep that trick totally evaded me... I don't doubt that would work fine though.

      Now.. what about if it had to be connected to the internet to validate the installation at startup >:W

      And the server had to give it's response in a reasonable amount of time ie 100ms and you couldn't fake it on the PC due to encryption. Now I don't doubt that could be broken but it would be a tad harder at least perhaps ... maybe :D

    38. Re:Bring it on, folks! by Anonymous Coward · · Score: 0

      What method did you use to trigger decryption of a new page?

    39. Re:Bring it on, folks! by linuxrocks123 · · Score: 2

      I assume you mean PCI Express, since PCI-X is an obsolete standard not used on modern systems, but the answer is the same for PCI, PCI-X, and PCI Express, so no matter.

      The TRESOR-HUNT attack works by having the attacker plug a malicious peripheral into the running computer, then having that peripheral use DMA to write malicious code into the computer's RAM which copies the encryption key out of the CPU.

      Plugging a PCI card into a computer while it is running is likely to fry the motherboard, or at the very least cause an immediate system crash, so this is not a risk.

      --
      vi ~/.emacs # I'm probably going to Hell for this.
    40. Re:Bring it on, folks! by jtgd · · Score: 1
      A friend of mine suggested such an idea to me 15 years ago. This is what I told him.

      You run it inside an x86 interpreter which simulates the CPU all the way through the decryption. Then you snapshot the decrypted code and rebuild the app without the decryption and substitute the decrypted code. Now it's just a plain app. If it tries to "detect it's environment" (read the clock, etc), the simulator just tells it whatever it wants to hear. It cannot know it's being simulated, it's just code.

      --
      J
    41. Re:Bring it on, folks! by Anonymous Coward · · Score: 0

      The TLB splitting in this is also done in ring -1. Torres presented his work on this at BlackHat this year. His work did address the mixed code and data pages. Everyone is an arm-chair reverse engineer here, but this definitely raises the bar for reversing programs. You need nested virtualization to subvert it, in conjunction with convincing the key authority that it should release a key to you. It doesn't appear HARES is trying to provide a complete protection around reversing, it's a component. The key escrow/distribution problem that exists everywhere still exists here, although distribution platforms for making this a realistic approach to protecting executables are emerging. Think App Store, where things are submitted for distribution, but the vendor can do the final signing, with a key stored in hardware. This is an interesting bridge to what SGX is supposed to provide, without the need for newer hardware and code change.

    42. Re: Bring it on, folks! by tlambert · · Score: 1

      I'm jelly, I always wanted to try this. High end FPGA?

      There are commercial emulation chips available, used for testing everything up to the flat panel. You could build your own FPGA if you wanted to, I suppose.

    43. Re: Bring it on, folks! by Anonymous Coward · · Score: 0

      My thoughts exactly. Sounds like a challenge every cracker is waiting for.

    44. Re: Bring it on, folks! by Anonymous Coward · · Score: 0

      Blu Ray encryption eh? Already busted and software makes it easy to resize now. Slysoft

    45. Re:Bring it on, folks! by linuxrocks123 · · Score: 2

      For all practical purposes, you are incorrect. Desktops and laptops do not typically support PCI Express hot swapping; this is a feature implemented only on high-end server chipsets.

      Additionally, grow up.

      --
      vi ~/.emacs # I'm probably going to Hell for this.
    46. Re:Bring it on, folks! by Anonymous Coward · · Score: 0

      FYI, I have hot-swapped a PCI card on a normal consumer desktop and it just worked (this was on a Windows XP machine a long time ago). It was a sound card that had gotten unseated in transit. I pushed it in while the computer was on and it started working. That said, it may have been electrically connected on some but not all of the leads, making it a somewhat different situation from a full hot swap.

      On the cold boot attack, I did not read the details and I had been expecting some trick involving not letting the decrypted code get back to main memory, since I thought cold boot attacks only worked on DRAM, not SRAM, but Wikipedia seems to indicate that's not actually true.

    47. Re:Bring it on, folks! by linuxrocks123 · · Score: 1

      Heh ... you're lucky. I seated a PCI card in wrong once and it shorted out. Fortunately, it was only $10 or so to replace.

      But, you may have a point: it might be possible to electrically tap the PCI or PCI Express bus and do bad things with DMA, even if the bus wasn't built to support hot-swapping. You'd probably need custom hardware, a lot of time, and a lot of luck, though. Also, you'd need to keep power to the CPU on, meaning stuff like chassis intrusion detectors would be a sufficient countermeasure.

      --
      vi ~/.emacs # I'm probably going to Hell for this.
    48. Re:Bring it on, folks! by TemporalBeing · · Score: 1

      Yep that trick totally evaded me... I don't doubt that would work fine though. Now.. what about if it had to be connected to the internet to validate the installation at startup >:W And the server had to give it's response in a reasonable amount of time ie 100ms and you couldn't fake it on the PC due to encryption. Now I don't doubt that could be broken but it would be a tad harder at least perhaps ... maybe :D

      Until you have someone that has a slow internet connection, f.e sat-com where latencies are typically around 500ms or worse. A poor network, or bad mix of equipment, can make latencies really bad even on an otherwise good network.

      For example, my Dell D600 from 2003 had a Broadcom networking chipset in it. The 1GBit interface had a problem with some Cisco routers. The previous routers it was on were 10/100 and it had no issue; but when they upgraded the router to 10/100/1000 the new router had an issue with the auto-negotiation. Until I figured that out, the network speed when from 100 megaibts to 17 kilobits. Outlook generally worked okay (no choice at that company) but anything that made more use of the network had big issues. (Outlook worked to view what was in my inbox, because of the small messages; but even then it was slow).

      So even doing something like that would be risky - of course, you could also just capture the network traffic and hack that too; since you can control the network in Bochs, if you were really going that far it wouldn't be an issue to capture and adjust it as required to make it think it was talking to the real thing. This is actually relatively easy:

      1. Setup a transparent MITM proxy so SSL connections can be handled and neither side necessarily knows about it; though they would have to allow you to specify a client proxy because some places require you to do so to get to the Internet any how, so you could just use a client proxy too.
      2. capture the network traffic using tools like Wireshark for several different runs of the program
      3. compare the deltas to figure out what is changing

      Now you just setup a server to either play back the captured data, making the emulated system think it is running at that point when the older software did, or if you figured out enough of the traffic setup something to fake the other side in a way you control.

      FYI - this is how SaMBa got started (at least for Windows compatibility) - network analysis of CIFS/SMB traffic with Windows. They found some interesting things doing so - read their docs for things like single-bit flip reboots the Windows computer kind of stuff.

      There's very little that cannot be cracked in this regard.

      --
      Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
    49. Re:Bring it on, folks! by TemporalBeing · · Score: 1

      A friend of mine suggested such an idea to me 15 years ago. This is what I told him.

      You run it inside an x86 interpreter which simulates the CPU all the way through the decryption. Then you snapshot the decrypted code and rebuild the app without the decryption and substitute the decrypted code. Now it's just a plain app. If it tries to "detect it's environment" (read the clock, etc), the simulator just tells it whatever it wants to hear. It cannot know it's being simulated, it's just code.

      In a sense, that is exactly what Bochs is. It's a true Virtual Machine in that it software interprets every CPU instruction, and emulates every piece of connected hardware - RAM, motherboard, video, network, usb, chipsets, etc - to do so. A truely fine tool for OS and hardware developers.

      --
      Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
  2. Already sloved by PPH · · Score: 4, Funny

    I keep my code undeadable with a liberal use of goto statements.

    --
    Have gnu, will travel.
    1. Re:Already sloved by halivar · · Score: 4, Funny

      I keep my code undeadable with a liberal use of goto statements.

      You made an infinite loop with goto?

    2. Re:Already sloved by BronsCon · · Score: 5, Funny

      Is that your goto solution for preventing reverse engineering?

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    3. Re:Already sloved by fahrbot-bot · · Score: 3, Funny

      I keep my code undeadable with a liberal use of goto statements.

      I store my undeadable code using a Walking Dead technique, whereby the binary code is reaped from the the return statuses of zombie processes killed at the last possible moment ...

      --
      It must have been something you assimilated. . . .
    4. Re:Already sloved by Anonymous Coward · · Score: 0

      I once wrote an entire program of ~3000 characters length using nothing but IF and GOTO statements. I didn't know how loops were easily implemented in general worked at the age of ~10, but I implemented Langton's Ant* for a TI-83 handheld calculator without them.

      Shortly after I learned about FOR, WHILE, etc. and felt rather silly.

      * http://en.wikipedia.org/wiki/L...

    5. Re:Already sloved by wonkey_monkey · · Score: 3, Funny

      That's a terrible joke. Goto your room!

      --
      systemd is Roko's Basilisk.
    6. Re:Already sloved by Anonymous Coward · · Score: 0

      But that's where I've just comefrom.

      You're telling me I need to goto my room again?

      I hate this house!

    7. Re:Already sloved by eclectro · · Score: 1

      I keep my code undeadable with a liberal use of goto [slashdot.org] statements.

      Or simply use a language made out of gotos - Forth.

      It'll never be "decrypted."

      --
      Take the cheese to sickbay, the doctor should see it as soon as possible - B'Elanna Torres, "Learning Curve"
    8. Re:Already sloved by mr_mischief · · Score: 5, Funny

      Hardware by Intel, code by Escher.

    9. Re:Already sloved by BronsCon · · Score: 1

      You thought his code would be any better than his lyrics? (yes, I know who M.C. Escher is... I just prefer to imagine him as a rapper)

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    10. Re:Already sloved by Anonymous Coward · · Score: 1

      That's also George R.R. Martin's publishing model for Game of Thrones.

    11. Re:Already sloved by Anonymous Coward · · Score: 0

      Usher MCing on his Intel Mac.

    12. Re:Already sloved by Rudisaurus · · Score: 1

      I keep my code undeadable with a liberal use of goto statements.

      You made an infinite loop with goto?

      Hasn't everyone at some point early in their career?

      --
      licet differant, aequabitur
    13. Re:Already sloved by wonkey_monkey · · Score: 1

      (yes, I know who M.C. Escher is... I just prefer to imagine him as a rapper)

      You and Seth MacFarlane.

      --
      systemd is Roko's Basilisk.
    14. Re:Already sloved by PPH · · Score: 1

      Forth is a 'write only' language.

      --
      Have gnu, will travel.
    15. Re: Already sloved by Anonymous Coward · · Score: 0

      I keep my code unreadable by copy/pasting random snippets from StackOverflow (the question part, of course).

      That's all we've shipped so far.

    16. Re:Already sloved by rpstrong · · Score: 1

      My licence plate is an abbreviation for my favorite command: RANDOM GOTO

    17. Re:Already sloved by halivar · · Score: 1

      LOL, that was me for 5 years on QBasic until I looked at the help file. And then a new world of magical wonder was opened to me...

  3. The keys are in the CPU by Anonymous Coward · · Score: 1

    I assume by "inside the processor" they mean in the L2 or L3 cache. What is to stop someone from extracting the cached keys and decrypting the entire program? I assume they have some mechanism, but does anyone know what sort of mechanism that would be?

    1. Re:The keys are in the CPU by Anonymous Coward · · Score: 0

      The keys have to be loaded into the cache in the first place, so that is the point to attack.

    2. Re: The keys are in the CPU by Anonymous Coward · · Score: 0

      Easiest 'solution': run it in a VM where L2/L3 are virtual.

    3. Re:The keys are in the CPU by Gr8Apes · · Score: 1

      Seems silly as my CPU runs inside a grounded metal box.

      --
      The cesspool just got a check and balance.
    4. Re:The keys are in the CPU by hawguy · · Score: 1

      Seems silly as my CPU runs inside a grounded metal box.

      That only helps you until the 30 petahertz processors start shipping and they begin emitting X-rays. Then you'll need a lead vault.

    5. Re:The keys are in the CPU by Lehk228 · · Score: 1

      and lead undies

      --
      Snowden and Manning are heroes.
  4. More of the same: by Hartree · · Score: 5, Interesting

    Just another step along the road of "We own your computer, not you."

    1. Re:More of the same: by DocSavage64109 · · Score: 5, Insightful

      Assuming this encryption actually works, it probably wreaks major havoc with processor caching and branch prediction algorithms. I'd be interested in seeing benchmarks of this encryption in action vs the non-encrypted version.

    2. Re:More of the same: by Anonymous Coward · · Score: 0

      It would destroy/preclude that completely from working, at all, by definition. The only question, why couldn't they just get the key copied out of the cpu somehow with a tool? No 'cold boot' needed.

    3. Re:More of the same: by Anonymous Coward · · Score: 0

      If it works, it's tradeoff of security for speed seems to be worthwhile. That being said, I doubt it works. Time will tell.

    4. Re:More of the same: by Anonymous Coward · · Score: 0

      The road is actually leading toward "We own your computer AND you."

    5. Re:More of the same: by Rakarra · · Score: 2

      If it works, it's tradeoff of security for speed seems to be worthwhile. That being said, I doubt it works. Time will tell.

      Given a number of people here have already mentioned how this could be cracked, I'm not sure that you'll get much, if any security. After all, if you're looking for vulnerabilities, all you need is for those few hackers to care to have a VM that can analyze the cache. Meanwhile, the programs will be running slower for everyone. And Moore's Law is pretty much dead, so you can't just assume that faster and faster processors will make the slowdowns disappear.

    6. Re:More of the same: by Hartree · · Score: 1

      I admit I haven't looked into it deeply yet, but I suspect it may be able to switch in and out of this mode. Else, you'd have to precompile every thing you run in encrypted form and not be able to use any shared libraries. The binaries would be pretty tubby and performance would suck for the reasons you give.

      Run the license checks and some of the key code that's not very compute intensive in the encrypted space, and then shift context to run things you call to do the heavy work in unencrypted space.

    7. Re:More of the same: by faedle · · Score: 1

      What scares me more is the virus and malware creators getting ahold of this technology. If it does what is being claimed, imagine having to write a defense for malware so encrypted.

    8. Re:More of the same: by jtgd · · Score: 1

      I think they meant it to be "We own our code, not you."

      --
      J
  5. I believe this trick is old by Anonymous Coward · · Score: 0

    I remember hearing about it being used in Malware back in 2004, when I worked on a research project that used the split-TLB trick for data execution prevention, at Microsoft Research.

  6. Really? by jythie · · Score: 4, Insightful

    Does anyone in the industry who actually works with computers believe these kinds of claims? Such technologies are great for getting buy in from marketing, the legal dept, underwriters, and content owners, but outside making the life of developers more difficult I have not heard of them actually stopping reverse engineering.

    The only time these kinds of tools seem to 'work' is when you are producing something which lacks the popularity to be worth the effort, which is not a good sign.

    1. Re:Really? by mlts · · Score: 4, Informative

      We have had many, many technologies that were supposed to stop reverse engineering.

      I remember back in the Apple ][ days, a program called "Lock it Up" by Double Gold Software had anti-reverse-engineering things in it, and was advertised as sending the bad guys packing (one of which was doing "poke 214, 128" which would disable the BASIC prompt). Then we had obfuscators for C++, BASIC, Java, and other languages, same thing.

      This technology looks like it will be broken by running it in a VM, so I'm sure the next generation will have anti-VM stuff in it, and someone will just run a Bochs emulator (dog slow, but emulates everything 100%) to bypass that.

      My take: How about companies spend money on improving their software instead of playing with DRM which will get broken anyway? In the enterprise, the fear of an audit is good enough to keep people in compliance with Oracle licenses. For games, using CD keys is good enough. They can play locally, but can't go multiplayer without a proper key.

      If the code is so sensitive it -has- to be protected, put it in a tamper-resistant appliance, like a HSM.

    2. Re:Really? by davydagger · · Score: 4, Interesting

      Its possible, but entirely unlikely. There is going to be a massive performance hit. What they can do is encrypt RAM with the key directly in the CPU, something modern computer support.(See unmerged TRESSOR patches). They can then decrypt the data with hardware instructions(AES-NI), as they move main memory to the cache, either on die, on the motherboard which cannot be easily removed.(not within the timespan for coldboot attacks). harder to break does not mean unbreakable as well. If the operating system is rooted, it migh be very well easy enough to get the key from the CPU(AES is symetric, and no CPUs have HW implementations of asymetric ciphers.). If the key is burned when the CPU is made, it would be an industry-wide key. All it would take is one leak, one time, and everyone can now decrypt memory.

    3. Re:Really? by RabidReindeer · · Score: 1

      I remember a computer that operated in that fashion. It was the Texas Instruments TI-99/4A. Had this thing called a "GROM" that decrypted instructions before execution. It didn't make a lot of friends and very rapidly dove to obscurity.

      This more recent attempt makes me wonder about 2 things.

      First, encryption, like compression, is usually something that's applied to linear sequences. If you literally encrypted the code, then it seems like at a minimum the TLB pages would have to be decrypted as units, since the first branch instruction that came along would otherwise wreck the whole scheme.

      Secondly, for mass markets, it seems like you'd have to have either a stock set of keys (a la BluRay) or a CPU/chipset enhanced to load in custom keys.

      We already know what happens when the keys are built in. And if you load in custom keys, then it seems like every vendor who wants to "protect" their code is going to be trying to cram their keys into a presumably finite keyspace.

    4. Re:Really? by Anonymous Coward · · Score: 0

      The TI-99/4A was fantastic, wish I could have had one. I remember fondly standing in the home computer section of a department store as a kid, envying everyone who could afford such a thing. Not that I ever saw someone buy it. It had this gigantic persistent magnetic bubble memory extension and I liked the rumors that were spread that you could destroy this machine with some simple Poke commands.

    5. Re:Really? by drinkypoo · · Score: 1

      If the key is burned when the CPU is made, it would be an industry-wide key.

      But if the key is burned when the CPU is tested, it can be a CPU-unique key. Is there any evidence they would mask the key, when all modern processors have microcode anyway?

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    6. Re:Really? by Anonymous Coward · · Score: 0

      Breakable technologies can still serve a purpose by delaying a crack. Here's an interesting article that covers a real game that had high demand.

      http://www.gamasutra.com/view/...

    7. Re:Really? by Anonymous Coward · · Score: 0

      For games, using CD keys is good enough. They can play locally, but can't go multiplayer without a proper key.

      Couldn't agree more!

      When you have like half a dozen friends playing a game online and you've got a pirated copy that won't work on MP then it's a clear cut win. It turns the game into a full version demo (if that makes sense) till you want MP. Now this won't work in all circumstances as not every game has MP.

    8. Re: Really? by Anonymous Coward · · Score: 0

      Yeah, on the TI-99/4A, you're right about it not having been popular, but it had zero to do with encryption and the GROM chips didn't "do" anything, they were just ROM chips that operated serially, saving hella money (no address lines required). On the chips, TI usually put programs in an interpreted language called GPL (graphics programming language). This was slightly higher level than assembly, and again, it saved a lot of expensive memory because it was more compact. The CPU would fetch byte by byte, interpret it, and do what was required. In turn the entire TI-BASIC language interpreter was written in GPL, making it a second abstraction layer above assembly, and thus painfully slow.

      In summary, there was not a thing called a GROM that did anything, and there was no encryption. At worst, it was obfuscation, since the interpreted language had no public documentation. But reverse engineering that was easy.

    9. Re: Really? by Anonymous Coward · · Score: 0

      The TI had no POKE command, and you couldn't destroy anything by POKEing anything if it did, and I don't know what the hell you're on about a bubble memory extension. Storage was cart based, cassette or diskette. Do a Google search before posting nonsense.

    10. Re:Really? by davydagger · · Score: 1
      the problem with a CPU-Unique key, is that the same software needs to work with every device. The only crypto on the chip is AES, which is a symetric block cipher. symetric ciphers use a single shared key among recipiants.

      to have a unique key on every chip, you'd need asymetric crypto, something perhaps like secureboot or TLS that works with certificate chains, that allows for crypographicly verified by unique certificates that contain keys.

      That does not exist on die. They'd have to load that into cache, and then encrypt the rest of memory and decrypt when the bump to cache, which is already decreased by the size of the program in cache.

      Again, its possible, but highly unlikely.

    11. Re:Really? by tricorn · · Score: 1

      With hardware support in the CPU this can be done properly.

      CPU-unique public/private key pair generated by the manufacturer. Public key signed by manufacturer's private key. To install program, CPU public key is validated, program is encrypted with unique key, unique key is encrypted with CPU public key, program and encrypted key is sent to customer.

      CPU would then be givent the execution key, which it decrypts internally with private key and saves securely (no access via JTAG, no instructions to access it in any way). Instructions are then decrypted on-the-fly into internal secure instruction cache. You could do the same thing with data, with specific instructions to read/write unencrypted (after all, you do have to get the results out somehow), using a random key internally generated by the CPU. That key could be read/stored, but only encrypted with the instruction key (and changing the instruction key would wipe the data key).

      Encryption key for each block would include the location of that block (e.g. take decrypted key and hash with location, then use that as the key for the block). A final step could be to have a block of (encrypted) hashes of each block that would be verified as each block is decrypted (with immediate wipe of decryption keys and cached code if it fails).

      Breaking the private key of an individual CPU would, of course, allow you to emulate such a processor and break any program that's been keyed to it, but if such a CPU also required booting into encrypted firmware it could be very difficult to do (assuming the hardware is properly hardened), with the only practical attack being to break it using the public key. If you could do that, there are much better targets to go after than to get a free copy of some expensive program.

  7. Well, that's it...better pack up hackers... by NotDrWho · · Score: 5, Funny

    That's it. They've finally come up with uncrackable software. I guess all the hackers will just have to pack their bags and find another hobby now. It was a good many decades while it lasted. But now it's clearly over. Congrats to Jacob Torrey on doing what no one else has ever been able to do! No way this will ever be cracked. He's beaten us all.

    --
    SJW's don't eliminate discrimination. They just expropriate it for themselves.
    1. Re:Well, that's it...better pack up hackers... by Anonymous Coward · · Score: 0

      They wouldn't dare to crack this. They don't have the stones to take up a challenge like this.

    2. Re:Well, that's it...better pack up hackers... by NotDrWho · · Score: 1

      They would be crazy to! Clearly, there is no way to beat it. No one will ever be up to the task of beating this new system.

      --
      SJW's don't eliminate discrimination. They just expropriate it for themselves.
  8. In 3...2...1... by PvtVoid · · Score: 4, Insightful

    ... somebody exploits this to write malware that's truly a bitch to reverse-engineer.

    1. Re:In 3...2...1... by suutar · · Score: 4, Insightful

      and viruses/trojans that are immune to signature-based scanning. Better get serious about process privilege and running stuff in revertable VMs.

    2. Re:In 3...2...1... by Anonymous Coward · · Score: 0

      Meh, he probably stole it from some rootkit found in the wild.

    3. Re:In 3...2...1... by Megol · · Score: 2

      Nothing new: Proper polymorphic computer viruses have existed for a long time (>20 years), partially polymorphic viruses for longer...
      http://en.wikipedia.org/wiki/P...

    4. Re:In 3...2...1... by suutar · · Score: 1

      good point; I hadn't thought of those. So this'll really be an extra layer of obfuscation (though perhaps harder to get around; I'm not sure what approaches exist for analyzing polymorphic viruses, but this is likely to block them).

  9. No JTAG access? by Migraineman · · Score: 5, Interesting

    Are the TLB registers not accessible via JTAG?

    1. Re: No JTAG access? by Anonymous Coward · · Score: 0

      No. That would be cheating. :-)

    2. Re: No JTAG access? by Anonymous Coward · · Score: 1

      You are wrong. RTFA... they state directly that JTAG debuggers would work on this. The idea is that JTAG debuggers are expensive. Some are.

      Wired.com article comments are more intelligent than Slashdot comments? When did this happen?

    3. Re: No JTAG access? by Anonymous Coward · · Score: 0

      2002'ish.

    4. Re: No JTAG access? by k8to · · Score: 1

      I would countersuggest 1999.

      --
      -josh
    5. Re: No JTAG access? by Anonymous Coward · · Score: 0

      I get the Slashdot decline, I just mean Wired comments are mostly from idiots.

    6. Re: No JTAG access? by drinkypoo · · Score: 1

      You are wrong. RTFA... they state directly that JTAG debuggers would work on this. The idea is that JTAG debuggers are expensive. Some are.

      It's a dumb idea, because some aren't. Some have asserted that you would need one which was, so that you could do it in realtime, but a) I doubt you could do it in realtime and b) there's no reason why stepping through the code wouldn't be enough.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    7. Re: No JTAG access? by rdnetto · · Score: 1

      You are wrong. RTFA... they state directly that JTAG debuggers would work on this. The idea is that JTAG debuggers are expensive. Some are

      Which is a terrible defence when you're talking about a single key used for the entire industry (it has to be burned into the CPU, so good luck updating it.)

      --
      Most human behaviour can be explained in terms of identity.
  10. So now what? by Anonymous Coward · · Score: 0

    Instead of reading it from RAM addresses they'll read it from the cpu cache memory.

    1. Re:So now what? by Bengie · · Score: 2

      L2 cache has mechanisms to be read from outside, but L1 does not. L1 is internal to the CPU, and unless they add back doors, it'll be extremely hard to dissect a CPU and use an electron scanning microscope to read the data from the L1 cache. The other issue is cache uses SRAM, which does not use capacitance capacitance to store data like DRAM. Once power is lost, the data goes with it nearly instantly instead of slowly draining.

    2. Re:So now what? by Anonymous Coward · · Score: 1

      I've never heard of anyone trying to tweak or read code on the fly like that. In every case I wanted to look at what code a CPU was executing it has been in a virtual machine or emulator.
      Does encryption method prevent the code from being run in an emulator?
      If not it's like locking the window while leaving the door wide open.
      Sure, it will make it harder to climb in through the window, but no-one has ever considered climbin in through the windows since it is easier to just use the door.

  11. Sigh. by ledow · · Score: 4, Insightful

    Another way to crack HARESâ(TM) encryption, says Torrey, would be to take advantage of a debugging feature in some chips... But taking advantage of that feature requires a five-figure-priced JTAG debugger, not a device most reverse engineers tend to have lying around."

    Or running the code in a VM.

    Really? This sounds just the same as someone saying that DEP would stop this kind of reverse engineering (the concept seems incredibly similar to me, maybe I'm wrong). If someone wants to reverse engineer software, they will have the tools to do so and, in this modern world, any software thats run on physical hardware but not in a VM must have a limited lifespan.

    If all else fails, emulate the machine. Slow, yes, but reverse-engineering and debugging tools need to be incredibly slow anyway.

    Sorry, but this is a slashvertisement for something with precisely zero deployments in real-life software that people might want to reverse-engineer.

    And, as said, all you've done is make it easier to create malware that's difficult to remove. So, in effect, such facilities in processors will end up being beefed up to take account of this and rendering the technique obsolete.

    In all of recorded computing history, every technique for preventing reverse-engineering or debugging has turned out not to work, or to be so onerous on users that nobody ever actually enables it.

    1. Re:Sigh. by Anonymous Coward · · Score: 1

      Another way to crack HARESâ(TM) encryption, says Torrey, would be to take advantage of a debugging feature in some chips... But taking advantage of that feature requires a five-figure-priced JTAG debugger, not a device most reverse engineers tend to have lying around."

      Lol, five-figures...some "security researcher." Guess he's never been to DEFCON or Black Hat or ShmooCON...or ever even Googled "JTAG."

      JTAGulators are $144
      http://parallax.com/product/32115

      More info - http://www.grandideastudio.com/portfolio/jtagulator/

    2. Re:Sigh. by Anonymous Coward · · Score: 0

      JTAGulators are $144

      Uhm, that device doesn't support run time debugging and is completely useless for reverse engineering on the software level.

    3. Re:Sigh. by Anonymous Coward · · Score: 0

      But taking advantage of that feature requires a five-figure-priced JTAG debugger, not a device most reverse engineers tend to have lying around.

      JTAGulators are $144

      The "five-figure-priced" did not mention any particular currency. Let's assume that the $144 is US Dollars. That's five figures in Japanese Yen or Djibouti Francs or Guyanese Dollars or Pakistan Rupee or Vanuatu Vatu or Yemeni Rial or Zimbabwe Dollars. It's six figures in Cambodian Riel or Sierra Leone Leone or Ugandan Shillings, seven figures in Iranian Rial or Vietnamese Dong, or a much larger number of Ostmarks.

  12. Just need better hardware then by Anonymous Coward · · Score: 0

    That just mean you need better hardware, that gives you debug access to the buffer, or emulates the code step by step in its own little blue pill VM. Anyone trying this for antipiracy is just an idiot, but most of those guys are, so we probably will see it.

    Meanwhile, it WILL have merit as encryption- defeating cold boot is a big deal.

  13. Intel Already Does This by Anonymous Coward · · Score: 4, Informative

    Recent Intel processors have the ability to use encrypted RAM and only decrypt it in the CPU's caches. They do it with the SGX instructions.

    1. Re:Intel Already Does This by Anonymous Coward · · Score: 2, Insightful

      not released until skylake. can't believe this is +4 informative. should be -1 no research.
      https://software.intel.com/en-us/intel-isa-extensions

    2. Re:Intel Already Does This by Anonymous Coward · · Score: 0

      Sorry dude, I read about 3 years ago. Figured it was out by now.

      Not that it matters all that much, since it won't work on 99.9% of the already deployed CPUs whether it is available today or next year won't significantly affect the number of systems it runs on.

  14. Never heard of VM by Anonymous Coward · · Score: 0

    Nope, never heard of a VM. There is no way to emulate the CPU, no siree! If it's inside a CPU, it can't get out.

    What is this? Zoolander? The files are *inside* the computer?

    https://www.youtube.com/watch?...

  15. Does it matter? by aepervius · · Score: 5, Insightful

    As long as you can hide to the software you are debugging it, you can step by step through it until it is decrypted. So for all the money, all the added complexity, all you won is only a slight bit more time. The only real copy protection is when part of the code is not run locally but on a different remote machine. For example if you have something on a server which needs to be queried and allow you to continue with the software, like some of the online authorization.

    --
    C. Sagan : A demon haunted world:
    http://www.amazon.com/gp/product/0345409469/
    visit randi.org
    1. Re:Does it matter? by ledow · · Score: 2

      Weren't there online MMO games that tried that? And someone just made a tool that cached all the content etc. that the local computer received and offered it from a fake local server instead. Not perfect, but surely good enough to defeat even these tactics if you have enough interest in reverse-engineering something.

      If the code you want to protect is running on general-purpose processors under the control of a third-party (the user who might want to reverse-engineer), there's nothing you can do to stop them, only make their lives harder.

      If you're running services entirely on your end on behalf of the customer, then maybe you can stop things happening. But the second they have an opportunity to "change the mind" of the local software they're running to accept or not accept something, they have the power to fake acceptance. Hell, a lot of reverse-engineering is done by tweaking programs to contain their own "trojan horse" code that will then go through and happily output all the "decrypted/deobfuscated" code that it was trying to hide.

      Reverse engineering is possible on any processor I physically control. That's the end of it. If you want to move your product entirely to the cloud under your own control, feel free. But then you have the burden of all those computing resources, it's difficult to integrate (or trust with) my data, and you get into the OnLive situation all over again. Sure, zero "piracy" of games that could have been released exclusively on OnLive, At the expense of cost, performance, latency, network dependency, etc.

    2. Re:Does it matter? by sribe · · Score: 1

      As long as you can hide to the software you are debugging it, you can step by step through it until it is decrypted.

      Yep. In fact, you could build a virtual machine that would automate that for you, and collect the decrypted instructions as it runs.

      So, as always, "technique to prevent reverse engineering" == "snake oil"...

    3. Re:Does it matter? by BronsCon · · Score: 2

      That was remote content, not remote execution. Think of it more like taking calculateBulletTrajectory() and offloading it's task to the game server. Sure, you can tap the FIRE button without being connected to the server, but your game will likely crash, since it won't know which way the bullet is heading. I'd have suggested something a little less lag-sensitive than calculating the trajectory of the fast-moving object you just carefully aimed and set into motion, but you and I both know that gaming companies would want to offload the most critical part of their game, so it had to be just right in order to not destroy gameplay.

      On the other hand, if they did that... Imaging the funky paths people could make their bullets take by writing their own game servers. The local game not having the code to calculate the trajectory means the local game can no longer validate the input it's getting for where a bullet should be. That could actually be fun and I encourage the studios to try it, but only once.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    4. Re:Does it matter? by Anonymous Coward · · Score: 0

      yes, it was some of the early ubisoft "always on" titles. Settlers 7 was immune to this store / replay attack, and the pirate group actually wrote all the missing functionality and patched the "remote save" and "remote load" use the local file system.

    5. Re:Does it matter? by Gr8Apes · · Score: 1

      This is a pipe dream of someone, somewhere, that continues to want to control something they're selling to others. Somehow it seems they are violating the Doctrine of First Sale, IMHO,

      --
      The cesspool just got a check and balance.
    6. Re:Does it matter? by Anonymous Coward · · Score: 0

      As long as you can hide to the software you are debugging it, you can step by step through it until it is decrypted.

      You have failed to grasp what is happening here.

      The code is encrypted in RAM, if you step through it with a debugger, you will see encrypted instructions which, despite being encrypted, are somehow still executing correctly as though they are not encrypted. Your debugger is useless, that is the point.

      The trick being used is that you can trick the CPU into creating separate page mappings for data and instruction access so that address VMA 0x10000 contains encrypted junk when you try to look at the content but the CPU's hardware instruction fetcher sees a different page with different contents.

      The method being employed here is a rootkit for the OS kernel which overrides the page fault handler, or on newer CPUs which are harder to con, you use a Hypervisor to run the OS as a guest and handle page faults there.

    7. Re:Does it matter? by Lehk228 · · Score: 1

      even that does nothing useful, as a fake server can be set up.

      you need irreplaceable functions to be running on a server, functions that go to the core of the enjoyment of the game and which cannot be easily reverse engineered to make a simulated version of the server.

      unfortunately the more you put on the server the higher your ongoing operation cost is going to be and the more outraged your players will be when you shut down servers and the game stops working, so such a technique will only work for one or two release cycles before word gets out that buying your games is a waste of money.

      --
      Snowden and Manning are heroes.
    8. Re:Does it matter? by tepples · · Score: 1

      I don't know which country you're talking about, but in the USA, "first sale" is a defense to copyright infringement, and defenses to copyright infringement aren't defenses to circumvention.

    9. Re:Does it matter? by Gr8Apes · · Score: 1

      USA - and first sale allows you to resell or otherwise do what you want with a copyrighted work, ie, right to distribute.

      --
      The cesspool just got a check and balance.
  16. Run under an emulator by ubergeek65536 · · Score: 1

    Is it emulator safe? Would there be any way to determine which instructions are part to the decryption engine and which are part of the application?

    1. Re:Run under an emulator by Anonymous Coward · · Score: 0

      Nothing is emulator safe. Nothing is safe from going over the code with paper and pencil either - reconstructing the decryption process step by step.

      But an emulator is nicer. Just take one of the existing open-source emulators. Check that it is indeed capable of running this 'protected' sw correctly. then, make it output the address & opcode of every instruction it runs. The entire unencrypted program will appear as assembly language.

      Not that we need this - open-source stuff is not obfuscated, and it is now sufficient for all purposes. Piracy is no longer useful.

    2. Re:Run under an emulator by tepples · · Score: 1

      open-source stuff is not obfuscated, and it is now sufficient for all purposes

      Including games? And playback of lawful copies of films published by major movie studios?

  17. They work, and fill a need by mveloso · · Score: 0

    Vertical markets have severe problems with unauthorized software use (ie: piracy). This will make cracking that software much more difficult.

    1. Re:They work, and fill a need by Anonymous Coward · · Score: 1

      how much more difficult is that? My guess is, not very. They have to supply you with the encrypted package, they have to supply you with the key to decrypt it. They have to supply you with the algorithm to decrypt it. Failure to supply all those things means you can't run it. If the goal is to decrypt it and then start reverse engineering it, the software vendor has to distribute everything needed to reverse engineer it, simply by providing everything needed to run it.

    2. Re:They work, and fill a need by jythie · · Score: 1

      Oh I agree there is a demand for them, but I question how well they actually fill the need. I have used several, both in house and commercial, including ones that required special hardware to run, and they all got cracked. The only time they helped even a little was for low value products that were not worth the pirate's time.

    3. Re:They work, and fill a need by jythie · · Score: 1

      And within that, there is usually some weak link that can be exploited. A pirate does not need full understanding of the code base, they just need to track down that one little 'make it run' signal and duplicate that. At some point the program has to ask something, either itself or an external authority, 'can I run?', and there is always a way to say 'yes' otherwise, well, it would not work in the first place.

      These 'tools' usually just harden a stage that a pirate is probably not going to be needing to deal with anyway.

  18. no way the malware authors will ever do this by Anonymous Coward · · Score: 0

    It's lucky that only the good guys have access to this technology and that malware authors are strictly prohibited from ever using techniques like these, or there would be trouble!

  19. The world needs more literallys by Anonymous Coward · · Score: 0
    1. Re:The world needs more literallys by Anonymous Coward · · Score: 0

      you literally going all literal on us here?

  20. run in VM by Anonymous Coward · · Score: 0

    VM's processor has no idea whats up

  21. What could possibly go wrong? by gb7djk · · Score: 1

    Some translation step would be required for an issued binary (e.g an operating system and/or program) to be transformed into locally encrypted "executable" code. Now if there is a mechanism available to a bios and/or an operating system to do this, then ergo, it could be subverted. So why bother?

  22. You keep using that word... by Anonymous Coward · · Score: 0

    > “cold boot attack,” which literally
    > freezes the data in a computer’s RAM

    By "literally" you mean "figuratively", yes?

    1. Re:You keep using that word... by Anonymous Coward · · Score: 0

      No, literally. You literally refrigerate the RAM chips while the machine is running, which increases the time DRAM will hold a charge without refresh cycles. Once it's cold enough you can remove the DIMMs and stick them in another machine which reads out the memory.

    2. Re:You keep using that word... by Anonymous Coward · · Score: 0

      Or you just reboot onto a USB key on the same machine, simpler.

  23. literally by Noah+Haders · · Score: 1

    > That means even sophisticated tricks like a “cold boot attack,” which literally freezes the data in a computer’s RAM

    Does the attacker douse the computer in liquid nitrogen, like the T-1000?

    1. Re:literally by Anonymous Coward · · Score: 0

      No, a can of compressed air will do...

      http://www.technologyreview.com/view/530186/the-ongoing-threat-of-cold-boot-attacks/

    2. Re:literally by Anonymous Coward · · Score: 0

      The answer is: YES! Undoubtedly so.

  24. Wrong, wrong, wrong. by Anathem · · Score: 0

    It is through transparency of code that security is achieved, not further obscurity. Someone will figure out how to reverse engineer the code, and people obfuscating code for "greater security" will be lulled into a false sense of security, and write less secure code.

    1. Re:Wrong, wrong, wrong. by g0bshiTe · · Score: 1

      I envisage some mechanism now placed between CPU and socket that intercepts instructions sent to and from the CPU to be reviewed or even "replayed" at a later time.

      --
      I am Bennett Haselton! I am Bennett Haselton!
  25. Hardware ICE - JTAG by Anonymous Coward · · Score: 1

    Gee, so hardware ICE [In Circuit Debug] and JTAG can't possibly snoop on the processers internal busses. I'll just put my useless ICE tools and JTAG adapters away, they have solved ALL the hacking problems.

    Yep, it's impossible to write privileged code to read the TLB, heck, it must be IMPOSSIBLE to even TEST the TLB.

    Hint: If it can be TESTED, it can be read.

    So obviously, the solution to hacking is, make nothing testable!

    1. Re:Hardware ICE - JTAG by tippen · · Score: 2

      JTAG debuggers are a major problem when you really need to protect your IP. It's enough of a hole that I got NetLogic to add an e-fuse to their XLP network processors (+ later generations) that could disable EJTAG.

      Blow the e-fuse during ICT on production hardware and you can cut down on RE capabilities a fair bit.

      Doesn't really help for general purpose computers, but a very nice for hardening embedded systems.

    2. Re:Hardware ICE - JTAG by suutar · · Score: 1

      TFA mentions that JTAG can work, but assumes the tools are too pricey for pirates. (Which of course both overestimates the price of the tools and underestimates the resources of a dedicated pirate who expects to be able to actually sell the fruits of his cracking for money...)

    3. Re:Hardware ICE - JTAG by joemck · · Score: 1

      Nah. This scheme is designed with hardware-based attacks in mind. From the sound of it, unless you're going to put taps on the actual CPU die this will fail.

      The solution is software. Run it in an emulated CPU and dump the emulated TLB whenever you like. Or, there has to be SOME unencrypted code at the start that finds the key and sets up the rest of the nonsense. I expect this part to be heavily obfuscated using traditional techniques that can be deobfuscated with operand tracing and the like. Reverse this and you have the encryption algorithm and key.

      This WILL fail but it'll probably make for a few games that take a while to crack, and a few interesting crackmes.

  26. NO, will be cracked. by QuantumReality · · Score: 0

    "doesn't allow the code to be decrypted until the last possible moment" AND THEN IT'S DECRYPTING... which means it's accessible, which means it's crackable... There is no way to make anti RE tool that is uncrackable on current computer architecture. I'ts just impossible. Because you can't run any instructions in assembler without decrypting/decoding them to machine languge which can be interpreted by cpu. The only thing that change with systems like denuvo or hermes is the time needed for cracking the protection, they are adding more steps that's all...

    1. Re:NO, will be cracked. by Anonymous Coward · · Score: 0

      Mod parent up, this is correct; the only way to stop hackers (and even then it's questionable) is to rephrase this line

      "doesn't allow the code to be decrypted until the last possible moment"

      to this "doesn't allow the code to be decrypted at all"

      That would defeat whatever goal it serves (RIAA? DRM?) but would also defeat most hackers in doing so. I say most because there will always be someone who can brute force (or should that be rubber hose) the crypto or find bugs in the implementation.

      This is why hackers always win, in the endgame.

  27. And the big loop hole is.... by Anonymous Coward · · Score: 0

    That mentioned-in-passing "key" that resides in the CPU. The article is actually honest enough to mention that getting that key into the CPU in the first place is the weak spot in the approach. Anyone who wanted to hack a program would simply pick up that key from whatever artifact is used to deliver the software in the first place and voila, you can now decrypt the software.

    The only thing that this approach prevents is someone getting onto a system *after* it has started running some piece of software and accessing the software. There are some scenarios where that might be useful, but it is not the typical scenario for someone looking to reverse engineer a piece of software (said person almost certainly has acquired the to-be-hacked software themselves, in which case they now have the key).

    The only way to make an application that runs on a system that is fully under someone else's control secure is to remove critical and hard-to-reverse-engineer pieces of the app's logic and keep them on some piece of inaccessible hardware. For example, I saw a dongle years ago that claimed to be hardened which could run small amounts of Java code. If one could push pieces of one's app into the dongle and have the main app hand data to the dongle when it needed that functionality, that would be secure because the code in question never leaves the secure computing platform. If the operating environment of the app can reach out to the internet, then one can do the same thing via network RPC calls back to some secure server for the critical pieces of logic.

    While this is secure, it is has two obvious challenges - which pieces of the app can be extracted that are critical to the app and not easily reverse engineered -and- performance. If the logic is critical and has to be accessed via an Internet RPC call, performance will be limited.

  28. Story below this one by Anonymous Coward · · Score: 0

    I like how the /. story right below this one contains the line "It is well known at this point that nothing is unhackable...". Just something I noticed.

  29. Hardware support is required by ubergeek65536 · · Score: 1

    To do the job properly would take a processor with encryption support baked in, like Sega's Kabuki, or the into the memory controller as in the XBox. Software encryption or obfuscation is nearly useless.

    1. Re:Hardware support is required by suutar · · Score: 1

      and of course it either has to not run on a processor without baked in encryption or it's vulnerable to emulation. (Heck, if you can emulate an encrypting processor it's still vulnerable to emulation...)

  30. Fuzzing by g0bshiTe · · Score: 2

    How will this hinder current fuzzing techniques to search for vulnerabilities?

    --
    I am Bennett Haselton! I am Bennett Haselton!
    1. Re:Fuzzing by Megol · · Score: 1

      Mu

  31. VM by funkymonkjay · · Score: 1

    You don't even need JTAG access, modify one the many opensource VM and then have it log this awesomely secure key.

  32. trulyprotect by Anonymous Coward · · Score: 0

    check out www.trulyprotect.com for more complete industrial solution!

  33. Wired vs Slashdot? by Press2ToContinue · · Score: 1

    For some fun, read the comments on TFA, and compare them to the comments here.

    Demographic estimations, anyone?

    --
    Sent from my ENIAC
  34. Back to dongles... by Anonymous Coward · · Score: 0

    The proposal is to have the key built into the physical processor, and it does not appear to be something which can be changed.
    - this ties the software to a single physical processor.
    - to prevent hackers from being able to snag the key, it must not be readable, even by VMs.

    This feels like some of the old dongle-based-license-locking.

  35. Classic DRM flaw ... by janoc · · Score: 2

    As this, by definition, requires that the encryption key is present in the clear on the machine where the decryption is happening in order to make it possible to decrypt the instructions (CPU cannot execute encrypted code), then it can be trivially circumvented. Finding where the key is stashed is going to be only a matter of time and then the encrypted code can be conveniently decrypted off-line, repackaged without the stupid performance-impeding encryption (caching will suffer badly with it) and released on a torrent somewhere, as always ...

    Fundamentally this is not different from doing ROT13 on your code - code obfuscation.

  36. on-the-fly encryption/devryption by Anonymous Coward · · Score: 1

    Well, this sounds like the attempt to avoid what has been around for years: Dynamic programs
    which modify their own code... Tremendously hard to do correctly, but might solve the problem
    of people decrypting the static code, and even in a VM/emulator would require a lot of work to
    figure out.

  37. Reverse engineer in a VM by Shadow+IT+Ninja · · Score: 2

    In the article, they mention a JTAG hardware debugger as a possible tool to defeat HARES. Suppose, however, that your reverse engineering environment is a virtual machine, possibly with CPU emulation as well. Couldn't you then do the equivalent debugging in software? What if you write the the VM software specifically to help you out, possibly even just give you the key which the authentic CPU would keep secret?

  38. AV products will slaughter this... by DigitAl56K · · Score: 1

    AV products will have to kill this dead, because they won't be able to easily detect malware. If it can't be inspected it can't be known to be safe, so I'm going to bet anything using this that isn't whitelisted e.g. by digital signature is going to be DOA.

    1. Re:AV products will slaughter this... by Anonymous Coward · · Score: 1

      AV products are already dead, though.

      Encryption isn't new. Any skid from hackforums can make you a shitty packer in a week with 0% detection rate. Of course it won't work in two weeks, but by then you'll just buy a new packer.

  39. Inaccurate or misquoted statement by Anonymous Coward · · Score: 0

    "Torrey notes that it may someday be possible to encrypt a program’s code in a way that its instructions can run without ever being decrypted—making software that’s truly unhackable. But such a system, known as 'fully homomorphic encryption,' is still largely theoretical."

    First, he probably means garbled circuits, not homomorphic encryption. Second, FHE (and other homomorphic schemes) have been implemented. It's the applications and performance tradeoffs that everyone is working on.

    If these are merely misquotes, then I feel comfortable continuing to read the paper(s).

    1. Re:Inaccurate or misquoted statement by Anonymous Coward · · Score: 0

      “Fully homomorphic encryption is the holy grail, but it’s an academic math problem,”

      Okay, I take back the misquote suggestion. This guy plain doesn't know what he's talking about.

  40. QEMU processor emulation? by Dlin · · Score: 2

    Can't you just emulate the processor with QEMU and run the app in a sandboxed environment ?

    https://github.com/hackndev/qe...

    ------

    https://stackoverflow.com/ques...

  41. Perfect timing too by Anonymous Coward · · Score: 0

    Thanks to Windows Japanese OEM's were able to make lots of money by reverse engineering and inventing nothing. China then did the same.

    Now guess what, China has all the money and America is going to get locked out of the very technology that itself created... joke

    The joke that never ends....

  42. The age of security via obscurity. by funky_vibes · · Score: 1

    These kinds of "feel good" measures only amount to more work for devs, and stuff not working when they should.
    I'd rather people spent their time writing better and more secure code.

  43. HARES? How about HAREM? by synaptik · · Score: 1

    They missed the boat on that acronym, IMO. Change the last word from 'System' to 'Mechanism' or 'Method', and then they'd have HAREM, which evokes the Arabic word for 'forbidden'. (Not that I approve of this DRM chicanery, of course.)

    --
    HSJ$$*&#^!#+++ATH0
    NO CARRIER
  44. lmao by Anonymous Coward · · Score: 0

    any money on how long it will take malware writers to start using HARES to make their code harder to grok?

  45. What's new? by Megol · · Score: 2

    I honestly don't see how this is anything innovative, this is a known artifact of x86 microarchitecture (it isn't an architectural thing though - and it will not work on all x86 processors*). That it could be used for a copy protection scheme is also obvious to anyone with that level of knowledge.

    This, together with things like disabling primed data caches (x86 processors will still allow accesses to caches even when disabled under some circumstances) is a trick that is relatively fragile. And it really doesn't buy much extra security given the existence of a good low level emulator.

    (* there are x86 processors with a shared I/D TLB, not commonly in use nowadays though, exercise for the reader ;P)

  46. Hahahaha! by hey! · · Score: 1

    Seriously. Are there really people out there so naive that they think this will pose anything more than a minor inconvenience?

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    1. Re:Hahahaha! by Anonymous Coward · · Score: 0

      No, but there are people out there who need to publish in order to get degrees, make a living, market themselves ... etc.

  47. Everything can be deciphered. by Anonymous Coward · · Score: 0

    big deal.. just open the processor chip, stick probes in the right places, run the correct decyption code. done.

  48. Confused? by alexandre · · Score: 1

    What they really want is white box cryptography, but it seems computationally impractical right now.

    Also, http://en.wikipedia.org/wiki/T... did this and was broken!

  49. There is a much simpler way to do this. by 140Mandak262Jamuna · · Score: 4, Funny
    Hire a few Indian H1-Bs supplied by Wipro or Infosys or Cogniscent. The code they write is impossible for anyone to decode even if you discolose the the source code and the design specs.

    Venkat!!! Why on God's good name are you passing the reference to a pointer to a function as a construction argument?!?!?! aarggghhhh!

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
    1. Re:There is a much simpler way to do this. by Anonymous Coward · · Score: 0

      Why not just supply an armed guard with every copy of the software? Surely that's much less effort than all this DRM and obfuscation stuff.

    2. Re:There is a much simpler way to do this. by Anonymous Coward · · Score: 0

      As an Indian developer (not H1B though) I find this post hilarious :-)

  50. Duplicate the TLB code entries! by Terje+Mathisen · · Score: 2

    To me it looks like this trick has a similar, very simple trick to defeat it:

    Assuming you can run some code at kernel (or even SMM) mode, you should be able to scan through all code segments that are marked execute only, and which have a data segment which aliases it? I.e. same virtual address - different physical addresses.

    When you find such blocks, you just create new readonly or readwrite mappings which points to the same physical addresses as the decrypted/execute-only memory.

    At that point you can dump/debug to your heart's content.

    Terje

    --
    "almost all programming can be viewed as an exercise in caching"
  51. But... by Anonymous Coward · · Score: 0

    Before the key is in the CPU internal memory, it needs to be somewhere.

    Right...

  52. "Exactamundo"... apk by Anonymous Coward · · Score: 0

    Had a hell of a time vs. 5 antiviruses (Norton, McAfee, ClamAV, Comodo, Dr.Web, & ) in a SIMILAR situation!

    I used mpress by MATCODE (good FREE 64-bit + 32-bit .exe compressor) & it signalled my program -> APK Hosts File Engine 9.0++ SR-1 32/64-Bit http://start64.com/index.php?o... was a "virus"!

    Wrong:

    In the end? Each RESCINDED their findings as 'false positives'

    (Since using such an exe compressor IS NOT A VIRUS @ all whatsoever)

    ---

    I compress executables for 4 reasons:

    1.) Compressed exe's load FASTER over a LAN/WAN by far, very noticeably so (& faster from local HDD's too, since the compression/decompression process is offset by the speed of today's CPU's, & since the file is SMALLER on disk & tinier files load up from disks, faster!)

    2.) Compressed exe's are HARDER TO "resource hack"

    3.) Compressed exe's are HARDER to 'disassemble' (not in memory though - more on that below, which this tech *MAY* help against!)

    4.) I test my program @ startup, & IF IT IS NOT THE COMPRESSED SIZE? It will self-terminate (assuming it is infested/infected OR being hacked into in some way (noted above))... since std./classic viruses add size & alter jump tables + tack on code @ the tail of exe's typically? This method works as "built-in" virus protection (I am surprised EVERY coder's not using this technique in fact).

    ---

    * The latter point #4 above, & how I use compression ANOTHER WAY (sizetest vs. alterations) was one I did well/was modded up on here during "Coding for DEFCON" a few years ago here, since it makes sense for the reasons above -> http://it.slashdot.org/comment...

    APK

    P.S.=> That stuff's all "fine & good" UNTIL you peeked into RAM to look @ the code (ProcessExplorer by SysInternals can do this)

    Doesn't HELP then!

    Yes - it's great on disk vs. disassembly, but NOT once it's loaded into RAM: This SOUNDS good, let's see them pull it off though, MINUS what you brought up (which in a way, did happen to myself already, hence why I "second your motion")... apk

  53. Hacking Countermeasure - dynamic encryption by OS by Anonymous Coward · · Score: 0

    There is an alternative value than for DRM purposes: Exploit prevention

    The value is not in obfuscating the code from reverse engineering, but about protecting the integrity of the code being executed by using the encryption as a way to prevent something as simple as 'jmp ESP' or any other instruction from being meaningful if injected externally, since 'jmp ESP' would be the one-time encrypted version for that block of memory (lets assume some sane mode of AES encryption).

    Consider this scenario:

    Every instance of the software downloaded was separately encrypted with different keys

                or

    maybe even better if the the operating system could be modified to leverage this technique to dynamically encrypt the instruction pages of every application that ran dynamically, and managed the keys dynamically in the CPU for every process. In memory, there is never a single representation of any instruction and every instance is different even in memory.

      Assuming DEP is enforced also, any kind of buffer overflow would need to know the dynamic encryption key(s) in order to inject the buffer overflow code.

  54. Marketing hype? by Anonymous Coward · · Score: 0

    This really sounds like marketing hype to me.

    At some point the encryption key has to pass from RAM storage to the CPU. All you need to do is run the code in simulator/virtual machine, and wait for the instructions which loads the key.

    In my college days I relished such challenges, the harder the better. I didn't care about the decrypted data or code, the sheer challenge of outsmarting a protection scheme was what drove me. I would spend days, sometimes weeks studying disassembled code. Although I don't bother about those things today, I'm pretty sure you can find a lot of people out there with similar interests.

    Once the code and data, DRM based or not has left the manufacturer it vulnerable. At some point the code/data needs to be converted into clear text in order to be usable.

    When data is encrypted, e.g. sound or video, it must be converted into clear text, prior to touching the render/playback hardware. All you need to do is to replace the drivers. If the OS requires signed drivers, all you need to do is to patch the sign checking part of the OS.

    When code is encrypted, in must be converted into clear text, prior to touching the instruction decoder of the CPU. All you need to do is to replace the CPU with a simulated CPU.

    DRM based on cryptography is build on a flawed premise. Cryptography assumes that sender and receiver have a shared goal maintaining a shared secret. In DRM based on cryptography only the sender can be relied on having a goal of maintaining that shared secret. In order for the data/code to be usable the recipient needs to have the ability to decrypt the data/code. Since the recipient controls the execution environment, the recipient will always be able to access the decryption key, it is merely a question of how much effort is required to gain access. No matter of wishful thinking can make that problem go away.

  55. The phrase "TLB split" says it all. by Anonymous Coward · · Score: 0

    While Intel processors have fully coherent caches, even catching writes to the instruction stream only a few bytes ahead of the IP, the TLB must be explicitly flushed.

    Sp it's possible for the DTLB and ITLB to have different mappings.

    So the trick is to have the processor executing in an area of invalid virtual pages. Whenever there's an instructon access fault, the code does:

    - Allocate a new page, with two virtual addresses: one for execution, and the other for data access.
    - Put a single return (0xc3) instruction in the page and call it. This faults in the ITLB mapping.
    - Remove the ITLB mapping from the page tables.
    - Decrypt the code and put it in the page via the data access alias.
    - Return from the fault and resume executing code.

    As long as there are no interrupts, debugger traps, or other ITLB-polluting code executed, this will have the processor executing "unmapped" virtual memory due to the "stale" TLB entry.

    There are a bunch of variants on that (e.g. you could have in-line code to handle page boundary crossings rather than use the page fault handler), but that's the basic idea.

    I was wondering about SMM, but I think it doesn't use the page tables, so they might survive that.

  56. You can't protect code on known CPUs, ever. by Anonymous Coward · · Score: 0

    FFS if you really must you can crack it with a box of pencils, pads of paper, an assembly language reference, and a room full of idiot savants.

    Only encrypted code for an undocumented CPU can be protected, then you really are just dumping noise into a black box and getting rainbows to come out.

    d@3-e.net

  57. Defeat with a common debugger by Panaflex · · Score: 1

    It would be a little work, but by simply observing the changes in the register file step by step, you could make some good guesses at what instruction was executed. That gives you a portion of the decrypted executable code. If you can get a few 16 byte blocks (AES blocksize), then you can reverse the key.

    The other issue is that the only modes they could likely use to encrypt the data would be ECB, CTR or XTS. There are many known attacks on those modes when you have leaking cleartext.

    --
    I said no... but I missed and it came out yes.
  58. You load 16 tons: by Hartree · · Score: 1

    "St. Peter don't you call me, 'cause I can't go. I owe my soul to the company store."

    They always did own you. ;)

  59. That's going to make the virii REALLY hard to find by Anonymous Coward · · Score: 0

    Only one winner here, and it's NOT the user.

  60. FTFS: "literally freezes the data" by Anonymous Coward · · Score: 0

    Sigh.

    If the person writing this literally thinks that's the way it literally works, then I literally cannot take this seriously.

  61. SMH by Anonymous Coward · · Score: 0

    If it can be ran on a crackers computer it can be cracked end of story. We've seen everything from online only activation, virtualization, all the way to online only servers when it comes to games and they've all been destroyed completely with ease. Diablo 3 is online only play yet it was cracked with a server emulator created before the game was even fucking out of beta. When are software developers going to learn hardcore DRM is pointless and it only hurts legitimate users. Just take a look at Skybound Stylizer and the issues their VM wrapper causes for legit users.. Did I mention it was still was cracked easily?

    Cracking is a game, it's about reputation, showing off ones skill, and the harder the better because people love a challenge.
    Harder game = more players fighting to be the first to win.

    This will end up being another super ironic torrent.

  62. zzzzzzzz by Anonymous Coward · · Score: 0

    And how does it defeat being ran on a custom vm that stores the instructions as their executed?

  63. Re:HARES? How about HAREM? by joemck · · Score: 1

    Yes but 'harem' already means something else in English...

  64. Close but no cigar? by tharple · · Score: 1

    I believe that, conceptually, this is right on target. Practically, today's CPU are very noising across the RF spectrum and my guess is that THEY will be able to determine the actual instructions being executed using spectral theory and signal processing techniques. At the cost of performance, additional layers of instruction execution noise could be used to increase the complexity of RF radiation making the cracking mathematically more... challenging.

  65. Topic Shift by PPH · · Score: 1

    Still waiting to see some s/w dev in my neighborhood buy a Tesla and get the plate HCF

    --
    Have gnu, will travel.
  66. Evil hackers ... right ... by YoungManKlaus · · Score: 1

    no text

  67. Re:HARES? How about HAREM? by synaptik · · Score: 1

    True, but I figure anyone who's going to be savvy enough to be aware of H.A.R.E.M. is going to be familiar with the word's etymology, and make the connection. ...And if a few neckbeards get a chuckle out of it, what's the harm?

    --
    HSJ$$*&#^!#+++ATH0
    NO CARRIER
  68. Trusted Platform Module by tepples · · Score: 1

    Run it in an emulated CPU

    That won't work if it gets the decryption keys from the Trusted Platform Module (TPM).

  69. Prevent reverse engineering the SaaSS way by tepples · · Score: 1

    There is no way to make anti RE tool that is uncrackable on current computer architecture.

    Write the software in a managed language to prevent buffer overflows. Instead of distributing it to the public, run it only on a server that you control. This "service as a software substitute" principle is suitable for anything that doesn't need very low latency or very high throughput in a mobile use case.