Cybersecurity researchers at ANY.RUN has uncovered sophisticated new techniques employed by an advanced Android packer dubbed “Ducex,” discovered within samples of the notorious Triada malware family.
The packer, found embedded in a fake Telegram application, represents a significant evolution in mobile malware obfuscation capabilities and demonstrates the ongoing arms race between malware developers and security analysts.
Advanced Encryption and Anti-Analysis Measures
Ducex employs a multi-layered approach to evade detection and complicate analysis efforts.
The packer utilizes a modified RC4 algorithm with additional shuffling techniques to encrypt critical functions, making standard RC4 implementations ineffective against it.
Beyond function encryption, all strings within the packer are secured using a sequential XOR algorithm with changing 16-byte keys.
The malware’s anti-debugging capabilities are particularly sophisticated. Ducex performs APK signature verification, causing the application to crash if researchers attempt to modify and re-sign the package for analysis.
Additionally, the packer implements self-debugging mechanisms using fork and ptrace system calls, where parent and child processes monitor each other’s states.
This technique prevents external debuggers from attaching to the process, as Android systems allow only one tracer per process.
Most notably, Ducex actively scans memory for popular analysis tools, including Frida, Xposed, and Substrate.
Upon detecting any of these frameworks, the malware immediately terminates execution, effectively blocking dynamic analysis attempts that don’t involve direct APK modification.
Unique Payload Storage and Decryption Architecture
Unlike traditional malware packers that create separate encrypted files, Ducex stores the Triada payload within its classes, specifically, in an additional section following the main application code, within the dex file.

This approach helps avoid detection systems that specifically look for separate malicious files.
The payload consists of five Dex modules, with only the first 2,048 bytes of each module encrypted, while the remainder remains untouched.
This partial encryption strategy ensures that critical headers remain protected while optimizing performance.
The decryption process combines the modified RC4 algorithm with SM4, a Chinese block encryption standard identified by its distinctive substitution table.
The discovery of Ducex underscores the growing sophistication of mobile malware packers and their evolution toward increasingly robust anti-analysis techniques.
Security researchers emphasize that this level of obfuscation represents a significant challenge for traditional malware analysis workflows and underscores the need for advanced detection methodologies in mobile security frameworks.





