🤖 AI Summary
This work addresses the vulnerability of Erlang programs to reverse engineering, decompilation, and recompilation attacks by proposing a multi-layered obfuscation scheme that jointly applies transformations at the source code, abstract syntax tree (AST), BEAM assembly, and bytecode levels. Leveraging the representational gap between Erlang’s high-level semantics and its low-level execution model, the approach introduces novel obfuscation paradigms based on opcode dependencies, encoded receive loops, and irregular control flow, further enhanced with dynamic module loading and self-modifying code techniques. The method operates fully within the constraints of the standard Erlang compiler, validator, loader, and virtual machine, thereby preserving compatibility while significantly strengthening resistance against both static and dynamic analysis, offering a practical and stealthy defense mechanism.
📝 Abstract
This paper studies obfuscation techniques for Erlang programs at the source, abstract syntax tree, BEAM assembly, and BEAM bytecode levels. We focus on transformations that complicate reverse engineering, decompilation, and recompilation while remaining grounded in the actual behavior of the Erlang compiler, validator, loader, and virtual machine. The paper categorizes opcode-level dependency tricks, receive-based loop encodings, irregular control-flow constructions, mutability-oriented performance obfuscation, and self-modifying code enabled by dynamic module loading. A recurring theme is that effective obfuscation in BEAM often arises not from arbitrary corruption, but from exploiting representational gaps between high-level Erlang semantics and the lower-level execution model accepted by the toolchain and runtime.