Exam (100 Questions + Answers + Rationales)
1. Which security principle ensures a system is designed to minimize the amount
of code exposed to attack?
A. Defense in depth
B. Least privilege
C. Attack surface reduction
D. Fail securely
Correct Answer: C
Rationale: Attack surface reduction reduces exposed components, lowering
possible entry points.
2. What is the primary purpose of threat modeling?
A. To design test cases
B. To identify, classify, and prioritize threats
C. To write secure code
D. To encrypt data
Correct Answer: B
Rationale: Threat modeling determines what can go wrong and where controls
are needed.
3. In STRIDE, the “S” (Spoofing) is prevented primarily by:
A. Access control
B. Input validation
C. Authentication
D. Encryption
Correct Answer: C
Rationale: Spoofing relates to identity; authentication mitigates it.
,4. Which design flaw allows attackers to modify data between two components?
A. Cross-site scripting
B. Man-in-the-middle
C. SQL injection
D. CSRF
Correct Answer: B
Rationale: MITM intercepts/changes data during communication.
5. In a secure SDLC, security requirements should be defined during which
phase?
A. Deployment
B. Testing
C. Design
D. Maintenance
Correct Answer: C
Rationale: Security requirements must be established early, before development.
6. Which secure coding practice prevents SQL injection?
A. Session tokens
B. Parameterized queries
C. Load balancing
D. Logging
Correct Answer: B
Rationale: Parameterized statements prevent interpretation of user input as SQL
commands.
7. Least privilege dictates that:
A. Users get no access until they request it
B. Users only receive permissions necessary to perform tasks
C. All privileges are granted to admins
, D. Access is determined by encryption keys
Correct Answer: B
8. A system is designed so that any error does not expose stack traces. This is an
example of:
A. Defense in depth
B. Fail securely
C. Separation of duties
D. Open design
Correct Answer: B
9. Which OWASP item is most related to poor input validation?
A. Broken access control
B. Security misconfiguration
C. Injection attacks
D. Server-side request forgery
Correct Answer: C
10. Which is the best method to reduce insecure direct object references
(IDOR)?
A. Input sanitization
B. Strong logging
C. Access control checks on object access
D. Database encryption
Correct Answer: C
11. A developer wants to isolate microservices so compromise of one service
does not affect others. Which principle applies?
A. Open design
B. Defense in depth