I'm a bit confused - how do you do pointer arithmetic if the cpu encrypts pointers for your automatically and doesn't let you know the actual address in memory that they point to?
I know nothing of the implementation, but hypothetically a compiler could translate: p++ to instructions that effectively do: p = enc(dec(p)+1) Without exposing p outside the CPU. The implementation described (seems to be) new instructions for incrementing and dereferencing pointers.
Morpheus Turns a CPU into a Rubik’s Cube to Defeat Hackers
21–30 of 31 posts
Re: Morpheus Turns a CPU into a Rubik’s Cube to Defeat Hackers
#22> you change what it means to add a value to a pointer. Morpheus encrypts pointers. How does it allow C to access an array or a struct and prohibit access beyond bounds to the return address somewhere beyond the bounds of said array or struct, I wonder.
Re: Morpheus Turns a CPU into a Rubik’s Cube to Defeat Hackers
#23Earlier quoted context omitted.
Perhaps it could have pointer arithmetic instructions, where "ptr + n" makes code that uses special instructions to decrypt "ptr", add "n", and encrypt the result before giving it back to you?
Homomorphic encryption does that, yes. But in the interview, he talks about it hypothetically.
Re: Morpheus Turns a CPU into a Rubik’s Cube to Defeat Hackers
#24> you change what it means to add a value to a pointer. Morpheus encrypts pointers. How does it allow C to access an array or a struct and prohibit access beyond bounds to the return address somewhere beyond the bounds of said array or struct, I wonder.
Maybe it uses homomorphic encryption?
But it also is not a good match for the problem they are trying to solve (the attacker is not the cpu in this situation)
Re: Morpheus Turns a CPU into a Rubik’s Cube to Defeat Hackers
#25Earlier quoted context omitted.
Perhaps it could have pointer arithmetic instructions, where "ptr + n" makes code that uses special instructions to decrypt "ptr", add "n", and encrypt the result before giving it back to you?
Homomorphic encryption does that, yes. But in the interview, he talks about it hypothetically.
Re: Morpheus Turns a CPU into a Rubik’s Cube to Defeat Hackers
#26> What is the overhead for Morpheus? > Todd Austin: It’s about 10 percent slower on average. If you accept that kind of overhead, why not just go the Burroughs B5000/Lisp Machine/etc. route and have a hardware instruction set which is essentially byte code for a safe machine, which cannot be tricked into reading and writing in arbitrary places. Of course, then you would still have the problem of actual security holes…
Re: Morpheus Turns a CPU into a Rubik’s Cube to Defeat Hackers
#27> What is the overhead for Morpheus? > Todd Austin: It’s about 10 percent slower on average. If you accept that kind of overhead, why not just go the Burroughs B5000/Lisp Machine/etc. route and have a hardware instruction set which is essentially byte code for a safe machine, which cannot be tricked into reading and writing in arbitrary places. Of course, then you would still have the problem of actual security holes…
Are you talking about about both Burroughs B5000 and Lisp Machines having a tagged architecture[0]? [0]: https://en.wikipedia.org/wiki/Tagged_architecture
Re: Morpheus Turns a CPU into a Rubik’s Cube to Defeat Hackers
#28I'm a bit confused - how do you do pointer arithmetic if the cpu encrypts pointers for your automatically and doesn't let you know the actual address in memory that they point to?
Re: Morpheus Turns a CPU into a Rubik’s Cube to Defeat Hackers
#29I wish this was more a technical paper. The interview tries to dumb it down to the point where you can't follow what they actually did, or what type of attacks are actually in scope. Is this just encrypting pointers, where the encryption key changes very frequently?
Re: Morpheus Turns a CPU into a Rubik’s Cube to Defeat Hackers
#30Earlier quoted context omitted.
I know nothing of the implementation, but hypothetically a compiler could translate: p++ to instructions that effectively do: p = enc(dec(p)+1) Without exposing p outside the CPU. The implementation described (seems to be) new instructions for incrementing and dereferencing pointers.
In which case, can't you just use it in your shell code? I guess the defense is info leaks are useless so you can't defeat aslr(?)
But yeah, you'd have to end up with equivalents to p* = 123 which becomes (dec(p)* = 123 etc. My guess is that due to the simon cipher they're allocating full blocks whenever you do the safe version of malloc, and then do a range check to ensure that there is no overrun when storing / incrementing etc.