Question
Which of the following correctly describes the primary
difference between Cross-Site Request Forgery (CSRF) and Cross-Site Scripting (XSS)?Solution
Cross-Site Request Forgery (CSRF) and Cross-Site Scripting (XSS) are both web security vulnerabilities, but they operate in distinct ways:
- CSRF tricks authenticated users into performing unintended actions on behalf of an attacker by exploiting trust in the user's session. For example, if a logged-in user clicks on a malicious link, the attacker could execute unwanted actions (e.g., fund transfers). CSRF exploits flaws in how web applications handle session tokens or cookies.
- XSS , on the other hand, involves injecting malicious scripts into a web application to execute in the victim’s browser. It primarily targets input validation and output encoding flaws to display or execute harmful code in the user's context.
- Option A: Both CSRF and XSS target the user’s browser, but XSS also indirectly impacts the application.
- Option C: CSRF does not rely on executing JavaScript; it typically involves sending crafted HTTP requests.
- Option D: CSRF does not inherently depend on phishing; it can occur through any malicious link, such as in a forum or ad.
- Option E: CSRF and XSS are protocol-agnostic and can occur over both HTTP and HTTPS.
The preamble of the Environment (Protection) Act, 1986 states it implements Stockholm decisions relating to:
What is the quantity of food grain that is provided to every person belonging to priority households under the Targeted Public Distribution System as p...
Under Section 19, previous sanction for prosecution is required for which category?Â
Which of the following is not a qualification for election of the President as laid down under the Indian Constitution?
Which part of the Indian Evidence Act, 1872 deals with the Relevancy of facts?
The Companies Act, 2013 was enacted on ____________
What is the main objective of the Prevention of Money Laundering Act (PMLA), 2002?Â
Who formulates and announces foreign trade policy?
Power of High Court to confirm death sentence is given under Section ……… of CrPC
Who serves as the Chairperson of the Board of Approval?