text
stringlengths 1
38.9k
|
|---|
Over a few days' span , the threat actors install remote access tools on additional systems based upon the results of the network reconnaissance .
|
They use At.exe to schedule tasks to run self-extracting RAR archives , which install either HttpBrowser or PlugX .
|
CTU researchers observed the threat actors collecting Cisco VPN profiles to use when accessing the victim's network via VPN .
|
To facilitate lateral movement , the adversaries deploy ASPXTool web shells to internally accessible systems running IIS .
|
CTU researchers have observed the threat actors encrypting data using the password " admin-windows2014 " and splitting the RAR archives into parts in the recycler directory , with the same name as the uncompressed data .
|
The number at the end of the password corresponds to the year of the intrusion .
|
For example , the password " admin-windows2014 " shown in Figure 14 was changed to "admin-windows2015" for TG-3390 intrusions conducted in 2015 .
|
CTU researchers have observed TG-3390 actors staging RAR archives , renamed with a .zip file extension , on externally accessible web servers .
|
The adversaries then issue HTTP GET requests , sometimes with the User-Agent MINIXL , to exfiltrate the archive parts from the victim's network .
|
Successfully evicting TG-3390 from an environment requires a coordinated plan to remove all access points , including remote access tools and web shells .
|
Within weeks of eviction , the threat actors attempt to access their ChinaChopper web shells from previously used IP addresses .
|
Finding the web shells inaccessible , the adversaries search google.co.jp for remote access solutions .
|
CTU researchers discovered the threat actors searching for " [company] login , " which directed them to the landing page for remote access .
|
TG-3390 attempts to reenter the environment by identifying accounts that do not require two-factor authentication for remote access solutions , and then brute forcing usernames and passwords .
|
After reestablishing access , the adversaries download tools such as gsecudmp and WCE that are staged temporarily on websites that TG-3390 previously compromised but never used .
|
CTU researchers believe legitimate websites are used to host tools because web proxies categorize the sites as benign .
|
TG-3390 actors keep track of and leverage existing ASPXTool web shells in their operations , preferring to issue commands via an internally accessible web shell rather than HttpBrowser or PlugX .
|
After reentering an environment , the threat actors focus on obtaining the active directory contents .
|
TG-3390 is known for compromising organizations via SWCs and moving quickly to install backdoors on Exchange servers .
|
Despite the group's proficiency , there are still many opportunities to detect and disrupt its operation by studying its modus operandi .
|
The threat actors work to overcome existing security controls , or those put in place during an engagement , to complete their mission of exfiltrating intellectual property .
|
Uses RijndaelManaged instead of AES for encryption .
|
( with ECB mode , which is considered weak ) .
|
Quasar contains the NetSerializer library that handles serialization of high level IPacket objects that the client and server use to communicate .
|
The serialization assigns unique IDs for serializable objects types .
|
The open source and several other samples we found give a dynamically-assigned 1 byte ID at compile time .
|
The sample we analyzed changed that behavior and hard-coded DWORD for each object type .
|
This is a better implementation , as it allows servers and clients from different versions to communicate with each other to some extent .
|
The sample we analyzed is most likely forked from open source quasar 1.2.0.0 .
|
We find multiple file/object names hinting at the version , but must compelling :Quasar version 1.1.0.0 names the encryption module name space β Encryption β , while subsequent Quasar versions use β Cryptography β β which we observe in this sample .
|
Quasar version 1.3.0.0 changed the encryption key generation , and stopped saving the password in the sample .
|
There are more indications as well , such as names of objects , files etc .
|
Other samples we analyzed had different combinations of modification to cryptography and serialization .
|
Our decompilation of the serialization library was not complete enough to allow simple recompilation .
|
Instead , we downloaded and compiled the 1.2.0.0 server of the open-source Quasar RAT , having determined that this seemed likely the most similar version .
|
The out-of-the-box server could not communicate with the client sample owing to the previously documented modifications that we had observed .
|
We incorporated those changes into our build , discovering that this worked for most sample versions with almost no further modification .
|
Both the client and the server use the same code to serialize and encrypt the communications .
|
Instead of compiling a different server for each client , our server uses the code from within the client to communicate with it .
|
Using Reflection , the server can load the assembly of the client to find the relevant functions and passwords .
|
This was more complex .
|
Both the client and server uses the same API , but the client serializer cannot serialize server objects , because they are not the same as their β mirrored β objects inside the client .
|
In some cases these objects are completely different , for example the server commands to get the file system .
|
Our solution is to :Translate on the fly the objects the server send to mirrored matching client objects ( will not work if client doesnβt have this object , or renamed it ) .
|
Copy the content from the server object into the new client object ( will not work if client implementation is different ) .
|
Serialize the client object ( which will be later encrypted and sent ) .
|
Deserialize the decrypted response into another client response object .
|
Translate the client response object into the server version of the client response object .
|
Copy the contents from the client response object into the translated server object .
|
Return the translated object .
|
Our sample communicates with app.progsupdate.com , which resolved to 185.141.25.68 , over TCP port 4664 .
|
The server sends a command .
|
for example , β Get System Information β .
|
The command is translated to an IPacket of type GetSystemInfo .
|
The packet is serialized into a stream of bytes .
|
The stream of bytes is encrypted ( in some versions there is also optional compression step ) .
|
The stream of bytes is sent over TCP to the client .
|
The client receives and decrypts the packet .
|
The client deserializes the packet into IPacket GetSystemInfo .
|
The relevant handler of the client is called , collects the system information and sends it back inside IPacket of GetSystemInfoResponse .
|
Each of these layers seems to be different to some extent in the various samples we found .
|
The IPacket , Serialization and Encryption framework code is shared between the client and the server , therefore we can use it with Reflection .
|
However the Server handlers and command function are not , so we cannot create a completely perfect simulation .
|
The attacker can issue commands ( not all commands appear in different samples ) through the Quasar server GUI for each client :Get system information .
|
Get file system .
|
Upload / download / execute files .
|
Startup manager .
|
Open task manager .
|
Kill / start processes .
|
Edit registry .
|
Reverse Proxy .
|
Shutdown / restart the computer .
|
Open remote desktop connection .
|
Observe the desktop and actions of active user .
|
Issue remote mouse clicks and keyboard strokes .
|
Password stealing .
|
Retrieve Keylogger logs .
|
Visit website .
|
Display a message box .
|
The file system commands underling handlers and IPacket were modified to support more features , so these commands donβt work out of the box and required manual implementation from us .
|
With further analysis of the Quasar RAT C2 Server , we uncovered vulnerabilities in the server code , which would allow remote code execution .
|
This might allow a second attacker to install code of their choice β for example , their own Quasar RAT β on the original attacker βs server .
|
We refer to this ( somewhat ironic ) technique as a β Double Edged Sword Attack β .
|
We did not apply this to any live C2 servers β we only tested this with our own servers in our lab .
|
In the lab , we changed our Quasar RAT source code to use the known encryption key , and to send fake victim IP address , City , Country code , Flag , and Username .
|
The Quasar serve does not verify the RAT data , and displays this data in the RAT Server GUI when the RAT is executed and connects to the server .
|
We found this could be used to supply compelling β victim data β to convince the attacker to connect to this β victim β via the GUI .
|
Quasar serve includes a File Manager window , allowing the attacker to select victim files , and trigger file operations β for example , uploading a file from victim machine to server .
|
Uploaded files are written to the server sub directory β clients\user_name@machine_name_ipaddress β .
|
Quasar serve does not verify that the size , filename , extension , or header of the uploaded file is the same as requested .
|
Therefore , if we convince the attacker to request the file β secret_info.doc ( 20KB ) β , we can instead return to the server any file of our choice , of any size or type .
|
When the Quasar serve retrieves the name of the uploaded file from the victim , it does not verify that it is a valid file path .
|
Therefore sending the file path β ..\..\ secret_info.doc βwill result in writing our file instead to the same directory as the Quasar serve code .
|
Quasar serve does not even verify that a file was requested from the victim .
|
Immediately when the File Manager window is opened by the attacker , the Quasar serve sends two commands to the RAT : GetDrives and listDirectory ( to populate the list of the victim βs files in the RAT Server GUI ) .
|
We can respond to those commands by instead sending two files of our choice to the Quasar serve .
|
Again , we control the content of the file , the size and the path and filename .
|
Quasar is a .NET Framework assembly , loading multiple DLLs upon launch , for example β dnsapi.dll β .
|
Quasar serve is vulnerable to a simple DLL hijacking attack , by using this technique to replace server DLLs .
|
When the attacker restarts the Quasar application , our uploaded β dnsapi.dll β will instead be loaded .
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.