11 ms·
It’s intensely frustrating, because for some reason Apple thinks it’s a good idea to strip out security code from the source that they do release (months late),
by saagarjha 6y ago
It’s intensely frustrating, because for some reason Apple thinks it’s a good idea to strip out security code from the source that they do release (months late), and they tend to strip (and until recently, encrypt) kernel code. This is what a company from the last decade might do to hide security issues, except it’s coming from the world’s largest company with a highly skilled security team. Is there some old-school manager with so much influence that they’re able to override any calls from internal and external sources? It’s gotten to the point where Apple engineers privately brag about their new proprietary security mitigations after researchers who scrounge for accidentally symbolicated kernels (thank you, iOS 14 beta) do the work to find them. Why does this situation exist?
- bun_at_work 6y agoI can only speculate, but Apple seems to have very tightly coupled software and hardware. Since this coupling probably holds trade secrets (which we don't know about by definition), it seems likely to me that they are controlling access to as much of the stack as they can while still protecting those secrets.
- saagarjha 6y agoYes, but that doesn’t really make sense for things they have already shipped: researchers have to reverse engineer those for what seems like no reason. For example, the newest iPhones have entirely custom privilege levels that are lateral to the typical ARM exception levels and entered using proprietary instructions that their own silicon understands. This is something you can find if you load the kernel into a disassembler and poke at it a bit. But Apple doesn’t mention it at all or document it…what’s the point? Why put up such petty barriers in the face of people trying to audit this?
- richardwhiuk 6y agoLikely the documentation that does exist internal would take a relatively large amount of cost to extract without pulling other stuff with it.
- saagarjha 6y agoBut they go through the effort of stripping all mentions of these things from the source code they release?
- bun_at_work 6y agoI'm late to respond, but the obfuscation of code is almost certainly automated.
- saagarjha 6y agoApple doesn't really obfuscate their code outside of their DRM stuff–usually they just remove all the symbols and do a ⌘F for certain terms in their open source releases and strip those out. It really seems to be an manual process, since sometimes they miss things…
- someguydave 6y agowouldn’t the public interest in that be obvious at design time? why would apple write internal docs in such a way that they could never be released?
- Wowfunhappy 6y agoThere were some Hacker News threads the other day about Marcan's Patreon campaign for porting Linux to Apple Silicon. Everyone basically expects that Marcan will need to reverse engineer everything on his own, and my gut tells me they're right. But, if you actually stop and think about it for a moment... isn't this situation completely bizarre? Apple Silicon Macs explicitly support booting alternate OSs, because Apple went out of their way to add a `permissive-security` option to the boot-loader. They know Linux is important—the initial Apple Silicon reveal included a Linux VM demonstration—and now a well-known and talented developer is planning to do a native Linux port, at no cost to Apple, and we all fully expect that Apple won't make any documentation available or answer any questions? And, we're probably right? The more I consider it, the more crazy it all seems. Why is Apple so private about the internals of their products? It won't affect marketing—normal consumers don't care—and I can't think of a plausible scenario where this type of information could help a competitor. Is Apple using source code stolen from Oracle? Are they scared someone will discover an internal library written in COBOL and make fun of them? Are they worried their documentation could revive Steve Jobs as a vengeful ghost? I just don't get it.
- richardwhiuk 6y agoLots of the stuff they release I imagine is to comply with license obligations.
- Wowfunhappy 6y agoIn a few cases perhaps—they definitely still use some GPLv2 stuff—but it's mostly under a license that doesn't require them to release anything.
- plorkyeran 6y agoEven without being able to compile it I've successfully used their source dumps to debug problems in my code quite a few times (and occasionally find bugs in their code which I have to work around). Having code with comments to read is a huge step up from having to rely on decompilers.
- Leherenn 6y agoBut doesn't it work in some ways? It's not going to save them, but it seems to significantly increase the time/cost of exploiting the vulnerability. One more layer to the security system.
- saagarjha 6y agoObfuscating source? No, not at all. It just annoys legitimate security researchers (making them not want to deal with you) and is something that black hat bug finders largely don't care much about. Not only do they have more resources and patience, they are also more willing to use questionable methods to make their lives easier.
- Leherenn 6y agoWhat makes it less of an issue for black hats? Do they have access to symbols/source code that security researchers do not/are not willing to use? I certainly understand the frustration for legitimate researchers, and there's plenty to be said about having the source code available to make auditing easier but in itself it seems that making a black hat take 6 months instead of 1 to create an exploit raise the skill/patience level needed and busy them for while where they are not working on the next exploit.
- saagarjha 6y agoYes: black hats have much more incentive and generally larger, more focused teams to find these bugs, and they aren't concerned with the issues of buying stolen devices and source code on the black market. (If you're curious, search for "dev-fused iPhone" and "iBoot source code". The Project Zero team works from about the worst situation possible, choosing to even forgo using services like Corellium.)
- Leherenn 6y agoThanks for the detailed explanation!
- 3pt14159 6y agoBecause you're missing the other half of the exploit market: Selling vulnerabilities for big cheques. https://zerodium.com/program.html https://zerodium.com/program.html
- saagarjha 6y agoI'm not sure how that applies to my points?
- 3pt14159 6y ago> Apple thinks it’s a good idea to strip out security code from the source... Because it makes it easier for attackers to find vulns. That's why they do it. The high payouts on these platforms are evidence that it isn't as simplistic as "only defenders would look at this why won't they release it!?"