The attack scenario
Your agent checkpoints threat intelligence (malicious IPs, file hashes, attack patterns) viaclient.snapshot() and restores it on other devices or after a restart. Memory poisoning happens when an adversary modifies the replication database to inject false IOCs:
- False negatives — the attacker replaces a
CRITICALrecord for a known command-and-control IP with a benign entry, so the agent ignores traffic that should alert. - Denial of service — the attacker flags legitimate internal IPs as malicious, halting automated routing.
Implementation
Createsoc_agent.ts. Each threat indicator is one agent identity, so sequence_number gives you a natural update history per IOC, and agent_id is a stable hash of the IP you’re tracking — never the raw IP itself, since agent_id is visible to the server.
soc_agent.ts
Operational guidance for SOC environments
1
Fail closed — do not apply the record
The agent must not load the modified threat database or make routing decisions from unverified data.
queryThreatDatabase above throws before returning — decision logic downstream never receives the poisoned payload.2
Preserve the forensic trail
Log the expected and received hashes immediately — the delta is the primary evidence for pinpointing which replication log entry was compromised.
3
Recover via lineage rollback
Once the endpoint is secured, walk
client.lineage(agentId) to find the last known-good sequence_number and resume writes from there.