impacket-ping
Ping hosts using Windows protocols
TLDR
View documentation for the original command
SYNOPSIS
impacket-ping [options] target [target2 …]
PARAMETERS
-h, --help
Show help message and exit
-s SOURCE_IP, --source-ip SOURCE_IP
Source IP address to spoof (default: auto)
-t TIMEOUT, --timeout TIMEOUT
Ping response timeout in seconds (default: 2)
-T, --tcp
Use TCP ping on port 135 instead of ICMP
-i INTERFACE, --interface INTERFACE
Network interface to bind to (default: auto)
--debug
Enable debug output
DESCRIPTION
impacket-ping is a versatile network diagnostic tool from the Impacket suite, designed for sending ICMP echo requests (pings) to one or more targets. Unlike traditional ping, it supports source IP spoofing, allowing users to specify a custom source address for packets. This feature is invaluable in penetration testing, firewall rule validation, and network reconnaissance, as it helps evade source-based filtering or simulate attacks from different hosts.
Key capabilities include adjustable timeouts, interface selection, and an optional TCP ping mode targeting port 135 (common for Windows RPC). It leverages Python's Scapy library for packet crafting and raw socket transmission, requiring elevated privileges. Output displays round-trip times (RTT), packet loss, and statistics similar to standard ping, making it suitable for scripting and automation in security assessments.
Primarily used by security professionals, it's lightweight, cross-platform on Linux, and integrates seamlessly with other Impacket tools for Active Directory exploitation.
CAVEATS
Requires root privileges for raw sockets; source spoofing may fail on asymmetric routing networks; TCP mode less stealthy than ICMP.
INSTALLATION
pip install impacket; depends on Scapy.
EXAMPLE
impacket-ping -s 192.168.1.100 8.8.8.8
Pings 8.8.8.8 spoofing source as 192.168.1.100.
HISTORY
Part of Impacket suite developed by SecureAuth (now Fortra) since ~2011 for pentesting; evolved with Scapy integration for advanced packet manipulation.


