TET & 4N6

A good forensics challenge that was cheesed

We are presented with two files, a backup.ad1 file and memory image.

A quick google search leads us to to discover that .ad1 is referencing the AccessData Logial Image File Formatarrow-up-right.

We can quickly mount the .ad1 file using FTK imager, and we are presented with the user's AppData.

Basing off the description, we have two pieces of information.

  1. User was in the process of registering for TETCTF (Reading the Rules)

  2. Malicious code was downloaded onto the computer somehow

So we can start by looking for anything related to TETCTF first as that was how the malicious code got uploaded onto the computer.

Opening the Office Folder in Roaming, we see a suspicious .lnk file with the name TetCTF2024-Rules.LNK, suggesting that a docx was opened.

Looking at the templates directory, we recieve a windows defender error upon clicking on one of dotm files, indicating a possible malware dropper.

Using olevba to extract the macros, we get the C2's IP and Port as well as the first flag.

For the second part of the flag, there is two ways to go about it.

Using Strings (Cheesing)

  • Simply doing a strings on the raw file with the format Flag 2: gives us the flag.

Getting the chrome password and decrypting it (Intended)

  • The user states that he no longer remenbers anything about his account, suggesting we have to do some sort of password recovery from a browser

  • Looking at the .ad1 file, we can easily spot Google Chrome and its UserData file entry which we can use to extract chrome's encryption keyarrow-up-right.

  • Next is the encrypted passwords located in Login Data

  • Using memprocfs to mount memory to get SAM, SECURITY, SYSTEM for pypykatz where we get Stirring's password.

  • We can then decrypt the chrome password by doing the followingarrow-up-right

    • Generate prekey with the SID (S-1-5-21-347626499-1928756767-1973197264-1001) and password (S3cur3P@ass)

    • Use the prekey to decrypt the master password

    • Use the master password to decrypt the chrome password from Local State

    • Login to pastebin with the user tecij23311 to get our flag

Last updated