- Published on
Orion Machine (HackTheBox) — Step-by-Step Walkthrough
- Authors

- Name
- Hassaan Ali Bukhari
- @B3TA_BLOCKER
Previous Article


Overview
Orion is an Easy-difficulty Linux machine built around a Craft CMS 5.6.16 instance exposed on port 80. Enumeration of the site revealed the CMS and version, which had a known exploit available in Metasploit, giving initial access as www-data. From there, a .env file in the Craft installation directory leaked database credentials, which I used to connect directly to the backend MySQL instance and dump the users table. The extracted admin password hash cracked via hashcat against rockyou.txt, yielding valid SSH credentials for the adam user and the user flag.
Post-exploitation port enumeration on the box showed two additional services — MySQL (3306) and Telnet (23) — researching the Telnet service pointed to CVE-2026-24061, a telnetd auto-login flaw. Passing a crafted USER environment variable (USER='-f root') alongside the -a flag exploited this trust issue, bypassing authentication entirely and dropping a root shell — completing the box.
Machine Info
| Target IP | 10.129.8.209 |
|---|---|
| Difficulty Level | Very Easy |
| OS | Linux |
Nmap Scan

I added the domain and IP to my /etc/hosts file:
Port 80
Port 80 leads to a telecom service website.

Poking around the site, I found it was powered by Craft CMS.
Craft CMS
Craft CMS is a flexible, developer-friendly content management system built on PHP. It gives developers a blank canvas for building custom, high-performance sites without locking them into rigid templates or pre-made themes.
Nothing else on the front end stood out, so I moved on to directory enumeration.
Directory Enumeration with gobuster

This turned up http://orion.htb/admin/login. I didn't have credentials, so I tried admin:admin — no luck. The login page did, however, disclose the CMS version: Craft CMS 5.6.16. That gave me a clear next step: check whether this version has any known vulnerabilities.

Initial Access
I searched for a matching exploit in msfconsole.

I set the following options:

Running the exploit landed me a shell.

Spawning a PTY Shell
While exploring the filesystem, I found a .env file under /html/craft:
Inside the .env file were the database credentials.

Connecting to the Database
Using the credentials extracted from the .env file, I connected to the database to harvest further information that might help me escalate to the adam user.

I selected the orion database to investigate further.

It contained several tables. I focused on the users table and ran a query to pull only the relevant fields:

Hash Cracking
The hash cracked to: darkangel
SSH Connection
User Flag

Priv Esc --> Root
I started by checking for open ports.
The machine was listening locally on ports 3306 and 23, both bound to loopback only. To reach them, I set up local port forwarding over my existing SSH session.
I focused on port 23 (Telnet) first, since it's historically prone to weak authentication. Research turned up CVE-2026-24061, and I found an Offensive Security article walking through a proof of concept, which I replicated here.
Reference: https://www.offsec.com/blog/cve-2026-24061/

Root Flag
The vulnerability allowed authentication bypass via the -a auto-login flag combined with a crafted USER environment variable, which the vulnerable telnetd trusted without verifying credentials:
