Youssef Moukadem

Cybersecurity Enthusiast | Computer Science Graduate | Cloud Enthusiast | Lifelong Learner

View on GitHub

Case Study: Tempest — Investigating a Phishing-Based Intrusion with Sysmon and PowerShell

The Tempest challenge simulated a phishing attack that led to a full system compromise through a malicious Microsoft Word document. This case study focused on event log analysis, PowerShell forensics, and correlating Sysmon data to reconstruct the attacker’s steps — from the initial infection vector to privilege escalation and persistence.


Introduction and Environment Setup

I started by connecting to the investigation Windows virtual machine and reviewing the Sysmon, Windows, and PCAP files located in the Incident Files directory. The investigation centered on identifying how a user named benimaru on host TEMPEST was compromised after opening a suspicious document attachment. To prepare, I listed all files and generated their SHA256 hashes using PowerShell:

$Files = Get-ChildItem ‘C:\Users\user\Desktop\Incident Files’ ForEach($File in $Files) { Get-FileHash $File -Algorithm SHA256 }

This confirmed the integrity of the three main evidence files:


Identifying the Malicious Document

By parsing Sysmon event logs, I searched for entries containing .doc references and discovered a suspicious document named free_magicules.doc. Further review revealed that this file originated from a phishing domain:


Discovering the Exploit and Payload Execution

Within Sysmon logs, I found an encoded PowerShell command triggered through the MSDT utility:

Persistence and Secondary Payloads

The extracted payload placed a malicious shortcut at:

Network Analysis and C2 Behavior

Using Wireshark, I filtered HTTP traffic between the victim IP (192.168.254.107) and attacker IPs (167.71.199.191 / 167.71.222.162). The captured data revealed Base64-encoded HTTP requests to:

Discovery of Credentials and SOCKS Proxy Setup

From decoded traffic, the attacker exfiltrated credentials found in a PowerShell script:

Privilege Escalation and Persistence

After lateral movement, the attacker downloaded another tool named spf.exe (hash 8524FBC0D73E711E69D60C64F1F1B7BEF35C986705880643DD4D5E17779E586D) — identified as PrintSpoofer. It abused the SeImpersonatePrivilege to escalate privileges to SYSTEM. Then the attacker executed final.exe, which reconnected to the C2 over port 8080.

Account Creation and Persistence Mechanisms

Once SYSTEM access was achieved, two new user accounts were created:

Lessons Learned

The Tempest challenge provided an excellent full-cycle SOC investigation experience, covering: