MCQ Threat Modeling
MCQ Threat Modeling
4. Which phase of the software development lifecycle is best suited for conducting threat modeling?
a) Design
b) Development
c) Testing
d) Deployment
Answer: a) Design
Answer: c) DREAD
10. Which threat modeling technique uses a hierarchical model to identify threats?
a) PASTA
b) VAST
c) STRIDE
d) DREAD
Answer: b) VAST
12. Which of the following is a common threat associated with the "Spoofing" category in STRIDE?
a) Unauthorized access to sensitive data
b) Corruption of system files
c) Injection of malicious code
d) Impersonation of legitimate users
13. Which threat modeling technique focuses on business goals and impacts?
a) STRIDE
b) PASTA
c) VAST
d) DREAD
Answer: b) PASTA
Answer: b) Intrusion
16. Which threat modeling technique emphasizes identifying and protecting valuable assets?
a) PASTA
b) VAST
c) STRIDE
d) DREAD
Answer: a) PASTA
17. What is the primary goal of threat modeling during the design phase?
a) Identifying vulnerabilities in the existing codebase
b) Ensuring compliance with industry standards
c) Identifying and mitigating potential security risks
d) Enhancing user experience
18. Which threat modeling methodology considers attacker motivations and goals?
a) STRIDE
b) PASTA
c) DREAD
d) VAST
Answer: b) PASTA
19. Which of the following is not a step in the threat modeling process?
a) Define security objectives
b) Identify threats and vulnerabilities
c) Create a threat model diagram
d) Test the application for all possible threats
23. Which of the following is not a common type of threat modeling diagram?
a) Data flow diagrams
b) Sequence diagrams
c) Use case diagrams
d) State transition diagrams
24. Which phase of the threat modeling process involves assessing the severity of identified threats?
a) Threat identification
b) Threat modeling
c) Threat analysis
d) Threat mitigation
25. What is the main purpose of the "Elevation of Privilege" category in STRIDE?
a) Gaining unauthorized access to resources
b) Modifying data or system components
c
Answer: a) PASTA
27. Which of the following is not a common vulnerability that threat modeling helps to identify?
a) SQL injection
b) Cross-site scripting (XSS)
c) Buffer overflow
d) Operating system updates
28. Which of the following is a key consideration when evaluating threats during the threat modeling
process?
a) The color of the threat
b) The likelihood and impact of each threat
c) The size of the threat
d) The number of threats identified
Answer: b) The likelihood and impact of each threat
30. Which of the following is a common approach to mitigating security threats identified during
threat modeling?
a) Ignoring the threats
b) Accepting all identified risks
c) Implementing countermeasures
d) Increasing system complexity
32. Which threat modeling methodology emphasizes the importance of understanding system
components and interactions?
a) STRIDE
b) PASTA
c) DREAD
d) VAST
Answer: d) VAST
34. What is the primary goal of the "Information Disclosure" category in STRIDE?
a) Gaining unauthorized access to resources
b) Modifying data or system components
c) Preventing legitimate users from accessing resources
d) Revealing sensitive information
35. Which of the following is not a common challenge associated with threat modeling?
a) Identifying all potential threats
b) Lack of skilled personnel
c) Overestimating the severity of threats
d) Underestimating the importance of threat modeling
Answer: d) Underestimating the importance of threat modeling
Answer: c) DREAD
37. What is the main purpose of the "Denial of Service" category in STRIDE?
a) Gaining unauthorized access to resources
b) Modifying data or system components
c) Preventing legitimate users from accessing resources
d) Intercepting data in transit
42. Which threat modeling methodology emphasizes the importance of understanding system
boundaries?
a) PASTA
b) VAST
c) STRIDE
d) DREAD
Answer: a) PASTA
44. Which phase of the threat modeling process involves brainstorming potential threats?
a) Threat identification
b) Threat modeling
c) Threat analysis
d) Threat mitigation
46. Which of the following is not a common challenge associated with threat modeling?
a) Identifying all potential threats
b) Lack of skilled personnel
c) Overestimating the severity of threats
d) Underestimating the importance of threat modeling
47. Which threat modeling methodology emphasizes the importance of understanding system
components and interactions?
a) STRIDE
b) PASTA
c) DREAD
d) VAST
Answer: d) VAST
48. What is the main purpose of the "Denial of Service" category in STRIDE?
a) Gaining unauthorized access to resources
b) Modifying data or system components
c) Preventing legitimate users from accessing resources
d) Intercepting data in transit
API MCQ
1. Which of the following HTTP methods is considered safe and should not have side effects on the
server?
a) GET
b) POST
c) PUT
d) DELETE
**Answer: a) GET**
8. Which of the following is a best practice for securely storing API keys?
a) Storing them in plaintext in the source code
b) Encrypting them using a reversible encryption algorithm
c) Storing them in environment variables
d) Storing them in a publicly accessible database
**Answer: c) Storing them in environment variables**
9. Which type of attack involves sending a large number of requests to overwhelm a server?
a) SQL Injection
b) Denial of Service (DoS)
c) Cross-Site Scripting (XSS)
d) Man-in-the-Middle (MitM)
**Answer: b) Denial of Service (DoS)**
11. Which cryptographic algorithm is commonly used for generating secure hashes in API security?
a) MD5
b) SHA-1
c) SHA-256
d) AES
**Answer: c) SHA-256**
13. Which of the following is a common vulnerability associated with XML-based APIs?
a) SQL Injection
b) Cross-Site Scripting (XSS)
c) XML External Entity (XXE) Injection
d) Cross-Site Request Forgery (CSRF)
**Answer: c) XML External Entity (XXE) Injection**
14. Which of the following HTTP headers can help prevent Clickjacking attacks?
a) Content-Security-Policy
b) X-XSS-Protection
c) X-Frame-Options
d) X-Content-Type-Options
**Answer: c) X-Frame-Options**
15. Which authentication mechanism involves exchanging a username and password for a token?
a) Basic Authentication
b) OAuth
c) API Key Authentication
d) HMAC Authentication
**Answer: b) OAuth**
17. In the context of API security, what does Fuzzing refer to?
a) Sending random or malformed data to an API to find vulnerabilities
b) Encrypting API payloads
c) Implementing rate limiting for API requests
d) Testing API endpoints for SQL Injection vulnerabilities
**Answer: a) Sending random or malformed data to an API to find vulnerabilities**
18. Which HTTP status code indicates that the client must authenticate to gain network access?
a) 200 OK
b) 401 Unauthorized
c) 403 Forbidden
d) 404 Not Found
**Answer: b) 401 Unauthorized**
19. Which of the following is a common technique for preventing SQL Injection attacks?
a) Input validation
b) Output encoding
c) Prepared statements
d) Cross-Origin Resource Sharing (CORS)
**Answer: c) Prepared statements**
21. Which of the following is NOT typically included in an API security audit?
a) Authentication mechanisms
b) Input validation techniques
c) Performance optimization strategies
d) Authorization policies
**Answer: c) Performance optimization strategies**
22. Which HTTP method is typically used to update existing resources on the server?
a) POST
b) GET
c) PUT
d) DELETE
**Answer: c) PUT**
23. Which of the following is NOT a common vulnerability associated with JSON Web Tokens (JWT)?
a) Token Expiration
b) Replay Attacks
c) Session Fixation
d) Insecure Key Storage
**Answer: c) Session Fixation**
25. Which of the following is NOT a recommended practice for securing APIs against injection
attacks?
a) Parameterized queries
b) Input validation
c) Output encoding
d) Disabling HTTPS
**Answer:
d) Disabling HTTPS**
26. Which cryptographic algorithm is commonly used for encrypting data transmitted over HTTPS?
a) RSA
b) AES
c) DES
d) HMAC
**Answer: b) AES**
27. Which of the following is a common method for preventing brute force attacks on API
authentication endpoints?
a) Captcha verification
b) Account lockout policies
c) Cross-Site Request Forgery (CSRF) tokens
d) Biometric authentication
**Answer: b) Account lockout policies**
28. Which of the following is NOT a typical component of an API security architecture?
a) Firewall
b) Load Balancer
c) API Gateway
d) Web Browser
**Answer: d) Web Browser**
29. Which HTTP header can be used to mitigate the risk of Clickjacking attacks?
a) Content-Security-Policy
b) X-XSS-Protection
c) X-Frame-Options
d) X-Content-Type-Options
**Answer: c) X-Frame-Options**
30. What does the "Authorization" header typically contain in API requests?
a) User's password
b) User's username
c) API key or access token
d) Session ID
**Answer: c) API key or access token**
31. Which of the following is NOT a recommended practice for securely handling API keys?
a) Storing them in plaintext in the client-side code
b) Rotating keys periodically
c) Restricting key usage permissions
d) Encrypting keys at rest
**Answer: a) Storing them in plaintext in the client-side code**
32. Which of the following is NOT a common vulnerability in API authentication mechanisms?
a) Brute Force Attacks
b) Cross-Site Scripting (XSS)
c) Token Leakage
d) Man-in-the-Middle (MitM) Attacks
**Answer: b) Cross-Site Scripting (XSS)**
33. Which HTTP status code indicates that the requested resource has been permanently moved to
a new URL?
a) 200 OK
b) 301 Moved Permanently
c) 404 Not Found
d) 500 Internal Server Error
**Answer: b) 301 Moved Permanently**
34. Which of the following is NOT a common security risk associated with APIs?
a) XML Injection
b) SQL Injection
c) Man-in-the-Browser (MitB) Attacks
d) DNS Spoofing
**Answer: d) DNS Spoofing**
35. Which authentication mechanism involves sending a username and password with each
request?
a) HMAC Authentication
b) OAuth
c) Basic Authentication
d) JWT Authentication
**Answer: c) Basic Authentication**
36. Which of the following HTTP headers can help mitigate the risk of XSS attacks?
a) Content-Security-Policy
b) X-XSS-Protection
c) X-Frame-Options
d) X-Content-Type-Options
**Answer: b) X-XSS-Protection**
37. Which of the following is NOT a common method for securely transmitting sensitive data over
APIs?
a) HTTPS
b) Base64 encoding
c) Encryption
d) Tokenization
**Answer: b) Base64 encoding**
39. Which of the following is a common method for ensuring data integrity in API requests?
a) Digital Signatures
b) Base64 Encoding
c) OAuth Tokens
d) Encryption
**Answer: a) Digital Signatures**
40. Which HTTP status code indicates that the requested resource could not be found on the
server?
a) 200 OK
b) 404 Not Found
c) 500 Internal Server Error
d) 401 Unauthorized
**Answer: b) 404 Not Found**
41. Which of the following is a common technique for securing API endpoints against unauthorized
access?
a) OAuth Tokens
b) Session IDs
c) JWT Authentication
d) HTTP Basic Authentication
**Answer: c) JWT Authentication**
42. Which of the following is NOT a typical component of an API security architecture?
a) Intrusion Detection System (IDS)
b) Web Application Firewall (WAF)
c) API Gateway
d) Load Balancer
**Answer: a) Intrusion Detection System (IDS)**
43. Which HTTP method is typically used for retrieving data from a server without modifying it?
a) POST
b) GET
c) PUT
d) DELETE
**Answer: b) GET**
44. Which cryptographic algorithm is commonly used for hashing passwords before storing them in
a database?
a) MD5
b) SHA-1
c) SHA-256
d) AES
**Answer: c) SHA-256**
45. Which of the following is NOT a common vulnerability associated with API keys?
a) Key Leakage
b) Brute Force Attacks
c) Insufficient Key Length
d) Cross-Site Request Forgery (CSRF)
**Answer: d) Cross-Site Request Forgery (CSRF)**
46. Which of the following is a common method for securing APIs against SQL Injection attacks?
a) Input validation
b) Output encoding
c) Prepared statements
d) Cross-Origin Resource Sharing (CORS)
**Answer: c) Prepared statements**
47. Which HTTP status code indicates that the client does not have permission to access the
requested resource?
a) 200 OK
b) 401 Unauthorized
c) 403 Forbidden
d) 404 Not Found
**Answer: c) 403 Forbidden**
48. Which of the following is a common technique for mitigating the risk of API endpoint
enumeration?
a) Rate Limiting
b) API Key Rotation
c) Implementing Custom Error Messages
d) Hiding Error Details
**Answer: d) Hiding Error Details**
49. Which HTTP header can be used to specify the MIME type of the data being sent or received?
a) Content-Type
b) Content-Length
c) Content-Encoding
d) Content-Disposition
**Answer: a) Content-Type**
50. Which of the following is a common method for securing APIs against XML Injection attacks?
a) Input validation
b) Output encoding
c) XML Encryption
d) Session Management
**Answer: c) XML Encryption**
51. What does the term "JWT" stand for in the context of API security?
a) Java Web Tokens
b) JSON Web Tokens
c) JavaScript Web Tokens
d) JSON Web Transfers
**Answer: b) JSON Web Tokens**
53. Which of the following is NOT typically a part of API documentation regarding security?
a) Authentication mechanisms
b) Sample API responses
c) Authorization policies
d) Server hardware specifications
**Answer: d) Server hardware specifications**
54. Which cryptographic algorithm is commonly used for encrypting data transmitted over SSL/TLS
connections?
a) RSA
b) AES
c) SHA-256
d) HMAC
**Answer: b) AES**
55. Which of the following is a common technique for securing APIs against brute force attacks?
a) CAPTCHA verification
b) API key rotation
c) Rate limiting
d) Digital signatures
**Answer: c) Rate limiting**
56. Which HTTP header can be used to prevent a web page from being displayed in an iframe?
a) Content-Security-Policy
b) X-Frame-Options
c) X-XSS-Protection
d) X-Content-Type-Options
**Answer: b) X-Frame-Options**
58. Which of the following is NOT a common vulnerability associated with API versioning?
a) Insecure Direct Object References (IDOR)
b) Deprecated Functionality
c) Lack of Documentation
d) Backward Incompatible Changes
**Answer: a) Insecure Direct Object References (IDOR)**
59. Which authentication mechanism involves sending a shared secret along with each request?
a) HMAC Authentication
b) OAuth
c) JWT Authentication
d) Basic Authentication
**Answer: a) HMAC Authentication**
60. Which HTTP status code indicates that the client's request lacks proper authentication
credentials?
a) 200 OK
b) 401 Unauthorized
c) 403 Forbidden
d) 404 Not Found
**Answer: b) 401 Unauthorized**