root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat nimbus.md
// writeups

Nimbus

20 Jun 2026 · 10 min read · root access
Nimbus — Hack The Box machine

Executive summary — Nimbus is a Hard Linux box with a cloud/AWS theme: a job scheduler app runs on LocalStack (simulated AWS). The /jobs/preview endpoint has a reflected SSRF that, with an IP-encoding bypass, reaches the IMDS (169.254.169.254) and steals temporary credentials for the nimbus-web-role role. With them we inject a message into the SQS queue nimbus-jobs carrying a YAML whose script field the worker passes straight to exec() → RCE as the worker user (user flag). The same RCE launches a privileged CodeBuild project; the container's entrypoint tries to drop privileges by checking id, which we dodge by shadowing that function through an environment variable, and with CAP_SYS_ADMIN we hijack core_pattern combined with OverlayFS to run code as root on the host and read the root flag. Path: SSRF → IMDS → SQS → YAML RCE → CodeBuild escape → root.

PlatformHack The Box
Operating systemLinux
DifficultyHard
StatusRetired
Target IP<TARGET_IP>
StackFlask/Gunicorn · LocalStack (SQS, CodeBuild) · Docker
vhostsnimbus.htb (frontend) · aws.nimbus.htb (mock AWS) · floci (LocalStack's internal hostname)

Attack map

[1] Recon -- 22 SSH + 80 nginx (vhosts nimbus.htb / aws.nimbus.htb / floci)
        |
[2] SSRF reflejado en /jobs/preview -> IMDS por bypass decimal/octal + query .yaml ->
      credenciales IAM temporales (nimbus-web-role)
        |
[3] aws sqs list-queues -> cola nimbus-jobs (sqs:SendMessage) -> inyeccion de job YAML ->
      el worker pasa el campo script a exec() -> RCE como worker  ->  user.txt (callback HTTP)
        |
[4] El mismo RCE lanza CodeBuild --privileged (credenciales test:test, sin auth real) ->
      entrypoint intenta bajar privilegios via `id` -> shadow con BASH_FUNC_id%% -> se queda root
        |
[5] CAP_SYS_ADMIN -> localizar upperdir de OverlayFS -> hijack de
      /proc/sys/kernel/core_pattern -> SIGSEGV -> el kernel ejecuta el handler COMO ROOT EN EL HOST
      +-> leer /root/root.txt -> exfiltrar por callback  ->  root.txt

1. Reconnaissance

nmap -Pn -p- --min-rate 2000 <TARGET_IP>
PORT   STATE SERVICE
22/tcp open  ssh
80/tcp open  http
nmap -sC -sV -p22,80 <TARGET_IP>
22/tcp open  ssh     OpenSSH 9.6p1 Ubuntu 3ubuntu13.16
80/tcp open  http    nginx 1.24.0 (Ubuntu)

nginx 1.24.0 on a modern Ubuntu usually points to virtual hosting. We add the vhosts as we discover them:

sudo bash -c 'echo "<TARGET_IP> nimbus.htb aws.nimbus.htb floci" >> /etc/hosts'
curl -s http://nimbus.htb/
<title>Nimbus — Internal Job Scheduler</title>
<nav>
  <a href="/jobs">Submit Job</a>
  <a href="/login">Sign In</a>
</nav>
<div class="panel">
  <h3>How to Submit a Job</h3>
  <p>Drop the YAML in our internal Git, then point the job submitter at the raw URL.
     Or paste the YAML directly for ad-hoc runs.</p>
</div>
<div class="panel">
  <h3>Worker Fleet Configuration</h3>
  <p>Use SSH. Your SSH key needs to be approved by a DevOps lead. Ping marcus on Slack.</p>
</div>
<footer>
  <a href="/api/v1/health">/api/v1/health</a>
  <a href="/docs">/docs</a>
</footer>

Key findings: the app defines jobs in YAML, accepting them either by URL (remote fetch) or by pasting the YAML directly, mentions AWS infrastructure («worker fleet»), and leaks a username (marcus). If the app fetches a user-supplied URL, that's a potential SSRF.

curl -s http://aws.nimbus.htb/ -v
< HTTP/1.1 403 Forbidden
< Server: nginx/1.24.0 (Ubuntu)

The aws.nimbus.htb vhost exists (no 404) but nginx blocks direct access: confirms there's an internal AWS endpoint on the same box.

🔒 Clearance required

Root Access unlocks the content you can't see — everything else on the site is already open.

See Root Access plans

No account? Create one free then upgrade from your console.