• Stars
    star
    842
  • Rank 54,118 (Top 2 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 1 year ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Mantis is a security framework that automates the workflow of discovery, reconnaissance, and vulnerability scanning.

Features โ€ข Modules โ€ข Installation โ€ข Command Line Options โ€ข Documentation โ€ข Contributors โ€ข Join Discord

We are in the beta phase of the tool and would like to know if you are facing any installation issues with our framework. If so, please post your issues on our discord.

Summary

Mantis is a command-line framework designed to automate the workflow of asset discovery, reconnaissance, and scanning. It takes the top-level domains as input, then seamlessly progresses to discovering corresponding assets, including subdomains and certificates. The tool performs reconnaissance on active assets and concludes with a comprehensive scan for vulnerabilities, secrets, misconfigurations and phishing domains - all powered by a blend of open-source and custom tools.

Features ๐Ÿš€

  • Automated Discovery, Recon & Scan
  • Distributed Scanning (split a single scan across multiple machines)
  • Super-Easy Scan Customisation
  • Dashboard Support
  • Vulnerability Management
  • Advanced Alerting
  • DNS Service Integration
  • Integrate new tool (existing and custom) in minutes

Click here to know more about the features in detail.

Modules ๐Ÿงฐ

  • Discovery
    • Subdomains
    • Certificates
  • Recon
    • Open Ports
    • Technologies
    • CDN
    • WAF
    • Web Server
    • IP
    • ASN Information
    • Location
  • Scan
    • Domain Level Vulnerabilities and Misconfigurations
    • Secrets Scanning
    • Phishing Domains

Installation โš™๏ธ

Mantis supports multiple installation types. Installing Mantis via Docker would be a good start to get a hang of the framework.

Considering that Mantis also includes MongoDB and AppSmith, we have provided a shell script that installs all the components.

Minimum System Requirements (Single Machine Scan) ๐Ÿ–ฅ๏ธ

  • Supported OS: Ubuntu, macOS
  • RAM - 4GB
  • Cores - 2
  • Storage - 16GB

Warning ๐Ÿšจ - The framework combines a number of open source and custom tools and runs them in parallel, hence the framework is CPU intensive and is recommended to run the framework on a dedicated VM.
The -tc option controls the parallel processing. If you run it from a machine with low configuration, set the -tc to 1 or 2. If you have a machine with a higher configuration, you can increase the -tc count.

Docker

Setup Video - Click Here

Clone the Mantis repository

git clone https://github.com/PhonePe/mantis.git

cd into the Mantis directory

cd mantis/setup/docker

Run the respective docker setup file based on your OS

./docker-setup-macos.sh

./docker-setup-ubuntu.sh

For uninstalling Mantis (remove all the resources created by installation), run the following command in the same directory

docker compose down

Dashboard Setup ๐Ÿ“Š

Once the docker setup is complete, please run a scan and follow the below instructions to setup the dashboard.

Warning ๐Ÿšจ - Run atleast one scan before setting up dashboard using the command

mantis onboard -o org_name -t example.in   
  • The dashboard is accessible at http://mantis.dashboard:1337
  • Once you access the dashboard, create an account on AppSmith.
  • Now go to base url
  • Click on 3 dots on right side of the home page and import the template from dashboard_templates folder
  • You will be asked to enter db information, enter the following information:
    • host - mantis.db
    • port - 27017
    • default db - mantis

Assets

Vulnerabilities

Command Line Options ๐Ÿ–ฅ๏ธ


  usage: 
        ONBOARD: (First time scan, Run this !!)

        mantis onboard -o example_org -t www.example.org
        mantis onboard -o example_org -f file.txt

        SCAN:

        mantis scan -o example_org
        mantis scan -o example_org -a example_app
            

options:
  -h, --help      list command line options

subparser:
  {onboard,scan}
    onboard       Onboard a target
    scan          Scan an org
usage: 
        ONBOARD: (First time scan, Run this !!)

        mantis onboard -o example_org -t example.tld
        mantis onboard -o example_org -f file.txt

            

options:
  -h, --help            show this help message and exit
  -t HOST, --host HOST  top level domain to scan
  -f FILE_NAME, --file_input FILE_NAME
                        path to file containing any combination of TLD, subdomain, IP-range, IP-CIDR
  -w WORKFLOW, --workflow WORKFLOW
                        workflow to be executed as specified in config file
  -o ORG, --org ORG     name of the organisation
  -a APP, --app APP     scan only subdomains that belong to an app
  -p, --passive         run passive port scan
  -s, --stale           mark domains as stale (domains purchased but not in use)
  -i, --ignore_stale    ignore stale domains during scan
  -tc THREAD_COUNT, --thread_count THREAD_COUNT
                        thread count, default 10
  -r, --use_ray         use ray framework for distributed scans
  -n NUM_ACTORS, --num_actors NUM_ACTORS
                        number of ray actors, default 10
  -d, --delete_logs     delete logs of previous scans
  -v, --verbose         print debug logs
  -aws AWS_PROFILES, --aws_profiles AWS_PROFILES
                        List of comma separated aws profiles for Route53

Run a scan ๐Ÿ”

You want to onboard an org with its TLDs/IPs/IP-CIDRs/IP Range for the first time, use the onboard mode. This runs the scan on the default workflow.

TLD

mantis onboard -o org_name -t example.in   

IP

mantis onboard -o org_name -t 10.123.123.12

IP-Range

mantis onboard -o org_name -t 203.0.113.0-10

IP-CIDR

mantis onboard -o org_name -t 203.0.113.0/24

Onboard Known Assets and Scan

mantis onboard -o org_name -f input.txt

Scan on all assets belonging to an organisation

Now that you have onboarded, you just need to run scheduled scans for an org, you can just use the scan mode

mantis scan -o org_name

Scan on all assets belonging to an organisation and app

 mantis scan -o org_name -a app_name

How to contribute ?

If you want to contribute to this project:

  • Submit an issue if you found a bug, or a have a feature request.
  • Make a Pull Request from dev branch if you want to improve the code.

Need Help ? ๐Ÿ™‹โ€โ™‚๏ธ

Credits ๐ŸŽ–

Development - Prateek Thakare
Recon Tools Design/Launch scripts - Bharath Kumar
Secret Scanning - Hitesh Kumar, Saddam Hussain
Dashboard - Pragya Gupta
Design Suggestions - Dhruv Shekawat, Santanu Sinha
Framework Design - Praveen Kanniah

Special Thanks - Ankur Bhargava

Contributors

Disclaimer

Usage of this program for attacking targets without consent is illegal. It is the user's responsibility to obey all applicable laws. The developer assumes no liability and is not responsible for any misuse or damage caused by this program. Please use responsibly.

The material contained in this repository is licensed under Apache2.

More Repositories

1

pulse

A home for the data that powers the PhonePe Pulse website.
181
star
2

BetterMappable

Better Mappable through Property Wrappers using ObjectMapper
Swift
47
star
3

BGTasks

A wrapper over iOS provided BackgroundTasks framework to ensure smooth onboarding of usecases and handle all the complex functionalities of BackgroundTasks within it.
Swift
40
star
4

Permit

Permit framework provides a universal API for querying the permission status of different kinds of permissions, in an abstracted format with only what the user needs to know.
Swift
34
star
5

drove-orchestrator

Distributed container orchestration system
28
star
6

phonepe-pg-sdk-flutter

Dart
11
star
7

pg-sdk-react-native-sample

Sample App to demonstrate integration of PhonePe PG SDK React Native package.
TypeScript
9
star
8

phonepe-php

PhonePe PHP Merchant Client Library
PHP
9
star
9

babe

Management script for marathon. Named after the lead character in Marathon Man
Python
8
star
10

mustang

Search engine for Rules - Indexing boolean expressions at scale
Java
7
star
11

Batching

An iOS batching library for analytics events.
Swift
6
star
12

drove-cli

Command line client for the Drove Container Orchestrator
Python
4
star
13

phonepe-js-sdk

PhonePe's Your Store Public JS SDK
3
star
14

phonepe-pg-sdk-ionic

A Ionic Sample App to integrate PhonePe PG SDK in your project
TypeScript
3
star
15

PhonePePayment

PhonePe Intent SDK for iOS provides a simple integration that you can use in your iOS application to process your Transactions through the PhonePe ecosystem.
Objective-C
3
star
16

PPDrawableArrow

This library allows you to draw an arrow from a start point to end point with animation
Swift
3
star
17

swift-json

An idiomatic Swift framework for manipulating JSON
Swift
2
star
18

PPAlertViewController

A modern implementation of a highly customizable alert view using UIStackViews
Swift
2
star
19

drove-gateway

A fork of Nixy that helps manage NGinx endpoints to route traffic to Drove clusters
Go
2
star
20

drove

Distributed container orchestrator
Java
2
star
21

mockAppIos

Swift
1
star
22

epoch

A time based container job scheduler for Drove
Java
1
star