Professional network reconnaissance tool for advanced port scanning and service enumeration - CHDEVSEC Pentest Arsenal
- Features
- Installation
- Basic Usage
- Advanced Options
- Scanning Techniques
- Reports
- Examples
- Disclaimer
- License
| Feature | Description |
|---|---|
| Multi-Protocol Scanning | TCP, UDP, SYN scanning with stealth capabilities |
| Service Detection | Advanced service fingerprinting and banner grabbing |
| DNS Enumeration | Comprehensive DNS reconnaissance and subdomain discovery |
| SSH Brute Force | Intelligent SSH credential testing with rate limiting |
# Advanced Evasion Techniques
SYN Stealth Scan β Bypass basic firewalls
TCP Connect Scan β Full connection establishment
UDP Scan β Discover UDP services
Custom Packet Craft β Evade detection systems# Supported Formats
- JSON (structured data)
- XML (detailed reports)
- TXT (simple output)
- CSV (spreadsheet compatible)
ShadowPort is designed to run on penetration testing distributions:
# Supported Operating Systems
- Kali Linux (Recommended)
- Parrot Security OS
- BlackArch Linux
- Debian/Ubuntu based systemspython3 --version # Requires Python 3.6+# Clone repository
git clone https://github.com/chdevsec/ShadowPort.git
cd ShadowPort
# Install dependencies
pip install -r requirements.txt
# Alternative installation with pip3
pip3 install -r requirements.txtscapy>=2.4.5
requests>=2.25.1
dnspython>=2.1.0
paramiko>=2.7.2
colorama>=0.4.4
python-nmap>=0.6.1
# Update package repositories
sudo apt update && sudo apt upgrade -y
# Install core networking tools (REQUIRED)
sudo apt install nmap masscan dnsutils netcat-traditional
# Install Python development packages
sudo apt install python3-dev python3-pip build-essential
# Install Scapy system dependencies (CRITICAL for stealth scanning)
sudo apt install python3-scapy libpcap-dev tcpdump
# Alternative Scapy installation for advanced features
sudo apt install python3-scapy python3-cryptography# Verify Nmap installation
nmap --version
# Install latest Nmap from source (optional)
wget https://nmap.org/dist/nmap-7.94.tar.bz2
tar -xjf nmap-7.94.tar.bz2
cd nmap-7.94
./configure && make && sudo make install# Method 1: Grant capabilities to Python (RECOMMENDED)
sudo setcap cap_net_raw,cap_net_admin+eip $(which python3)
# Method 2: Always run with sudo (ALTERNATIVE)
# sudo python3 shadowport.py target --stealth
# Verify raw socket access
python3 -c "import socket; s=socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_TCP); print('Raw sockets: OK')"π Kali Linux:
# All tools pre-installed, just update
sudo apt update && sudo apt install python3-pip
pip3 install -r requirements.txtπ¦ Parrot Security OS:
# Install missing packages
sudo apt install python3-scapy libpcap-dev
pip3 install -r requirements.txtπ§ Debian/Ubuntu:
# Complete installation from scratch
sudo apt install nmap python3-scapy python3-pip libpcap-dev tcpdump
pip3 install -r requirements.txtpython3 shadowport.py [TARGET] [OPTIONS]# Basic port scan
python3 shadowport.py 192.168.1.1
# Scan specific ports
python3 shadowport.py 192.168.1.1 -p 22,80,443,8080
# Stealth SYN scan
python3 shadowport.py 192.168.1.1 --stealth
# Full network scan
python3 shadowport.py 192.168.1.0/24| Option | Description | Default |
|---|---|---|
-p, --ports |
Port range (22,80,443 or 1-1000) | Top 1000 |
-t, --threads |
Number of threads | 100 |
--stealth |
SYN stealth scanning | False |
--udp |
UDP port scanning | False |
--dns |
DNS enumeration | False |
--ssh-brute |
SSH brute force attack | False |
-o, --output |
Output file | None |
--format |
Output format (json/xml/txt/csv) | txt |
--timeout |
Connection timeout | 3 |
--delay |
Delay between requests | 0.1 |
SCAN_TYPES = {
"tcp_connect": "Full TCP connection scan",
"syn_stealth": "SYN stealth scan (requires root)",
"udp_scan": "UDP service discovery",
"fin_scan": "FIN scan for firewall evasion",
"null_scan": "NULL scan technique"
}# Banner Grabbing
HTTP/1.1 Server: Apache/2.4.41
SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5
220 ProFTPD 1.3.6 Server ready
# Service Fingerprinting
Port 22/tcp β SSH (OpenSSH 8.2)
Port 80/tcp β HTTP (Apache 2.4.41)
Port 443/tcp β HTTPS (Apache 2.4.41){
"target": "192.168.1.100",
"scan_time": "2024-06-29T10:30:00Z",
"open_ports": [
{
"port": 22,
"protocol": "tcp",
"service": "ssh",
"banner": "SSH-2.0-OpenSSH_8.2p1",
"state": "open"
}
],
"dns_info": {
"hostname": "target.local",
"subdomains": ["www", "mail", "ftp"]
}
}[+] ShadowPort v1.0 - Network Reconnaissance Tool
[+] Target: 192.168.1.100
[+] Starting port scan...
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.2p1
80/tcp open http Apache 2.4.41
443/tcp open https Apache 2.4.41
3306/tcp open mysql MySQL 8.0.25
[+] Scan completed in 45.2 seconds
[+] 4 open ports discovered# Scenario: Security assessment of company network
python3 shadowport.py 10.0.0.0/24 \
--stealth \
-p 21,22,23,25,53,80,135,139,443,445,993,995,3389 \
--dns \
--format json \
-o corporate_scan.json \
--threads 100 \
--delay 0.5
# Expected Output:
[+] Discovered 15 live hosts
[+] Found 47 open ports across network
[+] Critical services: RDP (3389), SMB (445), SSH (22)
[+] Potential vulnerabilities: 3 hosts with Telnet (23)# Scenario: Mapping web application infrastructure
python3 shadowport.py webapp.company.com \
--dns \
-p 80,443,8000,8080,8443,9000,9443 \
--format xml \
-o webapp_infrastructure.xml
# DNS Enumeration Results:
api.webapp.company.com β 203.0.113.10
admin.webapp.company.com β 203.0.113.15
staging.webapp.company.com β 203.0.113.20# Scenario: Testing SSH security across server farm
python3 shadowport.py servers.txt \
-p 22,2222 \
--ssh-brute \
-u common_users.txt \
-w weak_passwords.txt \
--delay 2.0 \
-o ssh_assessment.csv
# Sample Results:
192.168.1.50:22 β SUCCESS: admin:admin123
192.168.1.51:2222 β SUCCESS: root:password
192.168.1.52:22 β FAILED: Strong authentication# Scenario: Identifying IoT devices on network
python3 shadowport.py 192.168.1.0/24 \
-p 23,80,443,502,1883,8080,8443,9000 \
--format json \
-o iot_devices.json
# Typical IoT Signatures:
Port 1883 β MQTT Broker (IoT Communication)
Port 502 β Modbus (Industrial Control)
Port 23 β Telnet (Legacy IoT Devices)# Scenario: Testing firewall configuration
python3 shadowport.py internal.company.com \
--stealth \
-p 1-65535 \
--format txt \
-o firewall_test.txt \
--threads 200
# Firewall Analysis:
Allowed: 22,80,443 (Expected)
Blocked: 135,139,445 (SMB - Good)
Unexpected: 3389 (RDP - Security Risk)# Scenario: Initial reconnaissance for bug bounty
python3 shadowport.py target.hackerone.com \
--dns \
-p 80,443,8000-8999 \
--format json \
-o bugbounty_recon.json \
--delay 1.0
# Subdomain Discovery:
api.target.hackerone.com β 104.16.1.1
dev.target.hackerone.com β 104.16.1.2
test.target.hackerone.com β 192.168.1.100 (Internal IP Exposed!)# Scenario: Database security assessment
python3 shadowport.py db-servers.txt \
-p 1433,1521,3306,5432,5984,6379,9042,27017 \
--format csv \
-o database_audit.csv
# Database Services Found:
MySQL (3306) β 5 servers
PostgreSQL (5432) β 3 servers
Redis (6379) β 2 servers (No authentication!)
MongoDB (27017) β 1 server# Scenario: Advanced evasion during red team exercise
sudo python3 shadowport.py target-network.com \
--stealth \
--decoy-ips 10.0.0.1,10.0.0.2,10.0.0.3 \
-p 22,80,443 \
--source-port 53 \
--delay 5.0 \
-o stealth_scan.json
# Evasion Techniques Applied:
β SYN Stealth Scanning
β Decoy IP Addresses
β DNS Source Port Spoofing
β Slow Scan (5s delay)# Subdomain Discovery
www.target.com β 192.168.1.10
mail.target.com β 192.168.1.20
ftp.target.com β 192.168.1.30
# DNS Record Types
A Records β IPv4 addresses
AAAA Records β IPv6 addresses
MX Records β Mail servers
TXT Records β Additional information# Credential Testing
[+] Testing SSH credentials on 192.168.1.50:22
[+] Success: admin:password123
[!] Rate limiting active (1 attempt per 2 seconds)# Primary Testing Platforms
π Kali Linux 2024.x (Recommended)
π¦ Parrot Security OS (Fully Supported)
β« BlackArch Linux (Compatible)
π§ Debian 11/12 (Base Support)
π§ Ubuntu 20.04/22.04 (Base Support)RAM: 512MB minimum (2GB recommended)
CPU: Any modern processor
Storage: 100MB for tool + dependencies
Network: Ethernet or WiFi interface# For stealth scanning (SYN, FIN, NULL)
sudo python3 shadowport.py target --stealth
# For raw packet crafting
sudo setcap cap_net_raw+ep /usr/bin/python3π’ open # Port is accessible and service is running
π΄ closed # Port is accessible but no service
π‘ filtered # Port is blocked by firewall
βͺ unknown # Unable to determine stateHigh Confidence # Banner grabbed successfully
Medium Confidence # Service detected by behavior
Low Confidence # Port open, service unknown# Implemented Evasion Methods
- SYN Stealth Scanning
- Fragmented Packets
- Decoy Source IPs
- Random Source Ports
- Timing Randomization# Configurable Delays
--delay 0.1 # Fast scan (may trigger detection)
--delay 1.0 # Balanced approach
--delay 3.0 # Stealth mode (slower but quieter)This tool was developed for educational purposes and authorized security testing. The use of this tool is entirely the user's responsibility. Make sure you have explicit authorization before testing any system.
- β Test only on your own systems or with explicit written authorization
- β Respect the terms of service and local laws
- β Use appropriate rate limiting to avoid service disruption
- β Obtain proper consent before scanning third-party networks
- β Follow responsible disclosure for discovered vulnerabilities
- β Do not use for malicious or illegal activities
- β Do not scan networks without permission
- β Do not violate privacy rights or cause service disruption
- β Do not use for unauthorized access attempts
AUTHORIZED USE ONLY: This software is intended for:
- Personal network security assessments
- Authorized penetration testing engagements
- Corporate security assessments with proper approval
- Educational and research purposes in controlled environments
- Bug bounty programs with explicit scope authorization
PROHIBITED ACTIVITIES:
- Scanning networks/systems without explicit authorization
- Violating computer fraud and abuse laws
- Accessing systems without permission
- Causing service disruption or damage
- Any illegal or malicious activities
The developer is NOT RESPONSIBLE for any misuse of this tool. Users must comply with all applicable laws and regulations in their jurisdiction.
Before using ShadowPort, ensure you have:
- Written authorization from system owners
- Clearly defined scope and limitations
- Understanding of applicable laws and regulations
- Proper insurance and legal protection
- Incident response procedures in place
# Solution: Run with sudo for stealth scans
sudo python3 shadowport.py target --stealth# Solution: Reinstall dependencies
pip3 install --upgrade -r requirements.txt# Solution: Increase thread count
python3 shadowport.py target -t 200We welcome contributions from the cybersecurity community! Here's how you can help improve ShadowPort:
- Use GitHub Issues to report bugs
- Include detailed steps to reproduce
- Provide system information (OS, Python version)
- Attach relevant log files or screenshots
- Open a GitHub Issue with the "enhancement" label
- Clearly describe the proposed feature
- Explain the use case and benefits
- Consider implementation complexity
# Fork the repository
git clone https://github.com/yourusername/ShadowPort.git
cd ShadowPort
# Create a feature branch
git checkout -b feature/amazing-feature
# Make your changes and test thoroughly
python3 -m pytest tests/
# Commit with descriptive messages
git commit -m "Add advanced firewall evasion technique"
# Push and create a Pull Request
git push origin feature/amazing-feature# Follow PEP 8 style guidelines
# Use meaningful variable names
# Add docstrings to functions
# Include type hints where possible
def scan_port(target: str, port: int, timeout: float = 3.0) -> dict:
"""
Scan a specific port on target host.
Args:
target: Target IP address or hostname
port: Port number to scan
timeout: Connection timeout in seconds
Returns:
dict: Scan result with port status and service info
"""
pass# Write tests for new features
# Ensure all tests pass before submitting PR
python3 -m pytest tests/ -v
# Test on multiple Python versions
python3.6 -m pytest tests/
python3.9 -m pytest tests/
python3.11 -m pytest tests/- Update README.md for new features
- Add docstrings to all new functions
- Include usage examples
- Update command-line help text
Contributors will be acknowledged in:
- README.md contributors section
- Release notes
- GitHub contributor page
- Join our Discord server: [ShadowPort Community]
- Follow updates: @CHDevSec
- Email: security@chdevsec.com
We're particularly interested in:
- New Evasion Techniques: Advanced firewall bypass methods
- Protocol Support: Additional protocols (SNMP, LDAP, etc.)
- Performance Optimization: Faster scanning algorithms
- OS Fingerprinting: Enhanced operating system detection
- Reporting Features: Better output formats and visualizations
This project is licensed under the MIT License - see the LICENSE file for details.
π Developed by CHDEVSEC | Pentester Caio Henrique
β If this project was useful to you, consider giving it a star!
port-scanner network-reconnaissance penetration-testing ethical-hacking cybersecurity security-audit stealth-scanning service-enumeration dns-enumeration ssh-bruteforce vulnerability-scanner network-security kali-linux parrot-security red-team blue-team osint information-gathering network-mapping security-testing pentest-tools scapy python automation firewall-evasion banner-grabbing service-detection tcp-scanning udp-scanning syn-stealth