Skip to main content

A Docker runner for docker-based vulnerable environments.

Project description


Docker Vuln Runner

Docker Vuln Runner
A Docker runner for docker-based vulnerable environments.

Table of Contents

Overview

vuln-runner is a tool that allows you to quickly run the docker vulnerable stacks.

The vulnerable stack actually supported are:

At SecSI we found it useful to reproduce vulnerable environments for training purposes. To reproduce vulnerable environment easily, take a look at DSP.

Install

You can easily install it by running:

pip install vuln-runner

Usage

vuln-runner --help

This will display help for the tool. Here are all the switches it supports.

Usage: vuln-runner [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  down              Down a list of vulnerable projects
  down-env          Down an environment
  generate-vulnenv  Generate <no_env> vulnerable environments composed of...
  init
  list              List the vulnerable names
  run               Run a list of vulnerable projects
  run-env           Run an environment taken from a JSON configuration file
  update            Update the vulnerable git repositories

  • Initialized the vulnerable environment:
vuln-runner init

asciicast

  • List the vulnerable stacks:
vuln-runner list

asciicast

  • Run a list of vulnerable stacks:
vuln-runner run vulhub.CVE-2014-3120,vulhub.CVE-2018-1270

asciicast

  • Down the list of vulnerable stacks:
vuln-runner down vulhub.CVE-2014-3120,vulhub.CVE-2018-1270

asciicast

Advanced usage: vulnerable environment

With the previous commands you can already manage your vulnerable stacks and manually run and stop them. Anyway, you can also create vulnerable environments. A vulnerable environment is a set of vulnerable docker-compose stacks that has not ports' conflicts.
You can generate a vulnerable environment descriptor in JSON format with the generate-vulnenv command:

vuln-runner generate-vulnenv NO_VULNS [--no-env=<default=1>]
  • NO_VULNS defines the number of vulnerable stacks for each environment.
  • --no-env defines the number of environments. It is useful if you want to run vuln-runner in different hosts, where each host runs a single environment.

For example, to create a JSON vulnerable descriptor with two vulnerable stack and two environments:

vuln-runner generate-vulnenv 2 --no-env=2  

asciicast

You can output into the JSON descriptor into a file an reuse with two commands:

  • run-env: run the set of stacks belonging to a vulnerable environment.
vuln-runner run-env output.json 1

asciicast

  • down-env: down the vulnerable environment.
vuln-runner down-env output.json 1

asciicast

Development

The poetry packaging and management tool was used to build the project.
To initialize the project:

poetry install 

To run the several commands, you can use poetry as follows:

poetry run vuln-runner <command>  

Credits

Developed by gx1 @SecSI

License

Docker Vuln Runner is released under the GPL LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vuln_runner-0.1.1.tar.gz (19.7 kB view hashes)

Uploaded Source

Built Distribution

vuln_runner-0.1.1-py3-none-any.whl (20.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page