# Mutate Malware

The tool can be used to create mutated malware that can evade an AI-powered classifier.

{% hint style="info" %}
Prerequisites

* Environment
* [Train Models (optional)](https://vaya97chandni.gitbook.io/pesidious/train-models-optional)
  {% endhint %}

{% hint style="warning" %}
This tool is designed to work with only 32 bit PE binaries. &#x20;
{% endhint %}

## Step 1: Get the original scores of malware samples

In order to assess the evasiveness of the mutated malware generated by the tool, you can first run the classifier against the malware samples.&#x20;

```bash
python classifier.py -d /path/to/directory/with/malware/files 
```

## Step 2: Mutate malware files

The tool comes with pre-trained models that can mutate a malware in order to evade the in-built classifier.&#x20;

Run the following command with to mutate malware files

```
python mutate.py -d /path/to/directory/with/malware/files
```

The mutated malware files will be stored in a directory called `Mutated_malware` in the following format

```
Mutated_malware/mutated_<name-of-the-file>
```

## Step 3: Check the score for mutated malware

You can again run the classifier but against the mutated malware and compare it with the original scores retrieved in the first step

```
python classifier.py -d Mutated_malware/
```
