text
stringlengths 1
38.9k
|
---|
A malware sample using two separate unique user agent strings is uncommon . |
A closer examination of the tool revealed the second user agent string was from a secondary payload that was retrieved by the cba5ab65a24be52214736bc1a5bc984953a9c15d0a3826d5b15e94036e5497df sample . |
Pivoting from the Mozilla v5.1 user agent revealed over forty additional Zebrocy samples , with several again targeting the same Central Asian nation . |
Two samples specifically , 25f0d1cbcc53d8cfd6d848e12895ce376fbbfaf279be591774b28f70852a4fd8 and 115fd8c619fa173622c7a1e84efdf6fed08a25d3ca3095404dcbd5ac3deb1f03 provided additional artifacts we were able to pivot from to discover weaponized documents to deliver Zebrocy as well as a Koadic . |
Examining the use of the unique user agents β strings over time shows that while previously only the Mozilla user agent was in use , since mid 2017 all three user agent strings have been used by the Zebrocy tool for its C2 communications . |
The two weaponized documents we discovered leveraging DDE were of particular interest due to victimology and a change in tactics . |
While examining 25f0d1cbcc53d8cfd6d848e12895ce376fbbfaf279be591774b28f70852a4fd8 , we were able to pivot from its C2220.158.216.127 to gather additional Zebrocy samples as well as a weaponized document . |
This document 85da72c7dbf5da543e10f3f806afd4ebf133f27b6af7859aded2c3a6eced2fd5 appears to have been targeting a North American government organization dealing with foreign affairs . |
It leveraged DDE to retrieve and install a payload onto the victim host . |
A decoy document is deployed in this attack , with the contents purporting be a publicly available document from the United Nations regarding the Republic of Uzbekistan . |
The creator of the weaponized document appended their DDE instructions to the end of the document after all of the decoy contents . |
When the document is opened in Word , the instructions are not immediately visible , as Word does not display these fields contents by default . |
As you can see in the following screenshot , simply attempting to highlight the lines in which the DDE instructions reside does not display them . |
Enabling the β Toggle Field Codes β feature reveals the DDE instructions to us and shows that the author had set instructions to size 1 font and with a white coloring . |
The use of a white font coloring to hide contents within a weaponized document is a technique we had previously reported being used by the Sofacy group in a malicious macro attack . |
The DDE instructions attempt to run the following the following command on the victim host , which attempts to download and execute a payload from a remote server . |
During our analysis , we observed this DDE downloading and executing a Zebrocy AutoIt downloader f27836430742c9e014e1b080d89c47e43db299c2e00d0c0801a2830b41b57bc1 , configured to attempt to download an additional payload from 220.158.216.127 . |
The DDE instructions also included another command that it did not run , which suggests it is an artifact of a prior version of this delivery document . |
The following shows this unused command , which exposed an additional server within Sofacy βs infrastructure would download and execute an encoded PowerShell script from 92.114.92.102 . |
The unused command above appears to be related to previous attacks , specifically attacks that occurred in November 2017 as discussed by McAfee and ESET . |
The payload delivered in these November 2017 attacks using DDE enabled documents was SofacyCarberp , which differs from the Zebrocy downloader delivered in the February 2018 attacks . |
115fd8c619fa173622c7a1e84efdf6fed08a25d3ca3095404dcbd5ac3deb1f03 was another Zebrocy sample we were able to pivot from by gathering additional samples connecting to its C2 86.106.131.177 . |
The additional samples targeted the same large Central Asian nation state as previously mentioned but more interestingly , one of the samples was a weaponized document also leveraging DDE and containing a non-Zebrocy payload . |
The payload turned out to be an open source penetration test toolkit called Koadic . |
It is a toolkit similar to Metasploit or PowerShell Empire and is freely available to anyone on Github . |
The RTF document 8cf3bc2bf36342e844e9c8108393562538a9af2a1011c80bb46416c0572c86ff was very small in size at 264 bytes . |
The contents above use the DDE functionality in Microsoft Word to run a PowerShell script to download the Koadic payload from a remote server , save it as an executable file on the system and then execute the payload . |
The Sofacy group continues their targeted attack campaigns in 2018 . |
As mentioned in this blog , Sofacy is carrying out parallel campaigns to attack similar targets around the world but with different toolsets . |
The Zebrocy tool associated with this current strain of attacks is constructed in several different forms based on the programming language the developer chose to create the tool . |
We have observed Delphi , AutoIt , and C++ variants of Zebrocy , all of which are related not only in their functionality , but also at times by chaining the variants together in a single attack . |
These attacks are still largely perpetrated via spear phishing campaigns , whether via simple executable attachments in hopes that a victim will launch the file to using a previously observed DDE exploitation technique . |
Sofacy Uses DealersChoice to Target European Government Agency . |
Back in October 2016 , Unit 42 published an initial analysis on a Flash exploitation framework used by the Sofacy threat group called DealersChoice . |
The attack consisted of Microsoft Word delivery documents that contained Adobe Flash objects capable of loading additional malicious Flash objects embedded in the file or directly provided by a command and control server . |
Sofacy continued to use DealersChoice throughout the fall of 2016 , which we also documented in our December 2016 publication discussing Sofacy βs larger campaign . |
On March 12 and March 14 , we observed the Sofacy group carrying out an attack on a European government agency involving an updated variant of DealersChoice . |
The updated DealersChoice documents used a similar process to obtain a malicious Flash object from a C2 server , but the inner mechanics of the Flash object contained significant differences in comparison to the original samples we analyzed . |
One of the differences was a particularly clever evasion technique : to our knowledge this has never been observed in use . |
With the previous iterations of DealersChoice samples , the Flash object would immediately load and begin malicious tasks . |
In the March attacks , the Flash object is only loaded if the user scrolls through the entire content of the delivery document and views the specific page the Flash object is embedded on . |
Also , DealersChoice requires multiple interactions with an active C2 server to successfully exploit an end system . |
The overall process to result in a successful exploitation is :User must open the Microsoft Word email attachment ;User must scroll to page three of the document , which will run the DealersChoice Flash object ;The Flash object must contact an active C2 server to download an additional Flash object containing exploit code ;The initial Flash object must contact the same C2 server to download a secondary payload ;Victim host must have a vulnerable version of Flash installed . |
The attack involving this updated variant of DealersChoice was targeting a European government organization . |
The attack relied on a spear-phishing email with a subject of β Defence & Security 2018 Conference Agenda β that had an attachment with a filename of β Defence&Security_2018_Conference_Agenda.docx β . |
The attached document contains a conference agenda that the Sofacy group appears to have copied directly from the website for the β Underwater Defence & Security 2018 Conference β here . |
Opening the attached β Defence & Security 2018 Conference Agenda.docx β file does not immediately run malicious code to exploit the system . |
Instead , the user must scroll to the third page of the document , which will load a Flash object that contains ActionScript that will attempt to exploit the user βs system to install a malicious payload . |
The Flash object embedded within this delivery document is a variant of an exploit tool that we call DealersChoice . |
This suggests that the Sofacy group is confident that the targeted individuals would be interested enough in the content to peruse through it . |
We analyzed the document to determine the reason that the malicious Flash object only ran when the user scrolled to the third page . |
According to the document.xml file , the DealersChoice loader SWF exists after the β covert-shores-small.png β image file within the delivery document . |
This image file exists on the third page of the document , so the user would have to scroll down in the document to this third page to get the SWF file to run . |
The user may not notice the Flash object on the page , as Word displays it as a tiny black box in the document , as seen in Figure 1 . |
This is an interesting anti-sandbox technique , as it requires human interaction prior to the document exhibiting any malicious activity . |
This DealersChoice Flash object shares a similar process to previous variants ; however , it appears that the Sofacy actors have made slight changes to its internal code . |
Also , it appears that the actors used ActionScript from an open source video player called β f4player β , which is freely available on GitHub . |
The Sofacy developer modified the f4player βs ActionScript to include additional code to load an embedded Flash object . |
The additions include code to decrypt an embedded Flash object and an event handler that calls a newly added function ( β skinEvent2 β ) that plays the decrypted object . |
The above code allows DealersChoice to load a second SWF object , specifically loading it with an argument that includes a C2 URL of β http://ndpmedia24.com/0pq6m4f.m3u8 β . |
The embedded SWF extracts the domain from the C2 URL passed to it and uses it to craft a URL to get the server βs β crossdomain.xml β file in order to obtain permissions to load additional Flash objects from the C2 domain . |
The ActionScript relies on event listeners to call specific functions when the event β Event.COMPLETE β is triggered after successful HTTP requests are issued to the C2 server . |
The event handlers call functions with the following names , which includes an incrementing number that represents the order in which the functions are called : onload1 , onload2 , onload3 , onload5 . |
With these event handlers created , the ActionScript starts by gathering system data from the flash.system.Capabilities.serverString property ( just like in the original DealersChoice.B samples ) and issues an HTTP GET with the system data as a parameter to the C2 URL that was passed as an argument to the embedded SWF when it was initially loaded . |
When this HTTP request completes , the event listener will call the β onload1 β function . |
The β onload1 β function parses the response data from the request to the C2 URL using regular expressions . |
The regular expressions suggest that the C2 server responds with content that is meant to resemble HTTP Live Steaming ( HLS ) traffic , which is a protocol that uses HTTP to deliver audio and video files for streaming . |
The use of HLS coincides with the use of ActionScript code from the f4player to make the traffic seem legitimate . |
The variables storing the results of the regular expression matches are used within the ActionScript for further interaction with the C2 server . |
The β onload1 β function then sends an HTTP GET request to the C2 domain using the value stored in the β r3 β variable as a URL . |
When this HTTP request completes , the event listener will call the β onload2 β function . |
The β onload2 β function decrypts the response received from the HTTP request issued in β onload1 β function . |
It does so by calling a sub-function to decrypt the content , using the value stored in the β r1 β variable as a key . |
The sub-function to decrypt the content skips the first 4 bytes , suggesting that the first four bytes of the downloaded content is in cleartext ( most likely the β FWS β or β CWS β header to look legitimate ) . |
After decrypting the content , the β onload2 β function will issue another HTTP GET request with the system data as a parameter , but this time to the C2 using a URL from the β r4 β variable . |
When this request completes , the event listener will call the β onload3 β function . |
The β onload3 β function will take the response to the HTTP request in β onload2 β and treat it as the payload . |
The ActionScript will read each byte of the C2 response and get the hexadecimal value . |
This hexadecimal string will most likely be a string of shellcode that will contain and decrypt the ultimate portable executable ( PE ) payload . |
The string of comma separated hexadecimal values is passed as a parameter when loading the SWF file downloaded in β onload2 β . |
This function creates an event listener for when the SWF file is successfully loaded , which will call the β onload5 β function . |
The β onload5 β function is responsible for adding the newly loaded SWF object as a child object . |
This loads the SWF file , effectively running the malicious code on the system . |
During our analysis , we were unable to coerce the C2 into providing a malicious SWF or payload . |
As mentioned in our previous blogs on DealersChoice , the payload of choice for previous variants was SofacyCarberp ( Seduploader ) , but we have no evidence to suggest this tool was used in this attack . |
We are actively researching and will update this blog in the event we discover the malicious Flash object and payload delivered in this attack . |
The delivery document used in this attack was last modified by a user named β Nick Daemoji β , which provides a linkage to previous Sofacy related delivery documents . |
The previous documents that used this user name were macro-laden delivery documents that installedpayloads , as discussed in Talos β blog . |
This overlap also points to a similar social engineering theme between these two campaigns , as both used content from upcoming military and defense conferences as a lure . |
The Sofacy threat group continues to use their DealersChoice framework to exploit Flash vulnerabilities in their attack campaigns . |
In the most recent variant , Sofacy modified the internals of the malicious scripts , but continues to follow the same process used by previous variants by obtaining a malicious Flash object and payload directly from the C2 server . |
Unlike previous samples , this DealersChoice used a DOCX delivery document that required the user to scroll through the document to trigger the malicious Flash object . |
0cd9ac328d858d8d83c9eb73bfdc59a958873b3d71b24c888d7408d9512a41d7 ( Defence&Security_2018_Conference_Agenda.docx ) ndpmedia24.com . |
Corporate IoT β a path to intrusion . |
Several sources estimate that by the year 2020 some 50 billion IoT devices will be deployed worldwide . |
IoT devices are purposefully designed to connect to a network and many are simply connected to the internet with little management or oversight . |
Such devices still must be identifiable , maintained , and monitored by security teams , especially in large complex enterprises . |
Some IoT devices may even communicate basic telemetry back to the device manufacturer or have means to receive software updates . |
In most cases however , the customers β IT operation center donβt know they exist on the network . |
In 2016 , the Mirai botnet was discovered by the malware research group MalwareMustDie . |