Skip to content

Simple ICMP listener that can handle and reconstruct chunked data sent via ICMP Echo Request packets.

License

Notifications You must be signed in to change notification settings

TheWation/eICMP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ICMP Data Receiver

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.

Features

  • 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.

Installation

Requirements

Setup Instructions

  1. Clone the repository:

    git clone https://github.com/TheWation/eICMP
    cd eICMP
  2. Create a virtual environment (optional but recommended):

    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies using requirements.txt:

    pip install -r requirements.txt

Usage

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.

Chunked data sample

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)

Customization

  • 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.

Troubleshooting

  • 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.

Contributing

Contributions are welcome! Feel free to fork this repository and submit pull requests with improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

Simple ICMP listener that can handle and reconstruct chunked data sent via ICMP Echo Request packets.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages