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 pairs the second person sits to the immediate right of the first person?
Which of the following pair sits in the extreme end?
How many seats are there around the table?
The position of how many people will remain unchanged if they are seated alphabetically in clockwise direction starting from E?
Who among the following stands third to the right of H?
Six persons Om, Yash, Rohit, Prateek, Tanu and Umesh are sitting in a straight horizontal row facing towards the south. Umesh sits second to the right ...
Which of the statement is true?
Six friends Chinu, Minu, Prem, Pari, Vansh and Vishu are sitting in a circle and facing the centre. Prem is to the immediate left of Pari. Only Vansh is...
Six people, T, U, V, W, X and Y are sitting around a circular table facing towards the centre (but not necessarily in the same manner). One person is si...
Four of the five among the following are similar in such a way to forms a group, who among the following doesn’t belong to that group?