{"id":86983,"date":"2018-10-16T16:05:50","date_gmt":"2018-10-16T10:35:50","guid":{"rendered":"https:\/\/blogs_admin.quickheal.com\/?p=86983"},"modified":"2018-10-16T16:32:26","modified_gmt":"2018-10-16T11:02:26","slug":"86983-2","status":"publish","type":"post","link":"https:\/\/www.quickheal.com\/blogs\/86983-2\/","title":{"rendered":"Deep analysis of AZORult \u2013 The information exfiltrator"},"content":{"rendered":"<p>While the current focus in the cyberspace is on Ransomware and Cryptominers there are other prevalent threat actors silently making their way into victim\u2019s machine in order to comprise it for malicious purpose. During the daily threat hunting task,Quick Heal Security labs came across a blocked URL by Quick Heal\u2019s URL categorization cloud feature. Further analysis of the URL led us to a new variant of the \u201cAZORult\u201d infostealer malware. This malware harvests and exfiltrates data from the victim\u2019s machine to the CnC server. In this post, we will dissect this malware and share interesting details about it.<\/p>\n<p>Below attack chain depicts the execution sequence observed for this malware.<\/p>\n<figure id=\"attachment_86929\" aria-describedby=\"caption-attachment-86929\" style=\"width: 689px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-86929\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2018\/10\/Untitled-drawing-3-1.jpg\" alt=\"\" width=\"689\" height=\"174\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/Untitled-drawing-3-1.jpg 689w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/Untitled-drawing-3-1-300x76.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/Untitled-drawing-3-1-650x164.jpg 650w\" sizes=\"(max-width: 689px) 100vw, 689px\" \/><figcaption id=\"caption-attachment-86929\" class=\"wp-caption-text\">Fig 1. Attack Chain<\/figcaption><\/figure>\n<p>At the time of analysis, the initial attack vector was unknown but the attack chain was traced from malicious URL. Quick Heal Security labs suspected the initial attack vector to be Phishing email.<\/p>\n<p><em>URL: cw57146.tmweb.ru\/upload\/neut[.]exe<\/em><\/p>\n<p>During static analysis, sample seems to have a lot of the Flare in it. The \u2018neut.exe\u2019 file is PE32 executable for MS Windows and compiled as P-code file of Microsoft Visual Basic. It has various encrypted strings and contains large resource data of high entropy.<\/p>\n<figure id=\"attachment_86930\" aria-describedby=\"caption-attachment-86930\" style=\"width: 796px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-86930\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2018\/10\/resource.png\" alt=\"\" width=\"796\" height=\"317\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/resource.png 796w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/resource-300x119.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/resource-768x306.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/resource-650x259.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/resource-789x314.png 789w\" sizes=\"(max-width: 796px) 100vw, 796px\" \/><figcaption id=\"caption-attachment-86930\" class=\"wp-caption-text\">Fig 2: Huge resource in CFF explorer<\/figcaption><\/figure>\n<p>Decompiled File has a function to disable DEP for the current process, it attempts to modify Explorer settings to prevent hidden files from being displayed and also loads huge resource in the memory.<\/p>\n<figure id=\"attachment_86933\" aria-describedby=\"caption-attachment-86933\" style=\"width: 769px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-86933\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2018\/10\/compile.png\" alt=\"\" width=\"769\" height=\"379\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/compile.png 769w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/compile-300x148.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/compile-768x379.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/compile-650x320.png 650w\" sizes=\"(max-width: 769px) 100vw, 769px\" \/><figcaption id=\"caption-attachment-86933\" class=\"wp-caption-text\">Fig\u00a03:\u00a0Decompiled\u00a0File\u00a0shows\u00a0DEP\u00a0policy\u00a0and\u00a0resource\u00a0loading<\/figcaption><\/figure>\n<p>While traversing some more functions in the decompiled file. An obfuscated code was found which is passed to a function which de-obfuscates the data and forms a valid string.<\/p>\n<figure id=\"attachment_86934\" aria-describedby=\"caption-attachment-86934\" style=\"width: 786px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-86934\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2018\/10\/strings.png\" alt=\"\" width=\"786\" height=\"183\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/strings.png 786w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/strings-300x70.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/strings-768x179.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/strings-650x151.png 650w\" sizes=\"(max-width: 786px) 100vw, 786px\" \/><figcaption id=\"caption-attachment-86934\" class=\"wp-caption-text\">Fig.\u00a04\u00a0Obfuscated\u00a0Bytes<\/figcaption><\/figure>\n<p>After converting these hex values to ASCII, Code looks like it is base64 encoded. So after decoding it using base64 algorithm following strings are found.<\/p>\n<p><em>C:\\ProgramData\\worm.exe<\/em><\/p>\n<p><em>Hxxp:\/\/cw57146.tmweb.ru\/upload\/neut[.]exe<\/em><\/p>\n<p>Next function traversed has XOR algorithm along with some more operation which is applied on whole resource data. Decryption routine is shown through below snippet.<\/p>\n<figure id=\"attachment_86935\" aria-describedby=\"caption-attachment-86935\" style=\"width: 872px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-86935 size-full\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2018\/10\/loop.png\" alt=\"\" width=\"872\" height=\"124\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/loop.png 872w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/loop-300x43.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/loop-768x109.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/loop-650x92.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/loop-789x112.png 789w\" sizes=\"(max-width: 872px) 100vw, 872px\" \/><figcaption id=\"caption-attachment-86935\" class=\"wp-caption-text\">Fig\u00a05.\u00a0Xor\u00a0algorithm\u00a0used\u00a0to\u00a0decrypt\u00a0resource\u00a0code<\/figcaption><\/figure>\n<p>After implementing this logic on the resource code, one PE file is found. Decrypted PE file is Delphi windows file and we are going forward to analyze this file.<\/p>\n<p>Statically checking file various base64 encode strings are found which are shown in the below image.<\/p>\n<figure id=\"attachment_86936\" aria-describedby=\"caption-attachment-86936\" style=\"width: 595px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-86936\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2018\/10\/str2.png\" alt=\"\" width=\"595\" height=\"114\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/str2.png 595w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/str2-300x57.png 300w\" sizes=\"(max-width: 595px) 100vw, 595px\" \/><figcaption id=\"caption-attachment-86936\" class=\"wp-caption-text\">Fig\u00a06.\u00a0Base64\u00a0encoded\u00a0strings<\/figcaption><\/figure>\n<p>Decoding above strings using base64 algorithm, below result is found. These strings are used to collect system info like \u201cDisplayName\u201d in \u201dUninstall\u201d registry key is used to identify all the installed software in the system. \u201cCreateToolhelp32Snapshot\u201d is used to list out all the running processes.<\/p>\n<pre>Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\r\nDisplayName\r\nDisplayVersion\r\n<em>HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0<\/em>\r\n<em>CreateToolhelp32Snapshot<\/em><\/pre>\n<p>Some unencrypted strings are also there. Below snapshot has some of those strings:<\/p>\n<figure id=\"attachment_86937\" aria-describedby=\"caption-attachment-86937\" style=\"width: 477px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-86937\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2018\/10\/all-str.png\" alt=\"\" width=\"477\" height=\"327\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/all-str.png 477w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/all-str-300x206.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/all-str-229x158.png 229w\" sizes=\"(max-width: 477px) 100vw, 477px\" \/><figcaption id=\"caption-attachment-86937\" class=\"wp-caption-text\">Fig\u00a07.\u00a0Strings\u00a0found\u00a0in\u00a0Resource\u00a0File<\/figcaption><\/figure>\n<p>Now further analysis will give understanding of where and how these strings are used. So after debugging the file in IDA. Malware collects machine information such as \u201cMachineGuid\u201d, \u201cProductName\u201d, \u201cUserName\u201d, \u201cComputerName\u201d and XOR it with DWORD then concat it and finally creates mutex of this name for the particular system.<\/p>\n<p>After that malware tries to send data to the C&amp;C server using a POST request. This is how that request is constructed:<\/p>\n<figure id=\"attachment_86938\" aria-describedby=\"caption-attachment-86938\" style=\"width: 816px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-86938\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2018\/10\/Capture2.png\" alt=\"\" width=\"816\" height=\"431\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/Capture2.png 816w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/Capture2-300x158.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/Capture2-768x406.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/Capture2-650x343.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/Capture2-789x417.png 789w\" sizes=\"(max-width: 816px) 100vw, 816px\" \/><figcaption id=\"caption-attachment-86938\" class=\"wp-caption-text\">Fig\u00a08.\u00a0Call\u00a0to\u00a0HttpSendRequestA<\/figcaption><\/figure>\n<p>The CnC server responded with the huge amount of data which seems to be encrypted.<\/p>\n<figure id=\"attachment_86939\" aria-describedby=\"caption-attachment-86939\" style=\"width: 741px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-86939\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2018\/10\/Capture4.png\" alt=\"\" width=\"741\" height=\"431\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/Capture4.png 741w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/Capture4-300x174.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/Capture4-650x378.png 650w\" sizes=\"(max-width: 741px) 100vw, 741px\" \/><figcaption id=\"caption-attachment-86939\" class=\"wp-caption-text\">Fig\u00a09.\u00a0Response\u00a0from\u00a0CnC\u00a0Server<\/figcaption><\/figure>\n<p>After more debugging the file, malware read data send by CnC server in memory by using \u201cInternetReadFile\u201d api &amp; then decrypted it using XOR algorithm with a 3 byte key. Some data at the end of the response buffer has base64 encoded strings.<\/p>\n<figure id=\"attachment_86940\" aria-describedby=\"caption-attachment-86940\" style=\"width: 613px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-86940\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2018\/10\/enncryted-_data.png\" alt=\"\" width=\"613\" height=\"362\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/enncryted-_data.png 613w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/enncryted-_data-300x177.png 300w\" sizes=\"(max-width: 613px) 100vw, 613px\" \/><figcaption id=\"caption-attachment-86940\" class=\"wp-caption-text\">Fig\u00a010.\u00a0Encrypted\u00a0data\u00a0received\u00a0from\u00a0CnC\u00a0Server<\/figcaption><\/figure>\n<p>Base64 encoded string that depicts the information that the malware tries to steal from victim machine like (Username, password, installed software, browser information etc).<\/p>\n<figure id=\"attachment_86941\" aria-describedby=\"caption-attachment-86941\" style=\"width: 504px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-86941\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2018\/10\/decrypted.png\" alt=\"\" width=\"504\" height=\"394\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/decrypted.png 504w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/decrypted-300x235.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/decrypted-499x390.png 499w\" sizes=\"(max-width: 504px) 100vw, 504px\" \/><figcaption id=\"caption-attachment-86941\" class=\"wp-caption-text\">Fig\u00a011.\u00a0Decrypted\u00a0Response\u00a0string<\/figcaption><\/figure>\n<p>After decrypting the other buffer which is encrypted with Xor operation, we came to know that it has lots of dlls (~48) that are dumped in the directory: %Temp%\\2fda\u201d and it also contains some strings. Some dlls are related to browser plugin. Malware loads these dlls in memory and exact browser &amp; other information.<\/p>\n<p>Malware is able to steal accounts information, browsing &amp; cookies details and also retrieves the public ip address of the infected machine by calling to \u201chxxp:\/\/ip-api.com\/json\u201d.<\/p>\n<p>It is also able to list out all the installed software in the system, list all running processes by calling CreateToolhelp32Snapshot, Process32first, Process32next functions. It also collects information about the different cryptomining wallet from Electrum, MultiBit, monero-project etc. It also collects information that which website is browsed by user at what time.<\/p>\n<p>It also sends machine name, RAM size and other machine related information.<\/p>\n<figure id=\"attachment_86942\" aria-describedby=\"caption-attachment-86942\" style=\"width: 483px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-86942\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2018\/10\/final_lastone.png\" alt=\"\" width=\"483\" height=\"497\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/final_lastone.png 483w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/final_lastone-292x300.png 292w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/final_lastone-379x390.png 379w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/final_lastone-80x81.png 80w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2018\/10\/final_lastone-45x45.png 45w\" sizes=\"(max-width: 483px) 100vw, 483px\" \/><figcaption id=\"caption-attachment-86942\" class=\"wp-caption-text\">Fig\u00a012.\u00a0Data\u00a0send\u00a0by\u00a0malware\u00a0to\u00a0CnC\u00a0Server<\/figcaption><\/figure>\n<p>All above information is then encrypted using XOR operation and sent back to CnC server. Then the server replies \u201cOK\u201d after receiving the complete data.<\/p>\n<p>Stolen data can be used widely to gain unauthorized access to email accounts, bank accounts and other online information. This stolen personal information can harm the user mentally as well as financially. AZORult variants are detected by Quick Heal products as \u201cTrojan.IGENERIC\u201d.<\/p>\n<p><strong>Conclusion<\/strong><\/p>\n<p>In the midst of Ransomware and Cryptominers such Infostealer malware are favorite attack vectors used by attackers. We advise our users to avoid accessing suspicious websites\/emails and keep their antivirus up-to-date to prevent their systems from being infected by such complex malware. Quick Heal with its advanced detection technology mechanism, has been consistently monitoring &amp; blocking these complex malware and malicious sites.<\/p>\n<p><strong>IOC<\/strong><\/p>\n<p>BF468C06614D844E1A856C02FE7FB698<\/p>\n<p><strong>Subject Matter Expert<\/strong><\/p>\n<p>Preksha Saxena | Quick Heal Security labs<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While the current focus in the cyberspace is on Ransomware and Cryptominers there are other prevalent threat actors silently making their way into victim\u2019s machine in order to comprise it for malicious purpose. During the daily threat hunting task,Quick Heal Security labs came across a blocked URL by Quick Heal\u2019s URL categorization cloud feature. Further [&hellip;]<\/p>\n","protected":false},"author":45,"featured_media":86886,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[1612,1326],"class_list":["post-86983","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-malware","tag-banking-trojan-malware","tag-infostealer"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/86983"}],"collection":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/comments?post=86983"}],"version-history":[{"count":7,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/86983\/revisions"}],"predecessor-version":[{"id":86990,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/86983\/revisions\/86990"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media\/86886"}],"wp:attachment":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media?parent=86983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/categories?post=86983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/tags?post=86983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}