Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

How to use cookies phpsessid to hack a site?

Hi,

Can you explain me how tu use cookies phpsessid to hack a website?
You would need to get the site admins phpsessid and use that to hijack his session that way you're logged in as him.
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.
I have the PHPSESSID of the server

(PHPSESSID=frdoi87lb034p5mn6g983d1pm3; path=/)
No.. that's your session ID. The server doesn't have a session ID, it issues them to users.
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=/"
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.
How can i benefit to hack this site web(to know the cookies of the visitors)??


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