During my technical interview at Protergo, I had the opportunity to showcase my skills in malware analysis. This blog post will take you through the exciting journey of dissecting a suspicious file using Cuckoo Sandbox, a powerful tool for both static and dynamic analysis.


Step-by-Step Malware Analysis with Cuckoo Sandbox

Step 1: Unpacking the Suspect

After downloading the sample file, I unzipped it to reveal its contents. This initial step allows us to see what’s lurking inside the archive.

cuckoo@cuckoo-sandbox:~$ cd Documents
cuckoo@cuckoo-sandbox:~$ unzip PowerShellScript.zip

Sample File

Step 2: Setting Up a Safe Environment

To create a safe environment for the analysis, I fired up a separate virtual machine running Windows. This isolated space ensures that the malware can’t wreak havoc on my actual system. It’s like having a controlled experiment to observe the malware’s behavior!

cuckoo@cuckoo-sandbox:~$ sudo virtualbox

Virtual Machine

Step 3: Launching Cuckoo Sandbox

With the virtual machine prepped, I launched the Cuckoo Sandbox tools. This versatile software provides a user-friendly interface to conduct both static and dynamic analysis of the malware. Think of it as a magnifying glass and a microscope combined, allowing us to see the malware from different angles.

cuckoo@cuckoo-sandbox:~$ sudo cuckoo -d

Cuckoo Sandbox

Step 4: Running the Local Web Server

To access Cuckoo Sandbox’s interface conveniently, I also ran a local web server. This lets me analyze the malware from the comfort of a web browser, just like browsing any other website.

cuckoo@cuckoo-sandbox:~$ sudo cuckoo web runserver

Web Server Up

Step 5: Accessing the Sandbox Interface

After a successful launch, I was greeted by the Cuckoo Sandbox interface. It’s the mission control center from where we’ll be dissecting the malware’s secrets.

Cuckoo Sandbox Interface

Step 6: Importing the Sample for Analysis

The next step was crucial. I imported the suspicious file into Cuckoo Sandbox for a thorough examination. This is like putting the malware under the scanner to see what makes it tick.

Import File

Step 7: Observing Malware Behavior

Cuckoo Sandbox then did its magic. It executed the malware within a simulated environment inside the Windows virtual machine. This lets us observe how the malware behaves in a controlled setting, mimicking a real-world attack scenario.

Simulate

Step 8: Reviewing the Analysis Report

Once the malware finished its execution, Cuckoo Sandbox presented the analysis report. This report is like a treasure trove of information, revealing the malware’s characteristics and potential threats.

Analysis Report


Key Findings

Malware Signatures

The report highlighted the malware’s distinctive signatures. These signatures are like fingerprints, helping us identify the type of malware we’re dealing with and potentially link it to known threats.

Malware’s Distinctive Signatures

Screenshots of Activity

Scrolling down the report, I found screenshots capturing the virtual machine’s activities during the malware execution. These screenshots provide valuable visual evidence of the malware’s actions.

Screenshots

Static Analysis Results

The initial static analysis, which examines the code without actually running it, didn’t yield any significant results. This often happens with encrypted malware, where the malicious code is hidden from plain sight.

Static Analysis

Strings Analysis

However, the strings analysis proved more fruitful. Here, I discovered strings associated with keyloggers. Keyloggers are malicious programs designed to steal your keystrokes, potentially revealing passwords, login credentials, and other sensitive information you might type. This finding suggested that the malware aimed to spy on the target user’s activities.

Strings Analysis

Missing Behavioral Data

Unfortunately, the behavioral analysis section of the report lacked data. This page typically details the malware’s interactions with the system, such as accessing the registry, manipulating files, or communicating over the network. The absence of data in this section could be due to various reasons, requiring further investigation.

Behavioral Analysis


Conclusion: Keylogger Confirmed

The analysis using Cuckoo Sandbox revealed several key points. The presence of specific signatures and the discovery of keylogger-related strings strongly suggested that we were dealing with a malicious program designed to steal user data.

Furthermore, the potential exfiltration of captured data to an attacker’s email address highlighted the urgency to take action.