CompTIA Security+ Practice Questions: Threats, Vulnerabilities and Mitigations

48 free, exam-style CompTIA Security+ (SY0-701) practice questions covering Threats, Vulnerabilities and Mitigations. Each question shows the correct answer and a clear explanation. Ready for the real thing? Take the full timed quiz below.

🚀 Take the full CompTIA Security+ quiz 📘 CompTIA Security+ study guide

Q1. Which of the following BEST describes a zero-day vulnerability?

Explanation: A zero-day vulnerability is one that is unknown to the vendor and has no available patch when it's being exploited. Learn more.

Q2. What type of attack involves inserting malicious code into a legitimate website?

Explanation: XSS attacks involve injecting client-side scripts into web pages viewed by other users. Learn more.

Q3. Which type of malware replicates itself across networks?

Explanation: Worms are self-replicating malware that spread across networks without user interaction. Learn more.

Q4. What type of attack intercepts communication between two parties?

Explanation: MITM attacks secretly relay and possibly alter communications between parties who believe they're directly communicating. Learn more.

Q5. What is the PRIMARY risk of social engineering?

Explanation: Social engineering bypasses technical controls by exploiting human psychology. Learn more.

Q6. Which protocol is vulnerable to VLAN hopping attacks?

Explanation: Dynamic Trunking Protocol (DTP) can be exploited to gain unauthorized VLAN access. Learn more.

Q7. What is the PRIMARY risk of an evil twin access point?

Explanation: Evil twins mimic legitimate WiFi networks to intercept user communications. Learn more.

Q8. Which type of attack floods a network with ICMP echo requests?

Explanation: Smurf attacks use amplified ICMP traffic directed at broadcast addresses. Learn more.

Q9. Which type of malware displays unwanted advertising?

Explanation: Adware automatically displays or downloads advertisements. Learn more.

Q10. Which type of attack exploits session management weaknesses?

Explanation: Session hijacking steals valid session tokens to impersonate users. Learn more.

Q11. Which type of attack intercepts and alters communication between two parties?

Explanation: Man-in-the-browser attacks modify web transactions within the browser. Learn more.

Q12. Which type of attack floods a target with SYN packets?

Explanation: SYN floods exhaust connection resources by leaving half-open connections. Learn more.

Q13. Which type of attack exploits cryptographic weaknesses in SSL/TLS?

Explanation: POODLE exploits SSL 3.0 fallback to decrypt secure communications. Learn more.

Q14. Which type of attack exploits buffer overflow vulnerabilities?

Explanation: Stack smashing overwrites memory to alter program execution. Learn more.

Q15. Which type of attack exploits race conditions?

Explanation: Time-of-check to time-of-use (TOCTOU) attacks exploit timing vulnerabilities. Learn more.

Q16. Which of the following BEST describes a zero-day vulnerability?

Explanation: Zero-day vulnerabilities are unknown to the vendor, leaving no time for patches before potential exploitation. Learn more.

Q17. What type of attack involves inserting malicious code into a legitimate website?

Explanation: XSS attacks inject client-side scripts into web pages viewed by other users. Learn more.

Q18. What is the PRIMARY purpose of a honeypot?

Explanation: Honeypots lure attackers to study their techniques without risking production systems. Learn more.

Q19. Which type of malware replicates itself across networks?

Explanation: Worms self-propagate without user interaction by exploiting network vulnerabilities. Learn more.

Q20. What type of attack intercepts communication between two parties?

Explanation: MITM attacks secretly relay and potentially alter communications. Learn more.

Q21. What is the PRIMARY risk of social engineering?

Explanation: Social engineering manipulates humans into bypassing security controls. Learn more.

Q22. During a penetration test, which tool would most likely be used to identify live hosts on a network?

Explanation: Nmap performs host discovery through ICMP, TCP, or ARP ping sweeps. Learn more.

Q23. Which cryptographic attack exploits predictable IVs in WEP encryption?

Explanation: The Fluhrer-Mantin-Shamir (FMS) attack recovers WEP keys by analyzing weak initialization vectors. Learn more.

Q24. Which type of malware remains dormant until specific conditions are met?

Explanation: Logic bombs activate upon predefined triggers like dates or system events. Learn more.

Q25. A security analyst is reviewing logs and notices a large number of failed login attempts from various IP addresses targeting a single administrative account. This activity is MOST indicative of which type of attack?

Explanation: A brute-force attack involves systematically trying all possible credential combinations (often passwords) until the correct one is found. Numerous failed logins from multiple sources against one account is a classic sign. Learn more.

Q26. Which of the following BEST describes a watering hole attack?

Explanation: In a watering hole attack, the attacker compromises a legitimate website that is popular among a target group. When members of the target group visit the site, their computers are infected with malware. Learn more.

Q27. Which of the following is a common technique used by attackers to escalate privileges on a compromised system?

