Hack The Box · Linux Machine

Bank

Machine details
NameBank
Release date16 Jun 2017
Retire date10 Oct 2017
OSLinux
DifficultyEasy - Retired [0]
Rated difficultyBank community difficulty rating
Radar graphBank radar graph
Creatormakelarisjr
CherryTree fileDownload and remove the .txt extension

Virtual host and exposed records

Nmap found SSH, DNS, and Apache. The default page became useful after adding bank.htb to /etc/hosts. Directory discovery exposed /balance_transfer/, where one unusually small .acc file contained credentials.

10.10.10.29 bank.htb

Email: [email protected]
Password: !##HTBB4nkP4ssw0rd!##
Bank anomalous account file

Upload bypass and shell

The authenticated support portal accepted a PHP reverse shell when it used the .htb extension. Opening the uploaded file returned a shell as www-data.

Uploaded Bank reverse shell
Bank reverse shell

SUID privilege escalation

LinEnum identified the SUID binary /var/htb/bin/emergency. Running it produced a privileged shell capable of reading both flags.

file /var/htb/bin/emergency
/var/htb/bin/emergency
SUID emergency binary
Bank machine completed