Attacks and Exploits

A tester has an SSH-only shell on an in-scope Linux gateway that carries a server's cleartext FTP traffic. The tester must save only that traffic for later GUI analysis. Which approach is best?

Show the answer

Correct answerC. Run tcpdump with a capture filter for the server's host and port 21, write a pcap, and open it in Wireshark

AWhy not this: A Netcat listener does not record traffic passing between a server and other hosts.

BWhy not this: Display-filter syntax is Wireshark's; tcpdump takes BPF capture filters, so this would fail.

CWhy this is right: A capture filter limits recording to the target traffic, and the pcap keeps full packets for Wireshark.

DWhy not this: Printed terminal text loses packet data, and Wireshark cannot rebuild a capture from pasted text.

tcpdump works headless, and a capture filter limits what is written to a pcap, which Wireshark then opens for GUI analysis such as following the FTP stream. Display-filter syntax belongs to Wireshark's analysis stage and is not valid as a tcpdump capture filter.