Lockpick

Description

Forela needs your help! A whole portion of our UNIX servers have been hit with what we think is ransomware. We are refusing to pay the attackers and need you to find a way to recover the files provided. Warning This is a warning that this Sherlock includes software that is going to interact with your computer and files. This software has been intentionally included for educational purposes and is NOT intended to be executed or used otherwise. Always handle such files in isolated, controlled, and secure environments. Once the Sherlock zip has been unzipped, you will find a DANGER.txt file. Please read this to proceed.

Files

└─$ 7z l lockpick1.zip
 
   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2023-06-02 10:38:02 D....            0            0  forela-criticaldata
2023-06-02 10:38:02 .....          153          130  forela-criticaldata/forela_uk_applicants.sql.24bes_note.txt
2023-06-02 10:38:02 .....     64954456     26941691  forela-criticaldata/customer-feedback.json.24bes
2023-06-02 10:38:02 .....       134892       134875  forela-criticaldata/sales_forecast.xlsx.24bes
2023-06-02 10:38:02 .....      1093774       450037  forela-criticaldata/trading-firebase_bkup.json.24bes
2023-06-02 10:38:02 .....       308633        63672  forela-criticaldata/co2_London
2023-06-02 10:38:02 .....        78627        46809  forela-criticaldata/forela_uk_applicants.sql.24bes
2023-06-02 10:38:02 .....          153          130  forela-criticaldata/sales_forecast.xlsx.24bes_note.txt
2023-06-02 10:38:02 .....          153          130  forela-criticaldata/complaints.csv.24bes_note.txt
2023-06-02 10:38:02 .....      5238447      2484636  forela-criticaldata/complaints.csv.24bes
2023-06-02 10:38:02 .....          153          130  forela-criticaldata/it_assets.xml.24bes_note.txt
2023-06-02 10:38:02 .....          153          130  forela-criticaldata/trading-firebase_bkup.json.24bes_note.txt
2023-06-02 10:38:02 .....          153          130  forela-criticaldata/customer-feedback.json.24bes_note.txt
2023-06-02 10:38:02 .....      6634991      1363391  forela-criticaldata/it_assets.xml.24bes
2023-07-10 10:49:59 .....         3890         3902  bescrypt.zip
2023-07-10 10:48:49 .....         1050          553  DANGER.txt
------------------- ----- ------------ ------------  ------------------------
2023-07-10 10:49:59           78449678     31490346  15 files, 1 folders
 
└─$ 7z x lockpick1.zip -p'hacktheblue'
└─$ cat DANGER.txt
Dear User,

This text file is to warn you that the ZIP file contains software that is going to interact with your computer and files. This software has been intentionally included for educational purposes and is NOT intended to be executed or used otherwise.Always handle such files in isolated, controlled, and secure environments. 

It is strongly recommend you proceed by:
1 - Running the sample in a controlled environment, for example EP Pwnbox or an isolated virtual machine. 
2 - Only unzip the software in this controlled environment, using the password provided.
3 - Unzip the file in the VM and enjoy analysing!

PLEASE EXERCISE EXTREME CAUTION!

The ZIP file containing the software is password-protected for your safety. The password is "E@iwyzXK7HK&". It is strongly recommended that you do NOT extract or execute the contents of this ZIP file unless you understand the risks involved.

By reading this file and using the provided password to unzip the file, you acknowledge and fully understand the risks as detailed in this warning. 

Tasks

Task 1. Please confirm the encryption key string utilized for the encryption of the files provided?

Open the malware in Ghidra and start static analysis. In the main function we see only 1 function, process_directory which seems to be taking directory and some string.

Writeup.png

some string turns out to be a key for encryption.

Writeup-1.png
Writeup-2.png
circle-check

Task 2. We have recently received an email from wbevansn1@cocolog-nifty.com demanding to know the first and last name we have him registered as. They believe they made a mistake in the application process. Please confirm the first and last name of this applicant.

Pretty much the encryption takes filename, reads it, XORs with key, saves encrypted file, adds note and deletes the original file. To recover files we can use say key because XOR is symmetrical.

Decrypt the files:

Answer: Walden Bevans

Task 3. What is the MAC address and serial number of the laptop assigned to Hart Manifould?

xml should have the answers, so I decided to parse it:

Find the answer:

circle-check

Task 4. What is the email address of the attacker?

They left notes all over the place about who they were.

circle-check

Task 5. City of London Police have suspicions of some insider trading taking part within our trading organization. Please confirm the email address of the person with the highest profit percentage in a single trade alongside the profit percentage.

The data which we should analyze is trading-firebase_bkup.json:

Get max percentage:

circle-check

Task 6. Our E-Discovery team would like to confirm the IP address detailed in the Sales Forecast log for a user who is suspected of sharing their account with a colleague. Please confirm the IP address for Karylin O'Hederscoll.

Open the sales_forecast.xlsx in Excel, Ctrl+T to create table, filter first_name for Karylin.

Writeup-3.png
circle-check

Task 7. Which of the following file extensions is not targeted by the malware? .txt, .sql,.ppt, .pdf, .docx, .xlsx, .csv, .json, .xml

In process directory we find a filter for extensions. The only one not included from question list is ppt

Writeup-4.png
circle-check

Task 8. We need to confirm the integrity of the files once decrypted. Please confirm the MD5 hash of the applicants DB.

circle-check

Task 9. We need to confirm the integrity of the files once decrypted. Please confirm the MD5 hash of the trading backup.

circle-check

Task 10. We need to confirm the integrity of the files once decrypted. Please confirm the MD5 hash of the complaints file.

circle-check

Last updated