The SecOps Group secops-CAP Practice Exams
Last updated on Oct 22,2026- Exam Code: secops-CAP
- Exam Name: Certified AppSec Practitioner Exam
- Certification Provider: The SecOps Group
- Latest update: Oct 22,2026
Which of the following is NOT a symmetric key encryption algorithm?
- A . RC4
- B . AES
- C . DES
- D . RSA
D
Explanation:
Symmetric key encryption algorithms use the same key for both encryption and decryption, while asymmetric algorithms use a pair of keys (public and private).
Let’s evaluate the options:
Option A ("RC4"): RC4 is a symmetric key encryption algorithm. It is a stream cipher that uses a single key to both encrypt and decrypt data, though it is considered insecure due to known cryptographic weaknesses (e.g., biases in the keystream).
Option B ("AES"): AES (Advanced Encryption Standard) is a symmetric key encryption algorithm. It uses a single key (e.g., 128, 192, or 256 bits) for both encryption and decryption, widely regarded as secure when properly implemented.
Option C ("DES"): DES (Data Encryption Standard) is a symmetric key encryption algorithm. It uses a 56-bit key for both encryption and decryption, but it is now considered insecure due to its small key size and vulnerability to brute-force attacks.
Option D ("RSA"): RSA (Rivest-Shamir-Adleman) is an asymmetric key encryption algorithm. It uses a public key to encrypt and a private key to decrypt, making it an asymmetric algorithm, not a symmetric one.
The correct answer is D, as RSA is the only asymmetric algorithm listed, aligning with the CAP syllabus under "Cryptography Fundamentals" and "Symmetric vs. Asymmetric Encryption."
Reference: SecOps Group CAP Documents – "Symmetric Encryption Algorithms," "Asymmetric
Encryption," and "OWASP Cryptographic Storage Cheat Sheet" sections.
After purchasing an item on an e-commerce website, a user can view their order details by visiting the URL:
https://example.com/?order_id=53870
A security researcher pointed out that by manipulating the order_id value in the URL, a user can view arbitrary orders and sensitive information associated with that order_id. There are two fixes:
(Bob’s Fix): In order to fix this vulnerability, a developer called Bob devised a fix so that the URL does not disclose the numeric value of the order_id but uses a SHA1 hash of the order_id in the URL, such as:
https://example.com/?order_id=1ff0fe6f1599536d1326418124a261bc98b8ea1
Note: that the SHA1 value of 53870 is 1ff0fe6f1599536d1326418124a261bc98b8ea1
(John’s Fix): Another developer called John devised a different fix so that the URL does not disclose the numeric value of the order_id and uses a Base64 encoded value of the order_id in the URL, such as:
https://example.com/?order_id=NTM4NzA=
Note: that the Base64 encoded value of 53870 is NTM4NzA= Which of the following is correct?
- A . Both solutions are adequate to fix the problem
- B . Both solutions are inadequate and the vulnerability is still not fixed
- C . Only John’s solution fixes the problem
- D . Only Bob’s solution fixes the problem
B
Explanation:
The vulnerability described is an Insecure Direct Object Reference (IDOR), where manipulating the order_id (e.g., 53870) allows unauthorized access to other users’ orders. The fixes proposed by Bob and John aim to obscure the numeric value of order_id to prevent easy guessing or manipulation: Bob’s Fix (SHA1 Hash): Replaces order_id=53870 with
order_id=1ff0fe6f1599536d1326418124a261bc98b8ea1 (SHA1 hash of 53870). While this obscures the original value, an attacker can still attempt to hash potential order IDs (e.g., 53871, 53872) and test them in the URL. If the application directly uses the hash to look up the order without validating the user’s authorization, the vulnerability persists. SHA1 is a one-way hash, but it does not inherently enforce access control.
John’s Fix (Base64 Encoding): Replaces order_id=53870 with order_id=NTM4NzA= (Base64 encoding of 53870). Base64 is a reversible encoding, and an attacker can easily decode NTM4NzA= back to 53870 using standard tools. If the application decodes it and uses the original value to fetch orders without authorization checks, the IDOR vulnerability remains.
Evaluation: Both fixes address the symptom (disclosing the numeric value) but fail to address the root cause: lack of authorization validation. The application must ensure that only the authenticated user can access their own orders, regardless of the order_id format (numeric, hashed, or encoded). Neither fix includes such a check, so the vulnerability persists.
Option A ("Both solutions are adequate to fix the problem"): Incorrect, as neither solution enforces authorization.
Option B ("Both solutions are inadequate and the vulnerability is still not fixed"): Correct, as both SHA1 hashing and Base64 encoding are superficial changes that do not prevent unauthorized access. Option C ("Only John’s solution fixes the problem"): Incorrect, as John’s Base64 encoding is reversible and does not fix the IDOR issue.
Option D ("Only Bob’s solution fixes the problem"): Incorrect, as Bob’s SHA1 hashing also does not address the authorization flaw.
The correct answer is B, aligning with the CAP syllabus under "Insecure Direct Object Reference (IDOR)" and "Access Control Best Practices."
Reference: SecOps Group CAP Documents – "IDOR Mitigation," "Cryptographic Hashing," and "OWASP Access Control Testing Guide" sections.
The following request is vulnerable to Cross-Site Request Forgery vulnerability.
POST /changepassword HTTP/2 Host: example.com User-Agent: Mozilla/5.0 (Windows NT 10.0;
Win64; x64) rv:107.0) Gecko/20100101 Firefox/107.0 Sec-Fetch-Dest: document Sec-Fetch-Mode:
navigate Sec-Fetch-Site: same-origin Cookie: JSESSIONID=38RC5ECV10785B53AF19816E92E2E50
Content-Length: 95
new_password=lov3MyPiano23&confirm_password=lov3MyPiano23
- A . True
- B . False
A
Explanation:
Cross-Site Request Forgery (CSRF) occurs when an attacker tricks a user’s browser into making an unintended request to a site where the user is authenticated, potentially performing actions like changing a password.
Let’s analyze the request:
The request is a POST to /changepassword with a Cookie: JSESSIONID, indicating the user is authenticated via a session. The Content-Length: 95 and payload
(new_password=lov3MyPiano23&confirm_password=lov3MyPiano23) suggest a state-changing operation (password change).
CSRF vulnerability arises when the request lacks a unique, unpredictable token to validate its legitimacy, and the server accepts it based solely on the session cookie. The request includes no CSRF token (e.g., in the body or headers like X-CSRF-Token).
The Sec-Fetch-Site: same-origin header indicates the request originates from the same domain, but this is a browser feature and does not guarantee server-side protection against CSRF from a malicious site (e.g., via a hidden iframe or form submission).
Without a CSRF token, an attacker could craft a malicious HTML page with a form that submits this exact request when a victim visits their site while authenticated to example.com, exploiting the browser’s automatic inclusion of the JSESSIONID cookie. This is a textbook CSRF vulnerability. Option A ("True"): Correct, as the request lacks a CSRF token, making it vulnerable to CSRF attacks. Option B ("False"): Incorrect, as the absence of a CSRF token indicates vulnerability.
The correct answer is A, aligning with the CAP syllabus under "Cross-Site Request Forgery (CSRF)"
and "Session Management."
Reference: SecOps Group CAP Documents – "CSRF Prevention," "Session Security," and "OWASP CSRF Prevention Cheat Sheet" sections.
If the end-user input is not validated or sanitized, an application created using which of the following languages or frameworks might be prone to Insecure Deserialization vulnerability?
- A . .NET
- B . Java
- C . PHP
- D . All of the above
D
Explanation:
Insecure Deserialization occurs when untrusted data is deserialized by an application, allowing attackers to execute arbitrary code, manipulate objects, or cause denial-of-service. If user input is not validated or sanitized, many languages and frameworks are vulnerable to this issue because deserialization often involves reconstructing objects from serialized data, which can include malicious payloads.
Option A (".NET"): .NET applications (e.g., using BinaryFormatter or XmlSerializer) are prone to Insecure Deserialization if untrusted data is deserialized without validation.
For example, mBinaryFormatter can execute arbitrary code during deserialization, a well-known vulnerability (e.g.,
CVE-2017-11882).
Option B ("Java"): Java’s ObjectInputStream is notoriously vulnerable to Insecure Deserialization. Libraries like java.io.Serializable can execute code during deserialization of untrusted data, as seen in vulnerabilities like Apache Commons Collections (CVE-2015-7501).
Option C ("PHP"): PHP applications using functions like unserialize() are vulnerable if they deserialize untrusted input. For example, an attacker can craft a serialized object to trigger a gadget chain, leading to remote code execution (e.g., CVE-2016-7124).
Option D ("All of the above"): Correct, as .NET, Java, and PHP all have deserialization mechanisms that, if not properly secured, can lead to Insecure Deserialization vulnerabilities when handling untrusted input.
The correct answer is D, aligning with the CAP syllabus under "Insecure Deserialization" and "OWASP Top 10 (A08:2021 – Software and Data Integrity Failures)."
Reference: SecOps Group CAP Documents – "Insecure Deserialization," "Serialization Security," and "OWASP Deserialization Cheat Sheet" sections.
Which of the following SSL/TLS protocols are considered to be insecure?
- A . SSLv2 and SSLv3
- B . TLSv1.0 and TLSv1.1
- C . Both A and B
- D . SSLv2, SSLv3, TLSv1.0, TLSv1.1, TLSv1.2 and TLSv1.3
C
Explanation:
SSL (Secure Sockets Layer) and TLS (Transport Layer Security) are cryptographic protocols used to secure communication over a network. The security of these protocols has evolved over time, with older versions being deprecated due to identified vulnerabilities. SSLv2 and SSLv3 are considered insecure because they are vulnerable to attacks such as POODLE (Padding Oracle On Downgraded Legacy Encryption), which exploits weaknesses in their padding schemes. Similarly, TLSv1.0 and TLSv1.1 are also deemed insecure due to vulnerabilities like BEAST (Browser Exploit Against SSL/TLS) and weak cipher support, and they have been deprecated by modern standards (e.g., PCI DSS). TLSv1.2 and TLSv1.3 are considered secure when properly configured with strong ciphers.
Option A correctly identifies SSLv2 and SSLv3 as insecure, but it omits TLSv1.0 and TLSv1.1. Option B correctly identifies TLSv1.0 and TLSv1.1 as insecure but omits SSLv2 and SSLv3. Option C ("Both A and B") encompasses all insecure protocols (SSLv2, SSLv3, TLSv1.0, and TLSv1.1), making it the most comprehensive and correct answer. Option D is incorrect because it includes TLSv1.2 and TLSv1.3, which are secure when used with modern configurations. This aligns with the CAP syllabus focus on secure communication protocols and vulnerability management.
Reference: SecOps Group CAP Documents – "Secure Communication," "SSL/TLS Configuration," and "OWASP Secure Headers" sections.
An application’s forget password functionality is described below:
The user enters their email address and receives a message on the web page:
“If the email exists, we will email you a link to reset the password”
The user also receives an email saying:
“Please use the link below to create a new password:”
http://example.com/reset_password?userId=5298
Which of the following is true?
- A . The reset link uses an insecure channel
- B . The application is vulnerable to username enumeration
- C . The application will allow the user to reset an arbitrary user’s password
- D . Both A and C
D
Explanation:
The scenario describes a password reset mechanism where a user receives an email with a reset link:
http://example.com/reset_password?userId=5298.
Let’s evaluate each option:
Option A ("The reset link uses an insecure channel"): The reset link uses http:// instead of https://, indicating an insecure channel (HTTP instead of HTTPS). Transmitting sensitive data (e.g., a reset link) over HTTP allows an attacker to intercept the request, potentially stealing the reset token or user ID. This makes the reset mechanism insecure, so this statement is true.
Option B ("The application is vulnerable to username enumeration"): The message "If the email exists, we will email you a link to reset the password" is generic and does not reveal whether the email exists, which is a best practice to prevent username enumeration. Username enumeration would occur if the application responded differently for existing vs. non-existing users (e.g., "Email not found"). Here, there’s no indication of enumeration vulnerability, so this statement is false.
Option C ("The application will allow the user to reset an arbitrary user’s password"): The reset link includes a userId=5298 parameter, which appears to directly reference a user’s ID. If an attacker can manipulate this parameter (e.g., to userId=5299), they might be able to reset another user’s password, especially if the application does not validate that the reset request is tied to the user’s session or email. The link also lacks a one-time token or other verification mechanism to ensure the request is legitimate. This suggests an Insecure Direct Object Reference (IDOR) vulnerability, making this statement true.
Option D ("Both A and C"): Since both A (insecure channel) and C (arbitrary password reset) are true, this is the correct answer.
The correct answer is D, aligning with the CAP syllabus under "Password Reset Security" and "Insecure Direct Object Reference (IDOR)."
Reference: SecOps Group CAP Documents – "Password Reset Best Practices," "IDOR Vulnerabilities," and "OWASP Authentication Cheat Sheet" sections.
Which of the following is NOT an asymmetric key encryption algorithm?
- A . AES
- B . RSA
- C . Diffie-Hellman
- D . DSA
A
Explanation:
Asymmetric key encryption (also known as public-key cryptography) uses a pair of keys: a public key for encryption and a private key for decryption (or vice versa for signing). Symmetric key encryption, on the other hand, uses the same key for both encryption and decryption. Let’s evaluate the options: Option A ("AES"): AES (Advanced Encryption Standard) is a symmetric key encryption algorithm. It uses a single key (e.g., 128, 192, or 256 bits) for both encryption and decryption, making it a symmetric algorithm, not an asymmetric one.
Option B ("RSA"): RSA (Rivest-Shamir-Adleman) is an asymmetric key encryption algorithm. It uses a public key to encrypt data and a private key to decrypt it, making it a classic example of asymmetric cryptography.
Option C ("Diffie-Hellman"): Diffie-Hellman is an asymmetric key exchange algorithm. While it is primarily used for key exchange rather than direct encryption, it relies on asymmetric principles (public and private keys) to securely establish a shared secret, so it is considered part of asymmetric cryptography.
Option D ("DSA"): DSA (Digital Signature Algorithm) is an asymmetric algorithm used for digital signatures. It uses a pair of keys (public and private) for signing and verification, making it an asymmetric algorithm.
The correct answer is A, as AES is the only symmetric algorithm listed, aligning with the CAP syllabus under "Cryptography Fundamentals" and "Symmetric vs. Asymmetric Encryption."
Reference: SecOps Group CAP Documents – "Cryptographic Algorithms," "Symmetric and Asymmetric Encryption," and "OWASP Cryptographic Storage Cheat Sheet" sections.
In the screenshot below, which of the following is incorrect?
Target: https://example.com
HTTP/1.1 404 Not Found
Date: Fri, 09 Dec 2022 18:03:49 GMT
Server: Apache
Vary: Cookie
X-Powered-By: PHP/5.4.5-5
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Cookie: JSESSIONID=1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789; secure; HttpOnly; SameSite=None
- A . The application discloses the framework name and version
- B . The application reveals user-agent details
- C . A cookie is set with HttpOnly and a Secure flag
- D . The application accepts insecure protocol
A
Explanation:
The screenshot shows an HTTP response header from https://example.com with a 404 status. Let’s evaluate each option:
Option A ("The application discloses the framework name and version"): The X-Powered-By: PHP/5.4.5-5 header reveals the server is running PHP version 5.4.5-5, which is a security risk as it exposes the framework and version. This information can help attackers identify known vulnerabilities, making A incorrect (i.e., it is a problem).
Option B ("The application reveals user-agent details"): The response does not include user-agent details; it only shows the server’s configuration. User-agent details are part of the request, not the response, so this is incorrect (not a problem here).
Option C ("A cookie is set with HttpOnly and a Secure flag"): The Cookie header includes HttpOnly and Secure attributes, which are best practices to prevent JavaScript access and ensure transmission over HTTPS, respectively. This is correct behavior, so it is not incorrect.
Option D ("The application accepts insecure protocol"): The response uses https://, indicating a secure protocol (TLS), and there’s no evidence of accepting insecure protocols like HTTP. This is not incorrect.
Thus, the incorrect statement is A, as disclosing the framework name and version via X-Powered-By is a security misconfiguration. This aligns with the CAP syllabus under "Security Headers" and "Information Disclosure."
Reference: SecOps Group CAP Documents – "Security Misconfigurations," "HTTP Headers," and "OWASP Top 10 (A05:2021 – Security Misconfiguration)" sections.
Salt is a cryptographically secure random string that is added to a password before it is hashed.
In this context, what is the primary objective of salting?
- A . To defend against dictionary attacks or attacks against hashed passwords using a rainbow table.
- B . To slow down the hash calculation process.
- C . To generate a long password hash that is difficult to crack.
- D . To add a secret message to the password hash.
A
Explanation:
Salting is a security technique used in password hashing to enhance protection against specific types of attacks. A salt is a random value added to a password before hashing, ensuring that even if two users have the same password, their hashed outputs will differ. The primary objective of salting is to defend against dictionary attacks and rainbow table attacks. Dictionary attacks involve trying common passwords from a precomputed list, while rainbow table attacks use precomputed tables of hash values to reverse-engineer passwords quickly. By adding a unique salt to each password, the hash becomes unique, rendering precomputed rainbow tables ineffective, as an attacker would need to generate a new table for each salt, which is computationally impractical.
Option B ("To slow down the hash calculation process") is incorrect because while techniques like key stretching (e.g., using PBKDF2 or bcrypt) intentionally slow hashing to counter brute-force attacks, salting itself does not primarily aim to slow the process―it focuses on uniqueness. Option C ("To generate a long password hash that is difficult to crack") is a byproduct of salting but not the primary objective; the length and difficulty come from the hash function and salt combination, not salting alone. Option D ("To add a secret message to the password hash") is incorrect, as a salt is not a secret message but a random value, often stored alongside the hash. This aligns with best practices in authentication security, a key component of the CAP syllabus.
Reference: SecOps Group CAP Documents – "Secure Coding Practices," "Authentication Security," and "Cryptographic Techniques" sections.
Which of the following security attributes ensures that the browser only sends the cookie over a TLS (encrypted) channel?
- A . Secure
- B . HttpOnly
- C . No_XSS
- D . None of the above
A
Explanation:
Cookies can have security attributes to enhance their protection against various attacks. The question asks which attribute ensures that the cookie is only sent over a TLS (encrypted) channel, meaning it is transmitted securely via HTTPS and not over unencrypted HTTP.
Option A ("Secure"): The Secure attribute ensures that the browser only sends the cookie over a secure, encrypted connection (i.e., HTTPS). If a request is made over HTTP, the browser will not include the cookie, preventing it from being intercepted in plaintext. This is the correct answer.
Option B ("HttpOnly"): The HttpOnly attribute prevents the cookie from being accessed by JavaScript (e.g., via document.cookie), mitigating XSS attacks that steal cookies, but it does not enforce transmission over TLS.
Option C ("No_XSS"): This is not a valid cookie attribute; it appears to be a made-up term and does not relate to TLS enforcement.
Option D ("None of the above"): Incorrect, as the Secure attribute directly addresses the requirement.
The correct answer is A, aligning with the CAP syllabus under "Cookie Security" and "Session Management."
Reference: SecOps Group CAP Documents – "Cookie Security Attributes," "Secure Session Management," and "OWASP Session Management Cheat Sheet" sections.