Always keep in mind a clear distinction between needs of security and obscurity. When we talk about security, we stress the need for proper cryptography. Do not confuse that with obscurity. Proper cryptography is often a hindrance for obscurity.
-
-
Would the "hash" being crap have ever helped you if you were trying to defeat it? Almost certainly not. Instead, it being a trivial algorithm means it is almost impossible to find, buried where it is among all the other code.
Show this thread -
Of course, when you're doing integrity detection, it doesn't help if you hide your algorithm well statically, if when it goes off at runtime the whole program stops and you can just trace back to what caused it. Which is why the only thing the hash failure does is set a flag.
Show this thread -
The flag is in a debug register only accessible from the PPC (no IOS snoopery!), and all addresses (what gets hashed, the hash value it is compared to, and the debug register) are mangled so you get no xrefs in IDA/Ghidra/etc.
Show this thread -
Then a completely *different* piece of code checks the debug register (addressed in a *different* way), and if it is set, it introduces a buffer overflow. That buffer overflow is carefully crafted to corrupt heap structures just enough.
Show this thread -
HBC won't crash immediately, but with high likelihood will later. This was based on a real bug I had, and which took me a month to debug. With a remote gdb stub and a debug build and logging. I ended up teaching myself to read swizzled glyph textures from hex dumps.
Show this thread -
So yeah, when you're doing obfuscation, you're doing it wrong if you think using Real Crypto is going to help you. For integrity checking, make it as inconspicuous as possible, so it blends in. For code obfuscation, just go nuts with bizarre DIY stuff.
Show this thread -
(For those new to this saga: HBC has integrity protection because I had to add "reverse DRM" because scammers were *selling* it by literally using game piracy tools; the rev-DRM means you can only install it with the official installer, which includes a warning that it is free).
Show this thread -
And also: the reason why the heap overflow was carefully tuned to make it crashy, but not *always*, was our policy that any security we add can *never* make the app completely unusable, because users have in the past put themselves in situations where (...)
Show this thread -
(...) HBC is the only thing that works on their console, and the only way they can fix the rest of it, and I absolutely *never* want some reverse-DRM bullshit to be the final nail in the coffin of a Wii brick (even if the user got themselves in this situation another way).
Show this thread -
Other highlights: other install/system state integrity checks in HBC will turn your screen upside-down, or show a scam warning for a couple minutes, or 60 minutes. Always leaving it usable. To some extent.
Show this thread
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.