Delphi Used To Score Against Palestine

2017-06-19T08:48:00
ID TALOSBLOG:7069F1070012FCEBA56CB27B96717C29
Type talosblog
Reporter noreply@blogger.com (Warren Mercer)
Modified 2017-06-19T15:48:04

Description

This blog was authored by <a href="https://www.blogger.com/profile/10073079939160046441">Paul Rascagneres</a> and <a href="http://blogs.cisco.com/author/warrenmercer">Warren Mercer</a> with contributions from <a href="https://blogs.cisco.com/author/emmanueltacheau">Emmanuel Tacheau</a>, <a href="https://blogs.cisco.com/author/emmanueltacheau"></a><a href="https://www.blogger.com/profile/18152595187998952871">Vanja Svajcer</a> and <a href="https://www.blogger.com/profile/17941683095374027310">Martin Lee</a>.<br /><br /><h2 id="h.3ib9qkmn7w54">Executive Summary</h2><br />Talos continuously monitors malicious emails campaigns. We identified one specific spear phishing campaign launched against targets within Palestine, and specifically against Palestinian law enforcement agencies. This campaign started in April 2017, using a spear phishing campaign to deliver the MICROPSIA payload in order to remotely control infected systems. Although this technique is not new, it remains an effective technique for attackers.<br /><br />The malware itself was developed in Delphi; in this article, we describe the features and the network communication to the command and control server used by the attackers. The threat actor has chosen to reference TV show characters and include German language words within the attack. Most significantly, the attacker has appeared to have used genuine documents stolen from Palestinian sources as well as a controversial music video as part of the attack. <br /><br /><br /><a name='more'></a><br /><br /><h2 id="h.lbywxgmnsh4g">Spear Phishing Campaign</h2><br />We identified a spear phishing campaign that appeared to be targeting members of the Palestinian law enforcement services as well as other Palestinian targets in the public sector. The email purports to be sent from an individual named "Yasser Saad" but includes a mismatch between the apparent name and the email address '<a href="mailto:yassersaaid01@gmail.com">yassersaaid01@gmail.com</a>' suggesting "Yasser Saaid".<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://3.bp.blogspot.com/-3a42reuT9u0/WUftPtxDtnI/AAAAAAAAATo/4DKV8eEdl5wfFFexC9q8euth1clcSj1fwCLcBGAs/s1600/image2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="436" data-original-width="1600" height="174" src="https://3.bp.blogspot.com/-3a42reuT9u0/WUftPtxDtnI/AAAAAAAAATo/4DKV8eEdl5wfFFexC9q8euth1clcSj1fwCLcBGAs/s640/image2.png" width="640" /></a></div><br /><br />The subject of the email translates to "Brothers security officers and directors", with the text content "Kindly to view and circulate under the responsibility:<br />The Council of Ministers' Decision on the Use of the Internet in Government Institutions"<br /><br />Attached to the email is a .r10 file, which suggests that the file is a tenth part of a split RAR archive. However, this isn't the case. The attachment is a simple RAR file. Despite the unusual file name extension, this file can be opened by many RAR archive handlers without modification. <br /><br />The RAR archive contains a single executable file named: InternetPolicy_65573247239876023_3247648974234_32487234235667_pdf.exe<br /><br />The .r10 file extension may have been chosen in order to confuse automated file parsing systems that check for malicious contents of archives with known file name extensions. Similarly, the long name of the file within the archive, along with the ending '_pdf.exe' may have been used to convince victims into thinking that the file is a real PDF file. It is worth keeping in mind that by default Windows will not show the .exe extension to the user. The icon of executable file itself is that commonly used for PDF files, enhancing the idea that the contents of the archive is a PDF.<br /><br />When the executable is launched it extracts the decoy document embedded as the PE resource named Resource_1 and opens it.<br /><br /><h3 id="h.e9om8fxbuzcl">Decoy Document</h3><br />The decoy document displayed, InternetPolicy.pdf, is a scanned document by the Ministry Of Interior of the State Of Palestine, signed by Dr Alaa Mousa, Minister of Communications & Technologies:<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-VTBikCk-Rdw/WUftVP1oi-I/AAAAAAAAATs/B711nmvYeRcpehemiGN1VouC_YQ2ON3-ACLcBGAs/s1600/image8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1411" data-original-width="1044" height="640" src="https://1.bp.blogspot.com/-VTBikCk-Rdw/WUftVP1oi-I/AAAAAAAAATs/B711nmvYeRcpehemiGN1VouC_YQ2ON3-ACLcBGAs/s640/image8.png" width="472" /></a></div><br /><br />The decoy document contains 7 pages describing new internet usage policies. The first page (shown above) informs governmental departments of the policy, and instructs them to follow it. A handwritten note stated to be from the Director of the IT Department adds his 'seal of approval' to the document.<br /><br />In the background, the malware MICROPSIA is executed on the infected system. This malware is a Remote Administration Tool (RAT), it will be described later.<br /><br /><h2 id="h.kaqrkq3hrcn7">Associated Campaigns</h2><br />We have also identified drive-by download campaigns which are distributing variants of the same malware, but with different decoy documents.<br /><br />URLs used in this campaign include:<br /><br /><ul><li>http://sheldon-cooper[.]info/Fuqha_NewDetails_docx.r10</li><li>http://feteh-asefa[.]com/pc/public/Fuqha_NewDetails_docx.r10</li><li>http://feteh-asefa[.]com/pc/public/Altarnatevs.r10</li><li>https://sheldon-cooper[.]info/attachment.r10</li></ul><br /><br />As with the spear phish, the archives also have the same .r10 extension. The first two archives contain the file: Fuqha_NewDetails_874918321795_39778423423094_1988734200039_docx.exe which although the file name suggests a .docx file, the icon is that of a PDF document.<br /><br />The second two archives contain the file: Altarnatives_Palestine_89840923498679852_9879483278432732489_pdf.exe Again being an executable file with a PDF style icon.<br /><br /><h3 id="h.x2eg478ars49">Decoy Documents</h3><br /><h4 id="h.ktbt9l8tcx1f">Altarnatives_Palestine Document</h4><br />The .pdf decoy document is study from the Palestinian Center for Policy Research and Strategic Studies (MASARAT): <br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-yROszkBAVzY/WUftbDF0ubI/AAAAAAAAATw/FrjxSdzUrkYXLm_AEZxO7PUTlsKBytzegCLcBGAs/s1600/image6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1299" data-original-width="976" height="640" src="https://1.bp.blogspot.com/-yROszkBAVzY/WUftbDF0ubI/AAAAAAAAATw/FrjxSdzUrkYXLm_AEZxO7PUTlsKBytzegCLcBGAs/s640/image6.png" width="480" /></a></div><br /><br />This 22 pages long research document addresses the current level of threat & security issues within the West Bank for 2016 & 2017. It contains chapters relating to human rights, data from Arab World for Research and Development center, violence center report etc.<br /><br /><h4 id="h.njabpcn4p3jy">Fuqha_NewDetails Document</h4><br />This 8 page long document appears to be an intelligence report based on interviews, documents and public information. The document mentions an assassination report of one of the highest ranked officers of the Al Qassam group's (Millitary Wing of HAMAS, aka Armed Militia). The document contains a single image, an illustration of the leadership of Hamas, hierarchical security & subgroups:<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://2.bp.blogspot.com/-i67ZadIH5Gk/WUftfUvtGFI/AAAAAAAAAT0/zI9t6pCeQYEoWXaHnMEwX3SodZEnGHfGACLcBGAs/s1600/image11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1012" data-original-width="1356" height="476" src="https://2.bp.blogspot.com/-i67ZadIH5Gk/WUftfUvtGFI/AAAAAAAAAT0/zI9t6pCeQYEoWXaHnMEwX3SodZEnGHfGACLcBGAs/s640/image11.png" width="640" /></a></div><br /><br /><h2 id="h.ge6voyei1hbi">Further Campaigns</h2><br />We also identified additional, related malicious documents which conform to the same naming pattern and which share indicators with the original malware we discovered.<br /><br /><h4 id="h.kxzoyb47xhog">Plan_Palestine Document</h4><br />Plan_Palestine_898409266595123498679852_9879483278432732489_pdf.exe<br /><br />The decoy document of this sample is a word document. It presents the strategic objectives, policies and interventions concerning security units (aka Police), including how to face the challenges, how to train police, new weapons etc.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://2.bp.blogspot.com/-4kIGYDSNWy8/WUftj5JCdXI/AAAAAAAAAT4/wXxw3SP7zFAJp66w5ry1--Ki_OIv-HgEQCLcBGAs/s1600/image3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="963" data-original-width="1391" height="442" src="https://2.bp.blogspot.com/-4kIGYDSNWy8/WUftj5JCdXI/AAAAAAAAAT4/wXxw3SP7zFAJp66w5ry1--Ki_OIv-HgEQCLcBGAs/s640/image3.png" width="640" /></a></div><br /><br /><h4 id="h.r9dmg4v7ay7x">Diwan2017_Palestine Document</h4><br />Diwan2017_Palestine_89840923498679852_9879483278432732489_pdf.exe<br /><br />This decoy document is a PDF file. The document itself appears to be scanned from the Council of Ministers of Palestine and relates to an announcement concerning employee regulation.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://2.bp.blogspot.com/-RnBkCYh_nBg/WUftot1kwjI/AAAAAAAAAT8/7ZIsg_Qg3wUWp8i_wgQF5MARG3nORhELwCLcBGAs/s1600/image4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="740" data-original-width="1243" height="380" src="https://2.bp.blogspot.com/-RnBkCYh_nBg/WUftot1kwjI/AAAAAAAAAT8/7ZIsg_Qg3wUWp8i_wgQF5MARG3nORhELwCLcBGAs/s640/image4.png" width="640" /></a></div><br /><br /><h4 id="h.6z3wqvgglusc">Goal2017 Document</h4><br />Goal2017_487886_10152599711675287_250999354_n_354343741352mp4.exe<br /><br />Instead of a decoy document, this sample is a decoy video of a music clip "Goal" by the Lebanese singers Myriam Klink and Jad Khalife. This video is particularly controversial as the overt nature of the video led it to be <a href="http://gulfnews.com/news/mena/lebanon/lebanese-pop-singer-s-song-goal-banned-1.1989080">banned</a> by the Lebanese Justice ministry. The sharing or airing of it is subject to a fine of 50 000 000 Lebanese Liras (approximately 33k USD).<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://2.bp.blogspot.com/-Z1YWVvlDAQY/WUftuybsOuI/AAAAAAAAAUA/MgYlC2x1QUkWguyFZPAdABo9SmNhR_I6wCLcBGAs/s1600/image1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1124" data-original-width="1600" height="448" src="https://2.bp.blogspot.com/-Z1YWVvlDAQY/WUftuybsOuI/AAAAAAAAAUA/MgYlC2x1QUkWguyFZPAdABo9SmNhR_I6wCLcBGAs/s640/image1.png" width="640" /></a></div><br /><h2 id="h.qp114fnr5rbi">MICROPSIA Analysis</h2><br />For all of these decoy documents, the malware is identical, the only differences are the sections containing the decoy documents themselves. The malware is a remote access trojan (RAT) written in Delphi named MICROPSIA.<br /><br /><h3 id="h.s648ug5mqht7">Features</h3><br />Firstly, the malware copies itself in C:\ProgramData\MediaPlayer\ExecuteLibrary.exe. The malware contains several resources, one of which is the decoy document, another is a legitimate binary developed by OptimumX named shortcut.exe. As expected the purpose of this tool is to create a shortcut. It is through creating a shortcut that the malware ensures its persistence:<br /><br />Shortcut.exe /f:"C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\D_Windows_v1.lnk" /a:c /t:"C:\ProgramData\MediaPlayer\ExecuteLibrary.exe"<br /><br />The malware is a Remote Administration Tool (RAT) which downloads and executes an executable obtained from the Command & Control infrastructure. This executable is downloaded in string format and then modified to become a binary file with the Hex2Bin Delphi API.<br /><br />An interesting element is the obfuscation algorithm used to hide the configuration of the RAT. The variables are stored in a custom base64:<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://4.bp.blogspot.com/-jVsLyDrA1bM/WUftzgWMn8I/AAAAAAAAAUE/0yRKg-hIi_AYtX9CD_JNIzUQ1YDj4NuKwCLcBGAs/s1600/image10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="245" data-original-width="1165" height="134" src="https://4.bp.blogspot.com/-jVsLyDrA1bM/WUftzgWMn8I/AAAAAAAAAUE/0yRKg-hIi_AYtX9CD_JNIzUQ1YDj4NuKwCLcBGAs/s640/image10.png" width="640" /></a></div><br />Once decoded with base64 and with 2 XOR Keys we can obtain the configuration of the malware:<br /><br />[{000214A0-0000-0000-C000-000000000046}]<br />Prop3=19,2<br />[InternetShortcut]<br />IDList=<br />URL=file://<br />Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)<br />http://camilleoconnell.website/api/white_walkers/<br />daenerys<br />betriebssystem<br />anwendung<br />mikasa<br />ackerman<br />ginny<br />AV<br /><br />We will see later, that this configuration contains the User-Agent, the CC URL and the json keys used for the network communication.<br /><br />Additionally the malware is interested by Anti-Virus installed on the system. It uses WMI queries to get this information:<br /><br /><ul><li>SELECT * FROM AntiVirusProduct</li><li>SELECT * FROM AntiSpywareProduct</li><li>SELECT * FROM FirewallProduct</li></ul>If an security product is installed this information is sent to the attacker.<br /><br /><h3 id="h.ymt85pkt0l8p">Network Communication</h3><br />All the network parameters are stored in the sample and can be easily updated by the author. The CnC is a web server: http://camilleoconnell[.]website<br /><br />The network communication is performed in HTTP. The malware uses an hardcoded User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)<br /><br />To register a new infected system the malware perform a POST request to /api/white_walkers/new with data on the compromised system consisting of: <br /><br /><ul><li>the filename of the executed malware and the version;</li><li>the version of the infected Operating System;</li><li>the hostname and username encoded in base64.</li></ul>The CC will reply in json format. The json object contains an ID (incremented each time that an infected system is registered) and 3 other boolean values: load_varys, lma and ausfart. Here is an output of a registration:<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-c7jdXV_jcVo/WUft5aZFMvI/AAAAAAAAAUI/Ubz3G-hRB6Eblo2bAnEF4Z__as8KmiXgQCLcBGAs/s1600/image7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1368" data-original-width="1289" height="640" src="https://1.bp.blogspot.com/-c7jdXV_jcVo/WUft5aZFMvI/AAAAAAAAAUI/Ubz3G-hRB6Eblo2bAnEF4Z__as8KmiXgQCLcBGAs/s640/image7.png" width="602" /></a></div><br /><br />As part of our investigation we believe currently more than 500 systems are already registered on the CC. This number may be a mix of genuinely infected systems and security researcher sandbox systems.<br /><br />After a registration, the malware periodically performs HTTP requests to the CC with the following pattern: GET /api/white_walkers/[base64_data_previously_sent]/requests<br /><br />The server will reply with a json object. We assume that the server can issue orders to the infected system. Here is an example:<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://2.bp.blogspot.com/-99p4DZfrd4o/WUft_PKymUI/AAAAAAAAAUM/_9rVBD3KQ1sUsI262ppR-RX5cgY7hI_OQCLcBGAs/s1600/image9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="680" data-original-width="1464" height="296" src="https://2.bp.blogspot.com/-99p4DZfrd4o/WUft_PKymUI/AAAAAAAAAUM/_9rVBD3KQ1sUsI262ppR-RX5cgY7hI_OQCLcBGAs/s640/image9.png" width="640" /></a></div><br /><br /><h3 id="h.pgw1sv2vz9nk">Reference to TV Show Characters</h3><br />In the analysed variant, we identify several reference to TV Show characters in the network communication and the URLs used by this actor:<br /><br /><ul><li>sheldon-cooper[.]info: this URL is a reference to one of the main characters of "The Big Bang Theory" named Sheldon Cooper;</li><li>Camilleoconnell[.]website: this URL is a reference to Camille O'Connell, the main actress of "The Vampire Diaries" and "The Originals";</li><li>Mikasa Ackerman is a json key returned by the CC. And this name is a character in "Attack on Titan";</li><li>/White_Walker/ in the URL is a species in the TV Show "Game of Thrones";</li><li>Deanerys is a variable used during Web request. This is the name of a character in "Game of Thrones";</li><li>Lord_varys is another json key returned by the CC. This is the name of a "Game of Thrones" character.</li></ul><br /><br />The malware author appears to have a real interest for TV shows.<br /><br /><h3 id="h.wskswv4247aj">Goethe's Style</h3><br />We identified the use of german language words in the network communication with the Command and Control server.<br /><br /><ul><li>"Betriebssystem" which means Operating System. This variable is used to send the OS version (for example "Windows 7 Service Pack 1 (Version 6.1, Build 7601, 32-bit Edition)")</li><li>"Anwendung" which means Application. This variable is used to send the filename and the version of the malware.</li><li>"Ausfahrt" which means Exit. This is a json key used by the CC during network communication. The key contains a boolean (false/true)</li></ul><br /><br />Obviously, the use of german words does not necessarily means that the author is German. The author could simply be adding german word in order to cover their tracks.<br /><br /><h2 id="h.pnupqfp5hnx9">Conclusion</h2><br />This spear phishing campaign was directed against Palestinian authorities and possibly against other entities. At least 500 machines have been registered by the CC infrastructure, which is still operating, indicating that this is a successful campaign.<br /><br />At Talos, we have in-depth experience of many APT campaigns, in this case one of the most surprising elements is the overt naming convention: the author deliberately uses references to several US TV show and intentionally uses German words for malware communication. We have no indication if these inclusions are to confuse attribution, to mock analysts, or a lapse of trade craft. This is in contrast to the highly convincing decoy documents which appear to be copies of genuine documents relating to the current situation in Palestine which suggests a high degree of professionalism.<br /><br /><h2 id="h.2fgixc2s1066">IOCs</h2><br /><h3 id="h.wh86gl8glcyp">File hashes</h3><br />InternetPolicy.r10: 9b162f43bcbfaef4e7e7bdffcf82b7512fac0fe81b7f2c172e1972e5fe4c9327<br /><br />InternetPolicy_65573247239876023_3247648974234_32487234235667_pdf.exe: 9cb5ef0b17eea1a43d5d323277e08645574c53ab1f65b0031a6fc323f52b0079 <br /><br />Attachment.r10: c7081b00ad8db62519c7af2cb5f493f56ecc487b087ae52d01f43953d2aa6952 <br /><br />Altarnatives_Palestine_89840923498679852_9879483278432732489_pdf.exe: 0180e2b601ae643e7adf1784c313dd2d10d114bd2b5692eb6e9c031a6e448ed1 <br /><br />Fuqha_NewDetails_docx.r10: 94902877b2cb523548a272d4e4fe0789192e1cb35b531297368b16a2865b33af <br /><br />Fuqha_NewDetails_874918321795_39778423423094_1988734200039_docx.exe: 77adba034d13b570c6aab79282326a1eb2efdfc14fbd7cd0651906e3fa31f9fe <br /><br />Plan_Palestine_898409266595123498679852_9879483278432732489_pdf.exe: 6c5884cf45d943f51566ea98113fecf851d49f59b70c8039aa21a14e09e21e5c<br /><br />Diwan2017_Palestine_89840923498679852_9879483278432732489_pdf.exe: 7c87f992674b962269d7fb2ffbad6d21f606c90d151a6fb67ac54387b6883aae<br /><br />Goal2017_487886_10152599711675287_250999354_n_354343741352mp4.exe:<br /><br />5f5af4762c073234fef6bfeaa3b9f6a04982e82a25e540116aa1f9e38223ae2b<br /><br /><h3 id="h.r55c8jr4gcmu">Domains</h3><br />feteh-asefa[.]com<br /><br />sheldon-cooper[.]info<br /><br />camilleoconnell[.]website<br /><br /><h3 id="h.nnjxx82ean4t">URLs</h3><br />http://sheldon-cooper[.]info/Fuqha_NewDetails_docx.r10<br /><br />http://feteh-asefa[.]com/pc/public/Fuqha_NewDetails_docx.r10<br /><br />http://feteh-asefa[.]com/pc/public/Altarnatevs.r10<br /><br />https://sheldon-cooper[.]info/attachment.r10<br /><br />http://camilleoconnell[.]website/api/white_walkers/new <br /><br />http://camilleoconnell[.]website/api/white_walkers/[base64]/requests<br /><br /><h2 id="h.vurr3jvn6g64">Coverage</h2><br /><br />Open Source Snort Subscriber Rule Set customers can stay up to date by downloading the latest rule pack available for purchase on Snort.org.<br /><br />Additional ways our customers can detect and block this threat are listed below.<br /><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://2.bp.blogspot.com/-jE3oS9eR8vQ/WUfuEo-5ohI/AAAAAAAAAUQ/bgPSvwPonqkqaQIudwn7BUEuMhJrcr_MQCLcBGAs/s1600/image5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="911" data-original-width="1086" height="536" src="https://2.bp.blogspot.com/-jE3oS9eR8vQ/WUfuEo-5ohI/AAAAAAAAAUQ/bgPSvwPonqkqaQIudwn7BUEuMhJrcr_MQCLcBGAs/s640/image5.png" width="640" /></a></div><br />Advanced Malware Protection (AMP) is ideally suited to prevent the execution of the malware used by these threat actors. <br /><br />CWS or WSA web scanning prevents access to malicious websites and detects malware used in these attacks. <br /><br />Network Security appliances such as NGFW, NGIPS, and Meraki MX with Advanced Security can detect malicious activity associated with this threat AMP Threat Grid helps identify malicious binaries and build protection into all Cisco Security products. <br /><br />Umbrella prevents DNS resolution of the domains associated with malicious activity. <br /><br />Stealthwatch detects network scanning activity, network propagation, and connections to CnC infrastructures, correlating this activity to alert administrators.<br /><br /><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/feedburner/Talos?a=UdXRBd5VW9A:pXS1heqCkN8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/feedburner/Talos?d=yIl2AUoC8zA" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/feedburner/Talos/~4/UdXRBd5VW9A" height="1" width="1" alt=""/>