<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by atlas on Medium]]></title>
        <description><![CDATA[Stories by atlas on Medium]]></description>
        <link>https://medium.com/@atlas64?source=rss-6659d8f8d0af------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by atlas on Medium</title>
            <link>https://medium.com/@atlas64?source=rss-6659d8f8d0af------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 00:53:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@atlas64/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Ghost Busting — Gh0st RAT Malware Analysis]]></title>
            <link>https://medium.com/@atlas64/ghost-busting-gh0st-rat-malware-analysis-e1155d091e3e?source=rss-6659d8f8d0af------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1155d091e3e</guid>
            <dc:creator><![CDATA[atlas]]></dc:creator>
            <pubDate>Mon, 20 Oct 2025 19:50:52 GMT</pubDate>
            <atom:updated>2025-10-20T22:14:48.399Z</atom:updated>
            <content:encoded><![CDATA[<h3>Ghost Busting — Gh0st RAT Malware Analysis</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uW9FJlOVovMpbYNJqmgRbQ.png" /></figure><h3>What is Gh0st RAT — History &amp; Variant Evolution</h3><p>Gh0st RAT (sometimes spelled Gh0strat) emerged around 2008, created by a Chinese hacker collective. Because its source code was later released publicly, it became a durable tool in many actors’ arsenals — modified, adapted, extended. One persistent tactic is embedding or pairing it with kernel-level rootkits to conceal its presence and complicate detection.</p><p>Variants like HiddenGh0st have already been documented in campaigns that combine Gh0st RAT functionality with the PurpleFox rootkit for file, registry, and process hiding. More recently, Sainbox RAT (a Gh0st-derived backdoor) has been observed in the wild, delivered alongside a PurpleFox rootkit in “<a href="https://www.netskope.com/blog/deepseek-deception-sainbox-rat-hidden-rootkit-delivery">DeepSeek Deception</a>” campaigns. In those campaigns, adversaries use MSI installers, sideloaded DLLs, and shellcode payloads to implant both the rootkit and the RAT.</p><h3>Sample Analysis</h3><p>Taking a sample of this malware from <a href="https://bazaar.abuse.ch/sample/42faf503afd58bc7aa37f5d4340be11895cae9d29da75bfaa97180671172304c/">Malware Bazaar</a> we observed this exhibiting the following behaviors:</p><p><strong>Fake MSI installer </strong>(disguised as a Chrome or popular app setup)</p><p><strong>DLL Sideloading</strong> — the chain includes a real browser binary (to reduce suspicion) and a benign EXE (<strong>mctty.exe</strong>)</p><ul><li>The benign EXE becomes the host for DLL side-loading</li><li>The loader writes Run key(s), and the rootkit is used to obscure the RAT’s presence from security tools</li></ul><p><strong>Hijack loader</strong> — <strong>sqlite3.dll</strong> exports sqlite3_open to masquerade, but actually reads a file 1.txt, allocates executable memory, and injects/runs its content inside mctty.exe</p><p><strong>Dual payloads embedded in </strong><strong>1.txt</strong>:</p><ul><li><strong>PurpleFox rootkit component</strong>, used for kernel-level stealth (hiding files, processes, registry keys)</li><li><strong>Sainbox RAT</strong>, a Gh0st-variant backdoor providing remote access, exfiltration, and command execution</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*ETuBj1iVNEKZ04vAQ27qTw.png" /><figcaption>SainBox Rat and PurpleFox rootkit delivery</figcaption></figure><h3><strong>Fake Chrome Installer</strong></h3><p>When unpacking the MSI installer the following files are seen:</p><ul><li>ChromeSetup.exe</li><li>mctty.exe</li><li>sqlite3.dll</li><li>txt</li><li>msvcp140.dll</li><li>vcruntime140.dll</li><li>msvcr100.dll</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*OK_5jwEbQZFpSNu4Lu1Z_A.png" /><figcaption>ChromeSetup-6581.msi Contents</figcaption></figure><p>This actually does contain a legitimate copy of ChromeSetup.exe, along with multiple legitimate DLLs, however the actual payloads here are sqlite3.dll and txt. The txt file when inspected actually shows two PE files, one 32-bit the other 64-bit, each of which listed as Driver files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/364/1*gJxwoqvZeF5zo_ckxz8vGw.png" /><figcaption>Contents of txt file</figcaption></figure><h3>Execution Chain</h3><p>During execution we see the installer dropping the files we saw in the cab file into the path <em>C:\ProgramData\cPZECO</em>, launching the EXE mctty.exe which loads the malicious DLL sqlite3.dll from this same path.</p><p>The EXE will then perform three actions:</p><ul><li>sqlite3.dll injects shellcode read into memory from 1.txt into the mctty.exe process.</li><li>Creates user-level persistence by setting the exe mctty.exe to run at boot via CurrentVersion\Run</li><li>Creating and launching a suspicious .BAT file — 8553C0C8.bat from AppData\Roaming\</li><li>Beacon to the domain ee[.]bsjdwn[.]com</li></ul><p>The script 8553C0C8.bat will simply check to see if the mctty.exe file is currently running, if it fails to find this process running it will initiate it directly from the script, and continue checking for this process in tasklist.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*MbDZvuCS-9O7smD1ikJKGg.png" /><figcaption>8553C0C8.bat</figcaption></figure><p>During installation this will install a legitimate instance of Chrome via ChromeSetup.exe to avoid suspicion from the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aZoPaMctRAyDhQMI-6n2bg.png" /><figcaption>Hybrid Analysis Process Tree</figcaption></figure><h3>Sideloaded DLL</h3><p>Delivery of the payloads is handled by the DLL sqlite3.dll. This is loaded from the same local install path in a search order hijack, this file serves to handle malware persistence as well as a loader for the next stage.</p><p><strong>Persistence</strong></p><p>The DLL establishes user level persistence, writing its own path into the HKCU Run key via RegSetValueExW. Then acts as a primary loader for the main payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*LjCXbuHg49_llnOpXw549Q.png" /><figcaption>sqlite3.dll Persistence function</figcaption></figure><p><strong>Thread Injection</strong></p><p>This routine opens 1.txt (packed shellcode), reads it, and uses VirtualAlloc to grab an RWX memory chunk. It copies the payload into that buffer, then kicks off a new thread that starts executing from there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*pDKvLOw1dD3XkcYBGsoHdA.png" /><figcaption>1.txt loaded into memory</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*2M5tMEDv22GBEwEC6zUHBg.png" /><figcaption>Thread Execution</figcaption></figure><h3>Sainbox and PurpleFox Payloads</h3><p>The actual execution, including functionality for both of the payloads is stuffed into 1.txt which is injected into memory via sqlite3.dll. Inside of 1.txt there are three parts, the 32-bit and 64-bit driver files containing PurpleFox rootkit, and shell code containing Sainbox Rat. This shell code is created via an open source tool sRDI (Shellcode Reflective DLL Injection), which converts DLL files into shellcode.</p><h4><strong>Sainbox Rat</strong></h4><p>Extracting the shell code from 1.txt we get a 32-bit DLL file named Install.dll which is the Sainbox Rat payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*MqTwN7irxOf3-2LF8kudbw.png" /><figcaption>Sainbox payload metadata</figcaption></figure><p>The Sainbox shellcode drops a binary named GetMP.exe. This is just a renamed Mimikatz that which when launched, runs standard mimikatz commands.</p><blockquote>GetMP privilege::debug sekurlsa::logonpasswords exit</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*qhexHbEYdOh4stf-hNaMaQ.png" /><figcaption>Sainbox Mimikatz routine</figcaption></figure><p>Checks for the following security tools:</p><blockquote>360tray.exe, 360sd.exe, kxetray.exe, KSafeTray.exe, QQPCRTP.exe, HipsTray.exe, BaiduSd.exe, baiduSafeTray.exe, KvMonXP.exe, RavMonD.exe, QUHLPSVC.EXE, QuickHeal, mssecess.exe, cfp.exe, SPIDer.exe, DR.WEB, acs.exe, Outpost, V3Svc.exe, AYAgent.aye, avgwdsvc.exe, f-secure.exe, F-Secure, avp.exe, Mcshield.exe, egui.exe, NOD32, knsdtray.exe, TMBMSRV.exe, avcenter.exe, ashDisp.exe, rtvscan.exe, remupd.exe, vsserv.exe, BitDefender, PSafeSysTray.exe, ad-watch.exe, K7TSecurity.exe, UnThreat.exe, UnThreat, MsMpEng.exe</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*TccIVPP93qkQ6tM759F2SQ.png" /><figcaption>Security tools check</figcaption></figure><p>Multiple functions observed that specifically target various user profile paths for deletion. This likely is designed to specifically slow down forensics on infected hosts. Each application listed below:</p><blockquote>QQ.exe, Telegram.exe, Firefox.exe, Chrome.exe, Msedge.exe, SogouExplorer.exe, 360Chrome.exe, 360se6.exe</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*j6JI8wrpWSWQS540ZmgX1Q.png" /></figure><p>Remode desktop is enabled flipping the policy bit <strong>HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\fDenyTSConnections</strong> to <strong>0</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*_MPOIWZhe5EHj7xGVPbZxg.png" /><figcaption>Enabling RDP</figcaption></figure><p>The sample grabs its own executable path with GetModuleFileNameA, then builds a hidden PowerShell command that calls <strong>Add-MpPreference</strong> to whitelist itself pointing to that path.</p><blockquote>powershell -WindowStyle Hidden Add-MpPreference -ExclusionPath \%s\</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*RLtPE9Nei2xnqOI6eOrkvA.png" /><figcaption>Add to Defender exclusion path</figcaption></figure><h4><strong>PurpleFox</strong></h4><p>PurpleFox starts by setting itself up as a hidden system device named QAssist inside the kernel. That program then sends commands to QAssist to turn on its stealth features and tell it exactly what files, processes, and registry entries to hide.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*WzWlq4OjUymopQbkI7SuNw.png" /><figcaption>PurpleFox device registration</figcaption></figure><p>As a kernel-level rootkit, PurpleFox’s main role is evasion. It uses the following set of commands to manipulate the operating system and actively hides its presence and malicious actions from security tooling:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/369/1*KsXXNLyi5CyTkXmZqHyBCw.png" /><figcaption>PurpleFox Settings</figcaption></figure><ul><li>Hid_State — Activates driver</li><li>Hid_StealthMode — Self-stealth mode</li><li>Hid_HideFsDirs — Hides directory</li><li>Hid_HideFsFiles — Hides file</li><li>Hid_HideRegKeys — Hides registry key</li><li>Hid_HideRegValues — Hides registry value</li><li>Hid_IgnoredImages — Specifies exception process</li><li>Hid_ProtectedImages — Specifies protection process</li><li>Hid_HideImages — Hides process</li></ul><h3>Conclusion</h3><p>The “DeepSeek Deception” campaign illustrates the continued evolution and effectiveness of legacy malware like Gh0st RAT, which has been adapted into the powerful Sainbox RAT. The sample analysis clearly demonstrates a sophisticated multi-stage infection chain: leveraging a convincing fake MSI installer to execute a DLL sideloading attack via a benign host process (mctty.exe). The core of this infection chain is the dual payload, injected from the packed file 1.txt, which deploys both the Sainbox RAT for remote control, credential theft (via Mimikatz), security tool evasion, and destructive actions, and the PurpleFox rootkit for kernel-level persistence and the ultimate concealment of the entire compromise.</p><h3>IOCs</h3><pre>SHA256<br>- ChromeSetup-6581.msi - 42faf503afd58bc7aa37f5d4340be11895cae9d29da75bfaa97180671172304c<br>- sqlite3.dll - 0aedfcd4fd87d514d611ffb5605f0a956710685f37dead4c410cd9f890568b06<br>- 1.txt - f55d496329e1e9f1ebe9713b47f160f4e23cdab828b338111156cbf850a9c85e<br>- mctty.exe - c123f39c6ef4b00863848d0146062a65d201931f78f1eb348f6a57e22e700481<br>- 32.sys - 15af9964bcf4938d3b4ab9bb15dc0f297d7ca596a86f8f1d9572f957f5441ddd<br>- 64.sys - 1006caa9f350f4e166704b0f35d10814982f6e238c06001b2508001f0104182b<br><br>Domain<br>- ee[.]bsjdwn[.]com<br><br>IP<br>- 45.207.12.71</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1155d091e3e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VIPKeylogger Injection Analysis]]></title>
            <link>https://medium.com/@atlas64/vipkeylogger-injection-analysis-a52f428e10a6?source=rss-6659d8f8d0af------2</link>
            <guid isPermaLink="false">https://medium.com/p/a52f428e10a6</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[cybercrime]]></category>
            <dc:creator><![CDATA[atlas]]></dc:creator>
            <pubDate>Wed, 30 Jul 2025 20:21:10 GMT</pubDate>
            <atom:updated>2025-07-30T20:21:10.010Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*56pW4h1kG5fZrkAo" /></figure><h3>Executive Summary</h3><p>VIPKeylogger is a .NET-based credential stealer and keylogger that emerged in late 2023, initially misclassified as SnakeKeylogger due to its similar use of in-memory execution, credential harvesting, and obfuscated loaders. Now recognized as a unique strain, VIPKeylogger mirrors many of Snake’s capabilities but distinguishes itself through more modern delivery mechanisms, including steganography-based staging and flexible loader variants.</p><p>The malware uses multi-stage loaders — most commonly obfuscated .NET droppers protected with .NET Reactor, but also observed in compiled AutoIt binaries. These loaders retrieve encrypted payloads (often disguised as MP3 or image files) from hardcoded URLs, decrypt them using RC2 in CBC mode, and load the resulting .NET assemblies directly into memory using reflection. AutoIt-based variants follow a similar model but employ XOR-based decryption and in-memory injection into trusted processes like RegSvcs.exe.</p><p>Once deployed, VIPKeylogger activates a broad information theft routine: keystroke logging, screenshot capture, clipboard scraping, and extraction of credentials from browsers and Outlook profiles. It performs light reconnaissance — such as IP and locale discovery — and typically exfiltrates data via the Telegram Bot API, with some samples supporting SMTP or HTTP-based fallback channels.</p><h3><strong>Sample 1 AutoIT Dropper</strong></h3><pre>ExifTool Version Number         : 13.30<br>File Name                       : RFQ 2507-4624.exe<br>Directory                       : .<br>File Size                       : 1037 kB<br>File Modification Date/Time     : 2025:07:25 01:00:10-07:00<br>File Access Date/Time           : 2025:07:24 18:51:39-07:00<br>File Creation Date/Time         : 2025:07:24 18:00:41-07:00<br>File Permissions                : -rw-rw-rw-<br>File Type                       : Win32 EXE<br>File Type Extension             : exe<br>MIME Type                       : application/octet-stream<br>Machine Type                    : Intel 386 or later, and compatibles<br>Time Stamp                      : 2025:07:23 19:59:27-07:00<br>Image File Characteristics      : Executable, Large address aware, 32-bit<br>PE Type                         : PE32</pre><p>The first sample analyzed is a VIPKeylogger variant delivered as a compiled AutoIt executable. This dropper initiates the infection chain by launching a .NET payload into memory, ultimately injecting it into legitimate Windows processes. The payload exhibits typical info stealer behavior — credential theft, system reconnaissance, and exfil via Telegram.</p><p>When inspecting this sample with PEStudio, several suspicious API imports stand out — including GetKeyboardState, RegisterHotKey, AttachThreadInput, and mouse_event—all commonly associated with keylogging and user input monitoring. Running the binary through Detect It Easy confirms that the file is a compiled <strong>AutoIt script</strong>, commonly used by commodity malware for simple droppers and loaders.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*y7q2Qns19zsYTVgtK9BWpg.png" /><figcaption>Suspicious imports (PEStudio)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*FIeaZCWLcrmlGf4JRfSoGw.png" /><figcaption>Detectiteasy file detector</figcaption></figure><p>To analyze the underlying logic of the compiled AutoIt dropper, we can use <strong>autoit-ripper.exe</strong>, a tool specifically designed to extract embedded .au3 source code from AutoIt executables. When applied to this sample, the ripper successfully recovers the original script, revealing a heavily<strong> </strong>obfuscated AutoIt payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VLTSEmeuFE3IkHy8bR8jEA.png" /><figcaption>Extracting script via autoit-ripper.exe</figcaption></figure><p>The extracted script uses heavy obfuscation — random function names, meaningless math calls, and deep nested loops — to thwart static analysis before unpacking and injecting the SnakeKeylogger .NET payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*pkRL3W53Y7TTEf_dto776Q.png" /><figcaption>Obfuscated XOR decryption calls mixed with hidden DLL invocations</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*SP2ZC_BNCNRxl7T98ak-AA.png" /><figcaption>XOR‑based payload decryption routine</figcaption></figure><p>This de‑obfuscated AutoIt loader implements an in‑memory injection workflow: it first decrypts an embedded payload (“Vevine”) using an XOR loop (key starts at 57, +13 per byte), then allocates an RWX memory region via VirtualAlloc and writes the decrypted shellcode into that space with WriteProcessMemory. Execution is transferred to the payload by abusing CallWindowProc, enabling the shellcode to run entirely in‑process without touching disk. Simultaneously, the script drops a second helper binary (“thixophobia”).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*C9aVwTqKeVAFi_12cGe6qw.png" /><figcaption>Deobfuscated AutoIT script</figcaption></figure><p>Once decryption and memory setup are complete, the loader hands off execution to a stub that targets the legitimate RegSvcs.exe process. This stub carries out a classic remote thread injection: it locates RegSvcs.exe, opens a handle with full access, allocates executable memory inside it, writes in the decrypted “Vevine” and “thixophobia” payloads, and kicks off execution via a remote thread. With the payload now running from a trusted Windows binary in memory, it moves into credential theft—logging keystrokes, grabbing clipboard contents, pulling saved browser passwords, followed by calls to the telegram API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*30Amh9jwug0F4sU6nIhZbQ.png" /><figcaption>RegSvcs.exe running payload in memory (Procmon)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*_FBJyx41iWEm53zMWH7o7Q.png" /><figcaption>Payload files dropped to AppData\Local\Temp</figcaption></figure><h3>Sample 2 .NET Dropper</h3><pre>File Name                       : PO NO. 72 Dtd. 25.07.2025 SABSRT Industries LL.exe<br>Directory                       : .<br>File Size                       : 18 kB<br>File Modification Date/Time     : 2025:04:25 22:55:59-07:00<br>File Access Date/Time           : 2025:07:28 20:41:48-07:00<br>File Creation Date/Time         : 2025:07:27 11:52:34-07:00<br>File Permissions                : -rw-rw-rw-<br>File Type                       : Win64 EXE<br>File Type Extension             : exe<br>MIME Type                       : application/octet-stream<br>Machine Type                    : AMD AMD64<br>Time Stamp                      : 2025:07:24 22:55:29-07:00<br>Image File Characteristics      : Executable, No line numbers, No symbols, Large address aware<br>PE Type                         : PE32+</pre><p>Looking at the next sample Detect It Easy shows this dropper file is a 64‑bit C# executable compiled for .NET 4.6 and it looks like this may be obfuscated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*Hq8STMQrQUwYkoa-BN7XmA.png" /><figcaption>Detectiteasy file detector</figcaption></figure><p>Opening the file in dnSpy reveals that the method, UnSetAlphabeticProvider, instantiates a WebClient, sets a macOS Chrome 114 user‑agent string to disguise the request, and fetches <strong>http://196.251.92.69/Jrvzmiiron.mp3</strong>. Despite its audio extension, the file is treated strictly as a byte array. Immediately after retrieval, the blob is passed to an RC2 decryption routine (CBC mode with PKCS7 padding) that leverages hard‑coded key (WjNURr7LxuuaJBZburQsIQ==) and IV (uidRXfeo1kc=) values, both embedded in Base64. Successful decryption yields a fully formed .NET assembly, which the loader executes in memory through Assembly.Load and reflective invocation, bypassing the filesystem entirely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*HaGBX3lWB2l5n_gC4-dFxw.png" /><figcaption>Webclient call pulling next stage payload</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*qlaL7o63Fk67oIIciw1rbQ.png" /><figcaption>Decryption routine</figcaption></figure><p>To get this payload as an actual file we can create a python script based on the functionality seen in the .NET loader file. This script accepts a target URL and output file paths, then downloads the encrypted resource and attempts RC2 decryption using the same hard-coded Base64-encoded key and IV values (WjNURr7LxuuaJBZburQsIQ== and uidRXfeo1kc=) extracted from the original C# sample. Once downloaded, the raw byte content is passed into a decrypt_rc2_cbc function which mirrors the decryption logic used in the malware—CBC mode with PKCS7 padding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*Ti2QjDiZ6JzM2oZPTiNaaw.png" /><figcaption>Python script running decryption routine</figcaption></figure><p>After decrypting the payload we can run Detect it easy against it showing this is a <strong>32-bit .NET DLL</strong> built for the .NET Framework 4.0. Additionally this looks to be potentially obfuscated and packed ((Heur)Cryptor: Encrypted or packed data[Assembly invoke + RSACryptoServiceProvider + DeflateStream + Section 0 (“.text”) compressed]).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*uxi48wKbC8hTAq4CBlRESA.png" /><figcaption>Detectiteasy file detector</figcaption></figure><p>Using de4dot we clean up a bit of the obfuscation taking place in the DLL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*hJHs-fsiNw1UpnLEZOnGyA.png" /><figcaption>de4dot obfuscation cleanup</figcaption></figure><p>This C# loader acts as the decryption and execution stage for the VIPKeyLogger payload. It starts by initializing crypto settings and then pulls an encrypted blob — either from an embedded resource or a local file. Using hardcoded AES keys and IVs, it decrypts this payload via a CryptoStream and loads it into memory using reflection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*Y09AGKGTP9OgEWShjL_WWQ.png" /><figcaption>Payload loaded into memory</figcaption></figure><p>After decrypting and loading the payload into memory, the malware moves into its next stage: code injection. Specifically, it targets the legitimate .NET utility InstallUtil.exe—a known LOLBin often abused in post-exploitation. The payload creates a remote thread within the InstallUtil.exe process, allowing it to execute malicious code in the context of a trusted binary.</p><p>From the thread injection the InstallUtil process runs the VIPKeylogger payload and begins enumerating browser credential paths and Outlook profile registry keys. This data is exfiltrated via HTTPs traffic to the Telegram API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2NE71wVVdVx5-D3d2eRRTA.png" /><figcaption>Thread injection into InstallUtil.exe (Procmon data)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*q943Y_0tskkZQRHRkHbb2g.png" /><figcaption>Enumerating Web Data Paths</figcaption></figure><p>Browser paths searched:</p><ul><li>Google Chrome</li><li>CocCoc</li><li>Tencent QQBrowser</li><li>Orbitum</li><li>Amigo</li><li>Xpoml</li><li>Nichrome</li><li>Uran</li><li>Iridium</li><li>Chromium</li><li>Comodo</li><li>7Star</li><li>CentBrowser</li><li>Elements</li><li>SuperBird</li><li>SlimBrowser</li><li>Brave</li><li>Epic Privacy Browser</li><li>Vivaldi</li><li>Sleipnir</li><li>Coowon</li><li>QIP Surf</li></ul><p>During live execution a notable action observed was a startup script added which will run the executable Data.exe as a argument to rundll32.exe, though this file is never actually written to disc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*T-Z5u-pFWDcEAWV5590TLg.png" /><figcaption>Startup VBS script created for persistence</figcaption></figure><p>Inspecting the strings in memory for InstallUtil.exe, we see evidence of VIPKeylogger’s credential harvesting functionality. The payload targets a wide array of Chromium- and Gecko-based browsers including Chrome, Edge, Brave, Firefox, and numerous offshoots like CocCoc, QQBrowser, Orbitum, and Iridium. It seeks out browser data directories to extract saved passwords (Login Data), cookies (Network\Cookies), autofill records, credit card entries (Web Data), and browsing history. Beyond browsers, it extends its reach into Outlook and Thunderbird profiles, Pidgin accounts, FileZilla configurations, and Discord’s LevelDB files to extract tokens. Exfiltration is handled via HTTPS POST requests to both Telegram and Discord, utilizing embedded bot tokens and webhook URLs. This also includes clipboard monitoring and keystroke logging features, with exfiltrated logs consistently labeled under the “VIP Recovery” tag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*gcct6IZipn4eWzOB9_COKw.png" /><figcaption>Strings in memory (Process Explorer)</figcaption></figure><h4>Conclusion</h4><p>Across both .NET and AutoIt variants, VIPKeylogger relies heavily on process injection to run its payloads under the guise of legitimate Windows binaries. From remote thread creation into <em>RegSvcs.exe</em> by AutoIt droppers to reflective loading and injection into <em>InstallUtil.exe</em> by .NET loaders, each sample maintains an in-memory execution profile with minimal disk footprint. This injection behavior not only enables credential theft from browsers, email clients, and messaging platforms, but also helps the malware remain hidden during active sessions.</p><h3>IOCs</h3><pre>SHA256<br>4855db599a56574be53bc438ceeceb06c55e849c84bd77171ac41b494e03ec89 - RFQ 2507-4624.zip<br>69a780be4f99360e50d944f4549cbe0909d5634e2e5a25d56ef61e439bf13140 - REQ. 056.exe<br>a7ed313ee26e6a2d9d4d2b4d5a11a40f1990113da591017d8ecdd061eab32504 - PO NO. 72 Dtd. 25.07.2025 SABSRT Industries LL.exe<br><br>URLs<br>ht\tps://reallyfreegeoip[.]org/xml/[IP]<br>ht\tp://checkip.dyndns[.]org/<br>ht\tps://api.telegram[.]org/bot/sendMessage?chat_id=<br>ht\tp://196.251.92[.]69/Jrvzmiiron[.]mp3</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a52f428e10a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hunting for Info-Stealer Malware: LimaCharlie EDR and Sysmon]]></title>
            <link>https://medium.com/@atlas64/hunting-for-info-stealer-malware-limacharlie-edr-and-sysmon-c5c621fea74a?source=rss-6659d8f8d0af------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5c621fea74a</guid>
            <category><![CDATA[threat-hunting]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[limacharlie]]></category>
            <category><![CDATA[edr]]></category>
            <dc:creator><![CDATA[atlas]]></dc:creator>
            <pubDate>Mon, 02 Dec 2024 13:25:08 GMT</pubDate>
            <atom:updated>2024-12-02T13:25:08.509Z</atom:updated>
            <content:encoded><![CDATA[<p>Info stealers targeting browser credentials have been on the rise. Some of the most notable ones include Lumma, Raccoon, and RedLine. These malware variants are designed to harvest stored credentials from web browsers, making it easier for attackers to gain unauthorized access to various accounts.</p><p>For example, the Lumma Stealer malware has been observed in recent infections, such as <a href="https://www.mcafee.com/blogs/other-blogs/mcafee-labs/behind-the-captcha-a-clever-gateway-of-malware/">ClickFix</a>. Cybercriminals use deceptive CAPTCHA pages to trick users into executing malicious scripts, ultimately leading to the installation of Lumma Stealer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*TdGGdCljEO27dpZbRF7t5Q.png" /><figcaption>Fake CAPTCHA page (Source: <a href="https://www.mcafee.com/blogs/other-blogs/mcafee-labs/behind-the-captcha-a-clever-gateway-of-malware/">McAfee</a>)</figcaption></figure><h3>Info-Stealer Lab</h3><p>In this lab, we will simulate the LummaStealer infection chain using Meterpreter as our payload and perform credential theft using the enum_browsers post-exploitation module. By leveraging <a href="https://limacharlie.io/">LimaCharlie</a>, we can observe what is detected out of the box and utilize Windows File auditing and Sysmon to hunt for and detect LummaStealer malware.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*-EDk8bUN_50Ro_8DfgQayg.png" /><figcaption>LummaStealer Infection Chain (Source: <a href="https://www.mcafee.com/blogs/other-blogs/mcafee-labs/behind-the-captcha-a-clever-gateway-of-malware/">McAfee</a>)</figcaption></figure><p>On an instance of Kali Linux I have created the following files:</p><ul><li>DriverUpdate_1_2.exe — Meterpreter Payload</li><li>runme.txt — Powershell command to be copied to clipboard</li><li>File.txt — Powershell invoked remotely to pull down and execute meterpreter payload.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*wSpD9ZFzgf9Fsf4-B5U6Kw.png" /><figcaption>runme.txt — Powershell copied to clipboard</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*bUddwGhHcOTF3S86DG_ndQ.png" /><figcaption>File.txt — Script invoked remotely</figcaption></figure><p>Additionally in LimaCharlie I have configured the following <a href="https://docs.limacharlie.io/v1/docs/telemetry-artifacts">artifact collection rules</a>:</p><ul><li>wel://Security:*</li><li>wel://Microsoft-Windows-Sysmon/Operational:*</li></ul><p>For Sysmon on each endpoint we will be utilizing the configuration from SwiftOnSecurity which can be downloaded <a href="https://github.com/SwiftOnSecurity/sysmon-config">here</a>. Below I will add links for how to setup LimaCharlie, and Sysmon respectively.</p><ul><li><a href="https://docs.limacharlie.io/docs/quickstart">https://docs.limacharlie.io/docs/quickstart</a></li><li><a href="https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon">https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon</a></li></ul><h3>Detonation with LimaCharlie</h3><p>Awaiting the connections from our victim host, on our Kali machine I have stood up an HTTP server as well as a meterpreter listener.</p><ul><li>We execute the fake captcha powershell commands on our victim host:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*Ecis8i3nm5fvLfUU6eYndQ.png" /><figcaption>Simulated LummaStealer fake CAPTCHA powershell command</figcaption></figure><ul><li>And we have a successful connection now in Meterpreter to this host:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*5RBOxweMEoa6T-i53OzWmw.png" /><figcaption>Meterpreter shell</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*TRqOl2YfzotvMqxizp_yjA.png" /><figcaption>Stealing browser credentials</figcaption></figure><p>After we have successfully stolen credentials on our victim host, let’s look and see if LimaCharlie alerted on any of this behavior. We detected 4 alerts, all against the initial powershell command invoked via the ‘Run’ feature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*SN5ey_yLzZppiL34d7kH0g.png" /><figcaption>LimaCharlie Alerts</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Up9uvre_h_cQH_3v7FAC8A.png" /><figcaption>Process Tree — LimaCharlie</figcaption></figure><p>While we successfully detected the attack, there was no indication that it managed to steal browser credentials from Msedge. Unfortunately, LimaCharlie EDR lacks the capability to monitor file read events, which significantly limits the scope of detecting such suspicious behavior. However, LimaCharlie does allows us to ingest additional Windows Event logs. To work-around this, we can set up file auditing on the specific paths known to be targeted for browser credential theft, and write detection rules for this activity.</p><ul><li>Chrome:</li></ul><blockquote>C:\Users\&lt;UserName&gt;\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies</blockquote><blockquote>C:\Users\&lt;UserName&gt;\AppData\Local\Google\Chrome\User Data\Default\Login Data</blockquote><ul><li>Edge:</li></ul><blockquote>C:\Users\&lt;UserName&gt;\AppData\Local\Microsoft\Edge\User Data\Default\Network\Cookies</blockquote><blockquote>C:\Users\&lt;UserName&gt;\AppData\Local\Microsoft\Edge\User Data\Default\Login Data</blockquote><p>Another gap in detection here, is our malicious powershell process from the “Run” feature. When observing this in LimaCharlie, it seemingly comes from nowhere when looking at this from an investigators perspective. We can actually monitor for the activation of the “Run” feature from the Windows registry under the “RunMRU” key:</p><blockquote>HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU</blockquote><p>Whereas LimaCharlie is capable of logging and alerting against registry events, it does not seem to track this registry key. With a slight modification to our Sysmon config we can track modifications to this key, and alert on this behavior.</p><h3>Windows File Audit Configuration</h3><p>In order to detect suspicious processes accessing browser credential files, we will need to first enable file system auditing, then configure the specific paths we want the system to log activity for. Configuring auditing to these file paths will generate <a href="https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4663">Event ID 4663</a> which will log files being accessed and the processes which are accessing them.</p><p>We can configure this per host, though this quickly becomes exponentially more difficult when you consider deploying to a fleet of hundreds to thousands of endpoints. To deploy these changes to hosts in our environment we can push this through a group policy. For this lab I will just modify the default domain policy on the Domain Controller in my lab environment.</p><p>On the domain controller we can change this group policy by following the path:</p><blockquote>Group Policy Management -&gt; Edit Domain Policy -&gt; Computer Configuration -&gt; Policies -&gt; Windows Settings -&gt; Security Settings -&gt; Advanced Audit Policy Configuration -&gt; Audit Policies -&gt; Object Access -&gt; Audit File System</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*JnSefuPdx7QrqMVbuvFWjw.png" /><figcaption>Group Policy Editor</figcaption></figure><p>Now that we have enabled file system auditing the next step is monitoring for browser file paths. To make this a uniform setup for all of our endpoints we can also add a logon script this group policy. With the powershell script below, each time a user logs on to a host this script will run which will then start logging for these paths.</p><h4>Configure-SACLs.ps1</h4><pre># Ensure the script can run by setting the execution policy<br>Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine<br><br># Define the paths and permissions<br>$paths = @(<br><br>    &quot;$env:LOCALAPPDATA\Google\Chrome\User Data\Default\Network\&quot;,<br>    &quot;$env:LOCALAPPDATA\Google\Chrome\User Data\Default\&quot;,<br>    &quot;$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Network\&quot;,<br>    &quot;$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\&quot;<br>)<br><br>$principal = &quot;Everyone&quot;<br>$permissions = &quot;Read&quot;<br><br># Function to set audit permissions<br>function Set-AuditPermissions {<br>    param (<br>        [string]$itemPath,<br>        [string]$principal,<br>        [string]$permissions<br>    )<br><br>    # Create a new FileSystemAuditRule<br>    $auditRule = New-Object System.Security.AccessControl.FileSystemAuditRule($principal, $permissions, &quot;None&quot;, &quot;None&quot;, &quot;Success&quot;)<br><br>    # Get the current access control settings<br>    $acl = Get-Acl -Path $itemPath<br><br>    # Add the new audit rule<br>    $acl.AddAuditRule($auditRule)<br><br>    # Set the new access control settings<br>    Set-Acl -Path $itemPath -AclObject $acl<br>}<br><br><br># Apply audit permissions to the specified paths<br>foreach ($path in $paths) {<br>    if (Test-Path -Path $path) {<br>        $items = Get-ChildItem -Path $path -Recurse -Force<br>        Set-AuditPermissions -itemPath $path -principal $principal -permissions $permissions<br><br>        # Apply audit permissions to all items (subdirectories and files) recursively<br>        foreach ($item in $items) {<br>            Set-AuditPermissions -itemPath $item.FullName -principal $principal -permissions $permissions<br>        }<br>        Write-Output &quot;Audit permissions have been applied to $path and all its subdirectories and files.&quot;<br>    } else {<br>        Write-Output &quot;Path $path does not exist. Skipping...&quot;<br>    }<br>}</pre><p>This script sets up audit permissions for paths related to Chrome and Edge credentials to monitor file read events. It defines the paths, sets the execution policy to allow the script to run, and uses Windows ACLs (Access Control Lists) to apply read audit permissions for the “Everyone” group. Windows ACLs are a way to define permissions and audit settings on files and directories.</p><p>Now with our logon script, we can put this in a location easily accessible across the environment. I have placed this in the share path:</p><blockquote>\\hl-dc02\LoginScripts\Configure-SACLs.ps1</blockquote><p>Next we just need to add this as a logon script within our group policy:</p><blockquote>Group Policy Management -&gt; Edit Domain Policy -&gt; User Configuration -&gt; Policies -&gt; Windows Settings -&gt; Scripts (Logon/Logoff)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*W8byrk1iVBPZ4zHCEBk7gQ.png" /></figure><p>To verify we are logging this path we can run the following LCQL query which looks for Windows Event Logs Event ID 4633 where the path of the object read contains “User Data\\Default”.</p><blockquote>-4h | plat == windows | WEL | event/EVENT/System/EventID == &quot;4663&quot; AND event/EVENT/EventData/ObjectName contains &quot;User Data\\Default&quot; | ts as ts event/EVENT/EventData/ObjectType as Type event/EVENT/EventData/ProcessName as Process event/EVENT/EventData/ObjectName as Object event/EVENT/EventData as event</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TyLmABWDqxwueOM-tFAQiA.png" /></figure><p>We should see quite a few results coming back now to confirm this is monitoring file read events in this path. Now that we are logging access to these paths we can write rules that will detect suspicious processes accessing browser credential paths. I have written the rule below which looks specifically for this behavior with LCQL.</p><blockquote>-24h | plat == windows | WEL | event/EVENT/System/EventID == &quot;4663&quot; and event/EVENT/EventData/ProcessName not contains &quot;msedge.exe&quot; and event/EVENT/EventData/ProcessName not contains &quot;chrome.exe&quot; and event/EVENT/EventData/ProcessName not contains &quot;MsMpEng.exe&quot; and event/EVENT/EventData/ProcessName not contains &quot;explorer.exe&quot; and event/EVENT/EventData/ObjectName contains &quot;User Data\\Default&quot; and (event/EVENT/EventData/ObjectName contains &quot;Login Data&quot; or event/EVENT/EventData/ObjectName contains &quot;Cookies&quot;) | ts as ts event/EVENT/EventData/ObjectType as Type event/EVENT/EventData/ProcessName as Process event/EVENT/EventData/ObjectName as Object event/EVENT/EventData as event</blockquote><p>With our query made, LimaCharlie actually has a wonderful feature in the Query Console to start a detection rule directly based off of a LCQL being ran:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/307/1*RLSS2XJ_9xeqYeZc3Xj1jA.png" /><figcaption>D&amp;R rule button</figcaption></figure><p>From this we auto-generate the following detection rule:</p><h4>Suspicious Browser Credential Access</h4><p>Detect:</p><pre>events:<br>  - WEL<br>op: and<br>rules:<br>  - case sensitive: false<br>    op: is<br>    path: event/EVENT/System/EventID<br>    value: &#39;4663&#39;<br>  - op: and<br>    rules:<br>      - case sensitive: false<br>        not: true<br>        op: contains<br>        path: event/EVENT/EventData/ProcessName<br>        value: msedge.exe<br>      - op: and<br>        rules:<br>          - case sensitive: false<br>            not: true<br>            op: contains<br>            path: event/EVENT/EventData/ProcessName<br>            value: chrome.exe<br>          - op: and<br>            rules:<br>              - case sensitive: false<br>                not: true<br>                op: contains<br>                path: event/EVENT/EventData/ProcessName<br>                value: MsMpEng.exe<br>              - op: and<br>                rules:<br>                  - case sensitive: false<br>                    not: true<br>                    op: contains<br>                    path: event/EVENT/EventData/ProcessName<br>                    value: explorer.exe<br>                  - op: and<br>                    rules:<br>                      - case sensitive: false<br>                        not: true<br>                        op: contains<br>                        path: event/EVENT/EventData/ProcessName<br>                        value: SearchProtocolHost.exe<br>                      - op: and<br>                        rules:<br>                          - case sensitive: false<br>                            op: contains<br>                            path: event/EVENT/EventData/ObjectName<br>                            value: User Data\Default<br>                          - op: or<br>                            rules:<br>                              - case sensitive: false<br>                                op: contains<br>                                path: event/EVENT/EventData/ObjectName<br>                                value: Login Data<br>                              - case sensitive: false<br>                                op: contains<br>                                path: event/EVENT/EventData/ObjectName<br>                                value: Cookies</pre><p>Respond:</p><pre>- action: report<br>  metadata:<br>    description: Detects suspicious access to browser credential files<br>    falsepositives:<br>      - Unknown<br>    level: high<br>  name: Suspicious Browser Credential Access</pre><h3>Sysmon Registry Monitoring</h3><p>When we initiate the first powershell process, we ran this from the “Run” feature in Windows, this is where we initiated the first call to run the malicious commands from the File.txt file we were hosting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*Ecis8i3nm5fvLfUU6eYndQ.png" /><figcaption>Simulated LummaStealer fake CAPTCHA powershell command</figcaption></figure><p>Windows tracks activity related to the Run dialog box in the registry key <em>Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU. </em>With a minor addition to the configuration from SwiftOnSecurity to look for events related to this registry key, we can detect this suspicious indicator.</p><p>By adding the line below to our configuration file we can start logging events related to the use of the “Run” feature.</p><blockquote>&lt;TargetObject name=”RunMRU” condition=”contains”&gt;RunMRU&lt;/TargetObject&gt;</blockquote><p>Running the command below we can update the Sysmon configuration:</p><blockquote>.\sysmon.exe -c config.xml</blockquote><p>Now running the following query we can look for these registry events:</p><blockquote>-24h | plat == windows | WEL | (event/EVENT/System/EventID == “12” OR event/EVENT/System/EventID == “14” OR event/EVENT/System/EventID == “13”) AND event/EVENT/EventData/TargetObject contains “CurrentVersion\\Explorer\\RunMRU” | ts as timestamp event/EVENT/System/EventID event/EVENT/EventData/EventType as EventType event/EVENT/EventData/TargetObject as TargetObject event/EVENT/EventData/Details as Details event/EVENT/System/Computer as Host</blockquote><p>We can see that this is logging what we input into the Run dialog box:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*cuHueSCi54lLuZWNDteIQA.png" /><figcaption>Running notepad.exe</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*O8biosxJUjAiHtkL62h41g.png" /><figcaption>LimaCharlie log of registry event</figcaption></figure><p>With the following query we can see suspicious shell execution being invoked from the “Run” feature:</p><blockquote>-24h | plat == windows | WEL | (event/EVENT/System/EventID == “12” OR event/EVENT/System/EventID == “14” OR event/EVENT/System/EventID == “13”) AND event/EVENT/EventData/TargetObject contains “CurrentVersion\\Explorer\\RunMRU” AND (event/EVENT/EventData/Details contains “powershell.exe” OR event/EVENT/EventData/Details contains “cmd.exe”) | ts as timestamp event/EVENT/System/EventID event/EVENT/EventData/EventType as EventType event/EVENT/EventData/TargetObject as TargetObject event/EVENT/EventData/Details as Details event/EVENT/System/Computer as Host</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*PhwpfetUfJ6mKsZMaxuGgA.png" /><figcaption>Powershell command from “Run”</figcaption></figure><p>We take this query and create our next detection rule:</p><h4><strong>Shell invoked via Run</strong></h4><p>Detect:</p><pre>events:<br>  - WEL<br>op: and<br>rules:<br>  - op: or<br>    rules:<br>      - case sensitive: false<br>        op: is<br>        path: event/EVENT/System/EventID<br>        value: &#39;12&#39;<br>      - op: or<br>        rules:<br>          - case sensitive: false<br>            op: is<br>            path: event/EVENT/System/EventID<br>            value: &#39;14&#39;<br>          - case sensitive: false<br>            op: is<br>            path: event/EVENT/System/EventID<br>            value: &#39;13&#39;<br>  - op: and<br>    rules:<br>      - case sensitive: false<br>        op: contains<br>        path: event/EVENT/EventData/TargetObject<br>        value: CurrentVersion\Explorer\RunMRU<br>      - op: or<br>        rules:<br>          - case sensitive: false<br>            op: contains<br>            path: event/EVENT/EventData/Details<br>            value: powershell.exe<br>          - case sensitive: false<br>            op: contains<br>            path: event/EVENT/EventData/Details<br>            value: cmd.exe</pre><p>Respond:</p><pre>- action: report<br> metadata:<br> description: Detects shell invoked via the Run dialog box.<br> falsepositives:<br> - Unknown<br> level: medium<br> name: Shell invoked via Run</pre><h3>Bring it all together</h3><p>Executing our payload again on the victim host we see both the alerts from earlier, as well as the new detections we created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*59FG4EZ4XUfnsjmeT6KMwg.png" /><figcaption>Detections</figcaption></figure><p><strong>Shell Invoked via Run</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*DSwBtkISUjfO5Sz0UCKWNg.png" /><figcaption><strong>Shell Invoked via Run — Detection</strong></figcaption></figure><p><strong>Suspicious Browser Credential Access</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*FYQjh2Wgq8JVfrOhKWoqOQ.png" /><figcaption><strong>Suspicious Browser Credential Access — Detection</strong></figcaption></figure><p>In this lab, we simulated the LummaStealer infection chain using Meterpreter as our payload and performed credential theft using the enum_browsers post-exploitation module. By leveraging LimaCharlie EDR, we were able to monitor the activity and significantly enhance detection capabilities by ingesting additional logging and creating detection rules against this behavior.</p><p>To detect artifacts associated with info-stealers, we created two detection rules in LimaCharlie:</p><ol><li><strong>Suspicious Browser Credential Access</strong>: This rule monitors access to browser credential files from suspicious processes.</li><li><strong>Shell Invoked via Run</strong>: This rule detects the execution of PowerShell or cmd.exe from the Windows “Run” feature.</li></ol><p>By focusing hunting on the behavior exhibited by this malware such as accessing suspicious Browser credential paths, and the registry modification as users leverage the “Run” feature, we are able to develop significantly more robust signatures than if we were to detect against static indicators.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5c621fea74a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Practical Malware Analysis & Triage]]></title>
            <link>https://medium.com/@atlas64/practical-malware-analysis-triage-a1a4aeb8db44?source=rss-6659d8f8d0af------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1a4aeb8db44</guid>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[pmat]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[atlas]]></dc:creator>
            <pubDate>Fri, 14 Jul 2023 02:24:33 GMT</pubDate>
            <atom:updated>2023-07-14T02:58:06.697Z</atom:updated>
            <content:encoded><![CDATA[<p>SikoMode InfoStealer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/0*Y3U9QuTJGn00fvCx" /></figure><h3>Executive Summary</h3><p>SikoMode is an information stealer malware first identified on July 2nd 2023. This was developed with the Nim programming language and runs on x64 Windows operating systems. SikoMode will first attempt to establish connection to a callback URL as an anti-analysis kill-switch (deleting itself from disk if it cannot establish this connection). If this connection is successful this will drop a file to C:\Users\Public\ called passwrd.txt containing the RC4 encryption key. This encryption key is used to create RC4 encrypted strings which are used to exfiltrate stolen data. These strings are then base-64 encoded and passed to the exfiltration domain via HTTP GET requests including the created string. This data is likely later scraped for reconstruction. Once the data is successfully exfiltrated or if the connection to the exfiltration URL is interrupted this will delete itself from disk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/0*2EgSiTe-BK-EAQIb" /></figure><h3>Malware Composition</h3><p>Sikomode consists of the following components:</p><h4>unknown.exe:</h4><p>Primary payload of SikoMode information stealer. Written in Nim and compiled with MinGW.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/0*Ae6NjDr_22x5pwI2" /><figcaption><em>Fig 1: DetectItEasy file detector</em></figcaption></figure><h4>passwrd.txt:</h4><p>Text file read and used for RC4 encryption.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/0*hQnWZRbxZMTqNJgk" /><figcaption><em>Fig 2: Text file containing RC4 encryption password</em></figcaption></figure><h3>Static Analysis</h3><p>Taking the binary unknown.exe into PEStudio there are several suspicious imports observed flagging MITRE techniques for Sandbox Evasion, Discovery, and Process Injection. Looking into the strings of this file we find a few interesting indicators about this file. This is seen importing Nim libraries, one of which is the RC4 library. There is a URI found as well which we will keep an eye out for during execution of this binary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*N3E6dKL1cEWQUCMj" /><figcaption><em>Figure 3: PEStudio Imports</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TvSbFi1c1-BXH4XK" /><figcaption><em>Figure 4: PEStudio Strings</em></figcaption></figure><p>Running the tool capa against this binary shows further rather interesting details, first this binary will check for breakpoints during execution, utilizes the luhn algorithm (determines whether or not a credit card number is valid), and can hash data with murmur3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/0*ujBUbo52mTnkA8HZ" /><figcaption><em>Figure 5: Capa output from unknown.exe</em></figcaption></figure><h3>Dynamic Analysis</h3><p>Upon initial execution with no network access this binary was observed waiting a moment and then deleting itself from disk. Running with network access we see this reach out to a suspicious URL with an HTTP GET request. This is a different URL than what was seen in the string output. This looks to be a kill switch URL for the malware.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/0*VB_rb5KvmmDteD9v" /><figcaption><em>Figure 6: Wireshark capture of killswitch URL</em></figcaption></figure><p>Going down a bit we see another suspicious URL this is reaching out to, the same one observed in the strings output. This traffic seems to continue over and over with different large strings getting passed into the URI each time. Interestingly enough these also are HTTP GET requests rather than POSTS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UkwG1pi_WNcLc9Jl" /><figcaption>Figure 7: Wireshare capture of exfiltration URL</figcaption></figure><p>Taking this string into Cyberchef and running magic in the recipe does show this as base64 but when attempting to decode this with base64 we get what looks to be encrypted data. We did see earlier in the strings output what looked to be an import for the toRC4 NIM library, this may be encrypted and then getting encoded in base64 then passed as strings in these GET requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/0*tmiCatFQ2W43O7r5" /><figcaption><em>Figure 8: Cyberchef decoded base64</em></figcaption></figure><p>During execution a few rather notable actions were observed. First is writing the file password.txt to the C:\Users\Public path, it looks like this is an attempt at evasion. Next we see this is opening the file cosmo.jpg from the Desktop. And finally this file actually deletes itself from disk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/0*cXl1o1q3s094XRTU" /><figcaption><em>Figure 9: Exfiltration traced in procmon</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uKa45ue7lD0i2_6h" /><figcaption><em>Figure 10: passwrd.txt file dropped into Public directory</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/0*MoYDBVf2eF_qEEaL" /><figcaption><em>Figure 11: File being sent over HTTP GET requests</em></figcaption></figure><h3>Binary Analysis</h3><p>Looking at the main function for this binary in cutter we can see where this calls the houdini function under three different conditions, this looks to be the function used to delete this file.. This first calls the killswitch URL, if this cant connect it will run houdini to delete the file. If it can make a successful connection after files have been exfiltrated it will delete itself. Finally if this loses connectivity to the exfiltration URL this will run houdini and delete itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jEr-NT-NS6JymtLP" /><figcaption>Figure 12: Main function in cutter</figcaption></figure><h3>Indicators of Compromise</h3><h4>Network Indicators</h4><p>ht/tp://update[.]ec12–4–109–278–3-ubuntu20–04[.]local</p><p>ht/tp://cdn[.]altimiter[.]local</p><h4>Host-based Indicators</h4><p>unknown.exe</p><p>SHA256 Hash: 3aca2a08cf296f1845d6171958ef0ffd1c8bdfc3e48bdd34a605cb1f7468213e</p><p>passwrd.txt</p><p>SHA256 Hash: 3aca2a08cf296f1845d6171958ef0ffd1c8bdfc3e48bdd34a605cb1f7468213e</p><h3>Yara Rules</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*7tI2KOyxVOk-3DDzBWn_VA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1a4aeb8db44" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>