LockTalk

Catégorie: Web Difficulté: medium Flag: HTB{h4Pr0Xy_n3v3r_D1s@pp01n4s}

Challenge

28KB
Ouvrir

Description


In "The Ransomware Dystopia," LockTalk emerges as a beacon of resistance against the rampant chaos inflicted by ransomware groups. In a world plunged into turmoil by malicious cyber threats, LockTalk stands as a formidable force, dedicated to protecting society from the insidious grip of ransomware. Chosen participants, tasked with representing their districts, navigate a perilous landscape fraught with ethical quandaries and treacherous challenges orchestrated by LockTalk. Their journey intertwines with the organization's mission to neutralize ransomware threats and restore order to a fractured world. As players confront internal struggles and external adversaries, their decisions shape the fate of not only themselves but also their fellow citizens, driving them to unravel the mysteries surrounding LockTalk and choose between succumbing to despair or standing resilient against the encroaching darkness.

Etape 1 : Bypass la restriction HAProxy

Dans les fichiers de conf, on voit que les chemins commençant par /api/v1/get_ticket sont bloquées.

On peut bypasser la restriction en ajoutant ./ milieu du chemin : /api/./v1/get_ticket

En python il faudra cependant encoder le ./ en %2e/ pour ne pas que le module requests simplifie le chemin avant d’envoyer la requête.


Etape 2 : Forger un ticket admin

Dans le requirements.txt on voit la version de jwt 3.3.3 :

Parmi les vulnérabilités de cette version il y a la CVE-2022-39227.

Un repo git contient un PoC : https://github.com/user0x1337/CVE-2022-39227/

On peut faire un script pour automatiser l’attaque

Script de résolution

Mis à jour

Ce contenu vous a-t-il été utile ?