Cyber security

ICMPWatch – Advanced Sniffing & Analysis of ICMP Packets

ICMP Packet Sniffer is a Python program that allows you to capture and analyze ICMP (Internet Control Message Protocol) packets on a network interface.

It provides detailed information about the captured packets, including source and destination IP addresses, MAC addresses, ICMP type, payload data, and more.

The program can also store the captured packets in a SQLite database and save them in pcap format.

Features

  • Capture and analyze ICMP Echo Request and Echo Reply packets.
  • Display detailed information about each ICMP packet, including source and destination IP addresses, MAC addresses, packet size, ICMP type, and payload content.
  • Save captured packet information to a text file.
  • Store captured packet information in an SQLite database.
  • Save captured packets to a PCAP file for further analysis.
  • Support for custom packet filtering based on source and destination IP addresses
  • Colorful console output using ANSI escape codes.
  • User-friendly command-line interface.

Requirements

  • Python 3.7+
  • scapy 2.4.5 or higher
  • colorama 0.4.4 or higher

Installation

  1. Clone this repository:
git clone https://github.com/HalilDeniz/ICMPWatch.git

2. Install the required dependencies:

pip install -r requirements.txt

Usage

python ICMPWatch.py [-h] [-v] [-t TIMEOUT] [-f FILTER] [-o OUTPUT] [--type {0,8}] [--src-ip SRC_IP] [--dst-ip DST_IP] -i INTERFACE [-db] [-c CAPTURE]
  • -v or --verbose: Show verbose packet details.
  • -t or --timeoutsniffing timeout in seconds (default is 300 seconds).
  • -f or --filtera BPF filter for packet sniffing (default is “icmp”).
  • -o or --outputan Output file to save captured packets.
  • --type: ICMP packet type to filter (0: Echo Reply, 8: Echo Request).
  • --src-ipsource IP address to filter.
  • --dst-ipdestination IP address to filter.
  • -i or --interfacea Network interface to capture packets (required).
  • -db or --databasestore captured packets in an SQLite database.
  • -c or --capturea Capture file to save packets in pcap format.

Press Ctrl+C to stop the sniffing process.

Examples

  • Capture ICMP packets on the “eth0” interface:
python icmpwatch.py -i eth0
  • Sniff ICMP traffic on interface “eth0” and save the results to a file:
python dnssnif.py -i eth0 -o icmp_results.txt
  • Filtering by Source and Destination IP:
python icmpwatch.py -i eth0 --src-ip 192.168.1.10 --dst-ip 192.168.1.20
  • Filtering ICMP Echo Requests:
python icmpwatch.py -i eth0 --type 8
  • Saving Captured Packets
python icmpwatch.py -i eth0 -c captured_packets.pcap

Tamil S

Tamil has a great interest in the fields of Cyber Security, OSINT, and CTF projects. Currently, he is deeply involved in researching and publishing various security tools with Kali Linux Tutorials, which is quite fascinating.

Recent Posts

Facebook Friend List Scraper – A Powerful OSINT Tool For Efficient Data Collection

OSINT tool to scrape names and usernames from large friend lists on Facebook, without being…

24 hours ago

Telepathy – Mastering Telegram OSINT For Enhanced Digital Investigations

Telepathy has been described as the "swiss army knife of Telegram tools," allowing OSINT analysts,…

24 hours ago

Blackbird – The Advanced OSINT Tool For Digital Investigations

Blackbird is a robust OSINT tool that facilitates rapid searches for user accounts by username…

24 hours ago

Natudump – Automating The Extraction Of Naturalisation Decrees From LegiFrance

This is example of scraping public LegiFrance registry's naturalisation decrees for research purposes only (naturalisation…

24 hours ago

Sabonis – The Ultimate Tool For Enhanced Digital Forensics And Incident Response

Sabonis provides a way of quickly parsing EVTX, proxy and PCAP files and extracting just…

24 hours ago

AutoExif – Simplifying Image Metadata Editing With Bash

AutoExif is a powerful Bash script designed to streamline the process of editing image metadata…

4 days ago