Gaming ServerTHM

This engagement demonstrates how exposed credentials and LXD group misconfigurations can be chained together to achieve full system compromise via container escape techniques.

Reconnaissance

Directory enumeration revealed a hidden `/secret` path containing a private SSH key, indicating potential credential exposure.

Initial Access

The SSH private key was cracked to recover the passphrase letmein, allowing login as user john.

Key Finding: LXD Group Misconfiguration

The user belonged to the LXD group, allowing container creation and interaction with the host filesystem.

This effectively grants root-equivalent privileges when abused.

Exploitation

A privileged container was created and configured to mount the host root directory. From within the container, the host filesystem was accessed and a root shell was obtained.

lxc exec privesc-container /bin/sh
Write Up Image

Impact

This vulnerability resulted in full system compromise, allowing access to all files, credentials, and system configurations.

Attackers could maintain persistence, manipulate users, and completely control the host.