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
In the context of the CORS (Cross-origin resource sharing) misconfiguration, which of the following statements is true?
GraphQL is an open-source data query and manipulation language for APIs, and a query runtime engine. In this context, what is GraphQL Introspection?
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).
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?
Determine the primary defense against a SQL injection vulnerability
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?
Which of the following headers helps in preventing the Clickjacking attack?
Which of the following is a common attack in the context of SAML security?
Which of the following is NOT an asymmetric key encryption algorithm?
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?
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?
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)
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
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 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?
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
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: