text
stringlengths
4
429
Aside from the malware code obfuscated with JMPs and NOPs, Win32/Hydraq also constructs a
reference table that will be used by the Command Reference field found in the client
s information header to convert the actual commands.
Once the server receives a packet from the client, it performs the following task to convert the
client
s Command Reference value:
CA ISBU-ISI WHITE PAPER: IN-DEPTH ANALYSIS OF HYDRAQ
1. Perform a bitwise XOR with 0xCC as the key in
Command Reference
Backdoor Command
the information transmitted.
2. The value in the Command Reference field will
be added with negative two (-2).
3. Match the value obtained in Step 2 in the Table
05 to get the Actual Command.
0x00
0x00
0x01
0x01
0x02
0x02
0x03
0x03
0x04
0x04
To elaborate on this further, let
s take an example
where the remote attacker requests information
about the logical drive of the compromised system.
0x05
0x0A
0x06
0x05
0x07
0x06
0x08
0x07
In Table 05, the Command Reference for retrieving
the logical drive is Command 0x04. (see Table 06
0x09
0x0A
0x0A
0x08
for Backdoor Command and Task reference)
0x0B
0x0A
0x0C
0x0A
0x0D
0x0A
0x0E
0x0A
0x0F
0x0A
0x10
0x0A
0x11
0x0A
0x12
0x09
In this example, the Command Reference is CA CC
CC CC, and the Task Number is CC CC CC CC.
Converting the correct instruction to execute:
1.0xCCCCCCCA XOR 0xCCCCCCCC = 6
2.6 + (-2) = 4
[Table 05 - Backdoor Command Reference]
3. Resulting match:
Command Reference
Backdoor Command
0x04
0x04
Listing 13 displays the captured communication between the client and server retrieving the logical drive information of the compromised system.
CA ISBU-ISI WHITE PAPER: IN-DEPTH ANALYSIS OF HYDRAQ
[Listing 13 - Captured client server communication ]
3.7 Backdoor Command Table
The Win32/Hydraq backdoor features 10 command switches, which theoretically allow the remote attacker to perform almost everything. An attacker can manipulate files, registries, services, process, privileges, search files and directories, remote download, update configurations,
open applications, and steal any desired information. Attackers can initiate real-time graphical
control and watch a user
s desktop using Command 0x07 Task 0x0b (see Appendix D for
discussion of acelpvc.dll and VedioDriver.dll installation).
Backdoor
Task
Description
Command
Command 0x00 Task 0x00
Adjust Token Privilege / Access Privilege Escalation and Enumerate
Process.
Task 0x01
Terminate Process
Other value
(Task 0x02 or more)
Receive further commands.
Command 0x01 Task 0x00
Enumerate service configuration and sends back to the client.
CA ISBU-ISI WHITE PAPER: IN-DEPTH ANALYSIS OF HYDRAQ
Command 0x01
Task 0x01
Modify or change service configuration.
Predefined Start type: 2-SERVICE_AUTO_START, 3SERVICE_DEMAND_START, 4-SERVICE_DISABLED
Task 0x02