Skip to content

MetaSign - Metamorphic Engine, Widening CFG, Lerning Rewriting Rules

Notifications You must be signed in to change notification settings

LabSPY-univr/MetaSign

Repository files navigation

MetaSign

Authors: Marco Campion, Mila Dalla Preda, Roberto Giacobazzi

Institution: University of Verona

Overview: MetaSign is a tool written in Python 3 with three main features: metamorphic engine, widening of Control Flow Graphs (CFG) and learner of rewriting rules. The project contains three python files: - MetaSign.py : it is the main code from where the execution starts. Besides the function that checks the input parameters and call the other modules, here you can find the read_assembly function for parsing programs written in our intermiediate language. - rulesDef.py : contains the functions implementing the rewriting rules used by the metamorphic engine. - utils.py : implements the function generating the CFG of each program (genGraph), the function generating the language of each node (genLang), the abstraction function (genAbstraction), and others for the widening process. - rulesInfer.py : contains all the functions implementing the learner of rewriting rules.

MetaSign can be executed by the following command:

python MetaSign.py [-h][-w][-e][-v][-s][-n ][-r][-i <variant1,variant2,...>][-l ] <starting_program>

where: -h : ("help") prints a descritpion of each accepted parameter. -w : ("widening") activates the widening proces, the -i parameter is required for specifying files as inputs. -e : ("expansion") the metamorphic engine applies expansion rules only. -v : ("verbose") shows detailed informations during the widening process such as the CFG, language, merging nodes at each step. -s : ("silence") no prints on terminal. -r : ("rewriting") activates the learning algorithm on the CFG obtained after the widening process. -i <variant1,...>: applies the widening on the CFGs of each variants given as inputs. -n : the metamorphic engine will generate variants starting from the starting_program given as input (default = 1). -l : widening seed length (default = 2). starting_program : it corresponds to the program from which the first variant is generated by the metamorphic variant, while, if the widening is activated, it corresponds to the first program from the set formed by the input privided to the -i parameter(starting_program,variant1,variant2,...). The folder "test" contains some examples of metamorphic variants with the widening and learner results.

PREREQUISITE: graph-tool package. Graph-tool is an efficient Python module for manipulation and statistical analysis of graphs. The installation of graph-tool is MANDATORY in order to run MetaSign. You can download and install it from https://graph-tool.skewed.de/

Link to repository: https://github.com/LabSPY-univr/MetaSign

Contacts: marco.campion@univr.it

About

MetaSign - Metamorphic Engine, Widening CFG, Lerning Rewriting Rules

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages