A web application has a function to retrieve content from an internal URL to identify CSRF attacks in the logs. The security analyst is building a regular expression that will filter out the correctly formatted requests. The target URL is https://10.1.2.3/api, and the receiving API only accepts GET requests and uses a single integer argument named “id.” Which of the following regular expressions should the analyst use to achieve the objective?
Answer(s): D
^https://10\.1\.2\.3/api\?id=[0-9]+$ is the most suitable regular expression to match the correctly formatted GET requests for the URL https://10.1.2.3/api with the parameter id as a single integer.Explanation of the components:-^: Asserts the start of the string.-https://10\.1\.2\.3/api: Matches the exact URL.-\?: Matches the literal question mark ?, which is the separator for the query string in the URL.-id=[0-9]+: Matches the id parameter followed by an integer (the [0-9]+ part matches one or more digits).-$: Asserts the end of the string, ensuring no extra characters or parameters are present.This regular expression ensures that the request is exactly in the expected format, including the correct URL and the id parameter containing one or more digits.
An analyst wants to ensure that users only leverage web-based software that has been pre-approved by the organization. Which of the following should be deployed?
Answer(s): B
https://www.sentinelone.com/cybersecurity-101/application-whitelisting/
After a recent vulnerability report for a server is presented, a business must decide whether to secure the company’s web-based storefront or shut it down. The developer is not able to fix the zero-day vulnerability because a patch does not exist yet. Which of the following is the best option for the business?
Placing a Web Application Firewall (WAF) in front of the storefront is the best option when a zero-day vulnerability is identified, and no patch is available. A WAF can help filter, monitor, and block malicious HTTP/S traffic targeting the web application. It serves as a protective barrier, mitigating the impact of the vulnerability by blocking exploit attempts, while still allowing the web-based storefront to remain operational. This approach balances the need to keep the business running with the need to protect against potential attacks until a patch is available.
The security team reviews a web server for XSS and runs the following Nmap scan:Which of the following most accurately describes the result of the scan?
The Nmap http-unsafe-output-escaping script reports that the id parameter is reflecting the characters > and " without filtering, indicating a potential XSS weakness in that parameter.
Patches for two highly exploited vulnerabilities were released on the same Friday afternoon. Information about the systems and vulnerabilities is shown in the tables below:Which of the following should the security analyst prioritize for remediation?
Post your Comments and Discuss CompTIA CS0-003 exam prep with other Community members: