{"id":91112,"date":"2022-10-21T13:31:28","date_gmt":"2022-10-21T08:01:28","guid":{"rendered":"https:\/\/blogs.quickheal.com\/?p=91112"},"modified":"2023-06-17T16:44:38","modified_gmt":"2023-06-17T11:14:38","slug":"are-malware-operators-using-nsis-installers-to-bombard-stealers-and-avoid-detection","status":"publish","type":"post","link":"https:\/\/www.quickheal.com\/blogs\/are-malware-operators-using-nsis-installers-to-bombard-stealers-and-avoid-detection\/","title":{"rendered":"Are Malware operators using NSIS Installers to bombard Stealers and avoid detection?"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>Threat actors have been using new techniques to hide their codes and avoid detection in every manner. They now use a new trend through NSIS (Nullsoft Scriptable Install System), which is an open-source installer that can bundle various files together. In the past, <a href=\"https:\/\/blogs.quickheal.com\/the-threat-landscape-emerging-viruses-and-malware-to-watch-out-for-in-2023\/\">Malware attackers<\/a> have used this NSIS-based crypter to hide themselves. This trend has been observed in malware families such as Lokibot, Ave Marie stealer, AgentTesla, Formbook, etc. This blog describes deeper insights into the new trend of cyber-attacks.<\/p>\n<h3><strong>ANALYSIS- LOKIBOT<\/strong><\/h3>\n<p>Let us look into the below hash (2D4739AB2D34EEC849D903E05E8E0EB4).<\/p>\n<p>This is an NSIS file that can be identified through the DIE tool<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-91113\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/1.png\" alt=\"\" width=\"445\" height=\"261\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/1.png 414w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/1-300x176.png 300w\" sizes=\"(max-width: 445px) 100vw, 445px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 1: DIE Tool showing NSIS<\/em><\/strong><\/p>\n<p>On extracting the file using 7zip, we can see the contents in the folder. It has two encrypted payloads and an executable inside it. On execution, all the files are dropped in the %temp% folder.<\/p>\n<p style=\"text-align: center;\"><strong><em>\u00a0 <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91114\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/2-1.png\" alt=\"\" width=\"516\" height=\"140\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/2-1.png 516w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/2-1-300x81.png 300w\" sizes=\"(max-width: 516px) 100vw, 516px\" \/>\u00a0 \u00a0 \u00a0 \u00a0Fig 2: Inside the NSIS file<\/em><\/strong><\/p>\n<p>Let us now look into the executable jyacil.exe (MD5: 81EC4B73F581DD36CBDBB6C695CD038C). The file allocates memory using VirtualAlloc API and then copies the encrypted payload (botredmnra-6kb) into that allocated space.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91115\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/3-1.png\" alt=\"\" width=\"688\" height=\"319\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/3-1.png 688w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/3-1-300x139.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/3-1-650x301.png 650w\" sizes=\"(max-width: 688px) 100vw, 688px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 3: Virtually Allocated memory containing the encrypted payload<\/em><\/strong><\/p>\n<p>This payload is decrypted into shellcode by the decryption loop followed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91116\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/4-1.png\" alt=\"\" width=\"668\" height=\"218\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/4-1.png 668w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/4-1-300x98.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/4-1-650x212.png 650w\" sizes=\"(max-width: 668px) 100vw, 668px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 4: Decryption loop<\/em><\/strong><\/p>\n<p>The code flow now moves into the decrypted shellcode, which is directly responsible for decrypting the bigger payload.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91117\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/5-1.png\" alt=\"\" width=\"685\" height=\"232\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/5-1.png 685w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/5-1-300x102.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/5-1-650x220.png 650w\" sizes=\"(max-width: 685px) 100vw, 685px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 5: Decrypted shellcode<\/em><\/strong><\/p>\n<p>Now the bigger encrypted file is read from %temp% using ReadFile API and copied into virtually allocated memory. Then the file is decrypted by a big decryption loop whose chunks are present below. It is a massive loop, so only a few fragments are shown in the picture.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91118\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/6-1.png\" alt=\"\" width=\"743\" height=\"364\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/6-1.png 743w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/6-1-300x147.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/6-1-650x318.png 650w\" sizes=\"(max-width: 743px) 100vw, 743px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91119\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/7-1.png\" alt=\"\" width=\"749\" height=\"363\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/7-1.png 749w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/7-1-300x145.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/7-1-650x315.png 650w\" sizes=\"(max-width: 749px) 100vw, 749px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 6: Decryption loop<\/em><\/strong><\/p>\n<p><em> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91120\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/8-1.png\" alt=\"\" width=\"755\" height=\"346\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/8-1.png 755w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/8-1-300x137.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/8-1-650x298.png 650w\" sizes=\"(max-width: 755px) 100vw, 755px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91121\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/9-1.png\" alt=\"\" width=\"752\" height=\"360\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/9-1.png 752w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/9-1-300x144.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/9-1-650x311.png 650w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91122\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/10-1.png\" alt=\"\" width=\"736\" height=\"298\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/10-1.png 736w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/10-1-300x121.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/10-1-650x263.png 650w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/em><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 7: Decryption loop<\/em><\/strong><\/p>\n<p>This decryption brings in another PE file which is the actual payload.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91123\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/11-1.png\" alt=\"\" width=\"679\" height=\"310\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/11-1.png 679w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/11-1-300x137.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/11-1-650x297.png 650w\" sizes=\"(max-width: 679px) 100vw, 679px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 8: Payload<\/em><\/strong><\/p>\n<p>After this, process hollowing is done, and the actual malware payload performs its activity. Let us now focus on the actual malware (md5: C6085AED2E2C782F81CCCA6B5FACA13E[Visual C++ compiler]).<\/p>\n<p>The malware creates a mutex to make sure only one instance is running. It then creates a file &lt;randomname&gt;.tmp to store all stolen information. This random name is formed by two unique strings present in the file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91124\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/12-1.png\" alt=\"\" width=\"926\" height=\"112\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/12-1.png 926w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/12-1-300x36.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/12-1-650x79.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/12-1-768x93.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/12-1-789x95.png 789w\" sizes=\"(max-width: 926px) 100vw, 926px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 9: Unique strings to form random name<\/em><\/strong><\/p>\n<p>\u00a0The C2 URL is hardcoded, which is later decrypted.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91125\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/13-1.png\" alt=\"\" width=\"685\" height=\"178\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/13-1.png 685w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/13-1-300x78.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/13-1-650x169.png 650w\" sizes=\"(max-width: 685px) 100vw, 685px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 10: Hardcoded URL<\/em><\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91126\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/14-1.png\" alt=\"\" width=\"672\" height=\"155\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/14-1.png 672w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/14-1-300x69.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/14-1-650x150.png 650w\" sizes=\"(max-width: 672px) 100vw, 672px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 11: C2 Formed after decryption<\/em><\/strong><\/p>\n<p>This payload is Lokibot stealer, which steals credentials from:<\/p>\n<p>Comodo, Maplestudio, Google Chrome, Nichrome, RockMelt, Spark, Chromium, Titanium Browser, Yandex, Torch, Mustang Browser, NetSarang, FossaMail, Postbox, MoonChild, NetGate, Total Commander, EasyFTP, FileZilla, KiTTy, etc. and sends to C2 :<\/p>\n<p>Hxxp[:]\/\/85.202[.]169.172\/goodlife\/five\/fre[.]php<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91127\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/15-1.png\" alt=\"\" width=\"1137\" height=\"445\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/15-1.png 1137w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/15-1-300x117.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/15-1-650x254.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/15-1-768x301.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/15-1-789x309.png 789w\" sizes=\"(max-width: 1137px) 100vw, 1137px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91128\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/16-1.png\" alt=\"\" width=\"1139\" height=\"447\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/16-1.png 1139w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/16-1-300x118.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/16-1-650x255.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/16-1-768x301.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/16-1-789x310.png 789w\" sizes=\"(max-width: 1139px) 100vw, 1139px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 12: Lokibot-related strings<\/em><\/strong><\/p>\n<p><strong>ANALYSIS- Ave Marie Stealer<\/strong><\/p>\n<p>We now look into another file belonging to Ave Marie Stealer (MD5: CE488BABC73497C16CE8D2DE5ED218A7). This is also an NSIS-based file.<\/p>\n<p>Using 7zip, we can see the contents present inside the file:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91129\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/17-1.png\" alt=\"\" width=\"736\" height=\"257\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/17-1.png 736w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/17-1-300x105.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/17-1-650x227.png 650w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 13: Inside NSIS Files<\/em><\/strong><\/p>\n<p>In this case, dyhqo.exe is responsible for decrypting the jvqnj (8kb file) and forms a shellcode which later decrypts the bigger payload gdrat8hotr11us6qz, which is the actual payload.<\/p>\n<p>There is a slight change in the decryption loop in the first stage (The remaining file is almost the same):<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91130\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/18-1.png\" alt=\"\" width=\"761\" height=\"256\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/18-1.png 761w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/18-1-300x101.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/18-1-650x219.png 650w\" sizes=\"(max-width: 761px) 100vw, 761px\" \/><\/p>\n<p><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <strong>Fig 14: Decryption loop<\/strong><\/em><\/p>\n<p>After the second stage decryption, we get the Ave Marie stealer (Delphi file) (MD5: E77D247BB34818C0C3352762C7DE0213). Related strings can be seen in the figure. This stealer captures keystrokes and steals data from various browsers such as UCBrowser, CentBrowser, Comodo, Chromium, Blisk, Microsoft Edge, etc.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91131\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/19-1.png\" alt=\"\" width=\"1143\" height=\"318\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/19-1.png 1143w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/19-1-300x83.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/19-1-650x181.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/19-1-768x214.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/19-1-789x220.png 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/19-1-304x84.png 304w\" sizes=\"(max-width: 1143px) 100vw, 1143px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91132\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/20-1.png\" alt=\"\" width=\"1145\" height=\"379\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/20-1.png 1145w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/20-1-300x99.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/20-1-650x215.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/20-1-768x254.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/20-1-789x261.png 789w\" sizes=\"(max-width: 1145px) 100vw, 1145px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>\u00a0Fig 15: <\/em>Ave Marie related strings observed in the inner payload<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91133\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/21-1.png\" alt=\"\" width=\"1167\" height=\"130\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/21-1.png 1167w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/21-1-300x33.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/21-1-650x72.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/21-1-768x86.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/21-1-789x88.png 789w\" sizes=\"(max-width: 1167px) 100vw, 1167px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 16: <\/em><\/strong><strong><em>C2 URL: danseeeee.duckdns.org:2022<\/em><\/strong><\/p>\n<p><strong>\u00a0<\/strong><strong>ANALYSIS: AGENTTESLA<\/strong><\/p>\n<p>Let us now look into another file belonging to Formbook (MD5: 66BE80324D7937C5E17F5D4B08574145). This is also an NSIS based file.<\/p>\n<p>Using 7zip, we can see the contents inside the file:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91134\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/22-1.png\" alt=\"\" width=\"469\" height=\"103\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/22-1.png 469w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/22-1-300x66.png 300w\" sizes=\"(max-width: 469px) 100vw, 469px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 17: <\/em><\/strong><strong><em>Inside the NSIS file<\/em><\/strong><\/p>\n<p>In this case, also omrtoehch.exe is responsible for decrypting the wygeuhclea (6kb file) and forms a shellcode which later decrypts the bigger payload y27ub6kcvxv73holza44, which forms the actual payload.<\/p>\n<p>There is a change in the decryption loop in the first stage (The remaining file is almost the same). It is a big loop, so chunks of code are shown below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91135\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/23-1.png\" alt=\"\" width=\"748\" height=\"272\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/23-1.png 748w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/23-1-300x109.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/23-1-650x236.png 650w\" sizes=\"(max-width: 748px) 100vw, 748px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91136\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/24-1.png\" alt=\"\" width=\"740\" height=\"229\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/24-1.png 740w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/24-1-300x93.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/24-1-650x201.png 650w\" sizes=\"(max-width: 740px) 100vw, 740px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 18: Decryption loop<\/em><\/strong><\/p>\n<p>After the second stage decryption, we get another payload (Visual C MD5: D0FF8F95A6AA286D781528197255B805).\u00a0 In this file, it can be clearly observed that there is another PE file inside the resources (RCDATA). Let\u2019s extract that and look into what exactly it is (F2E113BE23813F22EAA3B82CCBE535EA).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91137\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/25-1.png\" alt=\"\" width=\"781\" height=\"563\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/25-1.png 781w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/25-1-300x216.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/25-1-541x390.png 541w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/25-1-768x554.png 768w\" sizes=\"(max-width: 781px) 100vw, 781px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 19<\/em><\/strong><\/p>\n<p>This file is a DOTNET file obfuscated by \u201cObfuscar, \u201cwhich is an open-source .Net Obfuscator.<\/p>\n<p style=\"text-align: center;\"><strong><em><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91138\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/26-1.png\" alt=\"\" width=\"850\" height=\"260\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/26-1.png 850w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/26-1-300x92.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/26-1-650x199.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/26-1-768x235.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/26-1-789x241.png 789w\" sizes=\"(max-width: 850px) 100vw, 850px\" \/><br \/>\nFig 20<\/em><\/strong><\/p>\n<p>The code is highly obfuscated, and each string is decrypted at runtime. The encoded strings are highlighted. All the characters are stored in a single array of bytes, accessed by &lt;&lt;EMPTY_NAME&gt;&gt;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91139\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/27-1.png\" alt=\"\" width=\"692\" height=\"337\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/27-1.png 692w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/27-1-300x146.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/27-1-650x317.png 650w\" sizes=\"(max-width: 692px) 100vw, 692px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 21<\/em><\/strong><\/p>\n<p>The decryption is done by the above list by XOR operation with the encrypted byte, its position on the list, and the decimal number 170.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91140\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/28-1.png\" alt=\"\" width=\"781\" height=\"98\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/28-1.png 781w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/28-1-300x38.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/28-1-650x82.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/28-1-768x96.png 768w\" sizes=\"(max-width: 781px) 100vw, 781px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 22<\/em><\/strong><\/p>\n<p>This payload, to access a string, will call the function that returns the string by accessing its position in the list and its length.<\/p>\n<p>After decrypting the payload, the following strings were found, which are related to AgentTeslaV3:<\/p>\n<p>\\Account.CFN<\/p>\n<p>\\Account.stg<\/p>\n<p>\\accountrc<\/p>\n<p>\\accounts.xml<\/p>\n<p>\\Accounts\\Account.rec0<\/p>\n<p>\\Accounts_New<\/p>\n<p>\\Apple Computer\\Preferences\\keychain.plist<\/p>\n<p>\\browsedata.db<\/p>\n<p>\\cftp\\Ftplist.txt<\/p>\n<p>\\Claws-mail<\/p>\n<p>\\clawsrc<\/p>\n<p>\\Common Files\\Apple\\Apple Application Support\\plutil.exe<\/p>\n<p>\\Comodo\\IceDragon\\<\/p>\n<p>\\CoreFTP\\sites.idx<\/p>\n<p>\\Data\\Tor\\torrc<\/p>\n<p>\\Default\\<\/p>\n<p>\\Default\\EncryptedStorage<\/p>\n<p>\\Default\\Login Data<\/p>\n<p>\\drivers\\etc\\hosts<\/p>\n<p>\\EncryptedStorage<\/p>\n<p>\\falkon\\profiles\\<\/p>\n<p>\\Mailbox.ini<\/p>\n<p>\\Microsoft\\Credentials\\<\/p>\n<p>\\Microsoft\\Edge\\User Data<\/p>\n<p>\\Microsoft\\Protect\\<\/p>\n<p>\\Moonchild Productions\\Pale Moon\\<\/p>\n<p>\\Mozilla\\Firefox\\<\/p>\n<p>\\Mozilla\\icecat\\<\/p>\n<p>\\Mozilla\\SeaMonkey\\<\/p>\n<p>\\NETGATE Technologies\\BlackHawk\\<\/p>\n<p>\\OpenVPN\\config\\<\/p>\n<p>\\Opera Mail\\Opera Mail\\wand.dat<\/p>\n<p>\\passwordstorerc<\/p>\n<p>&nbsp;<\/p>\n<p><strong>INFECTION VECTOR<\/strong><\/p>\n<p>All these files have the following infection chain<\/p>\n<p>EMAIL &gt;&gt; DOCUMENT\/XLS\/CAB\/RAR &gt;&gt; NSIS Installers<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-91141\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/10\/29-1.png\" alt=\"\" width=\"603\" height=\"209\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/29-1.png 603w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/10\/29-1-300x104.png 300w\" sizes=\"(max-width: 603px) 100vw, 603px\" \/><\/p>\n<p style=\"text-align: center;\"><strong><em>Fig 22: Email containing XLSX attachment<\/em><\/strong><\/p>\n<p>&nbsp;<\/p>\n<h3><strong>How does Quick heal protect its customers?<\/strong><strong><br \/>\n<\/strong><\/h3>\n<p>Quick heal protects its customers via following detections:<\/p>\n<ul>\n<li>IgenericPMF.S28122388<\/li>\n<li>NSISFrmbk.S26708217<\/li>\n<li>NSISLokibt.S26708218<\/li>\n<li>MsilFC.S17872954<\/li>\n<li>GenericRI.S28136194<\/li>\n<\/ul>\n<h3><strong>Conclusion:<\/strong><\/h3>\n<p>We observed a change in <a href=\"https:\/\/www.quickheal.co.in\/home-users\/quick-heal-internet-security\">how malware actors deploy<\/a> malicious code via NSIS installers. We can witness how the stealers discussed above are using NSIS based Loaders. All these loaders have a script in which code is embedded, where the exe file is executed with a random name encrypted payload (small size). The exe reads the smaller encrypted payload and decrypts it. Then the decrypted shellcode decrypts the larger file having a random name which forms the actual malware.<\/p>\n<p>Thus, users should remain aware of these NSIS installers that might contain stealers these days.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Threat actors have been using new techniques to hide their codes and avoid detection in every manner. They now use a new trend through NSIS (Nullsoft Scriptable Install System), which is an open-source installer that can bundle various files together. In the past, Malware attackers have used this NSIS-based crypter to hide themselves. This [&hellip;]<\/p>\n","protected":false},"author":85,"featured_media":91149,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,24,910,5],"tags":[1931,1913,1930,1929,534,22,23,58,49,1923,50],"class_list":["post-91112","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-email","category-malware","category-ransomware","category-security","tag-lokibot","tag-ransomwareprevention","tag-stealers","tag-threatintelligence","tag-cybersecurity","tag-email-malware","tag-fraudulent-email","tag-hacking","tag-malware","tag-quickheal","tag-ransomware"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/91112"}],"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\/85"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/comments?post=91112"}],"version-history":[{"count":10,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/91112\/revisions"}],"predecessor-version":[{"id":91754,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/91112\/revisions\/91754"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media\/91149"}],"wp:attachment":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media?parent=91112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/categories?post=91112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/tags?post=91112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}