tryhackme: HTTP in detail: cookies.

 Cookies are saved when we receive a "Set-Cookie" header from a web server.


Then every further request the client make, they ll send the cookie data back to the web server. 


Because HTTP(S) is stateless, meaning: does not keep track of the previous requests. 


Cookies can be used to remind the web server who the client is, some personal settings for the website or whether they have been to the website before.


------------------------------------------------------------------------------------------------------------------------


HTTP request example:


https://static-labs.tryhackme.cloud/sites/howhttpworks/cookie_flow.png


1- The client requests the webpage from http://cookies.thm 


2- The server responds back with a simple webpage with a form asking for the users name


3- The client sends back the form with the name set to ( 'insert a random name or just a "user" ' ) 


4- The server responds with a Set-Cookie header telling the client to save the data name=(depends on the user name)


*then...*


5- On the next and every further request the client sends the cookie data back to the server 


6- The server then sees the cookie data and instead of displaying the form it displays a welcome back message instead.


------------------------------------------------------------------------------------------------------------------------

Cookies can be used for many purposes but are most commonly used for website authentication.


The cookie value won't usually be a clear-text string where you can see the password, but a token .


A token is an unique secret code that isn't easily humanly guessable.

------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------

Thanks for reading,

Roger

Comments

Popular posts from this blog

Common Network Commands: Ping

Common Network Commands: Route

John The Ripper