Cookie based sample login app maven project

this application has two main component one is session maintaining with the cookie, another one is the security of cookies. above login page contain four type of login. each login based on different types of cookies. normally cookie based on two flags those are httpOnly flags and secure flag each flag define different manner but both are used for security purpose.

  • secure flags 
    • it enables the encryption connection between the server and clients.
    • secure flags are created for only https connections.
  • httpOnly flags
    • this is helped to prevent from session hijacking.
    • This cookie can not allow javascript run on it.
login methods 
  • NO: it does not have secure and httpOnly flags so this cookie hasn't any security things. blow images describe the attribute of cookies.


  • HttpOnly: this option has only httpOnly flags so we can not run javascript on this cookie


  • Secure: its contain the secure flag so this connection should be encrypted but we can run javascript on this cookie.




  • Both: in this option have the secure flag and httponly flags so this connection should be secure also we cannot run javascript on this cookies.


Note: if you don't know how to create a maven project. you can refer this link.
Note: what is cookie
Source code :login Aplication



Comments

Popular posts from this blog

Install android studio on the parrot os

How to do simple brute force attack with burp suite

PoC video of How to Hack Gmail and Bitcoin Wallet using SS7 flaw