Skip to content

m-560/mx-scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ MX SCANNER

v5.0 โ€” AUTOMATION FRAMEWORK

Typing SVG

Advanced Asynchronous Security Scanner & Secret Hunter

High-speed detection of exposed secrets, API keys, and sensitive data


Python Version License Platform Author

๐Ÿ“– Documentation ยท โšก Quick Start ยท ๐ŸŽฏ Features ยท ๐Ÿ›ก๏ธ Smart Filter ยท ๐Ÿ”ฎ Roadmap


"In the world of cybersecurity, the smallest secret can lead to the biggest breach."


๐Ÿ“‘ Table of Contents


๐ŸŽฏ Overview

MX Scanner v5.0 is a cutting-edge, high-performance asynchronous security scanner engineered for modern security professionals. Built from the ground up with speed and precision in mind, it hunts for exposed secrets, API keys, tokens, and sensitive data across web applications and local codebases.

๐ŸŽฏ Purpose โšก Speed ๐Ÿง  Intelligence
Secret Detection Async Architecture Smart Filter (99% FP Reduction)
Code Analysis 1000+ req/sec Context-Aware Scanning
Security Auditing Concurrent Scanning Entropy Validation

Why MX Scanner?

๐Ÿ† Bug Bounty Hunters

Maximize your reward potential by discovering leaked credentials, API keys, and authentication tokens that others miss.

๐Ÿ”’ Penetration Testers

Streamline your assessment workflow with automated secret detection and comprehensive reporting capabilities.

๐Ÿข Security Teams

Protect your organization by identifying accidental secret exposure before malicious actors find them.

Key Highlights

โšก Performance:
  - Asynchronous engine with configurable concurrency
  - 50+ concurrent connections by default
  - Memory-efficient streaming for large files

๐Ÿง  Intelligence:
  - Context-aware false positive reduction (99%)
  - Shannon entropy analysis with PI normalization
  - Pattern validation and format verification

๐Ÿ” Coverage:
  - 50+ secret patterns and growing
  - Cloud providers, payment gateways, messaging platforms
  - Database connections, private keys, JWT tokens

๐Ÿ“Š Output:
  - Professional HTML reports with futuristic design
  - Structured JSON for CI/CD integration
  - Organized directory structure with timestamps

โœจ Features

๐Ÿ” Secret Detection

MX Scanner detects a comprehensive range of exposed secrets across multiple categories:

โ˜๏ธ Cloud Providers
Provider Pattern Type Severity
AWS Access Key ID, Secret Access Key ๐Ÿ”ด Critical
Google Cloud API Keys, Service Account Keys ๐Ÿ”ด Critical
Azure Storage Keys, Connection Strings ๐Ÿ”ด Critical
DigitalOcean API Tokens, Spaces Keys ๐Ÿ”ด Critical
Heroku API Keys, App Secrets ๐Ÿ”ด Critical
Vercel Tokens, Project Secrets ๐ŸŸ  High
๐Ÿ’ณ Payment Gateways
Provider Pattern Type Severity
Stripe Secret Keys, Publishable Keys ๐Ÿ”ด Critical
PayPal Client Secrets, Access Tokens ๐Ÿ”ด Critical
Square Access Tokens, Application Secrets ๐Ÿ”ด Critical
Braintree Merchant IDs, Private Keys ๐Ÿ”ด Critical
Plaid Client ID, Secret Keys ๐ŸŸ  High
๐Ÿ“ฑ Messaging & Communication
Provider Pattern Type Severity
Slack Bot Tokens, Webhook URLs ๐Ÿ”ด Critical
Discord Bot Tokens, Webhook URLs ๐Ÿ”ด Critical
Telegram Bot Tokens, API Hashes ๐Ÿ”ด Critical
Twilio Account SID, Auth Tokens ๐ŸŸ  High
SendGrid API Keys ๐ŸŸ  High
Mailgun API Keys, Domain Secrets ๐ŸŸ  High
๐Ÿ”ง Developer Tools
Provider Pattern Type Severity
GitHub Personal Access Tokens, OAuth Tokens ๐Ÿ”ด Critical
GitLab Personal Access Tokens, Deploy Tokens ๐Ÿ”ด Critical
Bitbucket App Passwords, Access Tokens ๐ŸŸ  High
NPM Access Tokens ๐ŸŸ  High
Docker Hub Access Tokens ๐ŸŸ  High
๐Ÿค– AI & ML Services
Provider Pattern Type Severity
OpenAI API Keys ๐Ÿ”ด Critical
Anthropic API Keys ๐Ÿ”ด Critical
HuggingFace Access Tokens ๐ŸŸ  High
Replicate API Tokens ๐ŸŸ  High
๐Ÿ—„๏ธ Databases & Storage
Type Pattern Severity
MongoDB Connection Strings with Credentials ๐Ÿ”ด Critical
PostgreSQL Connection Strings ๐Ÿ”ด Critical
MySQL Connection Strings ๐Ÿ”ด Critical
Redis Connection Strings ๐ŸŸ  High
Firebase Database Secrets, Service Accounts ๐Ÿ”ด Critical

