{"id":190,"date":"2019-04-04T12:46:40","date_gmt":"2019-04-04T10:46:40","guid":{"rendered":"https:\/\/lab52.es\/blog\/?p=190"},"modified":"2019-05-30T15:53:33","modified_gmt":"2019-05-30T13:53:33","slug":"military-financing-maldoc-analysis","status":"publish","type":"post","link":"https:\/\/lab52.io\/blog\/military-financing-maldoc-analysis\/","title":{"rendered":"Military Financing Maldoc: analysis"},"content":{"rendered":"\n<p>Recently at<strong> Lab52<\/strong> from S2 Grupo, we have detected an\n infection campaign through a malicious document that has called our \nattention due to its content and title.<\/p>\n\n\n\n<p>The document in question, named \u201cMilitary Financing.xlsm\u201d and hash \n\u201cefe51c2453821310c7a34dca3054021d0f6d453b7133c381d75e3140901efd12\u201d&nbsp; \nstands out mainly for the image it contains, which refers to a document \nwith secret information about the US Department of State.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"516\" height=\"548\" src=\"https:\/\/lab52.es\/blog\/wp-content\/uploads\/2019\/04\/00-1.png\" alt=\"\" class=\"wp-image-227\" srcset=\"https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/00-1.png 516w, https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/00-1-282x300.png 282w\" sizes=\"(max-width: 516px) 100vw, 516px\" \/><\/figure><\/div>\n\n\n\n<p style=\"font-size:15px;text-align:center\"><em>Illustration 1 Content of the document<\/em><\/p>\n\n\n\n<p>The file contains macros without any kind of obfuscation, which are \nresponsible for extracting lots of hexadecimal code from the cells in \nthe document, with which it composes two files, an executable and a \nscript:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/i2.wp.com\/www.securityartwork.es\/wp-content\/uploads\/2019\/04\/01-1.png?ssl=1\"><img loading=\"lazy\" decoding=\"async\" width=\"740\" height=\"321\" src=\"https:\/\/lab52.es\/blog\/wp-content\/uploads\/2019\/04\/01-1.png\" alt=\"\" class=\"wp-image-228\" srcset=\"https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/01-1.png 740w, https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/01-1-300x130.png 300w\" sizes=\"(max-width: 740px) 100vw, 740px\" \/><\/a><\/figure><\/div>\n\n\n\n<p style=\"font-size:15px;text-align:center\"><em>Illustration 2 Macros code<\/em><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"368\" height=\"620\" src=\"https:\/\/lab52.es\/blog\/wp-content\/uploads\/2019\/04\/02-1.png\" alt=\"\" class=\"wp-image-229\" srcset=\"https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/02-1.png 368w, https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/02-1-178x300.png 178w\" sizes=\"(max-width: 368px) 100vw, 368px\" \/><\/figure><\/div>\n\n\n\n<p style=\"font-size:15px;text-align:center\"><em>Illustration 3 Hex strings on the document cells<\/em><\/p>\n\n\n\n<p>Once both files are extracted, it stores them in the directory %ProgramData% with the following names and hashes:<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td><strong>Nombre<\/strong><\/td><td><strong>Hash<\/strong><\/td><\/tr><tr><td><strong>AutoHotkeyU32.exe<\/strong><\/td><td>967dba8d919693febf96fde4877e7f08077630f886d4e77b778855d998c073c2<\/td><\/tr><tr><td><strong>AutoHotkeyU32.ahk<\/strong><\/td><td>acb3181d0408c908b2a434fc004bf24fb766d4cf68bf2978bc5653022f9f20be<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>From the document, there are two other elements that have also called our attention.<\/p>\n\n\n\n<p>The first one is its Russian language and the fact that some macro data is written in Cyrillic:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"449\" src=\"https:\/\/lab52.es\/blog\/wp-content\/uploads\/2019\/04\/03-1.png\" alt=\"\" class=\"wp-image-230\" srcset=\"https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/03-1.png 320w, https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/03-1-214x300.png 214w\" sizes=\"(max-width: 320px) 100vw, 320px\" \/><\/figure><\/div>\n\n\n\n<p style=\"font-size:15px;text-align:center\"><em>Illustration 4 Macros internal data<\/em><\/p>\n\n\n\n<p>The second element that has caught our attention is the fact that it contains an author name of the document:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"416\" height=\"329\" src=\"https:\/\/lab52.es\/blog\/wp-content\/uploads\/2019\/04\/04-1.png\" alt=\"\" class=\"wp-image-231\" srcset=\"https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/04-1.png 416w, https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/04-1-300x237.png 300w\" sizes=\"(max-width: 416px) 100vw, 416px\" \/><\/figure><\/div>\n\n\n\n<p style=\"font-size:15px;text-align:center\"><em>Illustration 5 Document info<\/em><\/p>\n\n\n\n<p>From that name, we have found another 4 documents uploaded to the \nVirustotal platform from the Arab Emirates just over a week ago, at \nalmost the same time. They contain tests of different macros and ways to\n exploit the office document to install malware, with the same metadata \nas the main document and same strings in Russian in the macro data, so \nthey seem to be tests done by the author prior to this infection \ncampaign.<\/p>\n\n\n\n<p>Once the embedded files are extracted, the document launch the executable passing the script as a parameter:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"589\" height=\"208\" src=\"https:\/\/lab52.es\/blog\/wp-content\/uploads\/2019\/04\/05-1.png\" alt=\"\" class=\"wp-image-232\" srcset=\"https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/05-1.png 589w, https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/05-1-300x106.png 300w\" sizes=\"(max-width: 589px) 100vw, 589px\" \/><\/figure><\/div>\n\n\n\n<p>The executable consists of a legitimate AutoHotkey script loader, and\n the malicious logic comes on the file with extension \u201c.ahk\u201d. This \nscript, is in charge of, in first place, creating a shortcut in the \n\u201cStartup\u201d folder that brings persistence on each restart, and then, \nreporting the serial of the disk \u201cC:\u201d to the command and control server.\n Depending on the received command, it will update itself (Command 000) \nor create a new scripting file and execute it in parallel (Command 001).<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/i1.wp.com\/www.securityartwork.es\/wp-content\/uploads\/2019\/04\/06-1.png?ssl=1\"><img loading=\"lazy\" decoding=\"async\" width=\"740\" height=\"370\" src=\"https:\/\/lab52.es\/blog\/wp-content\/uploads\/2019\/04\/06-1.png\" alt=\"\" class=\"wp-image-233\" srcset=\"https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/06-1.png 740w, https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/06-1-300x150.png 300w\" sizes=\"(max-width: 740px) 100vw, 740px\" \/><\/a><\/figure><\/div>\n\n\n\n<p style=\"font-size:15px;text-align:center\"><em>Illustration 6 Script Code<\/em><\/p>\n\n\n\n<p>This allows it to remain as a backdoor, allowing the attacker to load\n any kind of new functionality or update the script itself, for example,\n an update with a new C2.<\/p>\n\n\n\n<p>The domain of the command and control with which the threat contacts is the following: \u201chxxp:\/\/185.70.186.]145\/7773\/index.php\u201d<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"545\" height=\"371\" src=\"https:\/\/lab52.es\/blog\/wp-content\/uploads\/2019\/04\/07-1.png\" alt=\"\" class=\"wp-image-234\" srcset=\"https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/07-1.png 545w, https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/07-1-300x204.png 300w\" sizes=\"(max-width: 545px) 100vw, 545px\" \/><\/figure><\/div>\n\n\n\n<p style=\"font-size:15px;text-align:center\"><em>Illustration 7 C2 IP info<\/em><\/p>\n\n\n\n<p>The IP is located in the Netherlands and belongs to the company \n\u201chostkey.ru\u201d, which offers a VPS hosting service in Russia or the \nNetherlands:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"617\" height=\"335\" src=\"https:\/\/lab52.es\/blog\/wp-content\/uploads\/2019\/04\/08-1.png\" alt=\"\" class=\"wp-image-235\" srcset=\"https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/08-1.png 617w, https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/08-1-300x163.png 300w\" sizes=\"(max-width: 617px) 100vw, 617px\" \/><\/figure><\/div>\n\n\n\n<p style=\"font-size:15px;text-align:center\"><em>Illustration 8 C2 Hosting Website<\/em><\/p>\n\n\n\n<p>At the moment, we have not been able to obtain new stages of \ninfection of this threat, nor other versions of this document with \ndifferent indicators, so we will continue monitoring this type of actors\n using TTPs slightly different from those used by more generic \ncybercrime actors.<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td><strong>Name<\/strong><\/td><td><strong>IOC<\/strong><\/td><\/tr><tr><td><strong>C2<\/strong><\/td><td>hxxp:\/\/185.70.186.145\/7773\/index.php<\/td><\/tr><tr><td><strong>AutoHotkeyU32.ahk<\/strong><\/td><td>acb3181d0408c908b2a434fc004bf24fb766d4cf68bf2978bc5653022f9f20be<\/td><\/tr><tr><td><strong>AutoHotkeyU32.exe<\/strong><\/td><td>967dba8d919693febf96fde4877e7f08077630f886d4e77b778855d998c073c2<\/td><\/tr><tr><td><strong>Military Financing.xlsm<\/strong><\/td><td>efe51c2453821310c7a34dca3054021d0f6d453b7133c381d75e3140901efd12<\/td><\/tr><\/tbody><\/table>\n","protected":false},"excerpt":{"rendered":"<p>Recently at Lab52 from S2 Grupo, we have detected an infection campaign through a malicious document that has called our attention due to its content and title. The document in question, named \u201cMilitary Financing.xlsm\u201d and hash \u201cefe51c2453821310c7a34dca3054021d0f6d453b7133c381d75e3140901efd12\u201d&nbsp; stands out mainly for the image it contains, which refers to a document with secret information about the [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":402,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[1],"tags":[],"class_list":{"0":"post-190","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-uncategorised","8":"entry"},"featured_image_src":"https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/141113-A-QS211-509_-_Soldiers_of_the_1st_Brigade_Combat_Team_1st_Cavalry_Division_and_2nd_Cavalry_Regiment_participate_in_the_closing_ceremony_for_Iron_Sword_2014-600x400.jpg","featured_image_src_square":"https:\/\/lab52.io\/blog\/wp-content\/uploads\/2019\/04\/141113-A-QS211-509_-_Soldiers_of_the_1st_Brigade_Combat_Team_1st_Cavalry_Division_and_2nd_Cavalry_Regiment_participate_in_the_closing_ceremony_for_Iron_Sword_2014-600x600.jpg","author_info":{"display_name":"JagaimoKawaii","author_link":"https:\/\/lab52.io\/blog\/author\/jagaimokawaii\/"},"_links":{"self":[{"href":"https:\/\/lab52.io\/blog\/wp-json\/wp\/v2\/posts\/190"}],"collection":[{"href":"https:\/\/lab52.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab52.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab52.io\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/lab52.io\/blog\/wp-json\/wp\/v2\/comments?post=190"}],"version-history":[{"count":5,"href":"https:\/\/lab52.io\/blog\/wp-json\/wp\/v2\/posts\/190\/revisions"}],"predecessor-version":[{"id":335,"href":"https:\/\/lab52.io\/blog\/wp-json\/wp\/v2\/posts\/190\/revisions\/335"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab52.io\/blog\/wp-json\/wp\/v2\/media\/402"}],"wp:attachment":[{"href":"https:\/\/lab52.io\/blog\/wp-json\/wp\/v2\/media?parent=190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab52.io\/blog\/wp-json\/wp\/v2\/categories?post=190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab52.io\/blog\/wp-json\/wp\/v2\/tags?post=190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}