S
S
seosova2015-11-30 17:10:39
Browsers
seosova, 2015-11-30 17:10:39

How to decrypt cookies?

I want to understand what information is stored in cookies. Do not read, but see with your own eyes. Try to write something in your cookies. No password cracking, hash decryption, etc.
Question. Does anyone know how cookies are arranged now? For firefox and chrome, this is now essentially a sqlite database file. If you open it with editors, then only a hex editor can at least see and understand something along the way. You can load it into the database editor, then I see the fields, I see the sites, the time of visiting, etc. And then comes the encrypted_value field. So I can’t understand its encoding and decrypt what’s there? Usually they say that cookies store information from sites, but I can’t read the information itself, I wonder what they put in there or do they always encrypt it? I would like to write a script for myself in python to test working with cookies on my website. Write what you need, read it. Can anyone tell me how to read the data in cookies and how to decrypt them?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
MiiNiPaa, 2015-11-30
@seosova

There is a line of values ​​there - is it some kind of encrypted hash?
This is the string that the server put there.
What do all these abbreviations mean?
How the server decides.
Cookies are actually key-value pairs. You can store anything there, from flags (show_ads=1), to strings, hashes, encrypted data, and just garbage.
If you want to access cookies from outside the browser or change cookies from another site, then you have a problem: browsers do everything to prevent this for security reasons.

A
Alexey Ukolov, 2015-11-30
@alexey-m-ukolov

Can anyone tell me how to read the data in cookies and how to decrypt them?
If without perversions, then you can simply press F12 in the browser.
For example, in Chrome: F12 -> Resources -> Cookies -> toster.ru .

N
nirvimel, 2015-11-30
@nirvimel

Cookies usually store hashes/unique_ids of the session and other entities stored on the server. The browser attaches cookies to each request to the server, and the server uses these unique identifiers to distinguish one session from another. Many cookies from one page can be explained by the work of many unrelated components on the server, each of which adds its own filters through which the request and response passes, each of them tries to track the state of the client in its own way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question