Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
CompTIA CySA+ Cybersecurity Analyst · CompTIA
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
D. netstat -antp | grep 8080 >dev/null && echo "Malicious activity" || echo "OK": This script uses netstat to check for any active TCP connections involving port 8080. This is the most direct way to check for ongoing suspicious activity related to the port in question. Therefore, the best option to most accurately confirm if the activity is ongoing is D. netstat -antp | grep 8080 >dev/null && echo "Malicious activity" || echo "OK". This will look for any active TCP connections on port 8080 and echo "Malicious activity" if found, or "OK" otherwise.
D To accurately confirm if the suspicious activity indicated by the provided command is ongoing, you can use option D:
Correct It uses the netstat command to list all active network connections and then uses grep to search for connections that involve the specified port (8080). If a connection is found, it implies that the malicious activity might still be ongoing. If no connection is found, it implies that the activity has likely ceased.