1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
//! XOR string obfuscation for security-sensitive constants.
//!
//! Strings are stored XOR-scrambled at compile time and decoded to plaintext
//! at runtime. This prevents trivial `strings`-tool extraction of debugger
//! names, pipe names, and registry paths from the compiled binary.
use Zeroize;
/// XOR key used for compile-time obfuscation.
pub const XOR_KEY: u8 = 0x5A;
/// XOR a fixed-size byte array at compile time.
pub const
/// Decode an XOR-obfuscated byte slice back to a `String` at runtime.
/// Decode an XOR-obfuscated byte slice, compare to `target`, then zero the
/// intermediate buffer so the plaintext does not linger in memory.
// ── Obfuscated string constants ───────────────────────────────────────────────
// All values are stored XOR-scrambled. Call `decode(&CONSTANT)` at runtime.
// Debugger / instrumentation process names
pub static FRIDA_SERVER: = xor_bytes;
pub static FRIDA_AGENT: = xor_bytes;
pub static GADGET: = xor_bytes;
pub static X64DBG: = xor_bytes;
pub static X32DBG: = xor_bytes;
pub static OLLYDBG: = xor_bytes;
pub static WINDBG: = xor_bytes;
pub static CHEATENGINE: = xor_bytes;
pub static IDA_PRO: = xor_bytes;
pub static DNSPY: = xor_bytes;
pub static PROCESSHACKER: = xor_bytes;
// Frida named pipe prefixes
pub static PIPE_FRIDA_PREFIX: = xor_bytes;
pub static PIPE_LINJECTOR_PREFIX: = xor_bytes;
// DLL names to check in loaded modules
pub static FRIDA_DLL: = xor_bytes;
pub static GADGET_DLL: = xor_bytes;
// VM process names
pub static VMTOOLSD: = xor_bytes;
pub static VMWARETRAY: = xor_bytes;
pub static VMWAREUSER: = xor_bytes;
pub static VBOXSERVICE: = xor_bytes;
pub static VBOXTRAY: = xor_bytes;
pub static VMUSRVC: = xor_bytes;
pub static VMSRVC: = xor_bytes;
// VM driver file paths
pub static VMMOUSE_SYS: = xor_bytes;
pub static VMHGFS_SYS: = xor_bytes;
pub static VBOXGUEST_SYS: = xor_bytes;
pub static VBOXMOUSE_SYS: = xor_bytes;
// VM CPUID vendor strings
pub static CPUID_VMWARE: = xor_bytes;
pub static CPUID_VBOX: = xor_bytes;
pub static CPUID_KVM: = xor_bytes;
pub static CPUID_HYPERV: = xor_bytes;
// VM MAC OUI prefixes (6 hex chars without colons)
pub static MAC_VBOX: = xor_bytes;
pub static MAC_VMWARE1: = xor_bytes;
pub static MAC_VMWARE2: = xor_bytes;
pub static MAC_QEMU: = xor_bytes;
// Registry path for MachineGuid (with trailing NUL padding to match const-array size)
pub static REG_MACHINE_GUID_PATH: =
xor_bytes;
pub static REG_MACHINE_GUID_KEY: = xor_bytes;