CompTIA Security+ 2025 past questions and answers
This 2025 CompTIA Security+ set has 20 practice questions. Try these 5 free sample questions, tap a question to reveal the answer and explanation. Then practise the whole 2025 set with instant marking.
Practise the full 2025 setTimed exam mode
Sample CompTIA Security+ 2025 questions
1. A company calculates a SHA-256 digest before sending a file and compares it with a digest calculated after receipt. Which security objective is this check intended to verify?
- Integrity
- Availability
- Confidentiality
- Nonrepudiation
Answer: A. Integrity
Matching digests provide evidence that the file was not altered in transit, supporting integrity. Encryption primarily supports confidentiality, not change detection by itself.
2. An attacker attempts one commonly used password against hundreds of employee accounts, then waits before trying another password. Which attack pattern best describes this activity?
- Credential stuffing
- Password spraying
- Brute-force attack against one account
- Pass-the-hash
Answer: B. Password spraying
Password spraying tests a small number of passwords across many accounts, often with delays to avoid lockouts. Credential stuffing instead reuses username-password pairs obtained from other breaches.
3. A public-facing server runs an operating system that has reached end of support and no longer receives security patches. Which action most directly addresses the underlying vulnerability?
- Increase log retention on the server
- Require longer passwords for administrator accounts
- Migrate to a supported operating system and apply current security updates
- Add a banner reminding users not to share data
Answer: C. Migrate to a supported operating system and apply current security updates
Moving to a supported platform restores access to vendor security fixes and removes the unpatchable operating-system exposure. Longer passwords and more logs do not remediate missing OS patches.
4. A company installs a routine software update signed by its trusted vendor, but later discovers that the vendor's build environment had been compromised and the update contained malicious code. What type of attack is this?
- Watering-hole attack
- Evil twin attack
- On-path attack
- Software supply-chain attack
Answer: D. Software supply-chain attack
The attacker compromised a supplier's development or distribution process to reach downstream customers, which is a software supply-chain attack. An evil twin impersonates a wireless network rather than compromising the vendor's build pipeline.
5. A firm adopts a zero-trust design for access to internal applications. Which approach best reflects this design?
- Authenticate and authorize each access request using identity and contextual signals
- Trust every device connected to the corporate LAN
- Allow broad access after a user passes one perimeter login
- Disable logging for traffic between internal systems
Answer: A. Authenticate and authorize each access request using identity and contextual signals
Zero trust avoids implicit trust based only on network location and evaluates access requests using identity and relevant context. A trusted-LAN assumption is the opposite of this approach.
More CompTIA Security+ years
All CompTIA Security+ years · CompTIA subjects
PassSpark questions are original practice questions written to each exam's syllabus and format, in the style of past questions. They are not official past papers and are not affiliated with JAMB, WAEC, NECO, any university or any exam body.