TLDR InfoSec · STRATEGIES & TACTICS

CREATING A “TWO-FACE” RUST BINARY ON LINUX

synacktiv.com8 min read

Summary from the TLDR InfoSec newsletter

A “two-face” binary is a binary that contains a malicious program designed to run on a target host and a benign binary that executes on any other host. To ensure that the malicious program runs only on the target host, it is encrypted with a key derived from the target's disk partition UUIDs. The author of this article developed a twoface Rust binary to implement this process, which also includes defenses to prevent detection of the decrypted binary.