CompTIA Security+ SY0-701 Practice Questions with Explanations
Questions
A company installs a locked fence around its data center. Which control category is this?
- Physical
- Managerial
- Technical
- Operational
A firewall rule blocks inbound traffic on port 23. Which control category is this?
- Technical
- Physical
- Managerial
- Operational
Leadership publishes a policy requiring an annual risk assessment. Which control category is this?
- Managerial
- Technical
- Physical
- Operational
After a ransomware attack, an admin restores servers from clean backups. Which control type is the backup?
- Corrective
- Detective
- Deterrent
- Preventive
A sign on the fence reads "Premises monitored by video surveillance." Which control type is the sign?
- Deterrent
- Corrective
- Detective
- Compensating
A legacy controller can't be patched, so it is moved onto an isolated VLAN with strict ACLs. What kind of control is the isolation?
- Compensating
- Directive
- Corrective
- Deterrent
Comparing a file's current SHA-256 hash to its original hash protects which part of the CIA triad?
- Integrity
- Confidentiality
- Availability
- Authorization
Which technology provides non-repudiation for an email?
- Digital signature
- Symmetric encryption
- Salted password hash
- TLS session key
A user types a password to prove they own the account they claimed. Which AAA step is this?
- Authentication
- Authorization
- Accounting
- Auditing
In a Zero Trust architecture, which component decides whether a subject is granted access?
- Policy engine
- Policy enforcement point
- Implicit trust zone
- Data plane switch
A fake cloud access key is planted in a code repository. Any use of it triggers an alert. What is this?
- Honeytoken
- Honeypot
- Honeynet
- Sinkhole
In change management, what is a backout plan?
- Steps to return to the prior state if the change fails
- A list of users who must approve the change
- A schedule of the maintenance window
- A record of who made each change
An organization compares its current security posture to a target framework to find what's missing. What is this called?
- Gap analysis
- Tabletop exercise
- Root cause analysis
- Business impact analysis
Which algorithm is symmetric?
- AES
- RSA
- ECC
- Diffie-Hellman
Two parties need to agree on a shared secret over an untrusted network without sending the secret itself. Which method fits?
- Diffie-Hellman
- SHA-256 hashing
- AES-CBC mode
- Base64 encoding
Why is a random salt added to each password before hashing?
- So identical passwords produce different hashes
- So the hash can be reversed if needed
- So the hash is shorter and faster to store
- So the password can't be changed later
A browser needs to check, in real time, whether a single certificate has been revoked. Which protocol does it use?
- OCSP
- CRL
- CSR
- PEM
Which hostname does a certificate for *.example.com cover?
- mail.example.com
- example.com
- dev.mail.example.com
- mail.example.net
Which technique makes a weak password harder to brute force by running the hash many thousands of times?
- Key stretching
- Key escrow
- Tokenization
- Data masking
A laptop stores its full-disk encryption keys in a chip soldered to the motherboard. What is that chip?
- TPM
- HSM
- KMS
- CASB
An attacker hides a text file inside the pixel data of a JPEG. What technique is this?
- Steganography
- Obfuscation by hashing
- Tokenization
- Data masking
A payment system replaces card numbers with random values and keeps the real numbers in a secure vault. What is this?
- Tokenization
- Hashing
- Data masking
- Key stretching
Which physical control is designed to stop tailgating into a secure area?
- Access control vestibule
- Reinforced bollards
- Motion-sensing lights
- Industrial camouflage
Alice wants to send Bob a message only Bob can read. Which key does she encrypt it with?
- Bob's public key
- Bob's private key
- Alice's private key
- Alice's public key
Bob receives a digitally signed message from Alice. Which key does he use to verify the signature?
- Alice's public key
- Alice's private key
- Bob's private key
- Bob's public key
In symmetric encryption, the same key is used to encrypt and decrypt.
Hashing is reversible if you have the correct key.
An employee gets a text message with a link claiming their package is held at customs. What is this attack?
- Smishing
- Vishing
- Whaling
- Pharming
An attacker calls the help desk pretending to be a manager and asks for a password reset. What is this?
- Vishing
- Smishing
- Typosquatting
- Watering hole
An attacker registers examp1e.com to catch users who mistype example.com. What is this?
- Typosquatting
- Domain hijacking
- DNS poisoning
- Brand impersonation
Attackers compromise a trade-association website that employees of a target company visit often. What attack is this?
- Watering hole
- Spear phishing
- Pharming
- Credential stuffing
An attacker uses one common password, like Spring2026!, against thousands of accounts. What is this?
- Password spraying
- Credential stuffing
- Brute force
- Rainbow table attack
An attacker takes username/password pairs leaked from one site and tries them on a bank's login page. What is this?
- Credential stuffing
- Password spraying
- Pass-the-hash
- Dictionary attack
Malware spreads across the network on its own, with no user action. What type is it?
- Worm
- Virus
- Trojan
- Logic bomb
A free game download secretly installs a backdoor. What type of malware is this?
- Trojan
- Worm
- Rootkit
- Bloatware
A fired developer left code that deletes the payroll database if his account is ever disabled. What is this?
- Logic bomb
- Worm
- Keylogger
- Spyware
Malware hides itself by modifying the operating system kernel so antivirus can't see it. What is it?
- Rootkit
- Adware
- Ransomware
- Worm
A login form accepts the username ' OR 1=1 -- and lets the attacker in. What is the best fix?
- Parameterized queries
- A longer password policy
- Disabling the login form's CSS
- Encrypting the database at rest
An attacker posts a forum comment containing a script that runs in every visitor's browser. What is this?
- Stored cross-site scripting
- SQL injection
- Directory traversal
- Server-side request forgery
A web request includes ../../../../etc/passwd in a file parameter. What attack is being attempted?
- Directory traversal
- Cross-site scripting
- Buffer overflow
- Replay attack
A program writes more data into a memory region than it can hold, overwriting nearby memory. What is this vulnerability?
- Buffer overflow
- Race condition
- Memory leak
- Integer rounding
A program checks that a file is safe, but the attacker swaps the file before the program uses it. What is this?
- Race condition (TOCTOU)
- Buffer overflow
- Cross-site request forgery
- Directory traversal
An attacker captures a valid authentication message and resends it later to log in. What mitigation works best?
- Timestamps or nonces in each message
- A stronger hashing algorithm
- Longer encryption keys
- Disabling account lockout
An attacker sends small DNS queries with a spoofed source address so huge responses flood the victim. What is this?
- Amplification DDoS
- DNS tunneling attack
- Domain hijacking
- ARP cache poisoning
An attacker forces a TLS connection to use an older, weaker protocol version. What attack is this?
- Downgrade attack
- Birthday attack
- Collision attack
- Replay attack
Which attack tries to find two different inputs that produce the same hash value?
- Birthday attack
- Downgrade attack
- Pass-the-hash
- Rainbow table attack
A vendor's signed software update is compromised before it ships to thousands of customers. What type of attack is this?
- Supply chain attack
- Watering hole attack
- Insider threat
- Zero-click exploit
An exploit targets a flaw the vendor doesn't know about and has no patch for. What is it called?
- Zero-day
- Known CVE
- End-of-life flaw
- Misconfiguration
Which threat actor is most associated with long-term, well-funded campaigns for espionage?
- Nation-state
- Unskilled attacker
- Hacktivist
- Shadow IT user
A group defaces a company website to protest the company's environmental record. What is the most likely motivation?
- Ideological beliefs
- Financial gain
- Espionage for a government
- Blackmail of executives