Skip to main content
QUICK REVIEW

[Paper Review] Malicious cryptography techniques for unreversable (malicious or not) binaries

Éric Filiol|arXiv (Cornell University)|Sep 21, 2010
Advanced Malware Detection TechniquesComputer Science11 references12 citations
TL;DR

This paper presents a novel approach to code protection using malicious cryptography and k-ary virtual machine-based obfuscation to render binaries completely immune to reverse engineering. By combining a deterministic finite state machine (dFSM) with biased pseudo-random number generators and splitting the malware into k-ary components, the method achieves up to $2^{140}$ polymorphic variants without a traditional decryptor, ensuring both total code armouring and undetectable metamorphism.

ABSTRACT

Fighting against computer malware require a mandatory step of reverse engineering. As soon as the code has been disassemblied/decompiled (including a dynamic analysis step), there is a hope to understand what the malware actually does and to implement a detection mean. This also applies to protection of software whenever one wishes to analyze them. In this paper, we show how to amour code in such a way that reserse engineering techniques (static and dymanic) are absolutely impossible by combining malicious cryptography techniques developped in our laboratory and new types of programming (k-ary codes). Suitable encryption algorithms combined with new cryptanalytic approaches to ease the protection of (malicious or not) binaries, enable to provide both total code armouring and large scale polymorphic features at the same time. A simple 400 Kb of executable code enables to produce a binary code and around $2^{140}$ mutated forms natively while going far beyond the old concept of decryptor.

Motivation & Objective

  • To develop a technique that renders reverse engineering of binaries impossible through advanced cryptographic obfuscation.
  • To overcome the limitations of traditional code armouring and polymorphism by eliminating the need for a fixed decryptor.
  • To enable high-scale polymorphism and metamorphism in malware or protected software using k-ary code distribution.
  • To ensure that both static and dynamic analysis are ineffective by leveraging hidden, distributed state machines and biased PRNGs.
  • To achieve TRANSEC-level security where protected binaries have indistinguishable entropy from legitimate code.

Proposed method

  • Transforms critical code into an intermediate representation (IR), then compiles it into bytecode for execution on a custom virtual machine.
  • Employs a deterministic finite state machine (dFSM) as the core obfuscation engine, generating 59-bit output chunks used to encrypt code.
  • Uses a biased pseudo-random number generator (PRNG) with non-uniform distribution to produce unpredictable yet deterministic output sequences.
  • Splits the malware into k-ary components (e.g., two parts: V₁ and V₂), where V₁ hosts the dFSM and V₂ supplies input keys, preventing reconstruction.
  • Implements inter-component communication via shared memory (System V IPC), named pipes, or process pipes to maintain secrecy and modularity.
  • Precomputes inputs to the dFSM using cryptanalytic techniques to ensure correct execution while hiding the internal logic from analysis.

Experimental results

Research questions

  • RQ1Can code protection be achieved such that both static and dynamic reverse engineering are fundamentally impossible?
  • RQ2How can polymorphism be scaled beyond traditional limits (e.g., $2^{140}$ variants) without relying on a central decryptor?
  • RQ3Can the absence of a traditional decryptor eliminate a major signature vector in malware detection?
  • RQ4To what extent can k-ary code distribution prevent reverse engineering by fragmenting the attack surface?
  • RQ5Can non-deterministic finite state machines further increase reverse engineering complexity beyond current limits?

Key findings

  • The proposed method enables the generation of up to $2^{140}$ distinct polymorphic variants from a single 400 KB binary using only a 59-bit key stream cipher.
  • The absence of a traditional decryptor eliminates a major detection vector, significantly enhancing resistance to signature-based analysis.
  • The dFSM-based obfuscation ensures that the protected binary has entropy indistinguishable from legitimate software, achieving TRANSEC-level security.
  • K-ary code distribution, particularly with parts V₁ and V₂, prevents reverse engineering by splitting the dFSM logic and input generation across separate components.
  • System V IPC and named pipes enable efficient, secure inter-component communication, making detection and reconstruction infeasible.
  • The use of biased PRNGs and cryptanalytic precomputation allows for deterministic yet unpredictable code mutation, enhancing resilience against static and dynamic analysis.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.