![Learn Penetration Testing](https://wfqqreader-1252317822.image.myqcloud.com/cover/577/36698577/b_36698577.jpg)
上QQ阅读APP看书,第一时间看更新
tcpdump
tcpdump is the most widely used packet capture utility. It is available on Linux/Unix-based operating systems, which means it's installed by default in Kali Linux. It has the abilities to save captures to a .pcap file and read .pcap files.
tcpdump has a number of switches that you can use. Some of its common switches are as follows:
- tcpdump -d: Displays a list of interfaces
- tcpdump -i [interface]: Specifies an interface to perform the packet capture on
- tcpdump -c: Specifies the number of packets to capture
- tcpdump -w /path: Defines a file that tcpdump should write to
- tcpdump -r /path: Reads a capture file
- tcpdump -XX: Captures packets in ASCII or HEX
The following is a practical example of using tcpdump to capture FTP traffic. Using tcpdump, you are able to see the username and password in clear text, as shown in Figure 28:
![](https://epubservercos.yuewen.com/9E7453/19470378408807206/epubprivate/OEBPS/Images/0d629955-8fd3-4b77-ab4e-7fc0c03f75a9.png?sign=1738795096-QUirjQfaBZaGofd6nwGjPefuqh5lNbQX-0-985f11bc1a6743087297856a8ab38629)
Figure 28: Login details in plain text
You can replicate the preceding test by using a publicly accessible ftp server, which is used for speedtest. The URL is speedtest.tele2.net.