vendor:
OSX
by:
vade79/v9 v9@fakehalo.us (fakehalo/realhalo)
7.2
CVSS
HIGH
Insecure File Permissions
259
CWE
Product Name: OSX
Affected Version From: N/A
Affected Version To: N/A
Patch Exists: YES
Related CWE: N/A
CPE: N/A
Metasploit:
N/A
Other Scripts:
N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References:
N/A
Nuclei Metadata: N/A
Platforms Tested: OSX
2006
/usr/bin/passwd[OSX]: local root exploit
Apple OSX's /usr/bin/passwd program has support for a custom passwd file to be used instead of the standard/static path. This feature has security issues in the form of editable file(s) being made anywheres on the disk and also writing arbitrary data to files. The first issue will only work if the file does not already exist, it is done using "umask 0;/usr/bin/passwd -i file -l <filename>". The second issue is once a successful password change has occured /usr/bin/passwd will insecurely re-write the passwd file to /tmp/.pwtmp.<pid>, which can be predicted and linked to a file of your choice. (this exploits the second issue to overwrite /etc/sudoers)
Mitigation:
Ensure that the permissions of the passwd file are set to the most restrictive settings possible.