Explanation: Attackers often gain initial low-privilege access and then exploit known vulnerabilities in the operating system or applications (that haven't been patched) to gain higher levels of access, such as administrator or root. Learn more.

Q28. Which of the following BEST describes a pharming attack?

Explanation: Pharming is a cyberattack intended to redirect a website's traffic to another, fake site, typically by modifying DNS records or the victim's hosts file. This can lead to users unknowingly entering credentials on a malicious site. Learn more.

Q29. Which of the following is a key characteristic of an Advanced Persistent Threat (APT)?

Explanation: APTs are characterized by their advanced techniques, stealth, persistence over long periods, and often have specific objectives like espionage or strategic disruption, frequently backed by significant resources. Learn more.

Q30. Which type of social engineering attack involves an attacker impersonating a senior executive to pressure an employee into making an unauthorized transaction?

Explanation: Whaling is a specific type of phishing attack that targets high-profile individuals within an organization, such as executives or C-level staff, often with the goal of financial fraud or sensitive data theft. Learn more.

Q31. An attacker gains access to a user's session cookie and uses it to impersonate the user on a web application. This is an example of what type of attack?

Explanation: Session hijacking (or cookie hijacking) involves an attacker stealing a valid session token (often stored in a cookie) to gain unauthorized access to a user's session with a web application. Learn more.

Q32. Which attack involves trying a small number of common passwords against a large number of different user accounts to avoid account lockout?

Explanation: Password spraying targets many accounts with a few passwords to bypass lockout thresholds, unlike brute force which targets one account with many passwords. Learn more.

Q33. Which type of social engineering attack uses Artificial Intelligence (AI) to create realistic audio or video impersonations of executives to authorize fraudulent transfers?

Explanation: Deepfakes use machine learning and AI to generate synthetic media (audio or video) that convincingly mimics real people, often used in sophisticated social engineering campaigns. Learn more.

Q34. Which supply chain risk involves an attacker intercepting hardware during shipment to install a backdoor or modify components?

Explanation: Interdiction is a supply chain attack where hardware or software is intercepted and tampered with before it reaches the end user. Learn more.

Q35. Which attack uses many systems to overwhelm a target service with traffic?

Explanation: Distributed denial-of-service attacks use multiple sources to exhaust capacity or availability. Learn more.

Q36. A user approves a push notification they did not initiate. What attack might this indicate?

Explanation: MFA fatigue attacks repeatedly send prompts hoping the user approves one by mistake. Learn more.

Q37. Which vulnerability management action should happen after remediation?

Explanation: Validation confirms that remediation was successful and did not leave the vulnerability exploitable. Learn more.

Q38. Which wireless attack creates a fake access point that appears legitimate?

Explanation: An evil twin is a rogue access point configured to impersonate a legitimate wireless network. Learn more.

Q39. Which type of malware encrypts user files and demands payment?

Explanation: Ransomware denies access to data, often through encryption, and demands payment for recovery. Learn more.

Q40. Which attack uses a fake QR code to send users to a malicious site?

Explanation: Quishing is phishing that uses QR codes to direct users to malicious content. Learn more.

Q41. Which attack attempts to capture cookies by forcing a victim browser to send unauthorized requests?

Explanation: Cross-site request forgery tricks an authenticated browser into submitting unwanted requests. Learn more.

Q42. Which attack uses similar-looking domain names to trick users?

Explanation: Typosquatting registers lookalike or misspelled domains to lure users. Learn more.

Q43. Which vulnerability occurs when an application includes user input in an LDAP query without safe handling?

Explanation: LDAP injection manipulates directory queries through unsafe input handling. Learn more.

Q44. Which attack sends fraudulent text messages to steal information?

Explanation: Smishing is phishing conducted through SMS or text messages. Learn more.

Q45. Which type of attack involves an attacker intercepting and potentially altering communication between two parties who believe they are directly communicating with each other?

Explanation: An on-path attack, formerly called man-in-the-middle, occurs when an attacker secretly intercepts and relays communication between two parties, potentially altering the data without either party's knowledge. Learn more.

Q46. Which type of malware encrypts a victim's files and demands payment for the decryption key?

Explanation: Ransomware encrypts a victim's files or locks them out of their system, then demands a ransom payment, typically in cryptocurrency, in exchange for restoring access. Learn more.

Q47. Which technique involves sending fraudulent emails that appear to come from a trusted source in order to steal sensitive information?

Explanation: Phishing uses deceptive emails that appear to originate from a legitimate, trusted source to trick recipients into revealing sensitive information or clicking malicious links. Learn more.

Q48. Which type of vulnerability scan is performed using valid credentials to log into the target system for a deeper assessment?

Explanation: An authenticated (credentialed) vulnerability scan logs into the target system using valid credentials, allowing it to detect missing patches, misconfigurations, and vulnerabilities not visible from an external, unauthenticated view. Learn more.

More CompTIA Security+ practice topics