by e28eta · 11y ago · 0 comments
I should look at it (on iPad currently), but it seems like the right combination of a custom Certificate Authority added to the keychain and signing your malicious Xcode with a certificate signed by the CA would help. Maybe also change the quarantine metadata on the file?
nope. Gatekeeper only accepts certificates issued by Apple. The trojan would have to patch gatekeeper itself which will be difficult once people upgrade to 10.11 and keep the System Integrity Protection enabled.
Even with all the bad feelings about Apple taking more and more control away from us, there's also a huge upside to this practice, I have to admit.
I guess as long as stuff is turnoffable in emergencies, I can live with the restrictions.
https://developer.apple.com/library/mac/technotes/tn2206/_in...
Gatekeeper seems to really be tied to Apple's CAs.
Of course, if you're willing to download XCode from a shady source, you're also willing to disable Gatekeeper when it prevents you from launching your shady copy, so the point is moot I guess.
edit: Stackoverflow seems to agree: http://stackoverflow.com/questions/11833481/non-apple-issued...
...mind you, I guess that doesn't matter. If I unknowingly had a hacked version and it prompted me for my password at install, I would enter it.
https://stackoverflow.com/questions/26197347/agreeing-to-the...
This seems to even be required to run things like the stock git or gcc, which I've always wondered how that isn't a violation of the GPL.
So, then you have to run sudo make to invoke the global license agreement console interface, then you manually type 'agree', then it runs the original command, except now you're running under sudo. In this case, that means it ran make as root, leaving root-owned artifacts all over my source tree.
The real question is whether the spctl tool displays "Apple" in case of a valid (relative to generic CAs) certificate issued to "Apple". Hopefully that's not the case.
Another risk is a specifically designed executable capable of compromising spctl.
I think that's what SIP is for: https://en.wikipedia.org/wiki/System_Integrity_Protection