首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Sudo <=1.8.14 - Unauthorized Privilege
来源:vfocus.net 作者:svartman 发布时间:2015-07-30  
# Exploit Title: sudo -e - a.k.a. sudoedit -  unauthorized privilege escalation
# Date: 07-23-2015
# Exploit Author: Daniel Svartman
# Version: Sudo <=1.8.14
# Tested on: RHEL 5/6/7 and Ubuntu (all versions)
# CVE: CVE-2015-5602.
 
Hello,
 
I found a security bug in sudo (checked in the latest versions of sudo
running on RHEL and ubuntu) when a user is granted with root access to
modify a particular file that could be located in a subset of directories.
 
It seems that sudoedit does not check the full path if a wildcard is used
twice (e.g. /home/*/*/file.txt), allowing a malicious user to replace the
file.txt real file with a symbolic link to a different location (e.g.
/etc/shadow).
 
I was able to perform such redirect and retrieve the data from the
/etc/shadow file.
 
In order for you to replicate this, you should configure the following line
in your /etc/sudoers file:
 
<user_to_grant_priv> ALL=(root) NOPASSWD: sudoedit /home/*/*/test.txt
 
Then, logged as that user, create a subdirectory within its home folder
(e.g. /home/<user_to_grant_priv>/newdir) and later create a symbolic link
inside the new folder named test.txt pointing to /etc/shadow.
 
When you run sudoedit /home/<user_to_grant_priv>/newdir/test.txt you will
be allowed to access the /etc/shadow even if have not been granted with
such access in the sudoers file.
 
I checked this against fixed directories and files (not using a wildcard)
and it does work with symbolic links created under the /home folder.
 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·OpenSSL Alternative Chains Cer
·Heroes of Might and Magic III
·Apple OS X DYLD_PRINT_TO_FILE
·OpenBSD Local Denial Of Servic
·OS X 10.10 DYLD_PRINT_TO_FILE
·KMPlayer 3.9.x - .srt Crash Po
·Counter-Strike 1.6 GameInfo Qu
·T-Mobile Internet Manager - Co
·tcpdump rpki_rtr_pdu_print Out
·BIND9 - TKEY PoC
·Internet Download Manager OLE
·Linux Privilege Escalation Due
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved