CFA-001 practice question 8 of 25

Netstat is a tool for collecting Information regarding network connections. It provides a simple view of TCP and UDP connections, and their state and network traffic statistics. Which of the following commands shows you the TCP and UDP network connections, listening ports, and the identifiers?

Full set: 180 questions

Domain Network Forensics

Answer options
A: netstat -ano Correct answer
B: netstat -b
C: netstat -r
D: netstat -s
Correct Answer:
A. netstat -ano
Explanation

The command netstat -ano is the correct choice as it combines multiple flags to meet all the specified requirements. The -a flag displays all active TCP/UDP connections and listening ports. The -n flag displays addresses and port numbers in numerical form, preventing delays from DNS lookups. Most importantly, the -o flag includes the process identifier (PID) for each connection, which is the "identifier" referred to in the question. This combination provides a comprehensive snapshot of network activity and the processes responsible for it.

Why Incorrect

B. netstat -b: This command shows the executable name involved in the connection, not the numerical process identifier (PID). It can also be significantly slower and requires elevated privileges.
C. netstat -r: This command is used to display the IP routing table, which contains information about network routes, not active connections or listening ports.
D. netstat -s: This command displays summary statistics for each network protocol (e.g., TCP, UDP, IP), not the details of individual connections or the processes that own them.

References

1. Microsoft Corporation. (2023). Netstat. Microsoft Learn. Retrieved from https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/netstat.

Reference Details: The documentation explicitly states: -a "Displays all active TCP connections and the TCP and UDP ports on which the computer is listening." and -o "Displays active TCP connections and includes the process ID (PID) for each connection." This directly supports the use of netstat -ano to view connections, ports, and PIDs.

2. SANS Institute. (2022). Windows Command Line Cheat Sheet - SANS Digital Forensics and Incident Response.

Reference Details: In the "Network Connections" section, the cheat sheet lists netstat -ano with the description: "List all listening ports and open connections, with owning process ID." This is a standard use case in digital forensics and incident response, confirming the command's purpose.

3. Carnegie Mellon University. (n.d.). 15-441/641: Computer Networks - Lecture 2: Tools of the Trade. School of Computer Science.

Reference Details: Course materials for networking courses frequently cover netstat. Lecture notes describe netstat with the -a (all), -n (numeric), and -o (owner PID) flags as essential for network troubleshooting and analysis, reinforcing the utility and correctness of the combined netstat -ano command for the described task.

Scroll to Top