CAP Certified AppSec Practitioner Exam Questions and Answers
Based on the screenshot below, which of the following statements is true?
HTTP/1.1 200 OK
Accept-Ranges: bytes
Age: 359987
Cache-Control: max-age=604800
Content-Type: text/html; charset=UTF-8
Date: Fri, 02 Dec 2022 18:33:05 GMT
Expires: Fri, 09 Dec 2022 18:33:05 GMT
Last-Modified: Mon, 28 Nov 2022 14:33:18 GMT
Server: Microsoft-IIS/8.0
X-AspNet-Version: 2.0.50727
Vary: Accept-Encoding
X-Powered-By: ASP.NET
Content-Length: 1256
Which of the following directives in a Content-Security-Policy HTTP response header, can be used to prevent a Clickjacking attack?
Based on the below HTTP request, which of the following statements is correct?
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=38RB5ECV10785B53AF29816E92E2E50
Content-Length: 95
new_password=usher!@22 & confirm_password=usher!@22
The application is vulnerable to Cross-Site Scripting. Which of the following exploitation is NOT possible at all?
Based on the below-mentioned code snippet, the 'filename' variable is vulnerable to which of the following attacks?
import os
filename = input("Enter the file name:")
path = "/var/www/html/files/" + filename
content = ""
with open(path, 'r') as file:
content = file.read()
print("File content:\n", content)
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?
In the context of a Dependency Confusion Attack, which of the following files is analyzed for determining potential private packages?
Based on the screenshot below, which of the following statements is true?
Request
GET /userProfile.php?sessionId=7576572ce164646de967c759643d53031 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=7576572ce164646de967c759643d53031
Te: trailers
Connection: keep-alive
Pretty Raw | Hex | php | curl | ln | Pretty
HTTP/1.1 200 OK
Date: Fri, 09 Dec 2022 11:42:27 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: 12746
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Set-Cookie: JSESSIONID=7576572ce164646de967c759643d53031; Path=/; HttpOnly
< html >
< head >
< meta charset="utf-8" >
< meta name="viewport" content="width=device-width, initial-scale=1" >
< title > Example Domain < /title >
< /head >
< body style="background-color:#f0f0f2; margin:0; padding:0; font-family: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;" >
< p style="..." > ... < /p >
< /body >
< /html >
Which of the following security attributes ensures that the browser only sends the cookie over a TLS (encrypted) channel?
A robots.txt file tells the search engine crawlers about the URLs which the crawler can access on your site. Which of the following is true about robots.txt?
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?
