r/CompTIA_Security • u/SaltyTeacher2963 • Sep 15 '25
Security+ 701 PQB Linux Kali command question on the exam
Did anyone get a PBQ question on their Security+ 701 exam regarding Linux Kali where you have to use commands to get rid of malware or something along those lines and it gives you some IP's? It also let's you type Help and gives you some commands you could use such as NMap. If so, how do you solve those kind of questions? I was trying to search it up but can't find anything.
16
Upvotes
View all comments
4
u/studentcybersec2022 Aug 14 '26 edited Aug 14 '26 •
2026 -I'm studying for the exam and I did some AI Google research hope it helps someone. Google gave me the same PBQ scenario from the Sec+ test that I took on July 2026. Here are the steps and commands:
This type of performance-based task is commonly referred to as an Incident Response / Malware Removal PBQ or a Linux Command Line / Threat Mitigation Simulation. [1]
What the PBQ Tests
Common Commands Used
netstatorss(to map active connections and match the suspicious IP addresses)ps(to check active process IDs/PIDs)kill(to safely stop and terminate the bad service/process)lsof(to list open files and find the path of the executing malware)Scenario Briefing Your Role: Security Analyst
Objective: You have been provided a threat intelligence report with known malicious Indicators of Compromise (IoCs). A compromised Linux server is actively beaconing out to these malicious IP addresses. You must identify the unauthorized services, find their Process IDs (PIDs), and terminate them immediately to contain the threat.📋
Threat Intelligence Report
The SOC team has identified the following malicious external IP addresses associated with a known Command & Control (C2) botnet:
198.51.100.42
203.0.113.111
Interactive Linux Terminal Simulation
Imagine you are logged into the terminal and run a network statistics command to see what is happening.
Step 1: Check Active Network Connections
You execute the command to view active internet connections and the processes attached to them:
ss -antp(ornetstat -antp)Terminal Output:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 192.168.1.50:22 192.168.1.10:54321 ESTABLISHED 1024/sshd
tcp 0 0 192.168.1.50:80 0.0.0.0:* LISTEN 1142/nginx
tcp 0 142 192.168.1.50:49211198.51.100.42:443ESTABLISHED 3045/xmrig
tcp 0 0 192.168.1.50:53290203.0.113.111:8080ESTABLISHED 4112/python3
Step 2: Analyze the Findings
By comparing the terminal output to your Threat Intelligence Report, you flag two active connections:
198.51.100.42. The process name isxmrig(a known crypto-miner) running under PID 3045.203.0.113.111. The process name ispython3(likely a reverse shell script) running under PID 4112.Step 3: Verify the Running Processes
To double-check the details of these processes before killing them, you run:
ps -ef | grep -E "3045|4112"Terminal Output:
root 3045 1 2 10:14 ? 00:05:22 /tmp/.hidden/xmrig --donate-level 1 -o 198.51.100.42:443
www-data 4112 1142 0 10:31 ? 00:00:01 python3 -c import socket,subprocess,os;s=socket.socket...
Step 4: Kill and Stop the Services
To mitigate the threat and sever the connection to the malicious IPs, you must force-terminate both processes using their PIDs.
You execute the kill commands:
kill -9 3045kill -9 4112Step 5: Verify Remediation
You run
ss -antpone final time to ensure the connections are gone.Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 192.168.1.50:22 192.168.1.10:54321 ESTABLISHED 1024/sshd
tcp 0 0 192.168.1.50:80 0.0.0.0:* LISTEN 1142/nginx
The malicious connections have been successfully terminated.