code wiki / (root) / nx_decoy.nx

nx_decoy.nx

buildroot/runtime/nx_decoy.nx

8425 B204 linesdepth 2pulls 2 transitivereach 3 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_decoy.nx -- honeypot tripwires (aggressive-mimicry inverted). Biology: aggressive mimicry is when a PREDATOR mimics something harmless to lure prey close (anglerfish lure resembling a worm, photuris firefly mimicking female photinus flash patterns to eat the responding males). Substrate INVERTS this: WE are not the predator. WE are the prey. We plant fake-but-attractive artifacts that lure THE PREDATOR (Intel ME / vendor scanner / state-actor scraper). When the predator reads the lure, a tripwire fires. Per user 2026-05-19: "make sure that we have the system designed with mimicry and obsfucation so these predatory programs get nonsense or get scared off." The decoy IS the nonsense. Reading it is fine -- but the read is observed, signed, and recorded as confirmed-exfiltration into the forensic ledger. V1 decoy kinds (modeled on what surveillance scrapers target): - FAKE_CREDENTIALS_FILE (.aws/credentials shape; tripwire keys) - FAKE_SSH_PRIVATE_KEY (-----BEGIN OPENSSH PRIVATE KEY-----) - FAKE_BROWSER_COOKIES (Chrome SQLite shape; tripwire UUIDs) - FAKE_WALLET_FILE (Bitcoin wallet.dat shape; tripwire hashes) - FAKE_KEYSTORE (Java keystore / PKCS12 shape) - FAKE_SECRETS_BLOB (generic high-entropy looks-like-keys) - FAKE_PASSWORD_MANAGER (KeePass kdbx shape) The decoy payload is STATISTICALLY plausible (high entropy, right magic bytes, right size class) but FUNCTIONALLY useless. Any "credential" extracted is a tripwire token. If that token ever shows up downstream (auth attempt, dark-net listing, vendor research paper), it's confirmed forgery from THIS host THIS session. Composes: nx_methyl -- decoys carry deliberately-invalid methyl marks so leaked decoys are detectable as forgery nx_aposematism -- decoys ALSO carry warning displays so vendor ML might back off; if it doesn't, we get the forensic tripwire instead -- either outcome is a win nx_xenocell -- a decoy read promotes the reading xenocell to

dependencies 2 imports · 3 importers

nx_syscalls.nx nx_tier.nx nx_decoy.nx nx_decoy_test.nx nx_mimicry_compose_test.nx nx_tier1_immune_compose_test.nx

imports: nx_syscalls.nxnx_tier.nx

imported by: nx_decoy_test.nxnx_mimicry_compose_test.nxnx_tier1_immune_compose_test.nx

structs

109struct NxDecoy

consts

81const NX_DK_FAKE_CREDENTIALS: nx_int = 0
82const NX_DK_FAKE_SSH_KEY: nx_int = 1
83const NX_DK_FAKE_BROWSER_COOKIES: nx_int = 2
84const NX_DK_FAKE_WALLET: nx_int = 3
85const NX_DK_FAKE_KEYSTORE: nx_int = 4
86const NX_DK_FAKE_SECRETS_BLOB: nx_int = 5
87const NX_DK_FAKE_PASSWORD_MGR: nx_int = 6
88const NX_DK_N_KINDS: nx_int = 7
92const NX_DECOY_OK: nx_int = 0
93const NX_DECOY_ERR_BAD_KIND: nx_int = 1
94const NX_DECOY_TRIPWIRE_FIRED: nx_int = 2
95const NX_DECOY_ERR_BAD_TOKEN: nx_int = 3

functions

122func nx_decoy_kind_is_valid(k: nx_int) -> nx_int
called by 2: nx_decoy_plantmain
133func nx_decoy_plant(kind: nx_int,
160func nx_decoy_on_read(d: *NxDecoy,
called by 2: mainmain
172func nx_decoy_was_read(d: *NxDecoy) -> nx_int
called by 3: mainmainmain
185func nx_decoy_token_matches(d: *NxDecoy, token: nx_size) -> nx_int
called by 2: mainmain
193func nx_decoy_read_count(d: *NxDecoy) -> nx_int
called by 2: mainmain
202func nx_decoy_reader(d: *NxDecoy) -> nx_int
called by 2: mainmain