Special Summer Sale Limited Time Flat 70% Discount offer - Ends in 0d 00h 00m 00s - Coupon code: 70spcl

The SecOps Group CAP Certified AppSec Practitioner Exam Exam Practice Test

Page: 1 / 6
Total 60 questions

Certified AppSec Practitioner Exam Questions and Answers

Question 1

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

PrettyRaw | 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

Options:

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

Question 2

In the context of the CORS (Cross-origin resource sharing) misconfiguration, which of the following statements is true?

Options:

A.

CORS is exploitable if the value of the HTTP headers are Access-Control-Allow-Origin: * and Access-Control-Allow-Credentials: true

B.

CORS is exploitable if the value of the HTTP headers are Access-Control-Allow-Origin: * and Access-Control-Allow-Credentials: false

C.

CORS is exploitable if the value of the HTTP headers is Access-Control-Allow-Origin: * and the value of the Access-Control-Allow-Credentials header is irrelevant

D.

All of the above

Question 3

GraphQL is an open-source data query and manipulation language for APIs, and a query runtime engine. In this context, what is GraphQL Introspection?

Options:

A.

A technique for testing the compatibility of the GraphQL API with other systems

B.

A technique for testing the performance of the GraphQL API

C.

A technique for discovering the structure of the GraphQL API

D.

A technique for testing the security of the GraphQL API

Question 4

In the context of NoSQL injection, which of the following is correct?

Statement A: NoSQL databases provide looser consistency restrictions than traditional SQL databases. By requiring fewer relational constraints and consistency checks, NoSQL databases often offer performance and scaling benefits. Yet these databases are still potentially vulnerable to injection attacks, even if they aren’t using the traditional SQL syntax.

Statement B: NoSQL database calls are written in the application’s programming language, a custom API call, or formatted according to a common convention (such as XML, JSON, LINQ, etc).

Options:

A.

A is true, and B is false

B.

A is false, and B is true

C.

Both A and B are false

D.

Both A and B are true

Question 5

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?

Options:

A.

True

B.

False

Question 6

Determine the primary defense against a SQL injection vulnerability

Options:

A.

Using a Web Application Firewall (WAF)

B.

Prepared Statements with Parameterized Queries

C.

Use of NoSQL Database

D.

Blacklisting Single Quote Character (‘)

Question 7

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?

Options:

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

Question 8

Which of the following headers helps in preventing the Clickjacking attack?

Options:

A.

Strict-Transport-Security

B.

Access-Control-Allow-Origin

C.

X-Frame-Options

D.

X-Content-Type-Options

Question 9

Which of the following is a common attack in the context of SAML security?

Options:

A.

XML Signature Wrapping Attack

B.

XML External Entity Injection

C.

Assertion Replay Attack

D.

All of the above

Question 10

Which of the following is NOT an asymmetric key encryption algorithm?

Options:

A.

AES

B.

RSA

C.

Diffie-Hellman

D.

DSA

Question 11

The DNS entries forwww.ironman.com andwww.hulk.com both point to the same IP address i.e., 1.3.3.7. How does the web server know which web application is being requested by the end user's browser?

Options:

A.

The web server inspects the HTTP "Host" header sent by the client.

B.

The web server inspects the cookies sent by the client.

C.

The web server inspects the client's SSL certificate.

D.

The web server uses a reverse DNS lookup of the client's IP address.

Question 12

While performing a security audit of a web application, you discovered an exposed docker-compose.yml file. What is the significance of this file and what data can be found in it?

Options:

A.

The docker-compose.yml file is a YAML file that contains the application source code.

B.

The docker-compose.yml file is a YAML file that contains the server logs and user session information including but not limited to admin users.

C.

The docker-compose.yml file is a YAML file that is used to define the services, networks, and volumes required for a Docker application. It specifies the configuration and dependencies for all containers in the application, including their network settings and container volumes.

D.

The docker-compose.yml file is a YAML file that contains the configuration of load balancers and firewalls.

Question 13

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)

Options:

A.

Path Traversal

B.

Remote Code Execution

C.

Both A and B

D.

None of the above

Question 14

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

Options:

A.

The change password feature does not validate the user

B.

The change password feature uses basic authorization

C.

The change password feature is vulnerable to Cross-Site Request Forgery attack

D.

All of the above

Question 15

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

Options:

A.

The application is using an outdated server technology

B.

The application is disclosing the server version

C.

The application is disclosing the version of the framework used

D.

All of the above

Question 16

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?

Options:

A.

Developers must not list any sensitive files and directories in this file

B.

Developers must list all sensitive files and directories in this file to secure them

C.

Both A and B

D.

None of the above

Question 17

Under the same-origin policy (also SOP), a web browser permits scripts contained in a web page to access data in another web page, but only if both web pages have the same origin. Which of the following pages are in the same origin as that of the below URL?

http://www.example.com/dir/page2.html

    http://www.example.com/dir/other.html

    http://www.example.com:81/dir/other.html

    http://www.example.com/dir/other.html

    http://en.example.com/dir/other.html

Options:

A.

1 Only

B.

1 and 2

C.

1, 3 and 4

D.

None of the above

Question 18

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. This attack is known as:

Options:

A.

Insecure Direct Object Reference

B.

Session Poisoning

C.

Session Riding OR Cross-Site Request Forgery

D.

Server-Side Request Forgery

Page: 1 / 6
Total 60 questions