TcpDump
- Default scan
type tcpdump in terminal
- Select a interface like lo,wlan0,wlan1,eth0,eth1
how to check interface
type ifconfig in kali
type ipconfig in windows
tcpdump -i <interface name>
- Writing captured packets to file
tcpdump -i <interface name > -w <filename want to write with .pcap extension>
- Reading an old tcpdump file or captured file
tcpdump -r <captired file>
- Getting more packets information with readable timestamps
tcpdump -ttttnnvvS
- Check packets of whole network
tcpdump net 192.168.1.0/24
- To get packets based on source or destination of an IP address, use
tcpdump src 192.168.1.100
tcpdump dst 192.168.1.100
- Check packets for a protocol or port number
Using AND
tcpdump src 192.168.1.100 && port 22 -w ssh_packets
- Scan on specific port
tcpdump port 443 or 80 -w http_packets
Most Important
- filter or extract from packets.
tcpdump -r <packet> | grep -v '<which you want to filter >'
or
tcpdump -r <packets> |cut -d <which you want>
Written By Sanjay Kumar
Comments
Post a Comment