CompTIA Security+ Domain 2: Threats, Vulnerabilities, and Mitigations
44 free practice questions for Threats, Vulnerabilities, and Mitigations in the CompTIA Security+ (SY0-701) exam. Try each question first, then open "Show answer" for the correct option and explanation.
Threats, Vulnerabilities, and Mitigations practice questions
-
Question 1. Which threat actor is MOST likely to have large budgets, advanced tools, and long-term espionage goals?
Show answer
Answer: D. A nation-state group
Nation-state actors are well funded and pursue strategic, persistent campaigns, often called advanced persistent threats.
-
Question 2. A group defaces a company's website to protest its environmental record. Which threat actor type is this?
Show answer
Answer: A. Hacktivist
Hacktivists are driven by ideology or political causes, and defacement is a common tactic.
-
Question 3. An employee installs an unapproved cloud file-sharing app to work faster. What is this an example of?
Show answer
Answer: D. Shadow IT
Shadow IT is technology used without IT approval. It's usually well meant but creates unmanaged risk.
-
Question 4. Which motivation BEST describes a ransomware gang run like a business?
Show answer
Answer: B. Financial gain
Organized crime groups are mainly financially motivated, and ransomware is a direct way to monetize attacks.
-
Question 5. A user receives a text message claiming a parcel is held and asking them to pay a small fee through a link. What attack is this?
Show answer
Answer: D. Smishing
Smishing is phishing over SMS. Vishing uses voice calls, and whaling targets senior executives.
-
Question 6. An attacker calls the help desk pretending to be a traveling executive who urgently needs a password reset. Which technique is being used?
Show answer
Answer: D. Pretexting combined with impersonation
Pretexting creates a believable story to get help. Here the attacker also impersonates an authority figure to add urgency.
-
Question 7. Attackers compromise a trade association website that a target company's engineers visit often. What is this attack called?
Show answer
Answer: A. Watering hole attack
A watering hole attack infects a site the targets are known to visit, rather than contacting them directly.
-
Question 8. An attacker registers the domain examp1e.com to catch users who mistype example.com. What is this called?
Show answer
Answer: B. Typosquatting
Typosquatting relies on common typing mistakes or look-alike characters to lure users to a malicious site.
-
Question 9. Finance receives an email from a real supplier's compromised mailbox asking to change bank details for future invoices. What attack is this?
Show answer
Answer: C. Business email compromise
BEC abuses a trusted or compromised business email account to redirect payments. Verifying changes out of band is the key control.
-
Question 10. Which vulnerability occurs when a program writes more data to a memory buffer than it can hold?
Show answer
Answer: D. Buffer overflow
A buffer overflow overwrites adjacent memory and can let an attacker change program flow or run code.
-
Question 11. A program checks that a file is safe and then opens it, but an attacker swaps the file between the check and the use. What is this vulnerability?
Show answer
Answer: A. Time-of-check to time-of-use (TOCTOU) race condition
TOCTOU is a race condition where the state changes between checking a resource and using it.
-
Question 12. A web form passes user input directly into a database query, and entering ' OR 1=1 -- returns every record. Which vulnerability is this?
Show answer
Answer: A. SQL injection
SQL injection lets input change the structure of a query. Parameterized queries are the main fix.
-
Question 13. A comment field stores a script that runs in every visitor's browser when they view the page. What is this?
Show answer
Answer: B. Stored (persistent) cross-site scripting
Stored XSS saves the malicious script on the server, so it runs for everyone who loads the page. Output encoding and input validation mitigate it.
-
Question 14. A request containing ../../../../etc/passwd returns a system file. Which attack succeeded?
Show answer
Answer: D. Directory traversal
Directory (path) traversal uses ../ sequences to escape the intended folder and read other files.
-
Question 15. A logged-in banking user visits a malicious site that silently submits a funds transfer to the bank using the user's session. What attack is this?
Show answer
Answer: D. Cross-site request forgery (CSRF)
CSRF tricks the browser into sending an authenticated request the user didn't intend. Anti-CSRF tokens and SameSite cookies help prevent it.
-
Question 16. An attacker in a virtual machine exploits the hypervisor to access other VMs on the same host. What is this called?
Show answer
Answer: C. VM escape
VM escape breaks out of a guest's isolation to reach the hypervisor or other guests. Patching hypervisors is the main defense.
-
Question 17. A vendor's software update server is compromised and pushes a signed update containing a backdoor. Which vulnerability category does this represent?
Show answer
Answer: B. Supply chain compromise through a malicious update
Attacks on a trusted supplier reach every customer who installs its updates. Vendor risk management and update verification help.
-
Question 18. Which term describes a vulnerability that is exploited before the vendor has released a patch?
Show answer
Answer: D. Zero-day
A zero-day has no available fix at the time of exploitation, so defenders rely on compensating controls and detection.
-
Question 19. A company keeps running a server OS whose vendor no longer releases security updates. What is the MAIN risk?
Show answer
Answer: C. New vulnerabilities will never be patched
End-of-life systems stop receiving security fixes, so any new vulnerability stays open. Isolation or replacement is needed.
-
Question 20. Which mobile device risk involves installing apps from outside the official app store?
Show answer
Answer: B. Sideloading
Sideloading bypasses app store review and can introduce malware. Jailbreaking or rooting often goes with it.
-
Question 21. A new network printer is still using the manufacturer's admin password. What type of vulnerability is this?
Show answer
Answer: A. Default credentials, a misconfiguration
Default credentials are widely published and easy to exploit. Changing them is a basic hardening step.
-
Question 22. Malware encrypts user files and displays a demand for cryptocurrency payment. What type of malware is this?
Show answer
Answer: A. Ransomware
Ransomware denies access to data, typically through encryption, until a ransom is paid. Offline backups are a key defense.
-
Question 23. Which malware spreads across a network by itself without needing a user to run a file?
Show answer
Answer: A. A worm
Worms self-replicate by exploiting network vulnerabilities. Viruses and trojans usually need user action.
-
Question 24. A free game secretly installs a remote access tool when a user runs it. What type of malware is this?
Show answer
Answer: B. A trojan
A trojan looks like legitimate software but hides a malicious payload.
-
Question 25. A disgruntled administrator plants code that deletes the payroll database if their account is disabled. What is this?
Show answer
Answer: B. A logic bomb
A logic bomb runs when a specific condition is met, such as a date or an account change.
-
Question 26. Which malware hides its presence by modifying the operating system kernel, making it hard to detect?
Show answer
Answer: C. A rootkit
Rootkits operate at a deep level, often the kernel or firmware, to conceal themselves and other malware.
-
Question 27. Several user accounts show one or two failed logins each, all with the same common password, from one IP address. What attack is this?
Show answer
Answer: C. Password spraying
Password spraying tries a few common passwords across many accounts to avoid lockout thresholds.
-
Question 28. A user logs in from London and, ten minutes later, from Sydney. What indicator of compromise is this?
Show answer
Answer: B. Impossible travel
Logins from distant locations within an impossible time frame suggest stolen credentials being used elsewhere.
-
Question 29. Attackers send small DNS queries with a spoofed source IP so large responses flood the victim. What attack is this?
Show answer
Answer: D. A reflected, amplified DDoS attack
Amplification uses services that send much larger responses than requests, and reflection directs those responses at the spoofed victim.
-
Question 30. An attacker corrupts a DNS resolver's cache so users of that resolver are sent to a malicious IP for a banking site. What attack is this?
Show answer
Answer: D. DNS cache poisoning
DNS poisoning inserts false records into a resolver's cache. DNSSEC helps validate responses.
-
Question 31. An attacker sets up an access point with the same SSID as the corporate Wi-Fi to capture user traffic. What is this?
Show answer
Answer: C. An evil twin
An evil twin impersonates a legitimate access point so clients connect to the attacker instead.
-
Question 32. An attacker positions themselves between a client and server, relaying and possibly altering traffic without either side knowing. What attack is this?
Show answer
Answer: A. An on-path (man-in-the-middle) attack
On-path attackers intercept communication between two parties. Strong encryption and certificate validation defend against it.
-
Question 33. An attacker captures a valid authentication token and resends it later to gain access. What attack is this?
Show answer
Answer: A. A replay attack
Replay attacks reuse captured valid data. Timestamps, nonces, and short-lived tokens prevent it.
-
Question 34. An attacker forces a client and server to negotiate an older, weaker TLS version. What attack is this?
Show answer
Answer: C. A downgrade attack
Downgrade attacks exploit backward compatibility. Disabling old protocol versions prevents them.
-
Question 35. Two different inputs produce the same hash value in a weak algorithm. What is this called?
Show answer
Answer: A. A collision
Collisions undermine integrity checks and signatures, which is why MD5 and SHA-1 are deprecated for those uses.
-
Question 36. A standard user exploits a flaw in a service running as SYSTEM to gain administrative rights. What is this?
Show answer
Answer: B. Privilege escalation
Vertical privilege escalation gains higher permissions than the account was granted.
-
Question 37. An attacker clones an employee's proximity badge by reading it from a short distance. What attack is this?
Show answer
Answer: B. RFID cloning
Many older proximity cards can be read and copied. Encrypted smart cards and multifactor entry help.
-
Question 38. Which mitigation MOST directly limits an attacker's ability to move from a compromised workstation to database servers?
Show answer
Answer: B. Network segmentation with restrictive rules between zones
Segmentation restricts which systems can talk to each other, containing lateral movement.
-
Question 39. An organization allows only approved executables to run on its point-of-sale terminals. Which mitigation is this?
Show answer
Answer: D. Application allow listing
Allow listing blocks anything not explicitly approved, which is highly effective on fixed-function systems.
-
Question 40. Which hardening step reduces a server's attack surface the MOST?
Show answer
Answer: A. Disabling unneeded services and closing unused ports
Removing unnecessary services and ports eliminates potential entry points.
-
Question 41. Why is decommissioning an important mitigation for old systems?
Show answer
Answer: B. Unused but connected systems become unmonitored, unpatched targets
Retiring systems properly, including wiping data, removes forgotten assets that attackers could exploit.
-
Question 42. A developer uses a function that copies strings without checking length. Which secure coding fix BEST addresses this?
Show answer
Answer: C. Use bounds-checked functions and validate input length
Bounds checking and input validation prevent buffer overflows at the source.
-
Question 43. Which statement about misconfigured cloud storage is MOST accurate?
Show answer
Answer: D. Publicly accessible buckets are a leading cause of cloud data exposure
Under the shared responsibility model, customers configure access. Public buckets expose data even if it's encrypted at rest by the provider.
-
Question 44. A laptop is found with an unexpected process consuming 100% CPU and connecting to a mining pool. What is the MOST likely cause?
Show answer
Answer: D. Cryptojacking malware
Cryptojacking uses the victim's resources to mine cryptocurrency, showing up as high resource use and unusual outbound connections.
CompTIA and Security+ are trademarks or registered trademarks of CompTIA, Inc. These questions are original study material, not questions from the real exam.