๐Ÿ›ก๏ธ Security Features

๐Ÿง  Smart Filter System

  • 99% False Positive Reduction
  • Context-aware secret analysis
  • Placeholder pattern detection
  • Test/docs directory exclusion
  • UI identifier filtering

๐Ÿ“ Mathematical Precision

  • Shannon entropy calculation
  • PI-normalized confidence scores
  • Risk assessment algorithms
  • Entropy threshold validation

โœ… Pattern Validation

  • Format verification for each secret type
  • Length validation checks
  • Character set verification
  • Structure validation

๐Ÿ” Deep Analysis

  • Multi-line secret detection
  • Encoded secret recognition
  • Comment-aware scanning
  • Context extraction

โšก Performance

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    โšก PERFORMANCE METRICS                    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  ๐Ÿ”น Async Engine         โ”‚   asyncio + aiohttp              โ”‚
โ”‚  ๐Ÿ”น Default Concurrency  โ”‚   50 simultaneous connections    โ”‚
โ”‚  ๐Ÿ”น Max Concurrency      โ”‚   Configurable (1000+)          โ”‚
โ”‚  ๐Ÿ”น Memory Usage         โ”‚   Streaming (constant)           โ”‚
โ”‚  ๐Ÿ”น Large File Support   โ”‚   Up to 10MB per file            โ”‚
โ”‚  ๐Ÿ”น Scan Speed           โ”‚   1000+ URLs/minute              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“Š Output & Reporting

Format Description
HTML Report Futuristic, professional design with interactive tables
JSON Export Machine-readable output for CI/CD integration
Secrets File Isolated list of discovered secrets
URLs Log Complete list of scanned endpoints
Vulnerabilities Security issues and misconfigurations

๐Ÿ“ฅ Installation

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)

๐Ÿš€ Quick Install

# Clone the repository
git clone https://github.com/m-560/mx-scanner.git

# Navigate to directory
cd mx-scanner

# Install dependencies
pip install aiohttp

# Make executable (Linux/macOS)
chmod +x mx_scanner_v5.py

๐Ÿ“ฆ Optional Tools (Recon Mode)

For full reconnaissance capabilities, install these additional tools:

# Subdomain discovery
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest

# HTTP probing
go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest

# URL crawling
go install -v github.com/projectdiscovery/katana/cmd/katana@latest

# Archive URL discovery
go install -v github.com/tomnomnom/waybackurls@latest

๐Ÿณ Docker Support (Coming Soon)

docker pull mxscanner/mx-scanner:latest
docker run -it mxscanner/mx-scanner -u https://target.com

๐Ÿš€ Quick Start

Basic URL Scan

python3 mx_scanner_v5.py -u https://example.com

Scan Multiple Targets

python3 mx_scanner_v5.py -f targets.txt

Local Code Scan

python3 mx_scanner_v5.py --local /path/to/source/code

Add Custom Pattern

python3 mx_scanner_v5.py -k stripe

๐Ÿ“– Usage

Command Line Options

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘                          ๐Ÿš€ MX SCANNER v5.0 CLI                                โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘  TARGET OPTIONS:                                                               โ•‘
โ•‘    -u, --url URL           Target URL to scan                                 โ•‘
โ•‘    -f, --file FILE         File containing list of URLs                       โ•‘
โ•‘    --local PATH            Local file or directory to scan                    โ•‘
โ•‘                                                                                โ•‘
โ•‘  SCAN OPTIONS:                                                                 โ•‘
โ•‘    -t, --threads N         Number of concurrent threads (default: 50)         โ•‘
โ•‘    --timeout SECONDS       Request timeout (default: 15)                      โ•‘
โ•‘    --max-pages N           Maximum pages to scan (default: 500)               โ•‘
โ•‘    --full-recon            Enable full reconnaissance mode                     โ•‘
โ•‘                                                                                โ•‘
โ•‘  OUTPUT OPTIONS:                                                               โ•‘
โ•‘    -o, --output DIR        Output directory (default: mx_results)             โ•‘
โ•‘    --lang {en,ar}          Interface language (default: en)                   โ•‘
โ•‘                                                                                โ•‘
โ•‘  PATTERN OPTIONS:                                                              โ•‘
โ•‘    -k, --add-pattern NAME  Add pattern from database                          โ•‘
โ•‘    --list-patterns         List all available patterns                        โ•‘
โ•‘                                                                                โ•‘
โ•‘  OTHER OPTIONS:                                                                โ•‘
โ•‘    --debug                 Enable debug mode                                   โ•‘
โ•‘    --version               Show version information                            โ•‘
โ•‘    -h, --help              Show this help message                              โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Real-World Examples

