CompTIA Security+ (SY0-701) · CompTIA
Threats, Vulnerabilities, and Mitigations
11 practice questions covering 22% of the official CompTIA Security+ (SY0-701) blueprint. Every item includes a worked explanation of the correct answer.
Syllabus Coverage & Domain Overview
This topic covers how attackers operate and how defenders limit the damage. This overview follows the SY0-701 objectives. In that version the domain is called Threats, Vulnerabilities, and Mitigations and makes up 22 percent of the exam. SY0-801 is the next version of Security+ and is launching around now. It renames the domain Threats, Vulnerabilities, and Attacks and weights it at 24 percent, so do not read the 22 percent figure as the weighting for every candidate. SY0-701 groups the material into five areas. First, who the threat actors are and what drives them: nation-states, unskilled attackers, hacktivists, insiders, organized crime and shadow IT, with motives such as espionage, data theft and financial gain. Second, the ways attackers reach a target, including message-based, file-based, voice, unsecured network, social engineering, supply chain and vulnerable software vectors. Third, the kinds of weakness found in applications, hardware, mobile devices, virtualization, operating systems, cloud services, web components and suppliers. Fourth, how malicious activity shows up, covering malware, password, application, physical, network and cryptographic attacks. Fifth, the mitigations: segmentation, access control, configuration enforcement, hardening, isolation and patching.
The exam rewards distinctions more than definitions. Know how threat actors differ in resources, sophistication and intent, and how an insider differs from shadow IT. Separate a vulnerability (the flaw) from a threat (who or what may exploit it) and from an attack (the exploitation itself). Within malware, tell types apart by behavior: how it spreads, whether it hides, whether it needs user action, and whether it holds data hostage. For application attacks, link each flaw to its cause and its fix, such as injection and unvalidated input, cross-site scripting and output handling, request forgery and missing request verification, and memory errors and unchecked lengths. Password attacks such as brute force, spraying and credential stuffing differ in how many accounts and guesses they use, and that difference shows in the logs. Be comfortable with indicators of compromise too, because several questions ask you to infer an attack from symptoms.
Questions usually give a short scenario, a log excerpt or a code fragment and ask for the best identification or the best control. The wording often includes constraints, such as an unpatchable legacy system, a vendor that blocks upgrades, or a request for the control that addresses the root cause. Common traps include picking a detective control when a preventive one is asked for, choosing a reasonable control that fixes a symptom instead of the cause, and confusing similar attacks that differ in one detail, such as who is targeted or where the malicious content runs. Another trap is ignoring a stated limit, like cost or operational impact, which often makes a compensating control such as isolation or segmentation the intended answer. Read for the single detail that separates the closest two options.
To prepare, build a table of attacks, their indicators and the matching mitigation, and rewrite it from memory until it is reliable. Work through scenario questions and, for every miss, write down which clue you overlooked. Practise explaining in one sentence why each wrong option fails. Read the official objectives closely and make sure you can give an example of every term in them, since the outline is the boundary of what can be tested. Finally, check whether you are registered for SY0-701 or SY0-801. The two versions weight this domain differently, and SY0-801 also adds a new objective on the security risks of artificial intelligence. Study from the objectives for the version you will actually sit.
In the official CompTIA Security+ (SY0-701) examination blueprint, Threats, Vulnerabilities, and Mitigations carries a weightage of 22%. Out of the total examination duration of 1 hr 30 min, candidates should budget approximately 20 min for questions from this domain to maintain pace across the paper.
How to Master Threats, Vulnerabilities, and Mitigations for CompTIA Security+ (SY0-701)
Our 11 published questions in Threats, Vulnerabilities, and Mitigations are written for PrepIQ Hub and checked as set out in our editorial policy. Each item is written to the medium difficulty level of the CompTIA exam:
- Targeted Topic Drills: Launch Topic Practice mode to work exclusively through Threats, Vulnerabilities, and Mitigations items and review the step-by-step derivation after each submission.
- Negative Marking Discipline: The CompTIA Security+ (SY0-701) applies no negative marking penalty, so practice eliminating the three distractors systematically on every Threats, Vulnerabilities, and Mitigations item.
- Benchmark Target: Aim for at least 83% accuracy in Threats, Vulnerabilities, and Mitigations drills before moving to full-paper simulations.
Threats, Vulnerabilities, and Mitigations worked examples
Threats, Vulnerabilities, and Mitigations questions from the CompTIA Security+ (SY0-701) syllabus, answered in full. Try each one before opening the explanation.
Example 1 · Threats, Vulnerabilities, and Mitigations · medium
A security analyst discovers that an internal billing portal executes raw database queries built as "SELECT * FROM invoices WHERE id = '" + userInput + "'". Which remediation directly neutralizes SQL Injection (SQLi) on this endpoint?
Show answer and explanation
Correct answer: A. Refactoring the query to use prepared statements with bound parameters
Why
Prepared statements with bound parameters are the direct fix for SQL injection because they separate code from data. The query structure, such as SELECT * FROM invoices WHERE id = ?, is sent to the database and compiled first, and the user-supplied value is bound afterward as a literal. Even if an attacker enters something like ' OR '1'='1, the database treats it as an ordinary string to compare against the id column, never as SQL syntax. The root cause in the scenario is string concatenation of untrusted input into a command, so the remediation must remove that concatenation. The common trap is picking a control that sounds like general web hardening, such as encryption or cookie protections, which addresses a different attack class. On the exam, match the control to the vulnerability: injection flaws are fixed by input validation and parameterized queries, not by transport or session controls. Stored procedures that avoid dynamic SQL and least-privilege database accounts are complementary defenses, but parameterization is the direct fix.
- B. Enabling HTTP Strict Transport Security (HSTS) on the TLS load balancer — HSTS forces browsers to use HTTPS, which protects against downgrade and eavesdropping attacks on data in transit. A SQL injection payload sent over an encrypted connection still reaches the application and is concatenated into the query unchanged.
- C. Adding the HttpOnly and SameSite=Strict flags to session cookies — HttpOnly prevents JavaScript from reading session cookies and SameSite restricts cross-site cookie sending, so they reduce XSS cookie theft and CSRF. They have no effect on how the server builds its SQL query from user input.
- D. Increasing the database connection pool timeout and read-replica count — Connection pool timeouts and read replicas are performance and availability settings for the database tier. They do nothing to change how untrusted input is interpreted, so the concatenated query stays injectable.
Example 2 · Threats, Vulnerabilities, and Mitigations · hard
Which two characteristics distinguish an Adversary-in-the-Middle (AitM) reverse-proxy phishing kit from a traditional static credential-harvesting phishing page? (Select two.)
Show answer and explanation
Correct answers: B. It relays real-time multi-factor authentication challenges to the real IdP; D. It intercepts and steals the post-authentication session cookie token
Why
An AitM reverse-proxy phishing kit sits inline between the victim and the real identity provider (IdP), relaying the live MFA challenge (such as TOTP or push approval) in real time (B) and capturing the resulting authenticated session cookie (session token) returned by the IdP after MFA succeeds (D).
- A. It relies on offline rainbow tables to crack NTLMv1 hashes on a LAN — AitM phishing proxies operate over HTTPS against cloud identity providers, not offline LAN hash cracking.
- C. It infects the BIOS master boot record using a physical USB rubber ducky — USB keystroke injection is a physical access attack, unrelated to web reverse-proxy phishing.
Example 3 · Threats, Vulnerabilities, and Mitigations · hard
Which two indicators should a vulnerability management team combine with a vulnerability's base CVSS score to prioritize patching based on real-world active exploitation likelihood? (Select two.)
Show answer and explanation
Correct answers: B. Exploit Prediction Scoring System (EPSS) 30-day probability score; D. CISA Known Exploited Vulnerabilities (KEV) catalog inclusion status
Why
While CVSS measures technical severity, the Exploit Prediction Scoring System (EPSS) estimates the probability that a vulnerability will be exploited in the wild within 30 days (B), and the CISA Known Exploited Vulnerabilities (KEV) catalog confirms active real-world exploitation (D).
- A. Mean Time Between Failures (MTBF) of the underlying storage array — MTBF measures hardware reliability of replaceable components, not software exploit likelihood.
- C. Recovery Time Objective (RTO) defined in the business impact analysis — RTO specifies maximum tolerable outage duration, not whether an exploit is active in the wild.
Example 4 · Threats, Vulnerabilities, and Mitigations · easy
A developer discovers that a C++ network daemon copies a 512-byte user packet into a fixed 128-byte stack array using strcpy() without checking the input length, allowing an attacker to overwrite the function return address. What type of vulnerability is this, and which OS defense randomizes memory locations to hinder exploitation?
Show answer and explanation
Correct answer: A. Buffer overflow mitigated at the OS level by ASLR memory randomization
Why
Copying unchecked input into a fixed-size stack buffer that overwrites adjacent memory and the return pointer is a Stack Buffer Overflow. Address Space Layout Randomization (ASLR) randomizes the memory addresses of the stack, heap, and shared libraries so an attacker cannot reliably jump to a hardcoded shellcode address.
- B. SQL injection mitigated at the database layer by stored procedures — Overwriting a C++ stack return address via strcpy() is a memory buffer overflow, not SQL injection.
- C. Directory traversal mitigated by canonicalizing file system paths — Directory traversal uses ../ sequences to read arbitrary files, not stack buffer overwrites.
- D. Cross-Site Scripting mitigated by a Content Security Policy header — XSS is a browser script injection flaw in web pages, not a C++ stack memory corruption bug.
Example 5 · Threats, Vulnerabilities, and Mitigations · medium
An attacker compromises a niche trade-association website frequently visited by defense contractors, injecting an exploit kit that infects only visitors from those target organizations. What is this attack vector called?
Show answer and explanation
Correct answer: C. Watering hole attack (infecting a trusted third-party site visited by targets)
Why
A watering hole attack targets a specific group by compromising a legitimate website that the group is known to visit, such as an industry association, supplier portal, or forum. The attacker plants malicious code, often an exploit kit or drive-by download, and waits for members of the target group to browse there. Often the payload is delivered selectively, for example by checking the visitor's IP range, so only the intended organizations are infected while everyone else sees a normal site. In this scenario the niche trade-association site, the defense-contractor audience, and the targeted infection all point to a watering hole. The most common trap is confusing it with typosquatting, because both involve websites. The difference is that typosquatting uses a fake look-alike domain and depends on user typing errors, while a watering hole abuses a real, trusted site that has been compromised.
- A. Typosquatting (registering look-alike domain names with common spelling errors) — Typosquatting is registering a domain that resembles a legitimate one, such as a misspelled name, to catch users who mistype the address. Here the attacker compromised the real trade-association site rather than creating a look-alike, so it does not fit.
- B. Bluejacking (sending unsolicited vCard messages over short-range Bluetooth) — Bluejacking is sending unsolicited messages, such as vCards, to nearby Bluetooth devices. It works only at short range and is a nuisance technique, not a way to deliver an exploit kit through a website to a targeted industry.
- D. ARP poisoning (spoofing Layer 2 MAC addresses on a local Ethernet subnet) — ARP poisoning forges ARP replies on a local network segment to redirect traffic through the attacker for on-path interception. It requires local network access and has nothing to do with compromising a remote website frequented by a target group.
Example 6 · Threats, Vulnerabilities, and Mitigations · medium
A web application allows authenticated users to fetch profile avatars by passing a URL parameter avatarUrl=https://cdn.example.com/pic.png. An attacker passes avatarUrl=http://169.254.169.254/latest/meta-data/iam/ and retrieves the cloud instance's IAM credentials. What vulnerability was exploited?
Show answer and explanation
Correct answer: B. Server-Side Request Forgery (SSRF) querying the internal metadata endpoint
Why
Server-Side Request Forgery (SSRF) occurs when an application fetches a remote resource based on an unvalidated user-supplied URL, allowing an attacker to coerce the server into making requests to internal-only addresses such as the cloud instance metadata service (169.254.169.254).
- A. Cross-Site Request Forgery (CSRF) riding on a victim's browser session cookie — CSRF tricks a victim's browser into sending a request; here the server itself fetches an internal URL.
- C. Reflected Cross-Site Scripting (XSS) executing JavaScript in the DOM — XSS executes client-side script in a user's browser rather than making server-side HTTP requests.
- D. XML External Entity (XXE) expansion via a SOAP document DTD header — The exploit used an unvalidated URL fetch parameter (avatarUrl), which is classic SSRF.
Every worked example on this page passed our independent verification before publication — how that works is set out in our editorial policy. Spotted an error? Tell us through the contact page and we will correct it.
All 6 Threats, Vulnerabilities, and Mitigations questions with answers
- A security analyst discovers that an internal billing portal executes raw database queries built as "SELECT * FROM…
- Which two characteristics distinguish an Adversary-in-the-Middle (AitM) reverse-proxy phishing kit from a traditional…
- Which two indicators should a vulnerability management team combine with a vulnerability's base CVSS score to…
- A developer discovers that a C++ network daemon copies a 512-byte user packet into a fixed 128-byte stack array using…
- An attacker compromises a niche trade-association website frequently visited by defense contractors, injecting an…
- A web application allows authenticated users to fetch profile avatars by passing a URL parameter…
All Syllabus Domains in CompTIA Security+ (SY0-701)
General Security Concepts
11 questions · 12%Threats, Vulnerabilities, and Mitigations (Current domain)
11 questions · 22%Security Architecture
11 questions · 18%Security Operations
11 questions · 28%Security Program Management and Oversight
12 questions · 20%
CompTIA and Security+ are trademarks of the Computing Technology Industry Association. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by CompTIA.