Pre-Summer Sale - Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70dumps

CAP Questions and Answers

Question # 6

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

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

Full Access
Question # 7

Your application is hosting JavaScript from a third-party website as shown in the snippet below.

<script src="https://[//cdn.thirdparty-example.com/](example.js)" integrity="sha384-Fmb0CYeA6gM2uLuyvqs7x75u0mktDh2nKLomp3PHkJ0b5vJF2qF6Gbrc/6dK" crossorigin="anonymous" ></script>

Which of the following is true regarding the code snippet?

A.

The code snippet will perform validations for Cross-Site Scripting attacks

B.

The code snippet will perform validations for Cross-Site Request Forgery attacks

C.

The code snippet will perform Subresource Integrity (SRI) checks

D.

The code snippet will perform validations for Outdated Javascript checks

Full Access
Question # 8

Which of the following is NOT a Server-Side attack?

A.

OS Code Injection

B.

Cross-Site Request Forgery

C.

SQL Injection

D.

Directory Traversal Attack

Full Access
Question # 9

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

Full Access
Question # 10

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

A.

1 Only

B.

1 and 2

C.

1, 3 and 4

D.

None of the above

Full Access
Question # 11

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

Full Access
Question # 12

Which is the most effective way of input validation to prevent Cross-Site Scripting attacks?

A.

Blacklisting HTML and other harmful characters

B.

Whitelisting and allowing only trusted input

C.

Using a Web Application Firewall (WAF)

D.

Marking Cookie as HttpOnly

Full Access
Question # 13

Scan the code below and identify the vulnerability which is the most applicable for this scenario.

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<meta name="description" content="xss">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous" >

<link rel="shortcut icon" href="/favicon.ico">

<link charset="utf-8" media="all" type="text/css" href="/static/css/main.css" rel="stylesheet">

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" ></script>

A.

SQL Injection

B.

Type Juggling

C.

Component with a Known Vulnerability

D.

Server-Side Request Forgery

Full Access
Question # 14

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

Full Access
Question # 15

What is the name of the WordPress file that contains the database connection information, including the database name, username, and password?

A.

wp-configuration.php

B.

wp-conf.php

C.

wp-secret.php

D.

wp-config.php

Full Access
Question # 16

In the context of the infamous log4j vulnerability (CVE-2021-44228), which vulnerability is exploited in the backend to achieve Remote Code Execution?

A.

JNDI Injection

B.

JNDI Injection

C.

JNDI Injection

D.

None of the above

Full Access
Question # 17

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

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

Full Access
Question # 18

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?

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.

Full Access