[HELP]Hijack the session that has HTTP-Only Cookies
[removed]
Posted Jun 9, 2019, 4:28 AM UTC
[removed]
Posted Jun 9, 2019, 4:28 AM UTC
On modern browsers and correctly configured web servers (e.g. no XST, no debug page that echoes back request headers) you can only "hijack" a session as long as the victim is still logged in on their browser by using said browser as a proxy: sending each request using JS running in that browser, thus httponly cookies are sent as usual. This project automates this type of attack nicely: https://beefproject.com/
Thanks! I want to actually learn the hijack process by writing actual JS code. Could you point me where I can find such code?
Well, BeEF is open source ;)
The main points are:
Establishing a two-way channel between the victim browser (origin: vulnerable page) and the attacker -- can be as simple as polling a URL
Upon receiving a request over said channel, sending that request within the context of the vulnerable page loaded in the victim browser and sending the response back over the channel.
Presenting a sensible UI on the attacker end of the channel, this could be as simple as a curl-like command line interface dumping HTML source code as output or a full blown browser interface like what BeEF provides.
Which type of xss reflected or stored or self?