THIS TOOL IS STRICTLY FOR EDUCATIONAL AND AUTHORIZED TESTING PURPOSES ONLY.
The author is NOT responsible for any misuse of this tool. Unauthorized access to computer networks is illegal. Always ensure you have explicit permission to test on any network or system you are targeting. This tool is designed to help security professionals, students, and enthusiasts learn about network security concepts and vulnerabilities.
USE AT YOUR OWN RISK. ALWAYS RESPECT THE LAW AND OTHERS' PRIVACY.
Spofr is a Rust-based educational network security toolkit that demonstrates various network attack techniques. It provides a command-line interface to explore and understand how network protocols can be exploited, and serves as a practical learning resource for understanding network security vulnerabilities and defenses.
Address Resolution Protocol (ARP) spoofing attack implementation.
- List Network Settings:
- View comprehensive information about all network interfaces.
- Displays IP addresses, subnet masks, calculated network and broadcast addresses.
- Shows MAC addresses, interface flags (UP, RUNNING, PROMISC, etc.), and MTU.
- Attempts to detect the default gateway and DNS servers.
- Set Network Settings:
- Manual Configuration: Manually specify the interface, default gateway, and target IP.
- Auto-Configuration: Automatically detects the gateway and sets the target to the entire network.
- Start Attack:
- Performs ARP spoofing based on the configuration.
- Supports single target spoofing (Man-in-the-Middle between Target and Gateway).
- Supports entire network spoofing (Gratuitous ARP broadcast).
- Automatically enables IP forwarding to allow traffic to pass through.
- Requires:
rootprivileges for raw packet manipulation.
Rogue DHCP server implementation for network takeover attacks.
- List Network Settings:
- View detailed information about network interfaces.
- Set Network Settings:
- Configure Router (Gateway) IP: The IP address victims will use as their gateway.
- Pool Configuration: Define the Start and End IP addresses for the address pool.
- DNS Server: Specify DNS server to provide to victims.
- Auto-Suggestion: Intelligent defaults based on selected interface configuration.
- Start Attack:
- Starts a raw socket listener on UDP port 67.
- Responds to DHCP Discover messages with DHCP Offer.
- Responds to DHCP Request messages with DHCP Ack.
- Races against legitimate DHCP servers to control network configuration.
- Requires:
rootprivileges for raw socket access.
Domain Name System (DNS) spoofing attack for traffic redirection.
- List Network Settings:
- View comprehensive interface information including IP addresses and DNS servers.
- Displays detected gateway and DNS configuration.
- Set Network Settings:
- Manual Configuration: Specify interface and target (specific IP or entire network).
- Auto-Configuration: Automatically configures for network-wide DNS poisoning.
- Configure DNS Mappings:
- Redirect to IP: Map specific domains to IP addresses (e.g., example.com -> 192.168.1.100).
- Redirect to Domain: Redirect one domain to another (resolves target domain via system DNS).
- Wildcard Catch-All: Map all unmatched domains to a single IP address.
- Multiple Mappings: Support for numerous domain-to-IP mappings simultaneously.
- Mapping Management: Add, remove, or clear all mappings interactively.
- Start Attack:
- Intercepts DNS queries (UDP port 53) on the network.
- Responds with spoofed DNS responses before legitimate DNS servers.
- Supports both targeted (specific host) and broadcast (entire network) spoofing.
- Real-time logging of spoofed queries.
- Requires:
rootprivileges for packet manipulation.
Network interface MAC address manipulation tool.
- Change MAC Address: Set a custom MAC address for any network interface.
- Set Random MAC: Generate and apply a random, valid MAC address.
- Restore Original MAC: Reset interface to restore the original hardware MAC address.
- Features:
- Validates MAC address format.
- Generates locally administered MAC addresses to avoid conflicts.
- Manages interface state (down/up) automatically.
- Requires:
rootprivileges for interface configuration.
WiFi interface monitor mode configuration tool.
- Interface Selection: Lists all wireless network interfaces.
- Monitor Mode Management:
- Enable Monitor Mode: Uses
airmon-ngto put interface into monitor mode. - Disable Monitor Mode: Restores interface to managed mode.
- Status Checking: Real-time monitor mode status display.
- Interface Detection: Automatically detects renamed monitor interfaces (wlan0mon, mon0, etc.).
- Enable Monitor Mode: Uses
- Requirements:
aircrack-ngsuite (airmon-ng) must be installed.
WiFi deauthentication attack tool for network disruption testing.
- Interface Selection: Automatically detects wireless interfaces and displays their mode status.
- Network Scanning:
- Scans for available WiFi networks using
airodump-ng. - Displays ESSID, BSSID, Channel, and Signal Power.
- Interactive network selection.
- Scans for available WiFi networks using
- Jamming Attack:
- Performs continuous deauthentication attack using
aireplay-ng. - Targets all clients connected to selected access point.
- Automatically sets correct channel for attack.
- Requires: Monitor mode must be enabled first using "Change Card Mode".
- Performs continuous deauthentication attack using
WPA/WPA2 handshake capture tool for password cracking preparation.
- Interface Selection: Detects and validates monitor mode interfaces.
- Network Scanning: Scans and selects target WiFi network.
- Capture Configuration:
- Set Output Path: Customize capture file destination (default:
/tmp/handshake). - Active Capture: Sends deauthentication packets to force handshake.
- Passive Capture: Waits for natural client reconnection to capture handshake.
- Set Output Path: Customize capture file destination (default:
- Handshake Capture:
- Uses
airodump-ngto capture WPA/WPA2 4-way handshake. - Saves capture in
.capformat for later cracking. - Real-time capture monitoring.
- Requires: Monitor mode enabled,
aircrack-ngsuite installed.
- Uses
Denial of Service (DoS) attack targeting DHCP servers.
- List Network Settings: View interface details.
- Set Network Settings:
- Interface Selection: Choose target network interface.
- Attack Modes:
- Simple: Configurable delay between packets.
- Extreme Flooding: Zero-delay packet flooding for maximum throughput.
- Full Starvation (DORA): Completes the full DHCP handshake (Discover-Offer-Request-Ack) to permanently lease IP addresses.
- Start Attack:
- Floods the network with DHCP Discover packets using randomized MAC addresses.
- Exhausts the DHCP server's IP address pool, preventing legitimate clients from connecting.
- Requires:
rootprivileges.
WPA/WPA2 password recovery tool using captured handshakes.
- Capture File Selection: Specify path to captured
.capfile. - Cracking Modes:
- Wordlist Attack:
- Uses dictionary/wordlist file to test passwords.
- Supports large wordlists (rockyou.txt, etc.).
- Displays wordlist size before starting.
- Fast and practical for common passwords.
- Brute Force Attack:
- Systematically tries all possible password combinations.
- Configurable password length (min/max).
- Multiple character sets:
- Lowercase only (a-z)
- Lowercase + uppercase (a-z, A-Z)
- Alphanumeric (a-z, A-Z, 0-9)
- All printable characters
- Numeric only (0-9)
- Uses
crunchto generate passwords on-the-fly. - Warning system about extreme time requirements.
- Wordlist Attack:
- Tools Used:
aircrack-ngfor cracking,crunchfor password generation. - Common Wordlists:
/usr/share/wordlists/rockyou.txt/usr/share/wordlists/fasttrack.txt/usr/share/john/password.lst
cargo install spofr-
Clone the repository:
git clone https://github.com/hotplugindev/spofr cd spofr -
Build the project:
cargo build --release
Root privileges are required for most features:
sudo spofrOr if installed via cargo:
sudo $(which spofr)The tool will present an interactive menu where you can navigate through different attack modules.
- Operating System: Linux (uses
/proc,/sys, andipcommand) - Privileges: Root access required for raw socket operations and network interface manipulation
- Rust: Edition 2021 or later
- Required Tools:
aircrack-ngsuite (airmon-ng, airodump-ng, aireplay-ng) for wireless featurescrunchfor brute force password generation (optional, for cracking module)
- Recommended Wordlists:
- rockyou.txt (
sudo apt install wordlistsor download separately) - Custom wordlists for targeted attacks
- rockyou.txt (
This tool demonstrates:
- ARP Protocol Vulnerabilities: Understanding how the lack of authentication in ARP can be exploited.
- DHCP Security: How rogue DHCP servers can compromise network security.
- DNS Spoofing: Man-in-the-middle attacks through DNS cache poisoning and response manipulation.
- MAC Address Spoofing: Bypassing MAC-based access controls.
- WiFi Security Protocols: Understanding WPA/WPA2 4-way handshake capture and vulnerabilities.
- Password Cracking Techniques: Dictionary attacks vs. brute force approaches.
- Monitor Mode Operations: Understanding wireless packet injection and monitoring.
- Raw Socket Programming: Low-level network packet manipulation in Rust.
- Network Security Concepts: Practical implementation of common attack vectors.
✅ ARP Spoofing - Full implementation with auto and manual configuration
✅ DHCP Spoofing - Rogue DHCP server with complete DORA handshake
✅ DNS Spoofing - DNS cache poisoning with flexible domain mapping and redirection
✅ MAC Changer - Custom and random MAC address assignment
✅ Change Card Mode - Monitor mode management for wireless interfaces
✅ WLAN Jammer - WiFi deauthentication attack
✅ Auth Capture - WPA/WPA2 handshake capture with active and passive modes
✅ WLAN Capture Cracking - Password recovery with wordlist and brute force attacks
✅ DHCP Starvation - DHCP pool exhaustion with multiple attack modes (Simple, Extreme, DORA)
Contributions are welcome! Please ensure all contributions maintain the educational focus and include appropriate warnings about legal and ethical use.
MIT License - See LICENSE file for details
This software is provided for educational purposes. Users must comply with all applicable laws and regulations in their jurisdiction. Unauthorized network intrusion is illegal. Always obtain proper authorization before testing network security.