tcpdump

June 07, 2024

If you’re attempting a command injection and want to confirm whether your commands are being executed on the target, you can always try pinging your machine and capture the ping using tcpdump.

sudo tcpdump -i tun0 icmp
  • -i tun0: Specifies the network interface on which tcpdump should listen for traffic. In this case, tun0 is typically associated with a VPN interface.
  • icmp: This is a filter to limit the output to ICMP packets only. ICMP is used by the ping utility.

Checking Your Network Interface:

The command assumes you are using tun0 as your network interface, but this might not be the case, especially if your system configuration differs or if you are using multiple VPNs or other network interfaces. You can check the available network interfaces and identify your VPN interface by running ifconfig ; the interface name could be tun0, tun1, eth0, etc.,