Skip to content
RCE Write-up Intermediate

Inferno: From HTTP Basic Auth to Root via an Abandoned Web IDE

A deliberately vulnerable training box exposed an HTTP Basic Auth prompt that accepted a guessed default username with a common password, and the same credentials then opened an abandoned Codiad web IDE. That IDE's publicly known remote code execution flaw gave a short-lived shell, from which a hex-encoded file readable by the web user revealed SSH credentials for a local account, and an unrestricted passwordless sudo rule on tee allowed escalation to root.

Enryuuu Follow

Published on medium.com

This write-up documents my approach to solving the Inferno room on TryHackMe, a medium difficulty challenge built around Dante’s Inferno. Behind that literary, sparse-looking homepage lies a practical attack chain: brute-forcing an HTTP Basic Auth wall, reusing the recovered credentials to slip into an abandoned web…

Enryuuu, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a chain of weak configuration choices: no rate limiting on Basic Auth, a reused password across two separate login layers, an unmaintained Codiad install with a known RCE, a plaintext credential hidden only by hex encoding, and a NOPASSWD sudo rule on tee with no argument restrictions.

Impact

An attacker could gain a web-user shell and then full root access on the box, though every session was killed after roughly a minute, limiting how long each shell could be used.

What the attacker needed

Network access to the target; a wordlist for brute force; public Codiad exploit tool; two listening ports for the exploit

The fix

The text does not say the box was fixed; it recommends rate-limiting or locking out failed Basic Auth attempts, avoiding credential reuse across trust boundaries, and scoping sudo rules to specific files and arguments rather than granting a file-writing binary free rein.

How it was found

  1. Run a full port sweep and find SSH and Apache on the target.
  2. Brute-force directories to discover a path returning 401 with a browser Basic Auth prompt.
  3. Use hydra against the Basic Auth endpoint with the username admin and a wordlist to recover a valid pair.
  4. Log in with the same credentials to reach a second login page and enter the Codiad file browser.
  5. Run a public Codiad exploit with two listeners to obtain a www-data shell.
  6. Read a hidden file in the user's Downloads directory, hex-decode it, and recover an SSH password from the decoded text.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This is a practice machine, not a real company, so the weaknesses were planted on purpose. The attacker guessed a very common username and password to get past a browser pop-up login, then found the same password also worked on a second login page for an old code editor. That editor had a publicly known bug letting someone run commands on the server, and a badly configured permission let the attacker become the all-powerful root user.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.