text
stringlengths
1
38.9k
The initial sample we intercepted was a Microsoft Word document ( SHA256 : 2cfc4b3686511f959f14889d26d3d9a0d06e27ee2bb54c9afb1ada6b8205c55f ) with the filename crash list ( Lion Air Boeing 737 ).docx using the author name Joohn .
This document appeared to be targeting a government organization dealing with foreign affairs in Europe via spear-phishing .
Once the user attempts to open the document , Microsoft Word immediately attempts to load the remote template containing a malicious macro and payload from the location specified within the settings.xml.rels file of the DOCX document .
If the C2 has already been taken offline the document will still open , but Word will be unable to retrieve the remote template and thus Word will not load a macro .
In this situation , Word will present the same lure document to the victim as seen in Figure 2 , but without the ability to enable macros via an Enable Content button .
Assuming the C2 is still operational however , Word loads the remote template ( SHA256 : f1e2bceae81ccd54777f7862c616f22b581b47e0dda5cb02d0a722168ef194a5 ) and the user is presented with the screen .
Once the victim presses the Enable content button , the embedded macro is executed .
The macros used for these delivery documents use a less common method of using the AutoClose function .
This is a form of anti-analysis as Word will not fully execute the malicious code until the user closes the document .
If an automated sandbox exits its analysis session without specifically closing out the document , the sandbox may miss the malicious activity entirely .
Once successfully executed , the macro will install a payload and save a document to the system .
Typically , we expect to see a decoy document saved to the system and later displayed to make the victim less suspicious of malicious activity ; however , in this case the document saved to the system was never displayed and does not contain any pertinent content to the Lion Air tragedy theme seen in the filename .
The macro obtains the document saved to the system from within the document stored as UserForm1.Label1.Caption and will write it to : %TEMP%\~temp.docm .
The macro obtains the payload saved to the system from within the document stored as UserForm1.Label2.Caption and will write it to : %APPDATA%\MSDN\~msdn.exe .
The macro executes this payload in a rather interesting way by loading the dropped ~temp.docm document and calling a function within its embedded macro to run the payload .
We believe the creator of this delivery document chose to run the payload from the dropped file as an evasion technique .
Also , the fact the initial macro uses this dropped document for the execution of the payload may also explain why the document did not contain any decoy contents .
To carry out this functionality , after writing the~temp.docm and ~msdn.exe files to the system , the initial macro will load the ~temp.docm file as a Word Document object and attempts to run the function Proc1 in the Module1 macro within the ~temp.docm file .
The Proc1 function within the Module1 does nothing more than build the %APPDATA%\MSDN\~msdn.exe path to the dropped payload and executes it using the built-in Shell function .
The payload dropped to the system ( SHA256 : 6ad3eb8b5622145a70bec67b3d14868a1c13864864afd651fe70689c95b1399a ) is a UPX packed Zebrocy variant written in the Delphi language .
This variant of Zebrocy is functionally very similar to the Delphi based payloads discussed in our previous publication on Sofacy attacks using Zebrocy earlier this year .
The developer of this particular payload configured it to use the following URL to communicate with as its C2 :The Zebrocy Trojan gathers system specific information that it will send to the C2 server via an HTTP POST request to the above URL .
Like other Zebrocy samples , this Trojan collects system specific information it will send to the C2 server by running the command SYSTEMINFO & TASKLIST on the command line and by enumerating information about connected storage devices .
This specific variant of Zebrocy will also send a screenshot of the victim host as a JPEG image to the C2 server .
The C2 server will then provide a secondary payload to the beacon in ASCII hexadecimal representation , which the Trojan will decode and write to the following location : %APPDATA%\Roaming\Audio\soundfix.exe .
During our analysis , the C2 server provided a secondary payload that functionally appeared similar to the initial Zebrocy sample .
The secondary payload was also written in Delphi and its developer configured it to communicate with its C2 server using HTTPS via the following URL : https://200.122.181.25/catalog/products/books.php .
We were able to collect a second delivery document that shared the Joohn author from the crash list ( Lion Air Boeing 737 ).docx document , as well as the 188.241.58.170 C2 IP to host its remote template .
Structurally this sample was very similar to the initially analyzed document , but the payload turned out to be a completely new tool which we have named Cannon .
The tool is written in C# whose malicious code exists in a namespace called cannon , which is the basis of the Trojan ’s name .
The Trojan functions primarily as a downloader that relies on emails to communicate between the Trojan and the C2 server .
To communicate with the C2 server , the Trojan will send emails to specific email addresses via SMTPS over TCP port 587 .
This tool also has a heavy reliance on EventHandlers with timers to run its methods in a specific order and potentially increase its evasion capability .
The overall purpose of Cannon is to use several email accounts to send system data ( system information and screenshot ) to the threat actors and to ultimately obtain a payload from an email from the actors .
In addition to the following step-by-step process illustrates how Cannon communicates with the actor-controlled C2 email address to obtain a secondary payload .
Cannon gathers system information and saves it to a file named ini .
The Trojan sends an email to sahro.bella7@post.cz with i.ini as the attachment , S_inf within the body and a subject with a unique system identifier via SMTPS from one of the following accounts : Bishtr.cam47 , Lobrek.chizh , Cervot.woprov .
Cannon takes a screenshot and saves it to a file named ops .
The Trojan sends an email to sahro.bella7@post.cz with sysscr.ops as the attachment , the string SCreen within the body and a subject with the unique system identifier via SMTPS from one of three previously used accounts .
The actors likely log into sahro.bella7@post.cz and process the system information and screenshot sent by the Trojan to determine if the compromised host is of interest .
If the actor wishes to download an additional payload to the compromised host , they will respond by sending emails in the following steps .
The actor sends an email to trala.cosh2@post.cz with the unique system identifier as a subject with a secondary email account and credentials in ASCII hexadecimal format within the message body .
This secondary email account is unknown at this time , so we will refer to it as β€œ secondary email account ” in future steps .
The actor sends an email to the secondary email account with the unique system identifier as a subject with a secondary payload attached with a filename of txt .
Cannon logs into the trala.cosh2@post.cz account via POP3S looking for emails with a subject that matches the unique system identifier .
Cannon opens the email with the correct subject and decodes the hexadecimal data in the body of the message to obtain the secondary email account .
Cannon acknowledges the receipt of the secondary email address by sending an email to sahro.bella7@post.cz with s.txt ( contains {SysPar = 65} string ) as the attachment , ok within the body and a subject with the unique system identifier via SMTPS from one of the three accounts from Step 1 .
The actor sends an email to trala.cosh2@post.cz with the unique system identifier as a subject with a file path that the Cannon Trojan will use to save the secondary payload .
Cannon logs into the secondary email account via POP3S looking for emails with a subject that matches the unique system identifier .
Cannon opens the email with the correct subject and saves the attachment named auddevc.txt .
Cannon acknowledges the receipt of file download by sending an email to sahro.bella7@post.cz with l.txt ( contains 090 string ) as the attachment , ok2 within the body and a subject with the unique system identifier via SMTPS from one of the three accounts from Step 1 .
Cannon logs into the trala.cosh2@post.cz account via POP3S looking for emails with a subject that matches the unique system identifier .
Cannon opens the email with the correct subject and decodes the hexadecimal data in the body of the message to obtain the file path that it will use to move the downloaded auddevc.txt file .
Cannon acknowledges the receipt of file path by sending an email to sahro.bella7@post.cz with s.txt ( contains {SysPar = 65} string ) as the attachment , ok3 within the body and a subject with the unique system identifier via SMTPS from one of the three accounts from Step 1 .
Cannon moves the downloaded file to the specified path .
Cannon acknowledges the successful move by sending an email to sahro.bella7@post.cz with l.txt ( contains 090 string ) as the attachment , ok4 within the body and a subject with the unique system identifier via SMTPS from one of the three accounts from Step 1 .
Cannon runs the downloaded file from the specified path .
Cannon acknowledges the successful execution by sending an email to sahro.bella7@post.cz with s.txt ( contains {SysPar = 65} string ) as the attachment , ok5 within the body and a subject with the unique system identifier via SMTPS from one of the three accounts from Step 1 .
The Sofacy threat group continues to target government organizations in the EU , US , and former Soviet states to deliver the Zebrocy tool as a payload .
In these attacks , the delivery documents used to install Zebrocy used remote templates , which increases the difficulty to analyze the attack as an active C2 server is needed to obtain the macro-enabled document .
The Sofacy group also leveraged the recent Lion Air disaster as a lure in one of these attacks , which continues to show a willingness to use current events in their social engineering themes .
Of note , we also discovered the Sofacy group using a very similar delivery document to deliver a new Trojan called Cannon .
Cannon uses SMTPS and POP3S as its C2 channel compared to Zebrocy that uses a more commonly observed HTTP or HTTPS based C2 .
This is not a new tactic but may be more effective at evading detection as the external hosts involved are a legitimate email service provider .
Add the layer of encryption that the SMTPS and POP3S protocols provide to the legitimate web-based service and you have a very difficult C2 channel to block While Sofacy ’s campaign delivering Zebrocy and Cannon remains active , Palo Alto Networks customers are protected from this threat in the following ways :AutoFocus customers can track these samples with the Zebrocy and Cannon WildFire detects the delivery documents , Zebrocy and Cannon payloads discussed in this blog with malicious verdicts .
Traps blocks the macro-ladened remote templates as Suspicious macro detected , as well as Zebrocy and Cannon payloads as Suspicious executable detected .
The IP addresses hosting remote templates and C2 services in these attacks are classified as Command and Control .
Delivery Hashes :2cfc4b3686511f959f14889d26d3d9a0d06e27ee2bb54c9afb1ada6b8205c55f af77e845f1b0a3ae32cb5cfa53ff22cc9dae883f05200e18ad8e10d7a8106392 .
Remote Template Hashes :f1e2bceae81ccd54777f7862c616f22b581b47e0dda5cb02d0a722168ef194a5 fc69fb278e12fc7f9c49a020eff9f84c58b71e680a9e18f78d4e6540693f557d .
Remote Templates :Zebrocy Hashes :Zebrocy C2 URLs :http://188.241.58.170/local/s3/filters.php https://200.122.181.25/catalog/products/books.php .
Cannon Hashes :Cannon email Accounts :sahro.bella7@post.cz trala.cosh2@post.cz bishtr.cam47@post.cz lobrek.chizh@post.cz cervot.woprov@post.cz .
THE DUKES 7 YEARS OF RUSSIAN CYBERESPIONAGE .
The Dukes are a well-resourced , highly dedicated and organized cyberespionage group that we believe has been working for the Russian Federation since at least 2008 to collect intelligence in support of foreign and security policy decision-making .
The Dukes primarily target Western governments and related organizations , such as government ministries and agencies , political think tanks , and governmental subcontractors .
Their targets have also included the governments of members of the Commonwealth of Independent States ; Asian , African , and Middle Eastern governments ; organizations associated with Chechen extremism ; and Russian speakers engaged in the illicit trade of controlled substances and drugs .
The Dukes are known to employ a vast arsenal of malware toolsets , which we identify as MiniDuke , CosmicDuke , OnionDuke , CozyDuke , CloudDuke , SeaDuke , HammerDuke , PinchDuke , and GeminiDuke .
In recent years , the Dukes have engaged in apparently biannual large-scale spear-phishing campaigns against hundreds or even thousands of recipients associated with governmental institutions and affiliated organizations .
The earliest activity we have been able to definitively attribute to the Dukes are two PinchDuke campaigns from November 2008 .
These campaigns use PinchDuke samples that were , according to their compilation timestamps , created on the 5th and 12th of November 2008 .
The campaign identifiers found in these two samples are respectively , β€œ alkavkaz.com20081105 ” and β€œ cihaderi.net20081112 ” .
The first campaign identifier , found in the sample compiled on the 5th , references alkavkaz.com , a domain associated with a Turkish website proclaiming to be the β€œ Chechan [sic] Informational Center ” .
The second campaign identifier , from the sample compiled on the 12th , references cihaderi.net , another Turkish website that claims to provide β€œ news from the jihad world ” and which dedicates a section of its site to Chechnya .
Due to a lack of other PinchDuke samples from 2008 or earlier , we are unable to estimate when the Duke operation originally began .
Based on our technical analysis of the known PinchDuke samples from 2008 however , we believe PinchDuke to have been under development by the summer of 2008 .
In fact , we believe that by the autumn of 2008 , the Dukes were already developing not one but at least two distinct malware toolsets .
This assertion is based on the oldest currently known sample of another Duke related toolset , GeminiDuke , which was compiled on the 26th of January 2009 .
This sample , like the early PinchDuke samples , appears to already be a β€œ fully-grown ” sample , which is why we believe GeminiDuke was under development by the autumn of 2008 .
That the Dukes were already developing and operating at least two distinct malware toolsets by the second half of 2008 suggests to us that either the size of their cyberespionage operation was already large enough to warrant such an arsenal of tools , or that they expected their operation to grow significantly enough in the foreseeable future to warrant the development of such an arsenal .
The origins of the Duke toolset names can be traced back to when researchers at Kaspersky Labs coined the term β€œ MiniDuke ” to identify the first Duke related malware they found .
As explained in their whitepaper , the researchers observed the surprisingly small MiniDuke backdoor being spread via the same exploit that was being used by a malware that they had already named ItaDuke ; the β€œ Duke ” part of this malware ’s name had in turn come about because it reminded the researchers of the notable Duqu threat .
Despite the shared history of the name itself however , it is important to note that there is no reason to believe that the Duke toolsets themselves are in any way related to the ItaDuke malware , or to Duqu for that matter .
As researchers continued discovering new toolsets that were created and used by the same group that had been operating MiniDuke , the new toolsets were also given β€œ Duke ” -derived names , and thus the threat actor operating the toolsets started to be commonly referred to as β€œ the Dukes ” .
The only other publicly used name for the threat actor that we are aware of is β€œ APT29 ” .
Based on the campaign identifiers found in PinchDuke samples discovered from 2009 , the targets of the Dukes group during that year included organizations such as the Ministry of Defense of Georgia and the ministries of foreign affairs of Turkey and Uganda .
Campaign identifiers from 2009 also reveal that by that time , the Dukes were already actively interested in political matters related to the United States ( US ) and the North Atlantic Treaty Organization ( NATO ) , as they ran campaigns targeting ( among other organizations ) a US based foreign policy think tank , another set of campaigns related to a NATO exercise held in Europe , and a third set apparently targeting what was then known as the Georgian β€œ Information Centre on NATO ” .
Of these campaigns , two clusters in particular stand out .
The first is a set of campaigns from the 16th and 17th of April , 2009 , that targeted a US based foreign policy think tank , as well as government institutions in Poland and the Czech Republic .
These campaigns utilized specially-crafted malicious Microsoft Word documents and PDF files , which were sent as e-mail attachments to various personnel in an attempt to infiltrate the targeted organizations .
We believe this cluster of campaigns had a joint goal of gathering intelligence on the sentiments of the targeted 5 countries with respect to the plans being discussed at the time for the US to locate their β€œ European Interceptor Site ” missile defense base in Poland , with a related radar station that was intended to be located in the Czech Republic .
Regarding the timing of these campaigns , it is curious to note that they began only 11 days after President Barack Obama gave a speech on the 5th of April declaring his intention to proceed with the deployment of these missile defenses .