当前位置:网站首页>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权限)
这样就可以解决该问题了
边栏推荐
- QT elidedText 只对中文符合起作用,对英文不起作用的问题解决
- C语言刷题随记 —— 自由落体的球
- #18生成器函数的参数传递
- Pta:7-63 calculate the number one in the college entrance examination
- The spring recruitment in 2022 begins, and a collection of interview questions will help you
- Cocos learning diary 2 - scripts and attributes
- Leetcode 1208. 尽可能使字符串相等
- PTA:6-29 虚基类的应用-人与教师学生
- 【一起上水硕系列】Day Three - preview4
- Photoshop PS viewing pixel coordinates, pixel colors, pixel HSB colors
猜你喜欢

How to use MySQL index well

8位全加器原理

抖音x-bogus和_signature参数分析
![[pytoch] calculate the derivative of sin (x) by automatic differentiation](/img/a7/16dd9ecc13a986a9141ecc3fba00a1.png)
[pytoch] calculate the derivative of sin (x) by automatic differentiation

Principle of 8-bit full adder

在线文本过滤小于指定长度工具

语料库数据处理个案实例(词性赋码、词性还原)

Sessions and Daemons

Software development in 2022: five realities CIOs should know

Xiaojinwei, chairman of Chenglian Technology: implement the national strategy of data economy and lead the development of new consumption in the digital era!
随机推荐
PTA:7-61 师生信息管理
Cocos learning diary 2 - scripts and attributes
Pta:7-64 what day of the year is this day
【Pytorch】用自动微分求sin(x)的导数
Halcon知识:binocular_disparity 知识
距离度量 —— 余弦距离(Cosine Distance)
Pta:6-33 student ranking table (destructor)
JVM调优简要思想及简单案例-为什么需要JVM调优?
Pta:7-61 teacher student information management
flutter系列之:flutter中的Wrap
PTA:7-31 期刊收费
Xiaojinwei, chairman of Chenglian Technology: implement the national strategy of data economy and lead the development of new consumption in the digital era!
golang使用mongo-driver操作——增(基础)
Pytoch --- pytoch customizes the dataset
C语言刷题随记 —— 自由落体的球
composer按装laravel
TS进阶之infer
Pta:7-67 friend is very simple 2016final
制造型企业开发的SRM供应商管理系统特点是什么
notepad++ 查找替换之分组替换保留