CompTIA Security+ sample questions with answers
Work through these sample CompTIA Security+ questions to get a feel for the exam pattern. Pick an option to check it, or open “Show answer” under any question. No login needed.
100 questions on this pageFree
Questions are AI-drafted and reviewed against the official syllabus. Spotted a mistake? Report it — we review reports within 2 working days. How we make questions
CompTIA-Security-Plus sample questions
100 questionsCompTIA-Security-Plus mock tests
Q1.In a on-premises data center involving the payment API and admin credentials, A private application checks user identity, device compliance, location, and risk score before each session. Which architecture principle best fits?
Show answer
Correct answer: D. Never trust, always verify
Q2.In a AWS account involving the SIEM rule set and audit logs, A firewall exception for the payment API requires testing, rollback steps, owner approval, and a maintenance window. Which process is this?
Show answer
Correct answer: A. Change management
Q3.In a Kubernetes cluster involving the identity provider and audit logs, A patch causes failed logins in production. Which change-management artifact allows the team to restore service quickly?
Show answer
Correct answer: D. Rollback plan
Q4.In a AWS account involving the identity provider and source code, A design review focuses on preventing unauthorized disclosure of admin credentials. Which CIA objective is the review primarily addressing?
Show answer
Correct answer: B. Confidentiality
Q5.In a hybrid cloud involving the identity provider and medical records, A release manager requires signed commits so unauthorized changes to production code can be detected. Which objective is most directly supported?
Show answer
Correct answer: C. Integrity
Q6.In a manufacturing OT segment involving the patient-record system and customer PII, A private application checks user identity, device compliance, location, and risk score before each session. Which architecture principle best fits?
Show answer
Correct answer: D. Never trust, always verify
Q7.In a hybrid cloud involving the developer CI/CD pipeline and financial reports, A private application checks user identity, device compliance, location, and risk score before each session. Which architecture principle best fits?
Show answer
Correct answer: C. Never trust, always verify
Q8.In a retail branch network involving the identity provider and audit logs, A firewall exception for the SIEM rule set requires testing, rollback steps, owner approval, and a maintenance window. Which process is this?
Show answer
Correct answer: A. Change management
Q9.In a Kubernetes cluster involving the patient-record system and audit logs, A firewall exception for the public web application requires testing, rollback steps, owner approval, and a maintenance window. Which process is this?
Show answer
Correct answer: C. Change management
Q10.In a AWS account involving the container platform and admin credentials, A patch causes failed logins in production. Which change-management artifact allows the team to restore service quickly?
Show answer
Correct answer: A. Rollback plan
Q11.In a on-premises data center involving the SIEM rule set and customer PII, A patch causes failed logins in production. Which change-management artifact allows the team to restore service quickly?
Show answer
Correct answer: A. Rollback plan
Q12.In a Azure tenant involving the container platform and source code, A vendor publishes a SHA-256 digest for an installer. What should the customer use it for?
Show answer
Correct answer: B. Verify file integrity after download
Q13.In a manufacturing OT segment involving the patient-record system and encryption keys, A server proves its identity using a certificate and private key during TLS negotiation. Which cryptographic approach is involved?
Show answer
Correct answer: A. Asymmetric cryptography
Q14.In a retail branch network involving the HR portal and medical records, A team stores database encryption keys in a managed HSM instead of application code. What risk is reduced?
Show answer
Correct answer: D. Key exposure through source-code leakage
Q15.In a on-premises data center involving the branch-office firewall and customer PII, A vendor publishes a SHA-256 digest for an installer. What should the customer use it for?
Show answer
Correct answer: B. Verify file integrity after download
Q16.In a remote workforce involving the patient-record system and audit logs, A vendor publishes a SHA-256 digest for an installer. What should the customer use it for?
Show answer
Correct answer: D. Verify file integrity after download
Q17.In a Kubernetes cluster involving the identity provider and customer PII, A server proves its identity using a certificate and private key during TLS negotiation. Which cryptographic approach is involved?
Show answer
Correct answer: A. Asymmetric cryptography
Q18.In a remote workforce involving the EDR console and cardholder data, A server proves its identity using a certificate and private key during TLS negotiation. Which cryptographic approach is involved?
Show answer
Correct answer: B. Asymmetric cryptography
Q19.In a hybrid cloud involving the EDR console and customer PII, A team stores database encryption keys in a managed HSM instead of application code. What risk is reduced?
Show answer
Correct answer: B. Key exposure through source-code leakage
Q20.In a Kubernetes cluster involving the patient-record system and financial reports, A team stores database encryption keys in a managed HSM instead of application code. What risk is reduced?
Show answer
Correct answer: C. Key exposure through source-code leakage
Q21.In a retail branch network involving the container platform and medical records, A retail branch network team blocks inbound traffic with a stateful firewall before it reaches the identity provider. Which control type is being used?
Show answer
Correct answer: B. Technical preventive control
Q22.In a Kubernetes cluster involving the branch-office firewall and audit logs, Security installs lighting, fencing, and warning signs around a data-center loading dock. What is the main purpose of these controls?
Show answer
Correct answer: B. Deter unauthorized physical access
Q23.In a Kubernetes cluster involving the remote-access VPN and medical records, A Kubernetes cluster team blocks inbound traffic with a stateful firewall before it reaches the container platform. Which control type is being used?
Show answer
Correct answer: C. Technical preventive control
Q24.In a retail branch network involving the public web application and medical records, A Kubernetes cluster team blocks inbound traffic with a stateful firewall before it reaches the public web application. Which control type is being used?
Show answer
Correct answer: D. Technical preventive control
Q25.In a retail branch network involving the SIEM rule set and financial reports, Security installs lighting, fencing, and warning signs around a data-center loading dock. What is the main purpose of these controls?
Show answer
Correct answer: B. Deter unauthorized physical access
Q26.In a Azure tenant involving the public web application and source code, Security installs lighting, fencing, and warning signs around a data-center loading dock. What is the main purpose of these controls?
Show answer
Correct answer: C. Deter unauthorized physical access
Q27.In a AWS account involving the SIEM rule set and encryption keys, A design review focuses on preventing unauthorized disclosure of customer PII. Which CIA objective is the review primarily addressing?
Show answer
Correct answer: C. Confidentiality
Q28.In a retail branch network involving the payment API and customer PII, A design review focuses on preventing unauthorized disclosure of source code. Which CIA objective is the review primarily addressing?
Show answer
Correct answer: D. Confidentiality
Q29.In a retail branch network involving the EDR console and medical records, A release manager requires signed commits so unauthorized changes to production code can be detected. Which objective is most directly supported?
Show answer
Correct answer: D. Integrity
Q30.In a Kubernetes cluster involving the cloud storage account and audit logs, A release manager requires signed commits so unauthorized changes to production code can be detected. Which objective is most directly supported?
Show answer
Correct answer: C. Integrity
Q31.In a Azure tenant involving the HR portal and financial reports, A user logs in, receives access based on group membership, and the action is written to an audit log. Which sequence is represented?
Show answer
Correct answer: A. Authentication, authorization, and accounting
Q32.In a on-premises data center involving the identity provider and admin credentials, A user logs in, receives access based on group membership, and the action is written to an audit log. Which sequence is represented?
Show answer
Correct answer: D. Authentication, authorization, and accounting
Q33.In a on-premises data center involving the HR portal and customer PII, A user logs in, receives access based on group membership, and the action is written to an audit log. Which sequence is represented?
Show answer
Correct answer: C. Authentication, authorization, and accounting
Q34.In a remote workforce involving the payment API and financial reports, A login field accepts input that changes a database query and bypasses authentication. Which flaw exists?
Show answer
Correct answer: B. SQL injection
Q35.In a remote workforce involving the SIEM rule set and audit logs, A stored product review executes JavaScript in other shoppers’ browsers. What vulnerability is present?
Show answer
Correct answer: C. Stored cross-site scripting
Q36.In a remote workforce involving the SIEM rule set and medical records, A storage bucket containing encryption keys is readable without authentication. What is the root issue?
Show answer
Correct answer: A. Cloud access misconfiguration
Q37.In a hybrid cloud involving the developer CI/CD pipeline and source code, A login field accepts input that changes a database query and bypasses authentication. Which flaw exists?
Show answer
Correct answer: D. SQL injection
Q38.In a AWS account involving the remote-access VPN and medical records, A login field accepts input that changes a database query and bypasses authentication. Which flaw exists?
Show answer
Correct answer: B. SQL injection
Q39.In a remote workforce involving the identity provider and source code, A stored product review executes JavaScript in other shoppers’ browsers. What vulnerability is present?
Show answer
Correct answer: C. Stored cross-site scripting
Q40.In a hybrid cloud involving the cloud storage account and admin credentials, A stored product review executes JavaScript in other shoppers’ browsers. What vulnerability is present?
Show answer
Correct answer: A. Stored cross-site scripting
Q41.In a AWS account involving the public web application and audit logs, A storage bucket containing customer PII is readable without authentication. What is the root issue?
Show answer
Correct answer: A. Cloud access misconfiguration
Q42.In a AWS account involving the HR portal and source code, A storage bucket containing customer PII is readable without authentication. What is the root issue?
Show answer
Correct answer: A. Cloud access misconfiguration
Q43.In a hybrid cloud involving the developer CI/CD pipeline and admin credentials, File servers begin renaming files with a new extension and leave payment instructions. Which activity is indicated?
Show answer
Correct answer: A. Ransomware encryption
Q44.In a remote workforce involving the payment API and financial reports, EDR alerts on a tool reading LSASS memory shortly after admin login. Which activity should be suspected?
Show answer
Correct answer: A. Credential dumping
Q45.In a Azure tenant involving the developer CI/CD pipeline and financial reports, DNS logs show long random-looking subdomains leaving the network at high volume. What should analysts investigate?
Show answer
Correct answer: B. DNS tunneling or exfiltration
Q46.In a AWS account involving the identity provider and audit logs, File servers begin renaming files with a new extension and leave payment instructions. Which activity is indicated?
Show answer
Correct answer: C. Ransomware encryption
Q47.In a on-premises data center involving the remote-access VPN and cardholder data, File servers begin renaming files with a new extension and leave payment instructions. Which activity is indicated?
Show answer
Correct answer: C. Ransomware encryption
Q48.In a manufacturing OT segment involving the developer CI/CD pipeline and financial reports, EDR alerts on a tool reading LSASS memory shortly after admin login. Which activity should be suspected?
Show answer
Correct answer: C. Credential dumping
Q49.In a retail branch network involving the HR portal and source code, EDR alerts on a tool reading LSASS memory shortly after admin login. Which activity should be suspected?
Show answer
Correct answer: C. Credential dumping
Q50.In a on-premises data center involving the container platform and cardholder data, DNS logs show long random-looking subdomains leaving the network at high volume. What should analysts investigate?
Show answer
Correct answer: C. DNS tunneling or exfiltration
Q51.In a AWS account involving the branch-office firewall and source code, DNS logs show long random-looking subdomains leaving the network at high volume. What should analysts investigate?
Show answer
Correct answer: A. DNS tunneling or exfiltration
Q52.In a on-premises data center involving the patient-record system and admin credentials, One password is attempted once against hundreds of user accounts. Which attack pattern is this?
Show answer
Correct answer: D. Password spraying
Q53.In a Azure tenant involving the public web application and admin credentials, One password is attempted once against hundreds of user accounts. Which attack pattern is this?
Show answer
Correct answer: D. Password spraying
Q54.In a remote workforce involving the patient-record system and financial reports, One password is attempted once against hundreds of user accounts. Which attack pattern is this?
Show answer
Correct answer: D. Password spraying
Q55.In a retail branch network involving the HR portal and medical records, A vulnerable legacy server cannot be patched immediately. Which mitigation best reduces lateral movement risk?
Show answer
Correct answer: B. Network segmentation with restricted access
Q56.In a retail branch network involving the branch-office firewall and source code, A kiosk should run only one approved application. Which mitigation is strongest?
Show answer
Correct answer: B. Application allow listing
Q57.In a remote workforce involving the SIEM rule set and customer PII, Developers need to reduce injection risk in database queries. What should they implement?
Show answer
Correct answer: A. Parameterized queries and input validation
Q58.In a remote workforce involving the HR portal and customer PII, A vulnerable legacy server cannot be patched immediately. Which mitigation best reduces lateral movement risk?
Show answer
Correct answer: B. Network segmentation with restricted access
Q59.In a Azure tenant involving the public web application and admin credentials, A vulnerable legacy server cannot be patched immediately. Which mitigation best reduces lateral movement risk?
Show answer
Correct answer: D. Network segmentation with restricted access
Q60.In a on-premises data center involving the cloud storage account and cardholder data, A kiosk should run only one approved application. Which mitigation is strongest?
Show answer
Correct answer: B. Application allow listing
Q61.In a Azure tenant involving the patient-record system and cardholder data, A kiosk should run only one approved application. Which mitigation is strongest?
Show answer
Correct answer: D. Application allow listing
Q62.In a hybrid cloud involving the container platform and encryption keys, Developers need to reduce injection risk in database queries. What should they implement?
Show answer
Correct answer: B. Parameterized queries and input validation
Q63.In a manufacturing OT segment involving the SIEM rule set and financial reports, Developers need to reduce injection risk in database queries. What should they implement?
Show answer
Correct answer: B. Parameterized queries and input validation
Q64.In a Azure tenant involving the container platform and audit logs, A hacktivist group targets a public agency to disrupt services and publish political messages. Which motivation is most likely?
Show answer
Correct answer: C. Ideological or political motivation
Q65.In a AWS account involving the remote-access VPN and source code, A organized crime group targets a public agency to disrupt services and publish political messages. Which motivation is most likely?
Show answer
Correct answer: A. Ideological or political motivation
Q66.In a retail branch network involving the cloud storage account and audit logs, A nation-state team targets a public agency to disrupt services and publish political messages. Which motivation is most likely?
Show answer
Correct answer: B. Ideological or political motivation
Q67.In a Azure tenant involving the HR portal and admin credentials, Employees receive a benefits-update email linking to a lookalike login portal. Which vector is being used?
Show answer
Correct answer: B. Phishing
Q68.In a Kubernetes cluster involving the developer CI/CD pipeline and admin credentials, Attackers compromise a website frequently used by the company’s engineers and wait for them to visit. Which attack is this?
Show answer
Correct answer: D. Watering-hole attack
Q69.In a on-premises data center involving the identity provider and medical records, Several branded USB drives are left in the parking lot before malware appears on workstations. Which vector is most likely?
Show answer
Correct answer: C. Malicious removable media
Q70.In a manufacturing OT segment involving the developer CI/CD pipeline and audit logs, Employees receive a benefits-update email linking to a lookalike login portal. Which vector is being used?
Show answer
Correct answer: B. Phishing
Q71.In a manufacturing OT segment involving the remote-access VPN and medical records, Employees receive a benefits-update email linking to a lookalike login portal. Which vector is being used?
Show answer
Correct answer: C. Phishing
Q72.In a hybrid cloud involving the developer CI/CD pipeline and source code, Attackers compromise a website frequently used by the company’s engineers and wait for them to visit. Which attack is this?
Show answer
Correct answer: B. Watering-hole attack
Q73.In a Azure tenant involving the remote-access VPN and audit logs, Attackers compromise a website frequently used by the company’s engineers and wait for them to visit. Which attack is this?
Show answer
Correct answer: C. Watering-hole attack
Q74.In a hybrid cloud involving the identity provider and customer PII, Several branded USB drives are left in the parking lot before malware appears on workstations. Which vector is most likely?
Show answer
Correct answer: C. Malicious removable media
Q75.In a manufacturing OT segment involving the cloud storage account and customer PII, Several branded USB drives are left in the parking lot before malware appears on workstations. Which vector is most likely?
Show answer
Correct answer: D. Malicious removable media
Q76.In a AWS account involving the identity provider and source code, Changing an order ID in an API URL returns another customer’s order. Which vulnerability is most likely?
Show answer
Correct answer: C. Broken object-level authorization
Q77.In a retail branch network involving the SIEM rule set and medical records, Changing an order ID in an API URL returns another customer’s order. Which vulnerability is most likely?
Show answer
Correct answer: A. Broken object-level authorization
Q78.In a retail branch network involving the HR portal and medical records, Changing an order ID in an API URL returns another customer’s order. Which vulnerability is most likely?
Show answer
Correct answer: C. Broken object-level authorization
Q79.In a retail branch network involving the remote-access VPN and encryption keys, A switch denies production access until endpoint posture is checked. Which control is used?
Show answer
Correct answer: A. Network access control
Q80.In a AWS account involving the payment API and encryption keys, Workloads in the same data center are allowed to communicate only on explicitly required ports. Which design is this?
Show answer
Correct answer: C. Microsegmentation
Q81.In a manufacturing OT segment involving the HR portal and audit logs, Documents are labeled public, internal, confidential, or restricted before DLP policies apply. Which process is this?
Show answer
Correct answer: B. Data classification
Q82.In a Kubernetes cluster involving the cloud storage account and medical records, Where should a public reverse proxy normally sit to limit exposure of internal application servers?
Show answer
Correct answer: A. DMZ or perimeter network
Q83.In a AWS account involving the payment API and medical records, A switch denies production access until endpoint posture is checked. Which control is used?
Show answer
Correct answer: A. Network access control
Q84.In a hybrid cloud involving the remote-access VPN and admin credentials, A switch denies production access until endpoint posture is checked. Which control is used?
Show answer
Correct answer: A. Network access control
Q85.In a retail branch network involving the developer CI/CD pipeline and source code, Workloads in the same data center are allowed to communicate only on explicitly required ports. Which design is this?
Show answer
Correct answer: D. Microsegmentation
Q86.In a retail branch network involving the payment API and source code, Workloads in the same data center are allowed to communicate only on explicitly required ports. Which design is this?
Show answer
Correct answer: A. Microsegmentation
Q87.In a remote workforce involving the branch-office firewall and customer PII, A payment platform replaces card numbers with surrogate values while storing the mapping in a protected vault. What technique is this?
Show answer
Correct answer: C. Tokenization
Q88.In a retail branch network involving the developer CI/CD pipeline and medical records, A lost laptop contains an encrypted SSD. Which data state is protected most directly?
Show answer
Correct answer: A. Data at rest
Q89.In a retail branch network involving the HR portal and financial reports, Documents are labeled public, internal, confidential, or restricted before DLP policies apply. Which process is this?
Show answer
Correct answer: D. Data classification
Q90.In a Azure tenant involving the EDR console and source code, Documents are labeled public, internal, confidential, or restricted before DLP policies apply. Which process is this?
Show answer
Correct answer: A. Data classification
Q91.In a Kubernetes cluster involving the developer CI/CD pipeline and admin credentials, A payment platform replaces card numbers with surrogate values while storing the mapping in a protected vault. What technique is this?
Show answer
Correct answer: B. Tokenization
Q92.In a on-premises data center involving the developer CI/CD pipeline and customer PII, A lost laptop contains an encrypted SSD. Which data state is protected most directly?
Show answer
Correct answer: A. Data at rest
Q93.In a AWS account involving the cloud storage account and medical records, A design target says payroll must be restored within four hours after an outage. Which metric is this?
Show answer
Correct answer: C. Recovery time objective
Q94.In a Kubernetes cluster involving the developer CI/CD pipeline and cardholder data, Which backup design best resists ransomware modifying backup copies?
Show answer
Correct answer: B. Immutable or offline backups with restore testing
Q95.In a hybrid cloud involving the branch-office firewall and admin credentials, An application uses load balancing across two availability zones. Which goal is improved?
Show answer
Correct answer: C. High availability
Q96.In a Kubernetes cluster involving the container platform and financial reports, A design target says payroll must be restored within four hours after an outage. Which metric is this?
Show answer
Correct answer: C. Recovery time objective
Q97.In a manufacturing OT segment involving the payment API and admin credentials, A design target says payroll must be restored within four hours after an outage. Which metric is this?
Show answer
Correct answer: B. Recovery time objective
Q98.In a remote workforce involving the container platform and admin credentials, Which backup design best resists ransomware modifying backup copies?
Show answer
Correct answer: D. Immutable or offline backups with restore testing
Q99.In a remote workforce involving the HR portal and audit logs, Which backup design best resists ransomware modifying backup copies?
Show answer
Correct answer: A. Immutable or offline backups with restore testing
Q100.In a hybrid cloud involving the SIEM rule set and financial reports, An application uses load balancing across two availability zones. Which goal is improved?
Show answer
Correct answer: A. High availability
Take a full timed mock test
When you're ready, try a full CompTIA Security+ mock test in the real exam pattern. You get your score and the correct answer to every question at the end. Free to attempt.