Hidden Rogue AP Detector
A Python-based tool for detecting rogue/unauthorized wireless access points on a network using RSSI signal strength analysis.
- Rogue AP Detection: Identifies unauthorized access points using a whitelist approach
- Signal Strength Analysis: Uses RSSI measurements to estimate AP location
- Multiple Scanning Modes:
- Active scanning using
iwlist - Passive scanning using packet sniffing with
scapy
- Active scanning using
- Alerting System: Warns when new APs are detected with strong signal
- GPS Integration: Optional tracking of physical locations when detecting APs
- Comprehensive Logging: Detailed records of all detected networks
- Python 3.x
scapypackagewireless-toolspackage (foriwlist)gpsd-py3(optional, for GPS integration)- Root privileges (required for monitor mode)
Clone this repository:
git clone https://github.com/Rootless-Ghost/Hidden-Rogue-AP-Detector.git
cd Hidden-Rogue-AP-DetectorInstall the required Python packages:
pip install scapy
pip install gpsd-py3 # Optional, for GPS supportInstall the wireless tools package:
# Debian/Ubuntu/Kali
sudo apt-get install wireless-tools
# CentOS/RHEL
sudo yum install wireless-toolsThe script must be run with root privileges to enable monitor mode:
sudo python rogue_ap_detector.py [options]| Option | Description |
|---|---|
-i, --interface |
Wireless interface to use (default: wlan0) |
-m, --mode |
Scanning mode: active (iwlist) or passive (scapy) |
-t, --threshold |
RSSI threshold for alerts in dBm (default: -65) |
-s, --scan-interval |
Interval between scans in seconds (default: 30) |
-g, --gps |
Enable GPS integration if available |
-w, --whitelist |
Path to whitelist file (default: whitelist.json) |
-o, --output |
Output file for results (default: detected_aps.json) |
Basic usage with default settings:
sudo python rogue_ap_detector.pyUsing a specific interface with passive scanning:
sudo python rogue_ap_detector.py -i wlan1 -m passiveEnable GPS integration with a custom whitelist:
sudo python rogue_ap_detector.py -g -w my_whitelist.jsonThe whitelist is a JSON file containing MAC addresses of authorized access points:
{
"authorized_aps": [
"00:11:22:33:44:55",
"AA:BB:CC:DD:EE:FF"
]
}You can manually edit this file, or use the script's API to manage the whitelist programmatically.
- Scanning: The tool scans for wireless networks using either active scanning via
iwlistcommands or passive scanning by capturing beacon frames withscapy(requires monitor mode). - Detection: Each detected AP is compared against the whitelist. Unrecognized APs are flagged as potential rogues.
- Analysis: Signal strength measurements (RSSI) are used to approximate the physical location of the detected APs.
- Alerting: When a rogue AP with strong signal is detected, an alert is triggered.
- Only use this tool on networks you own or have explicit permission to test
- Putting wireless interfaces in monitor mode can affect normal network connectivity
- Maintain your whitelist regularly to avoid false positives
This project is licensed under the MIT License - see the LICENSE file for details.
- The scapy project for packet manipulation capabilities
- The wireless tools package for network scanning functionality
Built by Rootless-Ghost
