The Gersinia tool takes advantage of known weaknesses in several network protocols.It helps with trying to abuse the weaknesses to ensure that network protections are implemented where possible.
A modern GUI application for network protocol testing and packet crafting, similar to Yersinia but with updated functionality and a user-friendly interface.
- ARP Spoofing: Perform ARP cache poisoning attacks between targets
- DHCP Starvation: Exhaust DHCP server resources with fake requests
- LLMNR Spoofing: Intercept and respond to LLMNR queries
- Packet Crafting: Create custom network packets with various protocols
- Modern GUI: Built with CustomTkinter for a clean, dark-themed interface
- Real-time Logging: Monitor all activities with timestamped output
- Python 3.7+
- Administrator/root privileges (required for packet crafting and network attacks)
- Dependencies listed in
requirements.txt
- Clone or download the project:
git clone https://github.com/mscbuild/Gersinia
cd Gersinia- Install dependencies:
pip install -r requirements.txtWindows:
# Run as Administrator
python main.pyLinux/macOS:
# Run as root
sudo python3 main.py- Select a network interface
- Enter target IP address
- Enter gateway IP address
- Click "Start ARP Spoof"
- Monitor output for attack progress
- Select a network interface
- Set the number of DHCP requests (default: 100)
- Click "Start DHCP Starvation"
- Watch as DHCP leases are exhausted
- Select a network interface
- Enter your attacker IP address
- Click "Start LLMNR Spoof"
- The tool will respond to LLMNR queries with your IP
- Click the "Packet Crafter" button
- Add layers to your packet:
- Ethernet: Configure MAC addresses and EtherType
- IP: Set source/destination IPs, TTL, protocol
- TCP: Configure ports, sequence numbers, flags
- UDP: Set source/destination ports
- ARP: Configure ARP request/response parameters
- ICMP: Set type, code, ID, and sequence
- Click "Build Packet" to construct the packet
- Preview the packet structure in the preview window
- Configure send options (count and interval)
- Click "Send Packet" to transmit
- Save Template: Save current packet configuration as JSON
- Load Template: Load previously saved packet configurations
- Templates are stored as JSON files for easy sharing and modification
The tool automatically detects available network interfaces:
- Use the dropdown to select your active network interface
- Click "Refresh Interfaces" if you change network connections
- The selected interface is used for all attacks and packet sending
- All activities are logged in the main output window
- Logs include timestamps and detailed information
- Activities are also saved to
network_attack_tool.log - Use "Clear Output" to reset the display
IMPORTANT: This tool is designed for:
- Educational purposes and security research
- Network penetration testing with proper authorization
- Understanding network protocol vulnerabilities
Do NOT use for:
- Unauthorized network access
- Malicious activities
- Violating laws or organizational policies
Always ensure you have:
- Explicit permission to test networks
- Proper authorization for penetration testing
- Understanding of legal and ethical implications
-
"Administrator privileges required"
- Windows: Right-click and "Run as administrator"
- Linux/macOS: Use
sudoor run as root
-
"No network interfaces found"
- Check network adapter is enabled
- Try refreshing interfaces
- Ensure you have network connectivity
-
Packet sending fails
- Verify network interface is correct
- Check firewall settings
- Ensure administrator privileges
-
LLMNR spoofing not working
- LLMNR queries may be disabled on target network
- Check if port 5355 is blocked
- Verify target is using Windows name resolution
network_attack_tool/
├── main.py # Main application and GUI
├── packet_crafter.py # Packet crafting module
├── requirements.txt # Python dependencies
└── README.md # This file
- Create attack method in
main.py - Add GUI controls in
create_widgets() - Implement toggle method for start/stop
- Add logging for attack status
The tool supports common network protocols:
- Ethernet II
- IPv4
- TCP/UDP
- ARP
- ICMP
- DHCP
- LLMNR/NetBIOS
- DNS (basic support)
The Gersinia tool helps network administrators and security professionals:
-
Test network resilience to Layer 2 attacks.
-
Demonstrate vulnerabilities that are often overlooked during security assessments (usually focused on Layer 3/L4).
-
Test security settings: Port Security, DHCP Snooping, Dynamic ARP Inspection.
This project is for educational and research purposes. Users are responsible for compliance with applicable laws and regulations.
Contributions are welcome for:
- New attack modules
- Protocol support
- UI improvements
- Bug fixes
- Documentation updates
Warning
Please ensure all contributions maintain ethical use guidelines.
✅ No vulnerable dependencies detected.