Session Hijacking leads to full control of account by attacker
The report claims that a session cookie named connect.sid can be copied from one browser session and pasted into another to gain access to the same account. The author says an attacker who obtains this token, for example through sniffing, could take over the account.
Originally disclosed on HackerOne
- Disclosed after 37 days
Hi Team ,
I am Samprit Das MCEH (Metaxone Certified Ethical Hacker) and a Security Researcher I just checked your website and got a critical vulnerability please read the report carefully.
Description:- The Session Hijacking attack consists of the exploitation of the web session control mechanism, which is normally managed for a session token. Because http communication uses many different TCP connections, the web server needs a method to recognize every user’s connections. The most useful method depends on a token that the Web Server sends to the client browser after a successful client authentication. A session token is normally composed of a string of variable width and it could be used in different ways, like in the URL, in the header of the http requisition as a cookie, in other parts of the header of the http request, or yet in the body of the http requisition. The Session Hijacking attack compromises the session token by stealing or predicting a valid session token to gain unauthorized access to the Web Server.
Step to reproduce:-
- Login to application with firefox and press CTRL+Shift+I
- You will see developer tool will open
- Now go to Storage copy the value of the name field connect.sid
- Now Open New private window on firefox and press CTRL+Shift+I
- Again developer mode will open on private window
- Then again go to Storage and in connect.sid value change the value of new private window with firefox one
- After that press Enter and reload the Website Boom account will open due to session hijacking
Video POC :- https://drive.google.com/file/d/1sw0or6Q0yTNLEWfezEqwfSNZoIcGOQ06/view?usp=sharing
Reference:-
https://hackerone.com/reports/745324 https://owasp.org/www-community/attacks/Session_hijacking_attack https://hackerone.com/reports/167460
Impact
For this vulnerability attacker don't need any user credentials to login on an account what he will do, he will capture connect.sid value/token with any sniffing tools like Wireshark etc after getting session value/token he can easily login to account by developer tools as we can seen in POC video by this way account can be controlled by attacker and for this vulnerability it can also be impact full for xss attack if a attacker got xss vulnerability on your website he can chain the vulnerability with this attack
Thank you, Samprit Das
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the session cookie is not protected against theft or reuse, but the report does not show how an attacker would obtain the token in a real attack.
Impact
An attacker who can obtain the session token could take over the account, and the author suggests this could be chained with an XSS vulnerability, but no real theft method is demonstrated.
What the attacker needed
Ability to obtain the victim's session cookie
How it was found
- Log in to the application using Firefox and open the developer tools.
- Go to the Storage section and copy the value of the connect.sid cookie.
- Open a new private window in Firefox and open the developer tools there.
- In the Storage section, replace the connect.sid value with the copied value.
- Press Enter and reload the website; the account opens in the private window.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A session cookie is a small piece of data a website gives your browser after you log in, so the site can remember who you are. The report says that if someone copies this cookie from one browser and puts it into another, the second browser is treated as logged in. This is only a real vulnerability if the cookie can actually be stolen or guessed by someone else.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.