Question
Which of the following best describes the mechanism of a
Cross-Site Scripting (XSS) attack?Solution
A Cross-Site Scripting (XSS) attack involves injecting malicious scripts, typically JavaScript, into web pages that are later viewed by other users. This attack exploits vulnerabilities in web applications that fail to properly validate or sanitize user inputs. When a victim visits the compromised web page, the malicious script executes in their browser, potentially stealing sensitive data, hijacking sessions, or defacing websites. XSS is categorized into three types: reflected, stored, and DOM-based. Stored XSS is particularly dangerous because the malicious script is permanently stored on the server and served to multiple users. For instance, attackers might inject a script into a comment section of a blog, and every user viewing the comments becomes a victim. Proper input validation, output encoding, and Content Security Policy (CSP) implementation are essential defenses against XSS. Why Other Options Are Incorrect :
- Exploiting vulnerabilities in a database to inject malicious SQL queries : This describes SQL Injection, which targets backend databases rather than injecting scripts into web pages.
- Tricking users into executing unintended actions on a web application they are authenticated with : This is a Cross-Site Request Forgery (CSRF) attack, not XSS.
- Overwhelming a server with excessive traffic to disrupt service availability : This refers to Distributed Denial-of-Service (DDoS) attacks, unrelated to injecting scripts.
- Using trial-and-error methods to guess valid user credentials : This describes a Brute Force attack, which involves guessing passwords and does not involve script injection.
- The base of a right pyramid is an equilateral triangle with side 12 cm. If the height of the pyramid is 40√3 cm, calculate the volume of the pyramid.
In triangle ABC, the difference between angle A and angle B is 16°, and the difference between angle A and angle C is 8°. Determine the measure of an...
If area of similar triangles ∆ ABC and ∆ DEF be 64 sq Cm and 121 sq cm and EF = 15.4 cm then BC equals
Find the length of AB, if ΔABC ~ ΔRQP and AC = 22.5 cm, RP = 9 cm and RQ = 6 cm.
The angles of a triangle are in the ratio 4:5:3. Determine the sum of the smallest and largest angles of the triangle.
If the angles of a triangle are in the ratio of 2:5:8, then find the value of the biggest angle.
Find the area of a triangle whose sides are 12 m, 14 m, and 16 m.
In a right-angled triangle, the legs are in the ratio 3:4, and the hypotenuse is 25 cm. Find the perimeter of the triangle.
- A triangle has a base of 27.3 cm and the height is 11.4 cm. Find its area.
ABC is an equilateral triangle with sides of 24cm. Find the difference between its in-radius and circum-radius.