CompTIA Network+ N10-009 · Network Troubleshooting · medium

A Linux systems administrator suspects that a compromised container is opening an unauthorized outbound reverse shell connection over TCP port 4444 to an external command-and-control (C2) IP address, and also wants to capture the raw packets on interface eth0 for port 4444 into a .pcap file for forensic analysis. Which pair of Linux CLI commands lists active TCP socket connections with process IDs (PID) and captures matching packets on eth0?

Published · Last updated · checked before publication — how we verify questions

Options

  • ARun dig +short -x 4444 to list local process IDs and arp -d to capture .pcap packets
  • BRun ss -tulnp to list sockets/PIDs and tcpdump -i eth0 port 4444 -w out.pcapCorrect answer
  • CRun traceroute -n 4444 to list local process IDs and nslookup to write .pcap files
  • DRun chmod 777 /etc/resolv.conf to list TCP sockets and ping -c 4 to capture payloads

Answer: B. Run ss -tulnp to list sockets/PIDs and tcpdump -i eth0 port 4444 -w out.pcap

- ss -tulnp (or netstat -tulnp / netstat -ano) displays all listening and established TCP/UDP sockets along with numeric IP/port addresses and the owning Process ID (PID) / program name. - tcpdump -i eth0 tcp port 4444 -w capture.pcap captures raw packets matching the BPF filter on eth0 into a standard libpcap file.

Why the other options are wrong

  • A. Run dig +short -x 4444 to list local process IDs and arp -d to capture .pcap packets — dig queries DNS servers and arp -d deletes an ARP cache entry; neither lists local PIDs or captures packets.
  • C. Run traceroute -n 4444 to list local process IDs and nslookup to write .pcap files — traceroute maps Layer 3 router hops and nslookup queries DNS names.
  • D. Run chmod 777 /etc/resolv.conf to list TCP sockets and ping -c 4 to capture payloads — chmod changes file permissions and ping sends ICMP Echo Requests.

All Network Troubleshooting questions and the topic overview →

CompTIA and Security+ are trademarks of the Computing Technology Industry Association. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by CompTIA.