Skip to content

synacktiv/twoface

Repository files navigation

"Two-Face" Rust Linux binary

Two-Face Rust Linux binary

An executable file that runs a harmless program most of the time, but will run a different, hidden code if deployed on a specific target host.

See Creating a "Two-Face" Rust binary on Linux.

Usage

You need a Rust build environment for example from rustup.

A nightly toolchain is required (to support the ! "never" type).

The test-example script will build and run a complete example.

The following packages are provided in the repository:

  • evil_binary: an example of "hidden" binary, that will be run when host data matches what was set in example/host.json
  • harmless_binary: an example of "normal" binary that will be run on other hosts
  • example: the resulting "Two-Face" binary that will pack both previous binaries, and dispatch execution to either one depending on the host
  • twoface: the library that provides the build-time and run-time features

About

"Two-Face" Rust binary on Linux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published