CSRF (Cross-Site Request Forgery) ਇੱਕ ਲੌਗ-ਇਨ ਕੀਤੇ ਯੂਜ਼ਰ ਦੇ ਬ੍ਰਾਊਜ਼ਰ ਨੂੰ ਇੱਕ ਸਾਈਟ 'ਤੇ ਅਣਚਾਹੇ ਬੇਨਤੀਆਂ ਬਣਾਉਣ ਲਈ ਠੱਗ ਦਿੰਦਾ ਹੈ ਜਿੱਥੇ ਉਹ ਪ੍ਰਮਾਣਿਤ ਹੋਏ ਹਨ — ਕਾਰਵਾਈਆਂ (ਟ੍ਰਾਂਸਫਰ, ਬਦਲਾਵ) ਉਹਨਾਂ ਦੀ ਸਹਮਤੀ ਤੋਂ ਬਿਨਾ ਕਰ ਰਿਹਾ ਹੈ, ਬ੍ਰਾਊਜ਼ਰ ਦੀ ਆਪਣੇ ਆਪ ਈ-ਸਤਿਕਾਰ/ਕੂਕੀਜ਼ ਭੇਜਣ ਦੀ ਕਮਜ਼ੋਰੀ ਦੀ ਵਰਤੋਂ ਕਰਦੇ ਹੋਏ।
CSRF ਕਿਵੇਂ ਕਾਮ ਕਰਦਾ ਹੈ
The attack exploits that browsers AUTO-SEND cookies (incl. session cookies) with requests:
1. a user is LOGGED IN to a site (has a session cookie)
2. the user visits a MALICIOUS page (or clicks a crafted link)
3. that page makes a request to the target site (e.g. a hidden form auto-submitting)
4. the browser AUTOMATICALLY includes the user's session cookie → the site thinks it's
a legitimate request from the user → performs the action (transfer money, change email)
→ the user unknowingly performs an action they didn't intend.
