Jobstacle_I

Flag: ECW{mcd0_cr4ck}

Challenge

file-archive
16MB
archive
circle-info

Description


It looks like the enemy is recruiting...

One of our agents was contacted by a recruiter for a company working in weapons technology, Hammer Industries. A big contract apparently, but we don't know the company well. Our analysts, however, suspect that it has a connection to the drone attacks observed recently.

Two weeks ago, investigations led to the discovery of a hidden ZIP file on their website. The file, named hammer.zip, appeared to be an innocuous technical archive containing documentation...

Analyze this archive (no bruteforce needed) and let us know if anything interesting is found there.

This challenge is better done on windows

Challenge made by:

Solution

Déchiffrement du ZIP

Première reconnaissance du fichier :

L'idée ici c'est de voir que ZipCrypto (l'algorithme de chiffrement originel des zip) n'est pas sécurisé. Notamment face à aux attaques de type Known-Plaintext.

Sauf que l'archive contient un fichier svg. Ca tombe bien, ils commencent toujours par la même chose, donc on va pouvoir utiliser ce type d'attaque avec l'outil bkcrackarrow-up-right (il n'a besoin que de 12 bytes connus pour trouver la clé utilisée).

Maintenant, on peut retirer le mot de passe grâce à ces clés :


VHDX

Un fois l'archive déchiffrée, en ouvrant le fichier USDroneLaws.docx en tant qu'archive (car c'est un docx, donc une archive) on peut y trouver un fichier xml très lourd (et très suspect) :

Il s'agit en réalité d'un VHDX (un disque virtuel Hyper-V Microsoft). Par simplicité, on va le monter avec PowerShell et la commande Mount-VHD.

On se retrouve alors avec plusieurs fichiers, notamment deux PDF qui parlent de Base64 et ROT13.


Alternate Data Stream

Sur Windows, on peut utiliser des Alternate Data Stream (ADS). Ca veut dire qu'un même fichier peut avoir plusieurs contenus différents, et c'est exactement ce qu'il se passe ici :

Le fichier R45T3K7.txt contient un autre flux, que l'on peut obtenir comme ça :

C'est tout simplement le flag encodé en Base64 et ROT13. Un petit tour sur CyberChef :

Mis à jour