Recent research into the Rhadamanthys stealer malware has exposed the sophisticated anti-analysis methods used by its native Windows loader.
Rhadamanthys, a modular infostealer active since 2022, continues to evolve its evasion capabilities, making it increasingly difficult for security researchers and automated tools to analyze its behavior.
The latest version, v0.9.x, introduces a series of layered obfuscation techniques that disrupt both static and dynamic analysis, allowing the malware to remain undetected in many environments.
Advanced Obfuscation and Custom Encoding
The Rhadamanthys loader employs a combination of control-flow flattening and jump-target obfuscation to disrupt the logical structure of its code.
Control flow flattening removes direct relationships between code blocks, replacing them with a dispatcher that uses a state variable to determine which segment to execute next.
This dispatcher relies on high-entropy constants, making it nearly impossible for disassemblers and decompilers to reconstruct the original control flow graph.

Jump target obfuscation further complicates analysis by calculating jump destinations at runtime through memory lookups and key registers, rather than using fixed addresses.
Constant obfuscation is another key technique used by the loader. Instead of embedding static values directly in the code, the loader stores them in memory tables alongside unrelated data.
These values are only constructed at runtime, defeating fundamental static analysis and simplifying tools. This approach ensures that even if an analyst manages to extract the code, the constants remain hidden until execution.
The loader also encodes its embedded payloads using a custom binary-to-string algorithm. Unlike standard Base64 encoding, this algorithm allocates blocks of ASCII and symbol characters in a complex mapping, producing gibberish text strings within the binary.
Malware analysts do not document this encoding, and it is intentionally designed to frustrate automated decoding efforts. The result is a binary that appears to contain random text, making it challenging to identify and extract the actual payload.
Human-Interaction Detection and Delayed Execution
To evade automated AV sandboxes and emulation, the Rhadamanthys loader implements sophisticated timing and user interaction checks.
After startup, the malware registers an invisible window and schedules timers to collect mouse positions, foreground window changes, and timestamps every 30 milliseconds, repeating 1500 times.
This ensures the loader observes realistic, continuous cursor movement and window focus changes, which are common during real user activity but rare in emulated environments.
The loader then validates this behavior by requiring at least 30 mouse position changes and multiple unique foreground windows. If these conditions are not met, the loader re-enters extended monitoring intervals and runs more advanced checks, including Euclidean motion calculations.
Only after passing these checks does the loader decode and execute the primary stealer payload, using callback messages and queued function pointers to split operations and further complicate analysis.
Analysts warn that these anti-sandbox techniques allow Rhadamanthys to bypass standard behavioral checks and emulation traps, making detection and analysis far more resource-intensive.
Security teams are urged to update their tooling to address these increasingly advanced evasion systems as criminal stealer infrastructure continues to mature and professionalize.
Find this Story Interesting! Follow us on Google News , LinkedIn and X to Get More Instant Updates