A Trojan that acts as a backconnect proxy server on the infected computer and serves the purpose of sending spam messages together with a remote spam server.
During the installation, the Trojan attempts to create its copies with the names сsrss.exe, svchost.exe, and rundll32.exe in the C:\Windows\System32 system folder even though the original сsrss.exe file already exists in this directory. If the Trojan acquires necessary administrator and debugger privileges, the termination of the mentioned process causes BSOD (“Blue Screen of Death”). However, if the malware does not succeed in crushing Windows, it creates сsrss.exe, svchost.exe, and rundll32.exe in the %APPDATA% folder and modifies the system registry as follows:
[<HKCU>\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
'Client Server Runtime Process' = '%APPDATA%\csrss.exe'
'Host-process Windows (Rundll32.exe)' = '%APPDATA%\rundll32.exe'
'Service Host Process for Windows' = '%APPDATA%\svchost.exe'
When the next time the system is booted, all three applications created by the Trojan are launched automatically.
Once Trojan.Proxy.27552 is run, it checks whether there is an established Internet connection by referring to smtp.gmail.com:25 and plus.smtp.mail.yahoo.com:25. If the check returns negative result, the Trojan terminates its work. If the connection is established, the Trojan attempts to send a relevant report to the command and control server.
The list of command and control servers is stored in the malware’s body. Using either port 9631 or port 9630, the Trojan sends the DWORD value of 1000 (0x3e8) to every server on the list. Servers should reply with the same DWORD. If this operation proceeds successfully, a command and control server sends the malware a list with valid IP addresses of command and control servers. The list begins with the DWORD value specifying the number of structures followed by the structures themselves. They contain IP addresses of command and control servers, port, timestamp, and other additional parameters, which will be used by the Trojan to sort the received data. The malicious program compares the received lists and deletes local network addresses generating a final list of command and control servers. Then the malware encrypts this list and enters the information into the registry as follows:
[HKCU\SOFTWARE\Microsoft\Software\Microsoft\Shared Police]
MachineParam="...."
Once Trojan.Proxy.27552 is launched on the infected computer, it creates three threads. The first thread regularly updates the lists of command and control servers (as described above), the second thread monitors the status of the registry branch (and, if necessary, troubleshoots any errors) responsible for the Trojan’s autorun, and the third thread performs the functions of a backconnect proxy server.
To connect to the servers, the Trojan uses port 9997 and employs it own SOCKS4/5 binary protocol. The malware generates new threads trying to connect to the command and control servers. Some of these threads periodically open the port while others close it. The first command sent by the server contains configuration data for a keep-alive connection. The parameters are used in the function as follows:
char __usercall set_keepalive_vals@<al>(int a1@<eax>, SOCKET s)
{
int v2; // ecx@1
int vInBuffer[3]; // [sp+0h] [bp-10h]@1
DWORD cbBytesReturned; // [sp+Ch] [bp-4h]@1
v2 = *(_DWORD *)a1;
vInBuffer[2] = *(_DWORD *)(a1 + 4);
vInBuffer[1] = v2;
vInBuffer[0] = 1;
WSAIoctl(s, SIO_KEEPALIVE_VALS, vInBuffer, 0xCu, 0, 0, &cbBytesReturned, 0, 0);
return 1;
}
Thus, the connection to the command and control servers is carried out in such a way that they actually force the infected system to maintain this connection during a specified period of time. For example, the c0 d4 01 00 30 75 00 00 command makes the system maintain the connection for 2 minutes by sending TCP packets every 30 seconds.
The main purpose of Trojan.Proxy.27552 is to gain access to SMTP servers to send out spam email messages.