CLI Tool

CLI Tool

Misconfig Mapper has a dedicated open-source CLI tool written in Golang to help you automate the testing of most misconfigurations found on covered services. It can identify and enumerate instances of services used by your company, and perform detection and misconfiguration checks at scale! By supplying a template with detection fingerprints and misconfiguration check fingerprints, the tool can quickly and accurately identify potential security risks in popular third-party software and services! The tool is based on templates and is versatile. New services can be easily added by adding them to the services.json file.

Features

  • The CLI tool is based on templates defined in the services.json file. You can add as many as you want. See Templates section for more information on how to add a template.

  • If you provide a company name, the tool will automatically generate permutations based on the keyword you provided and try to find any matching services.

  • You can also optionally select to only detect the presence of services without performing any misconfiguration checks (see more on Usage section).

Installation

To install Misconfig Mapper, you can clone the repository and compile the code from source or download the latest release.

From source

If you want to build your own instance from source, ensure you have the latest version of Golang installed. To verify your installation, run:

$ go version
  go version go1.21.5 linux/amd64
  1. Clone this repository:

  1. Next, compile your binary from source:

  1. Finally, add or move the binary to a folder in your $PATH (optional)

Usage

Example 1: Perform a scan to enumerate all misconfigured third-party services

Example 1

Example 2: Perform a detection-only scan to enumerate all third-party services (without checking for any misconfigurations)

Example 2

Example 3: Only test for one specific service (by ID or name)

Example 3

Example 4: Print out all loaded services

Example 4

Additionally, you can pass request headers using the -headers flag to comply with any request requirements (separate each header using a double semi-colon):

Templates

You can easily define more templates to scan for. Templates are in a structured JSON object and read from services.json To define more services, edit the services.json file and separate each misconfiguration in your services.json file.

An example template definition schema is available here.

Template Type Definitions

ID

Type: number The id field is used to identify the service when the -service flag is provided. It should be a numerical value that follows the sequence of previous IDs.

Request

Method

Type: string

The method field is used to provide a HTTP method.

BaseURL

Type: string

The baseURL field is used to locate the third-party service, if it exists.

Path

Type: string

The path field checks whether the service is vulnerable by observing the response.

Headers

Type: object array

The headers field is used to supply any required request headers.

Body

Type: string | null

The body field is used to supply a raw request body.

Set the request body to null if there's no need to send a request body.

Response

StatusCode

Type: int

The statusCode field is used to validate the matching response status code and further minimize the chances of false positive results.

Detection Fingerprints

Type: string array

The detectionFingerprints field supports enumeration & validation of a third-party service for your target. These fingerprints are used to mark the detection of a service or instance. Make sure to define strict regex patterns or keywords to minimize the chances of false positive results.

Fingerprints

Type: string array

The fingerprints field is used to validate the existence of a misconfigured third-party service for your target. Make sure to define strict regex patterns or keywords to minimize the chances of false positive results.

Metadata

Service

Type: string

The service field is used to display the service name in the CLI output results to visually confirm which service is currently being scanned.

Description

Type: string

The description field displays the service description in the CLI output once a service has been enumerated or identified and confirmed vulnerable.

Reproduction Steps

Type: string array

The reproductionSteps field reports back on how to reproduce the found misconfiguration. These steps are derived from this documentation.

Each step should be in a separate array entry. You can specify as many steps as you'd like to.

References

Type: string array

The' references' field documents enumerated and misconfigured services. These references are derived from this documentation.

Each reference should be in a separate array entry. You can specify as many references as you'd like to.

Last updated

Was this helpful?