> For the complete documentation index, see [llms.txt](https://docs.wehost.co.in/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wehost.co.in/ctf-walkthrough/htb-traverxec-from-rce-to-root-with-a-nostalgic-bang.md).

# HTB: Traverxec – From RCE to Root with a Nostalgic Bang

<figure><img src="https://556493038-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxMLCiQqJJztvsDM2LNoE%2Fuploads%2Fgit-blob-514de72c89d06facec284c24d00d775ff40b2222%2FChatGPT%20Image%20Jun%207%2C%202025%2C%2008_39_54%20AM.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
**“Give me 3 minutes and I’ll show you how a misconfigured web server handed me SSH keys on a silver platter.”**
{% endhint %}

### 🧠 Reconnaissance

We kick things off with a good old `nmap` scan:

```
nmap -Pn -A -p- 10.10.10.165
```

```
22/tcp open  ssh     OpenSSH 7.9p1 Debian
80/tcp open  http    nostromo 1.9.6
```

### 🚀 Initial Foothold – CVE-2019-16278

A quick search reveals [CVE-2019-16278](https://github.com/AnubisSec/CVE-2019-16278), a remote code execution vulnerability in `nostromo 1.9.6`.

I used a simple Python script to exploit it and got a remote shell as `www-data`.

```
python nostroSploit.py 10.10.10.165 80 "id"
```

<figure><img src="https://556493038-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxMLCiQqJJztvsDM2LNoE%2Fuploads%2Fgit-blob-4a199654d14c4f382756e8774c7fafb7290ed489%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://556493038-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxMLCiQqJJztvsDM2LNoE%2Fuploads%2Fgit-blob-a5f1f6f54aa1fdbcb2bcf1c0188674da94d32049%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### 🛠️ Post-Exploitation – Looting Configs

Once inside, I poked around

* Quick Google and `nostromo` has conf stored in `/var/nostromo/conf/nhttpd.conf`

```
serverroot		/var/nostromo
homedirs		/home
homedirs_public		public_www
```

That `public_www` bit? Jackpot.

I couldn't list `/home/david` directly due to `drwx--x--x` permissions, but `/home/david/public_www` was accessible.

<figure><img src="https://556493038-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxMLCiQqJJztvsDM2LNoE%2Fuploads%2Fgit-blob-3a9f92be046e21c2a47e5892ecea554fff938af2%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

* this is cause of the permission i have on the dir

<figure><img src="https://556493038-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxMLCiQqJJztvsDM2LNoE%2Fuploads%2Fgit-blob-4d6e9471e4996350d3bbe41dc9cb0389c3131600%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

* On David's home dir, i have `drwx--x--x` in order for me to read the content of the directory i need read permission, which would mean `drwx--xr-x`&#x20;

<figure><img src="https://556493038-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxMLCiQqJJztvsDM2LNoE%2Fuploads%2Fgit-blob-dc5cb22b27dfcc4d13ba90567ad38be854a3f97a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Inside, I found a zipped SSH key bundle. Extracted it, and then:

```
ssh -o IdentitiesOnly=yes -i id_rsa david@10.10.10.165
```

* crack the password with john
*

```
<figure><img src="/files/7AxUNUxwbzsqBZ5bQB1L" alt=""><figcaption></figcaption></figure>
```

### 🧗 Privilege Escalation – From David to Root

As `david`, I spotted a custom script directory in his home: `/home/david/bin/`.

<figure><img src="https://556493038-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxMLCiQqJJztvsDM2LNoE%2Fuploads%2Fgit-blob-8dde3f13640cb7fbbc6e840183c1a3ad6dfa38e4%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

#### ⚔️ The Root Strike

`journalctl` can spawn a shell by executing:

<figure><img src="https://556493038-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxMLCiQqJJztvsDM2LNoE%2Fuploads%2Fgit-blob-c61807f3e20c8f1cceaa8954eb91e451d5824309%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

And with that…\
**Root. Owned. Game over.**

<figure><img src="https://556493038-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxMLCiQqJJztvsDM2LNoE%2Fuploads%2Fgit-blob-0ed8471cd7f994da5d1284fffb3c91a083f91460%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
