Insomnia

Posted on Sat 28 December 2024 in HTB challenge

This is a writeup of the Insomnia challenge which is a web challenge from Hack The Box.

First register a account: asdf:asdf

From ProfileController.php we know that the flag is shown if the user is logged in as Administrator

From UserController.php we know that the login only verifies user name if no password provided.

$db = db_connect();
$json_data = request()->getJSON(true);
if (!count($json_data) == 2) {
    return $this->respond("Please provide username and password", 404);
}
$query = $db->table("users")->getWhere($json_data, 1, 0);
$result = $query->getRowArray();

Intercept login with burp

change username remove password

b314294d2c3eb2f349482ea5203f8dad.png

Flag

7de0223622f968671d9f7ebafe9dac24.png

This gives us the flag:

HTB{I_just_want_to_sleep_a_little_bit!!!!!}

web