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 mirror image of a clock shows a time of 02:44 hrs. What is the time shown in the clock?
- If it was Sunday on 5th January, 1986, what was the day of the week on 14th January, 1993?
What will be the angle formed between the hour hand and minute hand of a clock at 9:23 pm, when take in clockwise direction from the minute hand?
The mirror image of a clock shows a time of 12:31. Then what is the time shown in the clock?
What is the reflex angle between the hands of a clock at 15 minutes past 5?
- Suman’s birthday is on Saturday 29th July. On which day of the week will be Tarun’s birthday in the same year if Tarun was born on 12th September?
- If it was Sunday on 1 st April, 1956, then what was the day of the week on 2 nd July, 1957?
- What is the angle between the hour hand and the minute hand at 7:45 AM?
Priyank and Umesh share the same birth year. Priyank was born on an odd-numbered date after the 29th of December. It is known that Priyank was born on a...
It was Tuesday on 12th September 2023. What will be the day on 12th September 2031?