Scenario Command
๐ŸŽฏ Single Target
python3 mx_scanner_v5.py -u https://target.com
๐Ÿ“‹ Multiple Targets
python3 mx_scanner_v5.py -f urls.txt -t 100
๐Ÿ“ Local Repository
python3 mx_scanner_v5.py --local ./my-project
๐Ÿ” Full Reconnaissance
python3 mx_scanner_v5.py -u https://target.com --full-recon
๐ŸŒ Arabic Interface
python3 mx_scanner_v5.py -u https://target.com --lang ar
๐Ÿ”ง Add Stripe Pattern
python3 mx_scanner_v5.py -k stripe
๐Ÿ“ฅ Pipe Input
cat domains.txt | python3 mx_scanner_v5.py
๐Ÿ”— Tool Chain
subfinder -d target.com | httpx -silent | python3 mx_scanner_v5.py

๐Ÿ›ก๏ธ Smart Filter System

The Smart Filter is MX Scanner's revolutionary anti-false-positive engine that achieves 99% false positive reduction through advanced context-aware analysis.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    ๐Ÿ›ก๏ธ SMART FILTER ARCHITECTURE                             โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                                              โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚   โ”‚   INPUT     โ”‚โ”€โ”€โ”€โ–ถโ”‚  PLACEHOLDER โ”‚โ”€โ”€โ”€โ–ถโ”‚    PATH     โ”‚โ”€โ”€โ”€โ–ถโ”‚  CONTEXT   โ”‚  โ”‚
โ”‚   โ”‚   SECRET    โ”‚    โ”‚   DETECTION  โ”‚    โ”‚   FILTER    โ”‚    โ”‚  ANALYSIS  โ”‚  โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚          โ”‚                   โ”‚                   โ”‚                 โ”‚        โ”‚
โ”‚          โ–ผ                   โ–ผ                   โ–ผ                 โ–ผ        โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚   โ”‚   Pattern   โ”‚    โ”‚   your-*    โ”‚    โ”‚  /docs/*    โ”‚    โ”‚  UI IDs    โ”‚  โ”‚
โ”‚   โ”‚   Match     โ”‚    โ”‚   example*  โ”‚    โ”‚  /test/*    โ”‚    โ”‚  Test Code โ”‚  โ”‚
โ”‚   โ”‚             โ”‚    โ”‚   sample*   โ”‚    โ”‚  /mock/*    โ”‚    โ”‚  Comments  โ”‚  โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                                                                              โ”‚
โ”‚                           โฌ‡๏ธ  99% FP REDUCTION  โฌ‡๏ธ                          โ”‚
โ”‚                                                                              โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚   โ”‚                         โœ… VERIFIED SECRETS                          โ”‚   โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                                                                              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

How It Works

1๏ธโƒฃ Placeholder Detection

Automatically filters obvious placeholder values:

# โŒ FILTERED - Placeholder patterns
API_KEY = "your-api-key-here"
SECRET = "your_secret_key"
TOKEN = "example_token_123"
PASSWORD = "sample_password"
KEY = "test_key_dummy"
FAKE_KEY = "0000123456789abcdef"

2๏ธโƒฃ Path Exclusion

Intelligently ignores files in non-production directories:

๐Ÿ“‚ Excluded Directories:
โ”œโ”€โ”€ ๐Ÿ“ docs/           # Documentation
โ”œโ”€โ”€ ๐Ÿ“ test/           # Test files
โ”œโ”€โ”€ ๐Ÿ“ tests/          # Test suites
โ”œโ”€โ”€ ๐Ÿ“ spec/           # Specifications
โ”œโ”€โ”€ ๐Ÿ“ examples/       # Example code
โ”œโ”€โ”€ ๐Ÿ“ demo/           # Demo files
โ”œโ”€โ”€ ๐Ÿ“ mock/           # Mock data
โ”œโ”€โ”€ ๐Ÿ“ fixtures/       # Test fixtures
โ”œโ”€โ”€ ๐Ÿ“ vendor/         # Third-party code
โ”œโ”€โ”€ ๐Ÿ“ node_modules/   # NPM packages
โ””โ”€โ”€ ๐Ÿ“ __pycache__/    # Python cache

3๏ธโƒฃ UI Identifier Filtering

Filters UI-related identifiers that are not actual secrets:

// โŒ FILTERED - UI Identifiers
data-testid="abc123"
clientId: "ui-component-123"
sessionId: "browser-session-456"
transactionId: "tx-789012"
trackingId: "ga-tracking-id"

4๏ธโƒฃ Context Analysis

Examines surrounding code to identify:

  • Test fixtures and mock data
  • Documentation examples
  • Configuration templates
  • Commented-out credentials

Example Comparison

# โŒ FILTERED (Placeholder Pattern)
API_KEY = "your-api-key-here"
STRIPE_KEY = "sk_test_example_key"
GITHUB_TOKEN = "ghp_example_token_for_testing"

# โŒ FILTERED (Inside /test/ directory)
# File: /tests/test_config.py
SECRET = "AKIAIOSFODNN7EXAMPLE"

# โŒ FILTERED (UI Identifier)
<button data-testid="submit-button">

# โœ… DETECTED (Real Secret)
API_KEY = "sk_live_4eC39HqLyjWDarjtT1zdp7dc"
AWS_KEY = "AKIAZ1234567890ABCDH"
GITHUB_TOKEN = "ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

๐Ÿ” Supported Secrets

๐Ÿ”ด Critical Severity

Service Pattern Example
AWS Access Key AKIA[0-9A-Z]{16} AKIAZ1234567890ABCDH
AWS Secret 40-char alphanumeric wJalrXUtnFEMI/K7MDENG...
GitHub Token ghp_[A-Za-z0-9_]{36} ghp_xxxxxxxxxxxx...
Slack Token xox[baprs]-[0-9]{10,13}-... xoxb-1234567890-...
Telegram Bot [0-9]{8,10}:[A-Za-z0-9_-]{35} 123456789:AABBccdd...
Stripe Secret sk_live_[0-9a-zA-Z]{24} sk_live_4eC39Hq...
OpenAI Key sk-[a-zA-Z0-9]{20}T3BlbkFJ... sk-proj-xxxxx...
Google API AIza[0-9A-Za-z\-_]{35} AIzaSyDaGmWKa4Ds...
RSA Private Key -----BEGIN RSA PRIVATE KEY----- Full PEM format
MongoDB URI mongodb://user:pass@host Connection strings

๐ŸŸ  High Severity

Service Pattern Example
Twilio SID AC[a-fA-F0-9]{32} ACxxxxxxxxxxxxxxxx...
SendGrid SG\.[a-zA-Z0-9_\-]{22}\.... SG.xxxxx.yyyyy
NPM Token npm_[a-zA-Z0-9]{36} npm_xxxxxxxxxxxx...
GitLab Token glpat-[A-Za-z0-9_\-]{20} glpat-xxxxxxxx...
Discord Bot [MN][a-zA-Z\d]{23}\.... MTEzB...
Heroku API 36-char UUID format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

๐ŸŸก Medium Severity

Service Pattern Example
JWT Token eyJ[a-zA-Z0-9_-]*\.eyJ... eyJhbGciOiJIUzI1Ni...
Generic API Key api[_-]?key.*[a-zA-Z0-9]{32,} Various formats
Secret Key secret[_-]?key.*[a-zA-Z0-9]{16,} Various formats
Access Token access[_-]?token.* Various formats

๐Ÿ“ Output Structure

MX Scanner organizes outputs professionally with automatic timestamping:

mx_results/
โ”‚
โ”œโ”€โ”€ goog_scan_20240327_203800/          # Auto-generated folder
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ results.json                  # Complete JSON report
โ”‚   โ”‚   โ”œโ”€โ”€ meta                         # Tool info, PI constant
โ”‚   โ”‚   โ”œโ”€โ”€ summary                      # Statistics
โ”‚   โ”‚   โ”œโ”€โ”€ secrets[]                    # All discovered secrets
โ”‚   โ”‚   โ””โ”€โ”€ vulnerabilities[]            # Security issues
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ report.html                   # Professional HTML report
โ”‚   โ”‚   โ””โ”€โ”€ Futuristic design, interactive
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ secrets_found.json            # Secrets only
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ vulnerabilities_found.json    # Vulnerabilities only
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ scanned_urls.txt              # All scanned URLs
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ scanned_files.txt             # Local scan files
โ”‚
โ”œโ”€โ”€ twil_scan_20240327_204500/
โ”‚   โ””โ”€โ”€ ...
โ”‚
โ””โ”€โ”€ local_scan_20240327_210000/
    โ””โ”€โ”€ ...

Folder Naming Convention

{first_4_chars_of_target}_scan_{YYYYMMDD}_{HHMMSS}/

Examples:

  • goog_scan_20240327_203800 โ†’ google.com scan
  • twil_scan_20240327_204500 โ†’ twilio.com scan
  • loca_scan_20240327_210000 โ†’ Local file scan

๐ŸŽจ Color System

MX Scanner features a professional color-coded output system for immediate visual recognition:

Color Severity ANSI Code Visual
๐Ÿ”ด Critical \033[91m Immediate Action Required
๐ŸŸ  High \033[38;5;208m Urgent Attention
๐ŸŸก Medium \033[93m Should Be Reviewed
๐ŸŸข Low \033[92m Informational
๐Ÿ”ต Info \033[96m Status Messages
โšช Success \033[92m Completed Tasks

Terminal Output Example

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘              ๐Ÿš€ MX SCANNER v5.0 - AUTOMATION FRAMEWORK                        โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘  ๐ŸŽฏ Targets: 15                                                               โ•‘
โ•‘  ๐Ÿงต Threads: 50                                                               โ•‘
โ•‘  ๐ŸŒ Language: EN                                                              โ•‘
โ•‘  ๐Ÿ›ก๏ธ Smart Filter: Active                                                      โ•‘
โ•‘  ๐Ÿ“ PI = 3.14159265358979                                                     โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

๐Ÿ“ก Scanning Targets...
  ๐Ÿ” [Critical] AWS Access Key ID @ Line 42
  ๐Ÿ” [Critical] GitHub Personal Access Token @ Line 87
  ๐ŸŸ  [High] SendGrid API Key @ Line 156
  ๐ŸŸก [Medium] JWT Token @ Line 203

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘                        ๐Ÿ“Š Scan Complete!                                       โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘  ๐Ÿ” Secrets Found: 15                                                         โ•‘
โ•‘  ๐Ÿ›ก๏ธ False Positives Filtered: 42                                              โ•‘
โ•‘  โญ Risk Score: 87                                                            โ•‘
โ•‘  โฑ๏ธ Duration: 45.32 seconds                                                   โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

๐Ÿ”ง Integration with Other Tools

MX Scanner is designed for seamless integration with popular security tools:

Pipeline Integration

# With subfinder + httpx
subfinder -d target.com -silent | httpx -silent | python3 mx_scanner_v5.py

# With waybackurls
cat domains.txt | waybackurls | python3 mx_scanner_v5.py

# With katana
katana -u https://target.com -silent | python3 mx_scanner_v5.py

# With nuclei results
cat nuclei_results.txt | python3 mx_scanner_v5.py

CI/CD Integration

# GitHub Actions Example
name: Secret Scan
on: [push, pull_request]

jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.10'
          
      - name: Install dependencies
        run: pip install aiohttp
        
      - name: Run MX Scanner
        run: python3 mx_scanner_v5.py --local ./ --output ./scan-results
        
      - name: Upload Results
        uses: actions/upload-artifact@v3
        with:
          name: scan-results
          path: ./scan-results/

Output Parsing

The JSON output is structured for easy programmatic access:

{
  "meta": {
    "tool": "MX Scanner v5.0",
    "pi": 3.14159265358979
  },
  "summary": {
    "secrets": 15,
    "risk_score": 87,
    "false_positives_filtered": 42
  },
  "secrets": [
    {
      "id": 1,
      "secret_type": "AWS Access Key ID",
      "severity": "Critical",
      "url": "https://target.com/config.js",
      "line_number": 42,
      "match": "AKIAZ1234567890ABCDH",
      "entropy": 3.68
    }
  ]
}

๐Ÿ“ Mathematical Precision

MX Scanner uses the mathematical constant ฯ€ (Pi) for enhanced precision in calculations:

PI Constant

PI = 3.14159265358979323846

Entropy Calculation

def calculate_entropy(data: str) -> float:
    """
    Shannon entropy calculation with PI normalization
    """
    counts = Counter(data)
    length = len(data)
    entropy = 0.0
    
    for count in counts.values():
        probability = count / length
        entropy -= probability * math.log2(probability)
    
    # Normalize using PI for enhanced precision
    normalized = entropy * (math.log(PI) / math.log(2))
    return round(entropy, 4)

Risk Score Calculation

risk_score = (
    (critical_count * 10) +
    (high_count * 5) +
    (medium_count * 3) +
    (low_count * 1)
) * (PI / 3)  # PI-normalized for precision

๐Ÿ”ฎ Roadmap

Coming Soon

Feature Status Expected Release
๐Ÿค– AI-Powered Detection ๐Ÿ”„ In Progress Q2 2024
๐Ÿ”Œ Plugin System ๐Ÿ”„ In Progress Q2 2024
๐Ÿ“ฑ Mobile App Integration ๐Ÿ“‹ Planned Q3 2024
๐ŸŒ Web Dashboard ๐Ÿ“‹ Planned Q3 2024
๐Ÿณ Docker Container ๐Ÿ“‹ Planned Q2 2024
โ˜๏ธ Cloud Version ๐Ÿ“‹ Planned Q4 2024

๐Ÿ› ๏ธ More Tools Coming Soon

We're building a complete security toolkit:

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘                    ๐Ÿ› ๏ธ MX SECURITY SUITE                      โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘  ๐Ÿ”น MX Subdomain Enumerator  - Advanced subdomain discovery  โ•‘
โ•‘  ๐Ÿ”น MX Vulnerability Scanner - Automated vulnerability scan  โ•‘
โ•‘  ๐Ÿ”น MX Port Scanner          - High-speed port scanning      โ•‘
โ•‘  ๐Ÿ”น MX Directory Buster      - Smart directory enumeration   โ•‘
โ•‘  ๐Ÿ”น MX SQL Injector          - Automated SQL injection tests  โ•‘
โ•‘  ๐Ÿ”น MX XSS Hunter            - Advanced XSS detection        โ•‘
โ•‘  ๐Ÿ”น MX Cloud Auditor         - Cloud misconfiguration scan   โ•‘
โ•‘  ๐Ÿ”น MX Secret Manager        - Secure secret storage         โ•‘
โ•‘  ๐Ÿ”น MX API Fuzzer            - API security testing          โ•‘
โ•‘  ๐Ÿ”น MX SSL Analyzer          - SSL/TLS security assessment   โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

๐Ÿค Contributing

Contributions are welcome! Here's how you can help:

Ways to Contribute

  • ๐Ÿ› Report Bugs - Open an issue with details
  • ๐Ÿ’ก Suggest Features - Share your ideas
  • ๐Ÿ”ง Submit PRs - Fix bugs or add features
  • ๐Ÿ“– Improve Docs - Help us clarify documentation
  • โญ Star the Repo - Show your support

Development Setup

# Fork and clone
git clone https://github.com/YOUR_USERNAME/mx-scanner.git

# Create feature branch
git checkout -b feature/amazing-feature

# Make changes and test
python3 mx_scanner_v5.py --debug --local ./test_files

# Commit and push
git commit -m "Add amazing feature"
git push origin feature/amazing-feature

# Open Pull Request

Guidelines

  • Follow PEP 8 style guide
  • Add tests for new features
  • Update documentation
  • Keep code clean and modular

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License

Copyright (c) 2024 Mohamed Musa Mohamed

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software...

โš ๏ธ Disclaimer

IMPORTANT: This tool is intended for educational purposes and authorized security testing only. The author is not responsible for any misuse or damage caused by this tool.

  • โœ… Use on systems you own or have explicit permission to test
  • โœ… Follow responsible disclosure practices
  • โœ… Comply with all applicable laws and regulations
  • โŒ Never use for unauthorized access
  • โŒ Never use for malicious purposes

๐Ÿ“ง Contact

Mohamed Musa Mohamed

Email Twitter LinkedIn GitHub


๐ŸŒŸ Support This Project

If you find MX Scanner useful, please consider:

โญ Star This Repo ๐Ÿ”„ Share With Others ๐Ÿ“ข Mention In Your Work
Helps visibility Grows the community Credits are appreciated

Typing SVG

"Security is not a product, but a process."

Made with โค๏ธ by Mohamed Musa Mohamed


About

Advanced async security scanner to detect exposed secrets and API keys with smart filtering.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages