Code Monkey home page Code Monkey logo

docker-rapid7-vm's Introduction

InsightVM/Nexpose Console and Engine Docker Images

The Rapid7 InsightVM/Nexpose Console and Engine Docker Images. These are functioning vulnerability management tools: https://www.rapid7.com/solutions/vulnerability-management/

DISCLAIMER: the resulting Docker images and the files found in this repository are meant for Proof of Concept and Testing purposes. They are NOT officially supported images and are not supported by Rapid7 Support. Best effort is used to keep the images up to date and resolve reported issues/bugs.

About

This implementation was designed to build and run docker containers for both the InsightVM/Nexpose Console and Engine.
It is a quick way to interact with the API, get acquainted with the tool, or any other purposes that may not require a a generated license. It is not recommended to use these images in a persistent state or for production purposes.

Usage

Running the Rapid7 VM Console while exposing the UI/API port (3780) and Engine Listener port (40815) for E -> C pairing:

docker run --init -p 3780:3780 -p 40815:40815 rapid7/rapid7-vm-console

Once the Console has been started and the login page is accessible at https://localhost:3780 (from host system), the default username is nxadmin and default password is nxpassword.

Running the Rapid7 VM Engine while exposing the Console Listener port (40814) for C -> E pairing:

docker run --init -p 40814:40814 rapid7/rapid7-vm-engine

Pairing Engine -> Console using shared secret

Depending on the environment and workflow, it can be easier to automatically pair the scan engine with the console using a shared secret. This method will automatically create the engine in the Nexpose/InsightVM console to be ready to use for scanning activity. Going to Administration -> Engines -> Manage, then scrolling to the bottom of the page, you can generate a shared secret.

Environment variables to be used in the docker run command:

  • SECRET: The shared secret generated on the console manually or via an API call
  • CONSOLE: The Nexpose/InsightVM console host or ip address. The scan engine requires this to know what console to pair with

Using the shared secret generated on the console either using the API or manually:

docker run --init -d --name "vm-engine" -e SECRET='XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX' -e CONSOLE='127.0.0.1' rapid7/rapid7-vm-engine

Activating Console at Startup

It is possible to pass an Activation Key or Activation License File with the use of environment variables. By setting one of these variables, at startup the Console API will be used to activate your console image. NOTE: The console will only be activated if the current license status is "Unlicensed".

Activate by Key with ACTIVATION_KEY environment variable:

docker run --init -d --name "vm-console" -p 3780:3780 -e ACTIVATION_KEY='AAAA-BBBB-CCCC-DDDD' rapid7/rapid7-vm-console

Activate by License File with ACTIVATION_LICENSE_FILE environment variable:

docker run --init -d --name "vm-console" -p 3780:3780 -e ACTIVATION_LICENSE_FILE='LICENSEFILECONTENTS' rapid7/rapid7-vm-console

Setting environment variables

It is possible to set a variety of environment variables at runtime to influence the functionality of the docker containers. Below are a list of environment variables possible:

Environment Variable Description Default Applicable Image
API_USER User for interacting with console API nxadmin rapid7-vm-console
API_PASSWORD Password of API user nxpassword rapid7-vm-console
CONSOLE_PORT Console web/API port 3780 rapid7-vm-console
ACTIVATION_KEY Activation key leveraged to license console rapid7-vm-console
ACTIVATION_LICENSE_FILE Contents of license file used to license console rapid7-vm-console
SEED_CONSOLE Pre-populate console with data (work in progress) rapid7-vm-console
SECRET Shared secret used for pairing engine to console rapid7-vm-engine
CONSOLE Console host or IP address used when pairing rapid7-vm-engine

Upgrading

Due to the nature of InsightVM/Nexpose, upgrades are not supported by use of new images and updates will be auto applied with the standard automated process. Future investigation into handling upgrades with the Docker images may occur as an enhancement.

Building

Build Installer:

docker build -t rapid7/rapid7-vm-installer installer/

Build Console:

docker build -t rapid7/rapid7-vm-console console/

Build Engine:

docker build -t rapid7/rapid7-vm-engine engine/

docker-rapid7-vm's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.