Grandmaster rank emblem

Lvl 99

Level XP3,807/5,718

3807 of 5718
Grandmaster dreadnaught
Machine
Compromised
OS
Linux
Difficulty
Hard
Steps
7
Added
23 Mar 2023

A leaked backup and a hidden log give admin creds; a LiteCart upload and a disable_functions bypass give a shell, then a MySQL UDF and a backdoored PAM lead to root.

0Reconnmap1LootNikto backup2Loothidden .log3FootholdLiteCart upload4Footholddisable_functions5LateralMySQL UDF6Lateralsysadmin7Priv escPAM backdoor
1Recon2Loot3Foothold4Lateral5Priv escnmap1Nikto backup2hidden .log3LiteCart upload4disable_functions5MySQL UDF6sysadmin7PAM backdoor8

How it went

  1. 0
    nmap

    An nmap scan shows a LiteCart e-commerce site on port 80.

  2. 1
    Nikto backup

    Nikto finds a site backup archive; a config file inside leaks database credentials and the admin email.

  3. 2
    hidden .log

    A comment in the login source points to a hidden .log file that stores the admin credentials in cleartext.

  4. 3
    LiteCart upload

    LiteCart 2.1.2's authenticated upload, with a Content-Type bypass, places a webshell, though most PHP functions are disabled.

  5. 4
    disable_functions

    A PHP disable_functions bypass restores code execution as www-data.

  6. 5
    MySQL UDF

    A malicious exec_cmd function planted in MySQL runs commands as the mysql account; an SSH key written to its authorized_keys gives a shell.

  7. 6
    sysadmin

    Password-change history in mysql's home reveals the sysadmin password for an SSH login and the user flag.

  8. 7
    PAM backdoor

    A backdoored pam_unix.so holds a hardcoded password; recovering it from the binary gives root over su.