feat(go): port memory-map detector tranche
This commit is contained in:
parent
c6f7219de8
commit
6a27e6e770
13 changed files with 377 additions and 41 deletions
|
|
@ -35,6 +35,8 @@ interpreters = ["bash", "python3"]
|
|||
egress_allow_cidrs = ["203.0.113.0/24"]
|
||||
stealth_network_allow_comms = ["tcpdump"]
|
||||
stealth_network_allow_kinds = ["mptcp"]
|
||||
memory_obfuscation_allow_comms = ["jit-runtime"]
|
||||
memory_obfuscation_allow_paths = ["/tmp/known-profiler/"]
|
||||
unknown_future_key = true
|
||||
`)
|
||||
if err := os.WriteFile(path, raw, 0o600); err != nil {
|
||||
|
|
@ -64,6 +66,11 @@ unknown_future_key = true
|
|||
t.Fatalf("unexpected stealth tuning: %#v %#v",
|
||||
cfg.StealthNetworkAllowComms, cfg.StealthNetworkAllowKinds)
|
||||
}
|
||||
if !cfg.MemoryObfuscationAllowComms["jit-runtime"] || len(cfg.MemoryObfuscationAllowPaths) != 1 ||
|
||||
cfg.MemoryObfuscationAllowPaths[0] != "/tmp/known-profiler/" {
|
||||
t.Fatalf("unexpected memory tuning: %#v %#v",
|
||||
cfg.MemoryObfuscationAllowComms, cfg.MemoryObfuscationAllowPaths)
|
||||
}
|
||||
}
|
||||
|
||||
func TestMissingFileKeepsDefaults(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue