Hi,
Can you explain me how tu use cookies phpsessid to hack a website?
Can you explain me how tu use cookies phpsessid to hack a website?
How to use cookies phpsessid to hack a site? |
|
Jul 20, 2018 02:12 PM
(This post was last modified: Jul 20, 2018 02:13 PM by w0rd.)
Let's say you find an LFI and you can include /tmp/sess_[yoursessionid] or wherever it's stored. Now lets say there's a form which stores information about you which is tied to your session - let's go with a contact form.
So you fill in the contact form with your first/last name, email, etc. All of those values are also stored in your session file - so for a PHP based website - put your firstname as Code <? $cmd = $_REQUEST['cmd']; passthru($cmd); ?>Then, utilizing your LFI, you can include your own session file and execute commands.
Jul 20, 2018 02:27 PM
(This post was last modified: Jul 20, 2018 02:27 PM by BT_751.)
I scan the web site using vega and i get a high alert :"Session Cookie Without Secure Flag "
In the Resource Content i find : "PHPSESSID=frdoi87lb034p5mn6g983d1pm3; path=/"
Jul 20, 2018 02:29 PM
(This post was last modified: Jul 20, 2018 02:30 PM by w0rd.)
All that means is that when the cookie was set, it was not set with the "secure" flag meaning it can be transmitted over http, not strictly SSL/TLS.
|
|
|
| Possibly Related Threads... | |||
| Thread / Author | Replies | Views | Last Post |
| by z3nd3rNov 4, 2018 02:51 PM | 2 | 264 |
Nov 4, 2018 02:51 PM Last Post: M L T |
| by BT_751Jul 20, 2018 03:49 PM | 2 | 153 |
Jul 20, 2018 03:49 PM Last Post: 0xB9 |
| by germi89May 8, 2017 11:46 PM | 4 | 489 |
May 8, 2017 11:46 PM Last Post: germi89 |