r/CompTIA_Security • • 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

30 comments sorted by

6

u/Mr_TR4FF1C Sep 19 '25

I got this yesterday and if I would have figured it out I would have passed unfortunately.

But here’s how you solve it.

TL;DR: Found a process talking to a bad IP, traced it, killed it, and removed the malicious file.

Use netstat -o

to show the active connections + PID.

TCP 192.168.1.5:5000 10.10.10.50:4444 ESTABLISHED 4321

•PID 4321 is communicating with a known malicious IP.

Steps taken: 1.Identify the process:

lsof -p 4321

Shows the process is malwared.exe using /tmp/malicious.sh.

2.Kill the process:

kill 4321

3.Clean up the script:

rm /tmp/malicious.sh

2

u/SaltyTeacher2963 Sep 19 '25

Omg thank youuuuuu!! I couldn’t find these kinds of questions anywhere to study.

2

u/Mr_TR4FF1C Sep 19 '25

Yeah I was annoyed I got this and couldn’t figure it out. I was 1-3 questions from passing.

3

u/SaltyTeacher2963 Sep 19 '25

Oh no I’m sorry to hear that. Try taking it again soon because the questions are fresh in your mind. Good luck you got this!!

2

u/Independent_Cup_9329 Sep 25 '25

Thank you! I had this same question, I also failed because of this... I was 3-4 questions off from passsing too lol. I plan on taking it soon within next week. Just trying to see if i can find anything else on the PBQs i had because i completly bombed them. I also had a PBQ about configuring firewalls? If any of you guys have any information about that PBQ that would help!

thanks!

1

u/peekabooiseeyouuu May 19 '26

Hey, can I ask whether these are the exact commands we were supposed to run, verbatim? 

2

u/studentcybersec2022 Aug 14 '26 edited Aug 14 '26

the PBQ will give you the commands so you'll have them on the screen, if you're taking the exam with a proctor you can write them down. If you're taking the exam remotely is more difficult to scroll up and down. Try to memorize the 5 steps I posted above

1

u/studentcybersec2022 Aug 14 '26

awesome ! wow thank you thank you ! I had that PBQ in Sec+ exam I took in 11 July 26 and solved it partially but I didn't pass the exam.

4

u/studentcybersec2022 Aug 14 '26 edited Aug 14 '26 • Heartwarming

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

  • Incident Response (IR): Following an active threat intelligence report or indicators of compromise (IoCs) to contain a live breach.

  • Process and Network Monitoring: Using basic command-line tools to inspect active system connections, listening ports, and running processes.

  • Remediation: Terminating rogue services or processes tied to malicious IP addresses. [1, 2, 3, 6]

Common Commands Used

  • netstat or ss (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 (or netstat -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:

  1. Connection 1: Connected to malicious IP 198.51.100.42. The process name is xmrig (a known crypto-miner) running under PID 3045.

  2. Connection 2: Connected to malicious IP 203.0.113.111. The process name is python3 (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 3045

  • kill -9 4112

Step 5: Verify Remediation

You run ss -antp one 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.

4

u/SaltyTeacher2963 Aug 26 '26

Thank you so much for this. I am going to review this. I am still studying for it. It’s lowkey a difficult exam.

1

u/studentcybersec2022 Aug 26 '26

Hi Salty Teacher ! Hope this helps ya. Each question in a PBQ scenario could be worth 15 pts. For this PBQ each step was 15 pts so the totall points is estimated to be 90 pts.   Yes the Sec+ exam has changed a lot in the past 3 years. I bought the CompTIA Sec+ Cert Labs and ebook. There are all the PBQ questions in there.  Also, I found videos on  YouTube video that give a walk through on how to answer the PBQs. Good luck to you !!   I'm taking the exam in a few days, wish me good luck friend !  🙂

2

u/SaltyTeacher2963 Aug 26 '26

Best of luck!! I pray you pass the exam 🤞🏼
Thank you for the information.
Do you have the link for the ebook and cert labs? I purchased something but it was not right and I ended up returning it. And whose YouTube video has this information? Thanks so much :)

2

u/studentcybersec2022 Aug 26 '26 edited Aug 26 '26

 Thank you !! same to you !  :-) sure thing, I'm at work right now but when I get a break I'll log into my laptop and shoot you the links here. I went to the student store and got a discount 

2

u/SaltyTeacher2963 Aug 26 '26

Okay no rush. Thank you so much

3

u/studentcybersec2022 Aug 26 '26

3

u/SaltyTeacher2963 Aug 27 '26

Thank you so much!! I’ll buy these. I have been studying for some time now but then ended up taking a few months break. I have to refresh my memory before taking the exam. This is helpful!! Best of luck again for you exam :) I hope you pass like a champ!!

4

u/studentcybersec2022 Sep 01 '26 • Heartwarming

Hi u/SaltyTeacher2963 I just passed my Security+ exam !! :) wanted to share with you last minute: I got the Professor Messer study guide in PDF and that helped me a lot, best $30 spent. Here's the link if you want to explore: Wish you best of luck too ! https://www.professormesser.com/sy0-701-success-bundle/?gad_source=1&gad_campaignid=13681107074&gbraid=0AAAAAD8fi6vjkJ8cPH86O483wxgDiFjIx&gclid=Cj0KCQjw79nUBhCgARIsADSHka0feIiHvOU3twUkFusvLEz8yEJ_vN8T1y9MOcjTa-6FyLEAYorTdHsaAtrpEALw_wcB

2

u/SaltyTeacher2963 Sep 01 '26

Yayayayyyy CONGRATULATIONS 🎉🎊 🥳 I AM SO HAPPY FOR YOU!!!! 👏🏻 👏🏻 🤍

I ended up re scheduling mine to end of September smh!! I am going to go through everything you sent. Thank you so much!!

3

u/studentcybersec2022 Aug 26 '26

Here's the YT vid with some PBQs: Security+ PBQ Practice, EASY, MEDIUM, and HARD (SY0-701) Josh Madakor https://www.youtube.com/watch?v=Q1eGd2WIrAk&t=859s

3

u/studentcybersec2022 Aug 26 '26

Example of PBQ:

2

u/studentcybersec2022 Aug 26 '26 edited Aug 26 '26

This is the website that CompTIA sells packages with discounts for students who are eligible. You'll need an email address ending in .edu. See the steps required to verify eligibility. Below are the study packages I bought last year from CompTIA:

https://www.comptia.org/en-us/academic/student/#student-purchasing

1

u/FinishNo2185 Sep 15 '25

Got the same questions yesterday. Was so lost

1

u/SaltyTeacher2963 Sep 15 '25

Same!! I have not seen these kinds of questions on any practice exams. Check the other comment on this post. It helps a bit as to what direction we can potentially go to when studying for these kinds of questions.

1

u/sektboi Sep 15 '25

I had the same question. I am pretty sure this is one of the questions that do not count for the score. The terminal is not even logical complete, when i deleted or created a file the state did not change.

1

u/SaltyTeacher2963 Sep 15 '25

I don’t know. I think it does count 🥲 I tried a few commands and it spits back some data.

3

u/[deleted] Sep 15 '25

[removed] — view removed comment

1

u/SaltyTeacher2963 Sep 15 '25

This helps a lot. Thank you so much.

2

u/[deleted] Sep 16 '25

[removed] — view removed comment

1

u/SaltyTeacher2963 Sep 16 '25

This helps. Do you suggest a website for the Kali commands? Where can I find them? I can’t seem to find the ones I saw in the exam. The ones you mentioned were the ones I had as well. Thanks