MOCCO: Class-based Code Obfuscation with Multi-objective Evolutionary Algorithms (Artifact)
Abstract
MOCCO (Multi-Objective Class-based Code Obfuscation) is a framework that automates source-code obfuscation as a multi-objective optimization problem. It parses a Python program into an Abstract Syntax Tree (AST), evolves a population of obfuscated variants with a Multi-Objective Evolutionary Algorithm (NSGA-II, MOEA/D, or our variant MOEA/D/ALT), and returns Pareto-optimal solutions that trade off obfuscation potency (cyclomatic complexity, nesting level, token dissimilarity) against runtime cost. A key contribution is a set of class-based obfuscation operators that manipulate object-oriented structure (class splitting via delegation/inheritance, class merging, polymorphic class renaming). Every accepted variant is dynamically checked to preserve the original program's output on a custom test suite. This is the artifact for the paper "Class-based Obfuscation with Multi-objective Evolutionary Algorithms on Source Code" (International Journal of Information Security, under review). CONTENTS- Framework source: obfuscation operators (methods/), the three MOEAs (alg/), metrics and similarity engine (utils/).- Benchmark suite: 15 classic algorithmic programs (the authors' own Python solutions) with custom test inputs/outputs (testcases/).- Experimental data: per-run metric records that reproduce every figure and table in the paper (results/), plus the measured metrics of the comparison obfuscators (relatedwork/).- Analysis/figure scripts: reviewer_response_analysis.py, compare_figures_gen.py, analyze.py. REPRODUCING THE RESULTS python -m venv .venv && source .venv/bin/activate pip install -r requirements.txt python reviewer_response_analysis.py # dataset table, objective correlation, Pareto projectionsTested on Python 3.10, 3.12.3, and 3.13 (3.10-3.13 supported). See README.md for full instructions, including running the obfuscator on new programs. NOT INCLUDED (by design)- The third-party comparison obfuscators (Intensio-Obfuscator, Opy, pyminifier, PyArmor): only the metrics measured from them are shipped; see relatedwork/README.md for upstream links and their respective licenses. BENCHMARK NOTEThe benchmark programs are the authors' own solutions to algorithmic problems popularly hosted on LeetCode; no LeetCode problem statements or other proprietary content are redistributed (referenced by URL only).
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 20 June 2026
- Language
- EN