This Python tool listens for ICMP Echo Request packets and reconstructs transmitted data from chunked payloads. The program uses Scapy to capture network packets, extract a 9-byte payload from each ICMP packet, and rebuild the original data once all chunks are received.
- ICMP Sniffing: Captures ICMP Echo Request packets.
- Payload Parsing: Validates a fixed 9-byte payload structure.
- Data Reconstruction: Reassembles the complete transmission from chunked data.
- Real-Time Feedback: Prints status updates for each received chunk and displays the final recovered data.
- Python 3.x
- Scapy
-
Clone the repository:
git clone https://github.com/TheWation/eICMP cd eICMP
-
Create a virtual environment (optional but recommended):
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies using requirements.txt:
pip install -r requirements.txt
To start the ICMP data receiver, run:
python eICMP.py
The script will begin listening for ICMP transmissions on the default network interface as specified in Scapy's configuration. As data chunks arrive, you will see output indicating the chunk number and source. When all expected chunks are received, the original data is reconstructed and printed to the console.
Listening for ICMP transmissions...
Using interface: eth0
Received chunk 1/8 from 10.0.0.20
Received chunk 2/8 from 10.0.0.20
Received chunk 3/8 from 10.0.0.20
Received chunk 4/8 from 10.0.0.20
Received chunk 5/8 from 10.0.0.20
Received chunk 6/8 from 10.0.0.20
Received chunk 7/8 from 10.0.0.20
Received chunk 8/8 from 10.0.0.20
[!] Transmission complete - Reconstructing data...
Recovered data:
uid=0(root) gid=0(root) groups=0(root)
- Network Interface: By default, the script uses Scapy’s default interface (conf.iface). Modify this in the script if you need to specify a different interface.
- Packet Filter: The packet sniffing is set up with an ICMP filter. To alter the filter (e.g., for different types of packets), adjust the filter string in the sniff() function.
- Permissions: Packet sniffing might require administrative privileges. If you encounter permission errors, try running the script with sudo (on Linux/macOS) or as an administrator on Windows:
sudo python eICMP.py
- Dependency Issues: Ensure all required packages are installed by verifying the contents of requirements.txt.
Contributions are welcome! Feel free to fork this repository and submit pull requests with improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for more details.