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
You found the xmrpc.php endpoint while performing a security assessment on a web application.
The target application is most likely using which of the following Content Management Systems (CMS)?
- A . WordPress
- B . Drupal
- C . Both A and B
- D . None of the above
A
Explanation:
The xmlrpc.php endpoint is a file commonly associated with WordPress, a popular Content Management System (CMS). XML-RPC (XML Remote Procedure Call) is a protocol used for remote communication, and in WordPress, xmlrpc.php enables features like remote publishing, pingbacks, and trackbacks. However, it is also a frequent target for attacks (e.g., brute-force attacks, DDoS) if not properly secured or disabled when unnecessary. While other CMS platforms like Drupal may support XML-RPC, they typically do not use a file named xmlrpc.php by default; Drupal’s XML-RPC functionality is often integrated into its core or modules (e.g., via xmlrpc.module) and uses different endpoints.
Option A ("WordPress"): Correct, as xmlrpc.php is a hallmark of WordPress installations.
Option B ("Drupal"): Incorrect, as Drupal does not use xmlrpc.php by default; its XML-RPC endpoints are different.
Option C ("Both A and B"): Incorrect, as xmlrpc.php is specific to WordPress.
Option D ("None of the above"): Incorrect, as WordPress is the correct match.
The correct answer is A, aligning with the CAP syllabus under "CMS Security" and "WordPress Vulnerabilities."
Reference: SecOps Group CAP Documents – "Content Management System Security," "WordPress
Hardening," and "OWASP CMS Security Guide" sections.
Which SQL function can be used to read the contents of a file during manual exploitation of the SQL injection vulnerability in a MySQL database?
- A . READ_FILE()
- B . LOAD_FILE()
- C . FETCH_FILE()
- D . GET_FILE()
B
Explanation:
SQL injection vulnerabilities allow attackers to manipulate database queries, potentially accessing unauthorized data, including file contents, if the database supports such operations. In MySQL, the LOAD_FILE() function is specifically designed to read the contents of a file on the server where the database is hosted, provided the file exists, the database user has appropriate privileges (e.g., FILE privilege), and the file is readable. For example, SELECT LOAD_FILE(‘/etc/passwd’) could extract the contents of the /etc/passwd file if exploitable.
Option A ("READ_FILE()"): This is not a valid MySQL function.
Option B ("LOAD_FILE()"): This is the correct function for reading file contents in MySQL, making it the right choice for exploitation.
Option C ("FETCH_FILE()"): This is not a recognized MySQL function.
Option D ("GET_FILE()"): This is also not a valid MySQL function.
The correct answer is B, aligning with the CAP syllabus under "SQL Injection" and "Database Security."
Reference: SecOps Group CAP Documents – "Injection Vulnerabilities," "MySQL Security Features," and "OWASP Top 10 (A03:2021 – Injection)" sections.
Which of the following directives in a Content-Security-Policy HTTP response header, can be used to prevent a Clickjacking attack?
- A . script-src
- B . object-src
- C . frame-ancestors
- D . base-uri
C
Explanation:
Clickjacking is an attack where a malicious site overlays a transparent iframe containing a legitimate site, tricking users into interacting with it unintentionally (e.g., clicking a button). The Content-Security-Policy (CSP) HTTP response header is used to mitigate various client-side attacks, including clickjacking, through specific directives. The frame-ancestors directive is the correct choice for preventing clickjacking. This directive specifies which origins are allowed to embed the webpage in an iframe, <frame>, or <object>. For example, setting frame-ancestors ‘self’ restricts framing to the same origin, effectively blocking external sites from embedding the page. This is a standard defense mechanism recommended by OWASP and other security frameworks.
Option A ("script-src") controls the sources from which scripts can be loaded, addressing XSS (Cross-Site Scripting) vulnerabilities but not clickjacking. Option B ("object-src") restricts the sources of plugins or embedded objects (e.g., Flash), which is unrelated to iframe-based clickjacking. Option D ("base-uri") defines the base URL for relative URLs in the document, offering no protection against framing attacks. The use of CSP with the frame-ancestors directive is a critical topic in the CAP syllabus under "Security Headers" and "OWASP Top 10" (UI Redressing).
Reference: SecOps Group CAP Documents – "Security Headers," "OWASP Top 10 (A07:2021 – Identification and Authentication Failures)," and "Client-Side Security" sections.
Observe the HTTP request below and identify the vulnerability attempted.
GET /help.php?file=../../../etc/passwd HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-GB,en;q=0.5
Accept-Encoding: gzip, deflate
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Cookie: JSESSIONID=38RB5ECV10785B53AF29816E92E2E50
Te: trailers
Connection: keep-alive
- A . Cross-Site Request Forgery Vulnerability
- B . Path Traversal Vulnerability
- C . Code Injection Vulnerability
- D . All of the above
B
Explanation:
The HTTP request is a GET to /help.php with a parameter file=../../../etc/passwd. Let’s analyze the vulnerability:
The file parameter includes ../ sequences, which are used to navigate up the directory structure (.. moves up one directory level). The request attempts to access /etc/passwd, a sensitive system file on Linux servers that contains user information.
This is indicative of a Path Traversal Vulnerability (also known as Directory Traversal), where an attacker manipulates file paths to access unauthorized files outside the intended directory. If the server does not sanitize or restrict the file parameter, it may serve the contents of /etc/passwd, leading to sensitive information disclosure.
Option A ("Cross-Site Request Forgery Vulnerability"): CSRF involves tricking a user into making an unintended request, typically via a malicious form or link. This request does not indicate CSRF; it’s a direct attempt to manipulate file access, so this is incorrect.
Option B ("Path Traversal Vulnerability"): As explained, the ../ sequences in the file parameter are a clear attempt at path traversal, making this the correct answer.
Option C ("Code Injection Vulnerability"): Code injection involves executing malicious code (e.g., PHP, SQL), but this request aims to read a file, not execute code, so this is incorrect. Option D ("All of the above"): Since only Path Traversal applies, this is incorrect.
The correct answer is B, aligning with the CAP syllabus under "Path Traversal" and "OWASP Top 10 (A05:2021 – Security Misconfiguration)."
Reference: SecOps Group CAP Documents – "Path Traversal Attacks," "Input Validation," and "OWASP Secure Coding Practices" sections.
Which of the following is a common attack in the context of SAML security?
- A . XML Signature Wrapping Attack
- B . XML External Entity Injection
- C . Assertion Replay Attack
- D . All of the above
D
Explanation:
SAML (Security Assertion Markup Language) is an XML-based standard for authentication and authorization, commonly used for single sign-on (SSO). Its reliance on XML and the complexity of its trust model make it vulnerable to several attacks:
Option A ("XML Signature Wrapping Attack"): This is a common SAML attack where an attacker manipulates the XML structure to wrap a malicious element while preserving the signature, tricking the relying party into accepting a forged assertion. This attack exploits the way SAML parsers handle signed XML messages.
Option B ("XML External Entity Injection"): SAML messages are XML-based, making them susceptible to XXE (XML External Entity) attacks if the XML parser is misconfigured. An attacker can include external entities to access local files or make network requests, compromising the system.
Option C ("Assertion Replay Attack"): In this attack, an attacker intercepts a valid SAML assertion and reuses it to impersonate the user. If the assertion lacks proper replay protection (e.g., timestamps, nonces), the relying party may accept the replayed assertion as valid.
Option D ("All of the above"): Correct, as all three attacks (XML Signature Wrapping, XXE Injection, and Assertion Replay) are well-documented vulnerabilities in SAML implementations.
The correct answer is D, aligning with the CAP syllabus under "SAML Security" and "XML-Based Attacks."
Reference: SecOps Group CAP Documents – "SAML Security Risks," "XML Vulnerabilities," and "OWASP SAML Security Cheat Sheet" sections.
Based on the below request/response, which of the following statements is true?
Send
GET /dashboard.php?purl=http://attacker.com HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) Firefox/107.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-GB,en;q=0.5
Accept-Encoding: gzip, deflate
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Cookie: JSESSIONID=38RB5ECV10785B53AF29816E92E2E50
Te: trailers
Connection: keep-alive
Pretty Raw | Hex | php | curl | ln | Pretty
HTTP/1.1 302 Found 2022-12-03 17:38:18 GMT
Date: Sat, 03 Dec 2022 17:38:18 GMT
Server: Apache/2.4.54 (Unix) OpenSSL/1.0.2k-fips PHP/8.0.25
X-Powered-By: PHP/8.0.25
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Location: http://attacker.com
Set-Cookie: JSESSIONID=38C5ECV10785B53AF29816E92E2E50; Path=/; HttpOnly
- A . Application is likely to be vulnerable to Open Redirection vulnerability
- B . Application is vulnerable to Cross-Site Request Forgery vulnerability
- C . Application uses an insecure protocol
- D . All of the above
A
Explanation:
The request is a GET to /dashboard.php with a purl parameter (http://attacker.com). The response is a 302 Found redirect with a Location: http://attacker.com header, indicating the server redirects the client to the URL specified in the purl parameter.
Let’s evaluate the statements:
Option A ("Application is likely to be vulnerable to Open Redirection vulnerability"): Correct. Open Redirection occurs when an application redirects to a user-supplied URL without validation. Here, the purl parameter (http://attacker.com) is directly used in the Location header, allowing an attacker to redirect users to a malicious site (e.g., for phishing). This is a classic Open Redirection vulnerability if the application does not restrict redirects to trusted domains.
Option B ("Application is vulnerable to Cross-Site Request Forgery vulnerability"): Incorrect. CSRF involves tricking a user into making an unintended request (e.g., via a malicious form). This response does not indicate a CSRF issue; there’s no evidence of state-changing actions or lack of CSRF tokens. Option C ("Application uses an insecure protocol"): Incorrect. The request is made over HTTP, and the redirect is to an HTTP URL (http://attacker.com), which is insecure, but the response itself does not indicate the protocol used for the initial request. The server could be using HTTPS for the initial response; the insecure protocol is in the redirect destination, which relates to the Open Redirection issue, not the application’s protocol usage broadly. Option D ("All of the above"): Incorrect, as only A is true.
The correct answer is A, aligning with the CAP syllabus under "Open Redirection Vulnerabilities" and "URL Redirection Attacks."
Reference: SecOps Group CAP Documents – "Open Redirection," "Input Validation for Redirects," and "OWASP Top 10 (A10:2021 – Server-Side Request Forgery)" sections.
Which HTTP header is used by the CORS (Cross-origin resource sharing) standard to control access to resources on a server?
- A . Access-Control-Request-Method
- B . Access-Control-Request-Headers
- C . Access-Control-Allow-Headers
- D . None of the above
C
Explanation:
Cross-Origin Resource Sharing (CORS) is a security mechanism that allows servers to specify which origins can access their resources, relaxing the Same-Origin Policy (SOP) for legitimate cross-origin requests. CORS uses specific HTTP headers to control this access. The key header for controlling access to resources is Access-Control-Allow-Origin, which specifies which origins are permitted to access the resource. However, among the provided options, the closest related header is Access-Control-Allow-Headers, which is part of the CORS standard and controls which request headers can be used in the actual request (e.g., during a preflight OPTIONS request).
Option A ("Access-Control-Request-Method"): This header is sent by the client in a preflight request to indicate the HTTP method (e.g., GET, POST) that will be used in the actual request. It is not used by the server to control access.
Option B ("Access-Control-Request-Headers"): This header is sent by the client in a preflight request to list the headers it plans to use in the actual request. It is not used by the server to control access. Option C ("Access-Control-Allow-Headers"): This header is sent by the server in response to a preflight request, specifying which headers are allowed in the actual request. While Access-Control-Allow-Origin is the primary header for controlling access, Access-Control-Allow-Headers is part of the CORS standard to manage header-based access control, making this the best match among the options.
Option D ("None of the above"): Incorrect, as Access-Control-Allow-Headers is a CORS header.
The correct answer is C, aligning with the CAP syllabus under "CORS Security" and "HTTP Headers."
Reference: SecOps Group CAP Documents – "CORS Configuration," "Security Headers," and "OWASP Secure Headers Guide" sections.
Multifactor authentication will NOT be able to prevent:
- A . Cross-Site Scripting Vulnerability
- B . Cross-Site Request Forgery Vulnerability
- C . Path Traversal Vulnerability
- D . All of the above
D
Explanation:
Multifactor Authentication (MFA) enhances security by requiring multiple forms of verification (e.g., something you know, like a password, and something you have, like a one-time code) to authenticate a user. It is effective against attacks that rely on stolen credentials, but let’s evaluate its impact on the listed vulnerabilities:
Option A ("Cross-Site Scripting Vulnerability"): XSS (Cross-Site Scripting) involves injecting malicious scripts into a web application that execute in the victim’s browser. MFA does not prevent XSS because it occurs after authentication; an attacker can exploit XSS to steal session cookies or perform actions on behalf of the authenticated user, bypassing MFA’s protection.
Option B ("Cross-Site Request Forgery Vulnerability"): CSRF (Cross-Site Request Forgery) tricks a user’s browser into making unintended requests to a site where they are authenticated. MFA does not prevent CSRF because the attack leverages the user’s existing session (post-authentication). The browser automatically sends cookies (e.g., session cookies) with the forged request, and MFA does not interfere with this process.
Option C ("Path Traversal Vulnerability"): Path Traversal allows an attacker to manipulate file paths (e.g., ../../etc/passwd) to access unauthorized files on the server. MFA does not prevent this because it is an application-level vulnerability unrelated to user authentication; an attacker with or without credentials can exploit it if the application fails to validate input.
Option D ("All of the above"): Correct, as MFA is designed to secure the authentication process, not to mitigate vulnerabilities like XSS, CSRF, or Path Traversal, which exploit application logic or session management after authentication.
The correct answer is D, aligning with the CAP syllabus under "Multifactor Authentication" and "Application Security Vulnerabilities."
Reference: SecOps Group CAP Documents – "MFA Implementation," "XSS/CSRF/Path Traversal Mitigation," and "OWASP Authentication Cheat Sheet" sections.
The payload {{7*7}} can be used for determining which of the following vulnerabilities?
- A . Server Side Template Injection (SSTI)
- B . Client-Side Template Injection (CSTI)
- C . Both 1 and 2
- D . None of the above
A
Explanation:
The payload {{7*7}} is a common test string used to detect Server-Side Template Injection (SSTI) vulnerabilities. SSTI occurs when user input is improperly rendered within a server-side template engine (e.g., Jinja2, Freemarker, or Handlebars), allowing the execution of arbitrary template expressions. If the server evaluates {{7*7}} and returns 49 (the result of 7 multiplied by 7), it indicates that the server is processing the input as a template expression, confirming an SSTI vulnerability. This can potentially lead to remote code execution if the template engine supports advanced features.
Option A ("Server Side Template Injection (SSTI)"): Correct, as {{7*7}} is a standard payload to test for SSTI by checking if the server evaluates the expression.
Option B ("Client-Side Template Injection (CSTI)"): Incorrect, as CSTI involves client-side rendering (e.g., JavaScript templates like Mustache), and {{7*7}} would not be evaluated on the client unless explicitly designed to do so, which is not implied here.
Option C ("Both 1 and 2"): Incorrect, as the payload specifically targets server-side processing.
Option D ("None of the above"): Incorrect, as SSTI is applicable.
The correct answer is A, aligning with the CAP syllabus under "Server-Side Template Injection" and "Input Validation."
Reference: SecOps Group CAP Documents – "SSTI Vulnerabilities," "Template Engine Security," and "OWASP Injection Prevention" 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:”
(Note that the developer has included a one-time random token with the ‘userId’ parameter in the
link). So, the link seems like:
https://example.com/reset_password?userId=5298&token=70e7803e-bf53-45e1-8a3f-
fb15da7de3a0
Will this mechanism prevent an attacker from resetting arbitrary users’ passwords?
- A . True
- B . False
A
Explanation:
The password reset mechanism now includes a one-time random token alongside the userId in the reset link: https://example.com/reset_password?userId=5298&token=70e7803e-bf53-45e1-8a3f-fb15da7de3a0. Let’s evaluate the effectiveness of this mechanism:
Analysis: The inclusion of a one-time random token (e.g., 70e7803e-bf53-45e1-8a3f-fb15da7de3a0) is a best practice for secure password reset mechanisms. This token should be unique, unpredictable, and tied to the specific user’s reset request (e.g., stored in the database with an expiration time). When the user clicks the link, the application should verify that the token matches the one associated with the userId and that it hasn’t been used or expired.
Preventing Arbitrary Resets: Without the token, an attacker could manipulate the userId (e.g., to 5299) to reset another user’s password (as seen in Question 45). However, with the token, the attacker would need to guess the correct token for the targeted userId, which is computationally infeasible if the token is sufficiently random (e.g., a UUID or cryptographically secure random string) and properly validated. This prevents unauthorized password resets.
Additional Considerations: The link uses https://, ensuring a secure channel (unlike Question 45). The message "If the email exists…" prevents username enumeration, as discussed previously.
Option A ("True"): Correct, as the one-time random token, if implemented correctly (e.g., validated server-side, single-use, time-limited), prevents an attacker from resetting arbitrary users’ passwords. Option B ("False"): Incorrect, as the mechanism is secure with the token.
The correct answer is A, aligning with the CAP syllabus under "Secure Password Reset" and "Token-Based Authentication."
Reference: SecOps Group CAP Documents – "Password Reset Security," "Token Generation Best Practices," and "OWASP Forgot Password Cheat Sheet" sections.