当前位置:网站首页>CVE-2019-14287(sudo提权)
CVE-2019-14287(sudo提权)
2022-06-23 03:50:00 【墨痕诉清风】
受影响的Sudo版本
版本号 < 1.8.28的Sudo版本均将受到该漏洞的影响。
漏洞修复
Sudo v1.8.28版本已修复该漏洞,建议广大Linux用户尽快手动将sudo包更新至最新版本。
复现CVE-2019-14287漏洞
原理:Sudo的全称是"superuserdo”,它是Linux系统管理指令,允许用户在不需要切换环境的前提下,以其它用户的权限运行应用程序或命令,通常是以root用户身份运行命令,以减少root用户的登录和管理时间,同时提高安全性,当在Linux操作系统上执行命令时,只有得到许可或者知道root密码,普通用户才可以使用sudo命令以root身份执行命令.
个人理解:(直白点讲就是,如果你入侵了他人的主机,可以利用该漏洞,进行权限升级,不用切换root,因为切换root的时候需要输入密码,用该漏洞可以跳过该步骤,获得权限)
那么开始实操吧!
1.打开contos7 liunx系统
(怎么安装虚拟机,就不讲了太简单了)

2.部署可实现该漏洞的环境
3.查看版本
命令:sudo -V

4.需要配置网络信息
命令: vim /etc/sudoers

5.找到root行,在root下一行加入一个命令
命令:test ALL=(ALL,!root) ALL
这里的第一个ALL代表用户可以在任何地方使用我们的sudo(简单点讲,假如每个人家里都有智能空调,你可以在任意地点远程操纵你的空调,就是这个道理)
(ALL,!root)该命令的意思就很简单了,表示除了root其他用户不可以使用sudo这个命令
最后一个ALL 表示被允许执行

输入完成之后,保存退出vim(这里不会的话,请学习下vim命令的使用)
6.利用漏洞
(1)先创建一个test用户,并且创建密码后切换到test用户
命令;新建;passwd test
切换;su test
useradd -m test
passwd test
(2)这时候会出现一个问题

sudo -u#1 idTest用户无权用root身份登录
那么怎么解决呢?
输入命令;sudo -u#1 id(这个就是体现了这个漏洞,原理上咱们限制了test 不能用root的命令,但是通过这个漏洞 成功的获得了root权限)
这样就可以解决该问题了
边栏推荐
- Photoshop PS viewing pixel coordinates, pixel colors, pixel HSB colors
- 抖音x-bogus和_signature参数分析
- Cocos learning diary 2 - scripts and attributes
- Mobile terminal city list sorting JS plug-in vertitylist js
- There is a problem with redis startup
- 五年连续亏损42亿,蘑菇如何渡劫?
- 什么是元数据
- x24Cxx系列EEPROM芯片C语言通用读写程序
- Pta:7-58 Book audio-visual rental management
- Kail 渗透基本素养 基础命令
猜你喜欢

How does flutter achieve different zoom animation effects

How MySQL deletes a row of data in a table

Monitoring artifact ZABBIX, from deployment to application, goes deep layer by layer

Leetcode 1208. 尽可能使字符串相等(终于解决,晚安)

应急响应-hw复习

Svg+js smart home monitoring grid layout

Photoshop PS viewing pixel coordinates, pixel colors, pixel HSB colors

How to use shell script to monitor file changes

什么是元数据

Basic skills of x64dbg
随机推荐
Pta:7-61 teacher student information management
Cocos学习日记1——节点
解决使用Exception抛出后,@Transactional不生效
How MySQL deletes a row of data in a table
Pta:7-60 pet growth
leetcode 91. Decode Ways 解码方法(中等)
How node+express operates cookies
PTA:7-37 学号解析
LabVIEW displays both hexadecimal and normal characters in the same table
PTA:7-31 期刊收费
Pta:6-29 application of virtual base classes - people, teachers and students
QT elidedText 只对中文符合起作用,对英文不起作用的问题解决
Xiaojinwei, chairman of Chenglian Technology: implement the national strategy of data economy and lead the development of new consumption in the digital era!
反编译
thinkphp6 模版替换
thinkphp6 无关联ID的连表查询(2张表)主要是select的应用
论文阅读_关系抽取_CASREL
在Pycharm中使用append()方法对列表添加元素时提示“This list creation could be rewritten as a list literal“的解决方法
395. 冗余路径
Pytoch --- pytoch customizes the dataset