Disclaimer: This blog serves solely for educational purposes. The author advocates for legal and ethical usage and does not support any unauthorized or malicious activities. The content is provided for educational use only, and readers are accountable for their actions and any resulting consequences.

This blog navigates the complex terrain of cybersecurity, focusing on advanced tactics in cyberattacks and the key role of digital forensics in analyzing these threats, reflecting a rising trend in cybersecurity risks. It aligns with key cybersecurity topics, notably computer forensics and anti-forensics, as evidenced by detailed analyses of Cobalt Strike payloads and digital forensic techniques. Additionally, the blog enhances understanding of threat intelligence and the evolution of digital crimes. It also addresses the challenges in analyzing Cobalt Strike beacons, which are designed for evasion and persistence, complicating detection and analysis.
The blog will be structured into two distinct parts: the first will detail the attack scenario, while the second part will focus on digital forensics.
In my blog, I will offer a brief and clear explanation of Cobalt Strike, outlining its basic functions and significance in cybersecurity. This will serve as an introduction or primer to the topic. For a more detailed exploration, readers can refer to the in-depth blog by my esteemed friend, batchmate, and coworker Mingmar Lama titled “Demystifying Cobalt Strike” which provides a comprehensive analysis of Cobalt Strike and its applications.
My friend unfortunately didn’t manage to secure a Cobalt Strike license, but fortune smiled on me during a rummage through my digital trash — I stumbled upon a Cobalt Strike license key right in my recycle bin.
Cobalt Strike
Cobalt Strike is a commercial penetration testing tool, renowned for its capability to simulate advanced cyber threats. Introduced in 2012 by Raphael Mudge, Cobalt Strike was designed to replicate the tactics, techniques, and procedures (TTPs) used by sophisticated attackers, providing security professionals with a robust platform for assessing the security of networks and systems.

Top threats 2022 by Redcanary
Recently, Advanced Persistent Threat (APT) groups have increasingly used Cobalt Strike. Below are some notable cyber threat incidents involving Cobalt Strike:
APT29 and Cobalt Strike (2018): APT29, a hacking group, used Cobalt Strike in their assaults on the U.S. energy sector. They utilized it for network infiltration, payload execution, and theft of sensitive data, including login credentials and financial information (Mandiant, 2021).
Lazarus Group (2019): The Lazarus hacking group employed Cobalt Strike in their attacks targeting banks and financial institutions. Their activities included network infiltration, backdoor execution, and stealing critical data such as customer records and transaction details (SentinelOne, 2023).
Emissary Panda’s Operations (2020): In their attacks on government entities and defense contractors, the Emissary Panda group utilized Cobalt Strike for network penetration, malware deployment, and exfiltration of sensitive information like classified documents and research data (SentinelOne, 2023).
Trickbot Operators (2020): Operators of Trickbot used PowerTrick and Cobalt Strike to implement their Anchor backdoor and deploy RYUK ransomware (Cisco Talos , 2022).
APT Attackers and CobaltStrike Beacon: APT attackers employed a CobaltStrike beacon, using a previously unknown persistence method through DLL hijacking, to connect to a company’s VPN via a public PureVPN node (SentinelOne, 2023).
LockBit Ransomware and Cobalt Strike: LockBit ransomware discovered a novel method to bypass security measures by utilizing a Windows Defender command-line tool to decrypt and execute Cobalt Strike payloads (Toulas, 2022).
Starting the Cobalt Strike Teamserver and Crafting a Stageless payload
Disclaimer: The use of cracked or unauthorized versions of Cobalt Strike software is strictly prohibited and not encouraged. Users are advised to handle such tools responsibly and ethically, adhering to legal and professional standards.

Initiating Cobalt Strike Teamserver
The Cobalt Strike team server is initiated and hosted on a public IP address. This setup enables the Cobalt Strike graphical user interface (GUI) client to effectively communicate and interact with the Cobalt Strike server. This configuration is essential for establishing the necessary command and control infrastructure for operations.

Client Initiates connection to Teamserver
The client establishes a connection with the Cobalt Strike server by inputting the required credentials. For security and confidentiality purposes, these credentials have been omitted from this documentation.

Successful connection to Teamserver
Following the successful establishment of the connection, access to the Cobalt Strike graphical user interface (GUI) is now available.

Cobalt Strike Payload categories
In this operation, Cobalt Strike’s extensive payload capabilities are utilized, with a particular focus on the Windows Stageless payload.

Setting up a listener.
The operation progresses with the establishment of a listener, designed to receive and manage connections from the Cobalt Strike beacon. This listener is configured to operate on port 1234.

Creating a PowerShell stageless payload
A Windows PowerShell stageless payload is generated, and the previously set up listener is employed to handle the reverse connection, in the event of a successful connection establishment.

Payload crafted successfully
The payload has been successfully crafted, and the listener is now configured and ready to capture the incoming connection.
Delivering and waiting for the execution of the Cobalt Strike Beacon

Malicious mail crafted for the delivery of the payload
In order to deliver the malicious payload, a scenario is contrived where an email, appearing to be from the IT support team, urgently requests employees to run a PowerShell script. This script is purportedly necessary for adhering to recent changes made within the organization’s network. The email is crafted to create a sense of urgency, emphasizing the importance of immediate compliance to avoid potential issues, thereby persuading the recipients to execute the payload without suspicion.

Successfully received a connection from the beacon
Following the successful execution of the payload, it initiates a callback to the previously configured listener. This action signifies that the computer has now been compromised, as the payload has established communication with an external controller, potentially allowing unauthorized access and control over the system.

Running Mimikatz for credential dumping
When granted administrator privileges, Cobalt Strike has the capability to run Mimikatz, resulting in the dumping of NTLM hashes from the compromised computer.
Cobalt Strike Features
Cobalt Strike features an extensive array of commands for operation on a compromised host. It goes beyond simple command execution, offering additional functionalities such as VNC access to the affected computer, keylogging, and a broad spectrum of other advanced capabilities. The diverse features of Cobalt Strike are showcased in the screenshots provided below.

Feature List 1

Feature List 2

Feature List 3

Extended Features 1

Extended Features 2

Extended Features 3
Keep an eye out for the upcoming blog where I’ll delve into the Digital Forensics aspect. More updates on Cobalt Strike Digital Forensics are on the way — stay tuned!
