ββββ ββββββββββββββββββββ βββββββ βββ βββ ββββββ ββββ ββββββββββββ βββββββ ββββ ββββ
βββββ ββββββββββββββββββββ βββββββββββ ββββββββββββββββ ββββββββββββββββββββββββββ βββββ
ββββββ βββββββββ βββ ββββββββββββββββββββββββββββββ βββ βββ βββ ββββββββββββββ
ββββββββββββββββ βββ βββββββ ββββββββββββββββββββββββββ βββ βββ ββββββββββββββ
βββ ββββββββββββββ βββ βββ βββ ββββββ ββββββ ββββββ βββ ββββββββββββ βββ βββ
βββ βββββββββββββ βββ βββ βββ ββββββ ββββββ βββββ βββ βββββββ βββ βββ
NetPhantom v3.2.2
A Wireshark-inspired network packet sniffer & analyzer built with Python, Scapy, and Tkinter.
NetPhantom/
βββ main.py β Entry point: CLI launcher & GUI bootstrap
βββ capture.py β Packet capture engine (Scapy + threading + PCAP import)
βββ analyzer.py β Deep packet inspection, protocol dissection, threat detection
βββ gui.py β Professional Tkinter GUI (Midnight Blue theme, 3-pane layout)
βββ setup.py β Package config: enables `netphantom` CLI command
βββ requirements.txt β Python dependencies
βββ SECURITY.md β Security policy
βββ README.md β This file
You can install NetPhantom on Windows using the pre-compiled graphic setup installer:
- Navigate to the
dist/directory. - Double-click
NetPhantom_Setup.exe. - Follow the wizard steps to install NetPhantom, create Desktop and Start Menu shortcuts, and launch the application.
- Python 3.10+
- Windows: Npcap installed (required by Scapy)
- Linux/macOS:
libpcap(usually pre-installed)
pip install -r requirements.txt# From the project directory:
pip install -e .
# Now you can launch NetPhantom from anywhere:
netphantomThis registers the netphantom command system-wide. Works on Windows, Linux, and macOS.
| Platform | How to Run |
|---|---|
| Windows | Right-click terminal β Run as Administrator β netphantom |
| Linux | sudo netphantom |
| macOS | sudo netphantom |
netphantom
# or:
python main.pynetphantom --open capture.pcap
netphantom -o traffic.pcapnetphantom -lnetphantom --versionββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β NetPhantom v3.2.2 [FileβCaptureβAnalyzeβViewβHelp] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β [Interface βΌ] [Capture Filter ] [βΆ Start] [β Stop] [Proto βΌ]β
β π [Display Filter ] [Apply] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β PACKET LIST (color-coded rows) β
β No. β Time β Source β Destination β Protocol β Length β Info β
ββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ€
β PROTOCOL TREE β HEX DUMP β
β βΈ Frame: 74 bytes β 0000 45 00 00 4a 1b 3e E..J.> β
β βΈ Ethernet II β 0010 80 11 00 00 0a 00 ...... β
β βΈ IPv4: 10.0β8.8 β 0020 08 08 08 08 d5 3e .....> β
β βΈ UDP: 54590β53 β β
ββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββ€
β β CAPTURING on Wi-Fi β 1,247 packets β 38.2 pkt/s β 14:32 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Panel | Description |
|---|---|
| Menu Bar | File (Open/Save PCAP, Export JSON), Capture, Analyze, View, Help |
| Toolbar | Interface selector, BPF capture filter, Start/Stop buttons |
| Display Filter | Post-capture search & protocol filter |
| Packet List | Color-coded rows: click to inspect, double-click for detail popup |
| Protocol Tree | Wireshark-style expandable protocol dissection (Ethernet β IP β TCP β App) |
| Hex Dump | Raw packet bytes with offset, hex, and ASCII columns |
| Side Panel | Tabbed: π Stats, π Streams, β Alerts, π Endpoints, π Graph |
| Key | Action |
|---|---|
F5 |
Start capture |
F6 |
Stop capture |
Ctrl+O |
Open PCAP file |
Ctrl+S |
Save as PCAP |
Ctrl+F |
Focus display filter |
Ctrl+L |
Clear all packets |
Ctrl+R |
Restart capture |
Ctrl++ |
Zoom in |
Ctrl+- |
Zoom out |
Escape |
Stop capture |
Double-click |
Open packet detail popup |
| Color | Protocol |
|---|---|
| π’ Emerald | TCP |
| π΅ Blue | UDP |
| π‘ Amber | ICMP |
| π£ Violet | ARP |
| π©΅ Cyan | DNS / TLS |
| π Orange | HTTP |
| π’ Teal | HTTPS / QUIC |
| π Pink | TLS Handshake |
| π΄ Red BG | Threat / Alert packets |
| Threat | Detection |
|---|---|
| Port Scan | > 15 unique dst ports from one IP |
| SYN Flood | > 50 SYN packets/sec from one IP |
| DoS / High Traffic | > 100 packets/sec from one IP |
| ICMP Flood | > 50 ICMP packets/sec from one IP |
| DNS Flood | > 30 DNS queries/sec from one IP |
| ARP Spoofing | IP address changes MAC address |
Alerts appear in the β Alerts tab and as red-highlighted rows in the packet list.
| Format | Description |
|---|---|
.pcap |
Standard packet capture (open in Wireshark) |
.json |
Parsed packet summaries (for scripting/analysis) |
main.py (NetPhantom Entry Point)
ββ parse_arguments() β argparse (--open, -l, --version)
ββ check_privileges() β admin/root check
ββ run_gui() β gui.py β PacketSnifferGUI
β
capture.py β CaptureEngine
β ββ sniff() [background thread]
β ββ load_pcap() [PCAP import]
β ββ Queue<pkt_info> (10000)
β ββ export_pcap / export_json
β
analyzer.py β PacketAnalyzer
ββ parse(pkt) β dict
ββ build_protocol_tree(pkt) β dissection
ββ format_hex_dump(pkt) β hex view
ββ get_stats() β dict
ββ _detect_threats() β alerts
ββ endpoint/stream tracking
Python >= 3.10
scapy >= 2.5.0
colorama >= 0.4.6
psutil >= 5.9.0
tkinter (bundled with Python)
Npcap (Windows only) β https://npcap.com
β Warning: Only use this tool on networks you own or have explicit written permission to monitor.
This tool is built for:
- β Authorized penetration testing
- β Network troubleshooting on your own network
- β Cybersecurity education and learning
- β CTF/lab environments
- β NOT for unauthorized surveillance
# Generate test traffic
ping 8.8.8.8
curl http://example.com
nslookup google.com| Issue | Fix |
|---|---|
Permission denied |
Run as Administrator (Windows) or sudo (Linux) |
| No packets captured | Install Npcap (Windows) or check interface name |
Interface not found |
Run netphantom -l to list available interfaces |
| Scapy import error | pip install -r requirements.txt |
| GUI doesn't open | Ensure tkinter is installed (python -m tkinter) |
netphantom not found |
Run pip install -e . from the project directory |
Lucky β Ethical Hacker
Tool Name: NetPhantom v3.2.2
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
"With great packet-sniffing power comes great responsibility."