Attacking Unattended Installs on macOS
The macOS installers for Druva inSync and Carbon Black used postinstall scripts that created files in world-writable locations, allowing a local low-privileged user to manipulate those files during installation. This could lead to privilege escalation to root, information disclosure, or denial of service.
medium.com
Published on medium.com
Back in 2017, Patrick Wardle presented a talk at DEF CON covering the many risk factors that macOS application installers can pose. A few months ago, he revisited some of these risks with regards to Zoom’s installer for macOS.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the installers created files in user-writable directories during privileged installation, and the postinstall scripts did not properly validate the integrity of those files before using them.
Impact
A local attacker could escalate privileges to root, cause a denial of service, or disclose sensitive files; the buffer overflow was not believed to be practically exploitable but was fixed anyway.
What the attacker needed
Local low-privileged user account; installer runs with root privileges; timing during installation
The fix
The vendors patched the installers; more generally, installers should use secure directories and sandboxing.
How it was found
- Wait for the installer to run and create files in a user-writable location.
- Create a malicious plist or symlink to overwrite those files.
- The installer, running as root, uses the manipulated files, leading to privilege escalation or other impacts.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When you install software on a Mac, the installer sometimes runs extra scripts with high privileges (as root). If those scripts create files in places that normal users can change, a bad user can swap those files while the installer runs. That can let them become root or read sensitive files.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.