01.靶场介绍
Description
Box created by vishal Waghmare This box should be easy to medium . This machine was created for the InfoSec Prep
Discord Server ( https://discord.gg/kDyAKtJs ) Website (https://hacksudo.com)
This box created for improvement of Linux privileged escalation, I hope so you guys enjoy. The box was created with Virtualbox ,but it should work with VMWare Player and VMWare workstation Upon booting up use netdiscover tool to find IP address you can check ip on grab page . This is the target address based on whatever settings you have. You should verify the address just incase.
Find the root.txt flag submit it to the flagsubmit channel on Discord and get chance to get hacksudo machine hacking course free .
This works better with VirtualBox rather than VMware
靶场地址:https://www.vulnhub.com/entry/hacksudo-thor,733/
02.信息收集
信息收集都是常规操作了,这里就简单记录了。
主机发现
端口扫描
目录扫描
指纹识别
提示信息
漏洞扫描
这里用nikto 扫描发现了关键文件README.md ,里面有默认账号密码,及其源码地址。这下就好办了。
admin/password123 进入后台后,发现存在一些账号密码,先收集起来。
zakee94/nafees123
salman/salman123
tushar/tushar123
jon/snow123
并不是ssh 账号密码呀,回到 web 继续挖洞。
这里随手就一个sql
源代码一看,无过滤直接执行
看下源代码sql注入倒是挺多,但是没有其他漏洞。没法GetShell,只能另寻思路了。
03.获取权限
前面利用sql 注入漏洞无果,回来目录这里,发现还有一个cgi-bin ,检测是否存在 Shellshock漏洞
还真的有这个古老的漏洞, Shellshock利用了linux环境变量解析问题,进而可以进行针对正常应用启动shell时进行劫持。通过该漏洞,可以实现CGI等环境下的RCE
利用该模块获取权限:exploit/multi/http/apache_mod_cgi_bash_env_exec
04.权限提升
获取交互shell python3 -c 'import pty;pty.spawn("/bin/bash")'
hack.tar 下载后解压出来没有也没有,只能继续提权了。
看来这个靶场主打的就是sudo 提权,gtfobins上查看提权的利用方法
https://gtfobins.github.io/gtfobins/service/
最后获得大锤子一把!
End
原文始发于微信公众号(贝雷帽SEC):NO.8 hacksudo-Thor 靶场
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论