vulnhub靶场digitalworld.local: DEVELOPMENT

0x000 靶场描述


This machine reminds us of a DEVELOPMENT environment: misconfigurations rule the roost. This is designed for OSCP practice, and the original version of the machine was used for a CTF. It is now revived, and made slightly more nefarious than the original.

If you MUST have hints for this machine (even though they will probably not help you very much until you root the box!): Development is (#1): different from production, (#2): a mess of code, (#3): under construction.

Note: Some users report the box may seem to be "unstable" with aggressive scanning. The homepage gives a clue why.

Feel free to contact the author at https://donavan.sg/blog if you would like to drop a comment.


0x001 靶场下载


https://www.vulnhub.com/entry/digitalworldlocal-development,280/


0x002 信息收集


探测存活主机

netdiscover -r 192.168.1.0/24

端口扫描

nmap -sS -sV -A -p 1-65535 192.168.1.106

22     ssh
139    samba
445    samba
8080   http-proxy


0x003 漏洞利用


smb漏洞

检测smb共享目录,发现access

同时也发现6个用户:admin、patrick、intern、ossec、ossecm、ossecr

尝试访问共享目录,但是都需要密码,遂放弃。。

文件泄露/远程文件包含漏洞

访问8080端口,提示我们可以去html_pages查看项目。

发现如下页面,一个一个查看。

访问页面,http://192.168.1.106/development.html 查看网页源代码,发现developmentsecretpage

访问`http://192.168.1.106/developmentsecretpage/,点击链接前往下一个页面。

来到http://192.168.1.106:8080/developmentsecretpage/sitemap.php页面,点击注销,竟然跳转到登陆页面。

尝试弱口令登陆。

然后网站竟然报错,访问这个developmentsecretpage/slogin_lib.inc.php页面,没有什么信息。

使用漏洞库搜索一下,发现这是一个文件泄露/文件包含漏洞。

https://www.exploit-db.com/exploits/7444

然后访问http://192.168.1.106/developmentsecretpage/slog_users.txt,发现用户名和密码。

md5解密

http://md5.cn/

admin, 3cb1d13bb83ffff2defe8d1443d3a0eb, #解不出来
intern, 4a8a2b374f463b7aedbb44a066363b81,12345678900987654321
patrick, 87e6d56ce79af90dbe07d387d3d0579e,P@ssw0rd25
qiu, ee64497098d0926d198f54f6d5431f98,qiu

0x004 提权


ssh登陆intern用户

登陆ssh,提示使用 ? 或者 help 获取允许使用的命令列表,尝试绕过

使用命令绕过限制:echo os.system('/bin/bash')

查看当前用户权限,没有什么利用信息。

切换patrick用户,查看当前用户权限,发现vim和nano具有root权限而且不需要密码。

参考:https://gtfobins.github.io/gtfobins/vim/

sudo vim
ESC + 冒号 输入shell
回车即可提权成功。

posted @ 2022-12-10 14:29  Cx330Lm  阅读(56)  评论(0编辑  收藏  举报