Author: @AGa Aga Date: Oct 8, 2020 Tags: 延伸閱讀 備註: 延伸閱讀 is really awesome. Give it a look! 性質: Tech Share
http is stateless
Session is a concept
The technique allows clients and servers that wish to exchange state information to place HTTP requests and responses within a larger context, which we term a "session". (from RFC-2109)
Cookie is a technique
It describes two new (http) headers, Cookie and Set-Cookie, which carry state information between participating origin servers and user agents. (from RFC-2109)
Technique:If the SessionID is too weak (short, predictable patern...), then the attacker can guest or bruteforce it.
Protection
HttpOnly
attribute of the Cookie (Can't use by JavaScript)Secure
attribute of the Cookie (Can only be include when using secure channel)A piece of data transmitting between different domain. Unix 'magic-cookie'.
淺談 Session 與 Cookie:一起來讀 RFC · Issue #45 · aszx87410/blog
HTTP Session 攻擊與防護 | DEVCORE 戴夫寇爾