Skip to main content

ML - Pentest | Are malware detector robust?

This is a software framework that can be used for the evaluation of the robustness of Malware Detection methods with respect to adversarial attacks. Currently, there is a focus on black-box adversarial attacks on PE malware detector.

The high level architecture of the software framework is shown in the following figure.

arch

Attacks included

  • GAMMA, formulated by Demetrio et al., with section injection and API injection manipulations. This implementation of the attack is easily used against any target model by implementing only the specific wrapper. Some code is reused from the open-source repository secml-malware.
  • GAMMA V2, introducted in this framework. Is an augmented version of GAMMA that optimize the section injection position, the section characteristics and the section names.

Models included

Some of the known malware detectors in the literature have already been included by default within the library.

Specifically, the models included include:

  • MalConv (link) in its original formulation. The PyTorch implementation of MalConv was taken from this open source repository.
  • MalConv2 (link), an improved version of MalConv that requires less memory and time to train the model. The PyTorch implementation of MalConv was taken from this open source repository. A pre-trained version of the model is available into the library.
  • EMBER Gradient-Boosted Decision Tree (GBDT) (link): a gradient-boosted decision tree that use EMBER features for classification. A pre-trained version of the model on the EMBER dataset (taken from this repository is available into the library.

It should be noted that any requirements needed to run the models must already be available in the software environment used for execution. The library offers support for any type of model upon implementation of a specific wrapper, with no software dependencies statically encoded in the library.

Therefore, PyTorch must be installed to use the MalConv and MalConv2 models, lgbm for the GBDT model.

Any other model can be used after implementing the specific wrapper and installing the necessary dependencies on the used environment.

Table of Contents

Installation

The library is tested with Python 3.8. The library can be used with later versions of Python as long as they are compatible with LIEF version 0.12.0.

You can install the library by using the following command.

pip install ml_pentest 

License

This system uses the GNU General Public License v3.0 (GPL-3.0) to ensure that the software remains open-source and free for everyone to use, modify and distribute. The license allows users to use the system for personal or commercial use, modify the code, and distribute the modified code as long as they maintain the same license. The GPL-3.0 ensures that the system's source code remains open and accessible, fostering a collaborative development environment.

Metadata

Release files for ml-pentest 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ml-pentest 0.0.3
File Size Uploaded
ml_pentest-0.0.3.tar.gz 57.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ml-pentest 0.0.3
File Interpreter ABI Platform
ml_pentest-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 115.8 MB

Release files / ml_pentest-0.0.3.tar.gz

Download URL ml_pentest-0.0.3.tar.gz
Size 57.9 MB
Tags Source
SHA-256 checksum
How to use checksums
3c272f13b13a2b9a22777379a790f072d2577298e2e1356334a19cb264d2d473
BLAKE2b-256 checksum
How to use checksums
c5e1d449474b97a5f4a580acf7a4b7ea75dbb7fa33e0f48b8f3ea8411658665f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / ml_pentest-0.0.3-py3-none-any.whl

Download URL ml_pentest-0.0.3-py3-none-any.whl
Size 57.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ae87b0b22b97fa88d2207bbc23dbbd23377a884e2452216ef217b5be02c6fe73
BLAKE2b-256 checksum
How to use checksums
8b7acf60ffb54959fe82b2545a32bf0fa5745011eb7b8c8f5fc8df5acb28b2fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page