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.
Which of the following artifacts were found in Indus Valley Civilization?
1. Gold necklace
2. Spindle whorls
3. Copper bracelets
In which year Sanchi was discovered after being abandoned for nearly 600 Years?
Taxila was historically the capital of which ancient Indian Mahajanapada?
Which of the following factors led to the expansion of trade during the seventeenth century?
1. Political integration of the country under the ...
Which dynasty did the Shishunaga dynasty follow in ruling Magadha?Â
From which space agency was the spacecraft "Psyche" launched?
During the Delhi Sultanate, which region gained fame for juristic learning?
Which temple was built by the Rashtrakuta Dynasty?
Which among the following statements is not correct regarding Swadesh Bandhab Samiti?
How many of the following statements about Angkor Wat are correct?**
I. Located in Cambodia
II. Known as the eighth Wonder of the World