🚨 We're disclosing a macOS security bug that Apple says is not an issue.
@mysk_co21K followers
87,426 views
23 Comments
Comments from the original post on X (Twitter)

@wtsdev
Your original post said: > The modified binaries can then access the original app's keychain records and protected containers. Your blog then conditions that on prompts. While I agree the social-engineering aspect is troublesome, I think the original post overstated the bug.
21 likes

@mysk_co
The original post had to be vague because we couldn't disclose the bug at the time. The system prompts show the original app's name and icon. The prompts are created and shown by macOS not the modified executable.
6 likes

@wtsdev
I understand the desire to be vague. But to be vague to the point of overstatement is an error, in my opinion.
6 likes

@mysk_co
No, the original post isn't an overstatement. You can still access Keychain, TCC protected folders. We just used the standard APIs as an example. However, a more sophisticated attack would use an executable that is more malicious than this, like this one:
1 like

@wtsdev
> You can still access Keychain, TCC protected folders. Can you do so unconditionally (e.g. *without* prompts)? If not, then I would still personally classify your original post as an overstatement.
4 likes

@ClassicMain
So in other words you wrote a script that replaces the executable of a program with a different executable and you run that script and the executable gets replaced as intended and then you start the new executable. Yeah, i am on apple's side. How is this a macOS security bug?
17 likes

@mysk_co
Because macOS already has safeguards against other apps and scripts tampering with app bundles, even with admin privileges. These safeguards are bypassed by a simple command that can be run by any script running on your Mac.
14 likes

@mysk_co
Plus, how is it okay that an app signed with the original developer’s certificate can simply be replaced by another ad-hoc signed binary and be allowed to run at all?
10 likes

@ClassicMain
I am not sure how macOS works but I'd be shocked if I weren't able to do that on Linux and just run whatever the hell I want. Heck even on windows. So either apple gives you control over your PC or not. What is it?

@liambrefberinn
@mysk_co This is an obvious security flaw, if you—for some reason—don't like security, macOS still lets you disable many security features, including SIP. Security != loss of ownership of your own device. Do some research.
5 likes

@ClassicMain
@mysk_co Ok i did Research and it seems i am mostly right with what I said about this being intended. You can swap out the binary on macOS anyways at any time. The issue is that the permission manager doesn't actually check whether the binary has been swapped or not because the
1 like

@ClassicMain
@mysk_co permission manager is dumb and therefore grants the same permissions to a completely different binary. That is the bug. Not that you can swap out binaries.
2 likes

@ClassicMain
@mysk_co And apple correctly refuted it on that ground since you reported it as "you can swap binaries"
3 likes

@mysk_co
Link to the blog:
14 likes

@mysk_co
Link to the video on YouTube:
15 likes

@mysk_co
Link to the script used in the demo:
8 likes

@DefenceOsint
I‘m amazed. You didn‘t find a security vulnerability, you just replaced an installed application with another one that has the same name. You didn‘t bypass any protections by the system. If you had, keychain wouldn‘t ask you for permission.
8 likes

@JureUrsic
If an unprivileged local process can silently overwrite signed application binaries and pull encryption keys from the keychain without a password or TCC prompt, it is a critical security vulnerability. Downplaying filesystem boundary bypasses as expected behavior only weakens the trust model users expect from an operating system.
3 likes

@0xocdsec
You already assume code execution and did not break a boundary prior. I can see you don't get paid.
2 likes

@TinOnX
It’s a useful feature that allows intelligence agencies and bad actors to steal secrets. Not a bug.
2 likes


