Skip to content

ramzan4ik-leaks/AutoMassCorpPentest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Docker Container Management & Nmap Scanning

Automated VPN & Security Analysis Tool

Purpose

This Python script automates the management of Docker containers for VPN testing and network analysis using Nmap. It integrates advanced logging and messaging with Telegram for real-time updates, enabling efficient monitoring and scanning.


Key Features

  1. Docker Container Management

    • Start, stop, and manage containers programmatically.
    • Dynamically configure containers with specific network settings.
  2. Network Interface Detection

    • Automatically identifies network interfaces (ppp0).
    • Retrieves CIDRs and configures routing tables within containers.
  3. Nmap Scanning Integration

    • Installs nmap and additional tools inside containers.
    • Performs network vulnerability scans for specific ports and services (e.g., SMB, RDP).
    • Outputs results in structured formats like JSON and XML.
  4. Telegram Notifications

    • Sends real-time updates and scan summaries to specified Telegram chats.
    • Shares files (e.g., Nmap results) via Telegram for easy accessibility.
  5. Error Handling & Logging

    • Implements retry mechanisms for container operations and CIDR retrieval.
    • Logs actions and errors with timestamped entries for debugging.

Workflow Overview

  1. Container Initialization

    • Defines container properties such as IP, VPN credentials, and privileged permissions.
    • Starts and configures Docker containers with these properties.
  2. Interface & CIDR Management

    • Checks for the existence of network interfaces within the container.
    • Retrieves and validates CIDRs for further scanning.
  3. Nmap Installation & Scanning

    • Installs tools (nmap, jq) to facilitate network scanning and result processing.
    • Executes scans using advanced Nmap arguments for service detection and vulnerability analysis.
  4. Results Processing

    • Parses Nmap XML output into JSON for easier interpretation.
    • Filters and sends relevant results to Telegram.
    • Saves detailed results as JSON files for future reference.

Telegram Interaction

  • Real-time Updates:

    • Notifies on key milestones (e.g., container start, scan completion).
    • Alerts on errors or invalid configurations.
  • Detailed Reporting:

    • Sends formatted scan summaries and full scan results.
    • Shares JSON files containing detailed scan data.

System Requirements

  1. Dependencies

    • Python Modules: requests, time, subprocess, logging, xmltodict, json
    • Linux tools within Docker containers: nmap, jq
  2. Docker Networking

    • Privileged access for configuring custom routes and VPN addresses.
  3. Telegram API Integration

    • A valid Telegram bot API key and chat IDs for notifications.

Potential Use Cases

  • Automated VPN testing and validation.
  • Network vulnerability assessments.
  • Real-time security monitoring for dynamic IP ranges.
  • Scalable testing for large-scale networks.

Next Steps

  1. Expand Features:

    • Add support for custom Nmap scripts.
    • Enhance error reporting with container-specific logs.
  2. Performance Optimization:

    • Parallelize scanning across containers for faster execution.
  3. Security Enhancements:

    • Secure sensitive data (e.g., passwords, API keys) using environment variables or encrypted files.
  4. Testing Automation:

    • Develop unit tests to validate individual components.

About

Auto Mass Loca lPentest Fortinet

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages