Hugo Pereira

Project 3: Advanced Command & Control (C2) Operations & Threat Hunting

Objective

To architect an offensive engagement against a hardened, localized Windows 11 endpoint using an enterprise-grade Command and Control (C2) framework. The objective encompasses payload weaponization, defense evasion via Living-off-the-Land (LotL) techniques, simulated post-exploitation (persistence and ransomware behavior), and a comprehensive Blue Team detection analysis utilizing the Wazuh SIEM and Sysmon telemetry.


Architecture & Tool Selection Rationale

Before executing the engagement, specific tools were selected to accurately mirror modern Advanced Persistent Threat (APT) behaviors:


Methodology & Execution Lifecycle

Phase 1: C2 Initialization & Weaponization

The offensive infrastructure was staged on the Kali Linux node. An HTTP listener was established on Port 80.

A custom Windows executable (amd64) implant was compiled via Sliver, hardcoded with the attacker IP address and callback port.

Phase 2: Defense Evasion & Payload Delivery

To deliver the payload to the victim endpoint (192.168.74.20), a temporary Python web server was staged on the attacker machine.

Phase 3: Post-Exploitation & Impact

Upon execution of the payload, a persistent session successfully checked into the Sliver C2 server.

Overcoming Environmental Instability: During post-exploitation, attempts to establish a continuous, interactive shell tunnel hung indefinitely. This was diagnosed as interference from background Windows OS updates and network state changes.

With stable execution established, I simulated two distinct MITRE ATT&CK techniques:

  1. Persistence (T1136 - Account Creation): Executed net localgroup administrators HACKER /add.
    • Rationale: Attackers provision rogue administrative accounts to guarantee continued access to the environment in the event the primary C2 payload is discovered and remediated by the Blue Team.
  2. Impact / Ransomware Simulation (T1490 - Inhibit System Recovery): Executed vssadmin delete shadows /all /quiet.
    • Rationale: This is a primary behavior of modern ransomware strains (e.g., LockBit, Conti). By deleting Volume Shadow Copies, the attacker ensures the victim cannot restore encrypted files from local backups.

Detection Engineering & SIEM Analysis (Blue Team)

Following the Red Team execution, I pivoted to the Wazuh SIEM to analyze the Sysmon telemetry and validate the detection pipeline. The pipeline successfully captured the entire attack chain.

1. Initial Access & Tool Transfer (Event ID 11)

Despite bypassing the browser, the SIEM detected the initial PowerShell staging. Wazuh captured powershell.exe dropping a temporary script policy file during the execution of Invoke-WebRequest.

2. Persistence Mechanism Detection (Event ID 1)

Sysmon Event ID 1 (Process Creation) recorded the exact command line execution used to create the backdoor administrator account (net localgroup administrators HACKER /add) running at a High Integrity level.

3. Ransomware Behavior Detection (Event ID 1)

The SIEM successfully captured the vssadmin shadow copy deletion. The logs explicitly showed the parent process (cmd.exe /c) executing the vssadmin delete shadows instruction, directly validating the success of the one-shot memory execution pivot used during the attack phase.


Conclusion

This engagement successfully validated the complete lifecycle of a cyber attack within a controlled environment. It demonstrated the practical application of C2 infrastructure, the necessity of adaptable tradecraft (LotL, memory execution) to bypass modern OS hardening, and the critical importance of kernel-level telemetry (Sysmon) for accurate threat hunting and SIEM alerting.