This Metasploit module exploits a command injection in TimeMachine on macOS <= 10.14.3 in order to run a payload as root. The tmdiagnose binary on OSX <= 10.14.3 suffers from a command injection vulnerability that can be exploited by creating a specially crafted disk label. The tmdiagnose binary uses awk to list every mounted volume, and composes shell commands based on the volume labels. By creating a volume label with the backtick character, we can have our own binary executed with root privileges.
7eb0567032fbb9cfa6bb44edac50bb3c598c094fd089f1288cc6d474ba8add57
Apple Security Advisory 2019-3-25-2 - macOS Mojave 10.14.4, Security Update 2019-002 High Sierra, Security Update 2019-002 Sierra are now available and addresses buffer overflow, bypass, and code execution vulnerabilities.
4586dd3e324e2c849bc6d37ff1b93dc1a83271a7faa1f2cab7ddccce107730f5