ObfusEval is the benchmarking tool to evaluate the reliability of the code obfuscating transformation.

Overview

ObfusEval

ObfusEval is the benchmarking tool to evaluate the reliability of the code obfuscating transformation.

The following two metrics related the reliability are evaluated.

  • Test Pass Rate indicates the rate of programs that are successfully obfuscated while keeping the functionalities.
  • Code Distance Mean indicates how an obfuscated program is changed from the original program.

Requirement

Docker

  • docker version 20.10.11 or newer
  • docker-compose version 1.29.2 or newer

Rust

  • cargo 1.64.0 or newer
  • rustc 1.64.0 or newer
  • rustup 1.25.1 or newer

Python (if plot result to graph using python script)

  • python 3.9 or newer

How to use

Preparation

  1. Clone this repository
git clone https://github.com/NAIST-SE/ObfusEval.git && cd ObfusEval
  1. Add a docker image of an obfuscating transformation tool.

    • Please place the Dockerfile in docker/ subdirectory.
    • Define the obfuscate command in your Dockerfile as follows to handle commands related to obfuscation uniformly in this tool.
      RUN echo '#! /bin/sh\n<PATH TO THE OBFUSCATOR> $@' >> /bin/obfuscate && \
          chmod a+x /bin/obfuscate
  2. Edit obfuscator/tool_name.json

    • Set the parameters as follows.
      • Please refer to the obfuscator existing file for details
      {
          "name": <TOOL_NAME>,
          "compiler": <PATH_TO_COMPILER_IN_TOOL>,
          "common_flag": <COMMON_FLAG_ON_COMPILING>, 
          "is_bin_only": <Whether the obuscator generates obfuscated binary only>,
          "transformations": [
              "name": <This transformation name>,
              "display": <This transformation abbreviation>,
              "flag": [
                  <Command line parametes to execute the docker image>
              ]
          ]
      }
  3. Edit properties.json

    • Set the pair of obfuscator that contains obfuscating transformations and dataset.

      example

      {
          "name": "prop1",
          "dataset": "basic-algorithms", // the name of dataset/<each dataset>/
          "obfuscator": "tigress" // the name of obfuscator/<tool>.json
      }
  4. Run docker service

    $ docker-compose up -d

Setup

  • Apply obfuscation to the code in the dataset
  • Compile code using compiler in docker service
$ cargo run setup <only_mode_option> <prop-name>

only_mode_option

  • --compile-code: Compile code in dataset by compiler same using obfuscator
  • --obfuscate-code: Obfuscate code in dataset

When run with no option, do all mode (compile and obfuscate code in dataset.)

Evaluate

$ cargo run evaluate <only_mode_option> <prop-name>

only_mode_option

  • --test-pass-rate: Write discription
  • --code-distance-mean: Write discription

When run with no option, do all mode.

LICENSE

You might also like...
Command-line tool to generate Rust code for Google Cloud Spanner

nene nene is a command-line tool to generate Rust code for Google Cloud Spanner. nene uses database schema to generate code by using Information Schem

A tool to decompile MSVC PDB files to C++ source code.

PDB Decompiler About Usage Contributing About A tool to decompile MSVC PDB files to C++ source code. This tool is a work in progress and will most lik

ripsecrets is a command-line tool to prevent committing secret keys into your source code.

ripsecrets is a command-line tool to prevent committing secret keys into your source code. ripsecrets has a few features that distinguish it from other secret scanning tools:

batch eval tool for machine code. eval() but for asm.

yaxpeax-eval yaxpeax-eval is the repo providing yaxeval, a tool to execute machine code with preconditions and report state at exit. currently, yaxeva

Sleek is a CLI tool for formatting SQL. It helps you maintain a consistent style across your SQL code, enhancing readability and productivity.

Sleek: SQL Formatter ✨ Sleek is a CLI tool for formatting SQL. It helps you maintain a consistent style across your SQL code, enhancing readability an

A CLI tool you can pipe code and then ask for changes, add documentation, etc, using the OpenAI API.
A CLI tool you can pipe code and then ask for changes, add documentation, etc, using the OpenAI API.

AiBro This is your own little coding bro, immersed in the world of AI, crypto, and all other types of over hyped tech trends. You can pipe it code and

An LLM-powered (CodeLlama or OpenAI) local diff code review tool.

augre An LLM-powered (CodeLlama or OpenAI) local diff code review tool. Binary Usage Install Windows: $ iwr https://github.com/twitchax/augre/releases

A cli tool to automatically download and upload advent of code problems.

Advent of Code CLI CLI client for advent of code. The purpose of this tool is so you don't have to leave your editor while participating (if you are l

A command line tool written in Rust and designed to be a modern build tool + package manager for C/C++ projects.

CCake CCake is a command line tool written in Rust and designed to be a modern build tool + package manager for C/C++ projects. Goals To be easily und

Owner
Software Engineering Lab @ NAIST
Software Engineering Lab @ NAIST
Cargo-eval - A cargo plugin to quickly evaluate some Rust source code.

cargo eval A cargo plugin to quickly evaluate some Rust source code. Installation $ cargo install --git https://github.com/timClicks/cargo-eval.git Us

Tim McNamara 9 Dec 21, 2022
Evaluate performance gains to expect when EVM were to compile hot contracts into machine code

Convert evm bytecode to native machine code and go vroom - just an experiment, probably broken, reach out to [email protected] to contribute / productionize.

Paradigm 105 Aug 1, 2023
Peakrs Dataframe is a library and framework facilitates the extraction, transformation, and loading (ETL) of data.

Peakrs Dataframe Peakrs Dataframe is a library and framework facilitates the extraction, transformation, and loading (ETL) of data. Its first applicat

Max Yu 5 Sep 6, 2023
RustHopper evaluate grasshopper3d with RhinoCompute from Rust.

RustHopper This is a crate to run grasshopper with RhinoCompute from rust. The input data can be created by entering into main.rs the same Python code

hiron 11 Jan 1, 2023
A command-line benchmarking tool

hyperfine 中文 A command-line benchmarking tool. Demo: Benchmarking fd and find: Features Statistical analysis across multiple runs. Support for arbitra

David Peter 14.1k Jan 4, 2023
Benchmarking C, Python, and Rust on the "sp" problem

Fast SP Various implementations of the problem in this blog post. Requirements To run this, you will need Rust Nightly and Python 3.8+ with numpy. Rus

Eddie Antonio Santos 2 Jul 13, 2023
Code-shape is a tool for extracting definitions from source code files

Code-shape Code-shape is a tool that uses Tree-sitter to extract a shape of code definitions from a source code file. The tool uses the same language

Andrew Hlynskyi 3 Apr 21, 2023
languagetool-code-comments integrates the LanguageTool API to parse, spell check, and correct the grammar of your code comments!

languagetool-code-comments integrates the LanguageTool API to parse, spell check, and correct the grammar of your code comments! Overview Install MacO

Dustin Blackman 17 Dec 25, 2022
ChatGPT-Code-Review is a Rust application that uses the OpenAI GPT-3.5 language model to review code

ChatGPT-Code-Review is a Rust application that uses the OpenAI GPT-3.5 language model to review code. It accepts a local path to a folder containing code, and generates a review for each file in the folder and its subdirectories.

Greg P. 15 Apr 22, 2023
rehype plugin to use tree-sitter to highlight code in pre code blocks

rehype-tree-sitter rehype plugin to use tree-sitter to highlight code in <pre><code> blocks Contents What is this? When should I use this? Install Use

null 5 Jul 25, 2023