Interview question
What is session hijacking and how do you prevent it? Session hijacking को कैसे रोकें?
Answer
Session hijacking is when an attacker steals a valid session ID. Prevent by using HTTPS, httponly flag, and regenerating IDs on login.
| Attack vector | Prevention |
|---|---|
| Network interception | Use HTTPS with secure flag |
| XSS | Set httponly flag |
Session hijacking तब होता है जब attacker session ID चोरी करता है। HTTPS, httponly, और regeneration से रोकें।
| Attack | Prevention |
|---|---|
| Network interception | HTTPS use करें |
| XSS | httponly flag लगाएं |
Was this answer clear?