











In the following sections, ThreatLabz examines the technical details of the identified C2Looper variants, including their features, network communication protocols and commands.
All identified C2Looper variants use string encryption and dynamically resolve Windows APIs.
LoadLibrary and GetProcAddress to load and resolve any necessary functions at runtime. C2Looper uses plaintext HTTP to communicate with its C2 server through a simple network protocol. First, C2Looper collects host information and sends it to the C2 server as a JSON object in an HTTP POST request. The JSON object contains the following information:
This information is formatted as follows:
{
"id": "DNSHOSTNAME_Username",
"user": "username",
"host": "DNSHOSTNAME",
"pid": C2LOOPER_PID_NUMBER
}C2Looper sends this information to the endpoint /api/beacon every second to request a command. Each command that is received from the C2 server is formatted as a JSON object containing the keys described in the table below.
JSON Key | Description |
|---|---|
arg | The command parameters. For example, this key contains the payload URL for the |
cmd | Specifies the command name. |
ok | A Boolean value indicating whether the command was parsed successfully. |
seq | Appears to serve as a task ID. C2Looper includes this value when reporting command results to the endpoint |
Table 1: C2Looper command message format.
The table below describes the C2 endpoints used by C2Looper.
Endpoint | Description |
|---|---|
/api/beacon | Retrieves commands from the C2 server. |
/api/result/BOT_ID/task_ID | Reports command output to the C2 server. |
Table 2: C2Looper C2 endpoints.
The table below describes the commands supported by C2Looper.
Command | Description |
|---|---|
ping | Ping message |
run | Executes a system command on the compromised host using |
shell | Executes a system shell command and returns the output to the C2 server. C2Looper first writes the output to the file |
upload | Downloads a PE file from a specified URL to the compromised host and saves it as the filename wtsapi32.dll under the path |
download | Downloads a file from a specified location and saves it as the filename |
Table 3: Commands supported by C2Looper in older variants.
ANALYST NOTE: Interestingly, Oyster malware (which is likely related with the threat actor behind Lactrodectus) uses similar API endpoints for C2 communication.
During our research, ThreatLabz identified a new version of C2Looper that supports additional commands, and most interestingly, uses GitHub for C2 communication. We also observed that the older C2Looper variant described previously was used to download the latest version of C2Looper through the upload command. This latest version appears to be internally tagged as version 2 as we will discuss later.
C2Looper v2 uses GitHub for all C2 operations, including storing exfiltrated data and reporting command output. In addition to the use of GitHub, C2Looper v2 introduces new commands and modifies the functionality of existing commands. The table below describes these additions and changes.
Command | Description |
|---|---|
ls | Lists files in a specified directory. |
recon | Collects additional host information using the following commands:
|
drives | Returns a list of drives on the compromised host. |
inject | Loads the legitimate |
upload | Unlike the previous version, this version downloads a specified file from a dedicated folder in the GitHub repository to the Windows temporary folder. |
run | Unlike the previous version, C2Looper v2 executes a specified file on disk using |
shell | Instead of storing the command output in the file |
Table 4: C2Looper v2 commands.
Furthermore, we identified the following noteworthy changes:
!!! v2 !!! pongv2 from. This is used as a response when the network command ping is used. This is an indicator that the malware developer refers to this variant as version 2 of C2Looper.ok has been removed from beacon requests and responses.seq has been fixed in this version and C2Looper uses the correct task ID with the appropriate command output. Since this variant uses GitHub for C2 communication, the endpoints have been removed. Instead, C2Looper creates a directory for each bot in the GitHub repository and uses the JSON files in the table below:
Filename | Description |
|---|---|
cmd.json | Stores command data for C2Looper to execute. |
result.json | Stores command output. |
beacon.json | Stores the bot ID and a timestamp that indicates the last successful request. |
Table 5: JSON files used by C2Looper v2 with GitHub-based C2 communication.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。