Skip to main content

SESSION FIXATION

  • What is Session Fixation ?
Session Fixation is an attack that permits an attacker to hijack a valid user session. The attack explores a limitation in the way the web application manages the session ID, more specifically the vulnerable web application. When authenticating a user, it doesn’t assign a new session ID, making it possible to use an existent session ID.


The attack consists of inducing a user to authenticate himself with a known session ID, and then hijacking the user-validated session by the knowledge of the used session ID. The attacker has to provide a legitimate Web application session ID and try to make the victim's browser use it.

  • Attack Scenario :
1. Mallory has determined that http://unsafe/ accepts any session identifier, accepts session identifiers from query strings and has no security validation. http://unsafe/ is thus not secure.

2. Mallory sends Alice an e-mail: "Hey, check this out, there is a cool new account summary feature on our bank, http://unsafe/?SID=I_WILL_KNOW_THE_SID". Mallory is trying to fixate the SID to I_WILL_KNOW_THE_SID.

3. Alice is interested and visits http://unsafe/?SID=I_WILL_KNOW_THE_SID. The usual log-on screen pops up, and Alice logs on.

4. Mallory visits http://unsafe/?SID=I_WILL_KNOW_THE_SID and now has unlimited access to Alice's account.

  • Attack Process :
1. Session Setup:

First, the attacker either sets up a trap session on the target server and obtains that session’s ID, or selects a arbitrary session ID to be used in the attack. In some cases, the established trap session needs to be maintained by repeatedly sending requests referencing it to avoid idle session timeout.


2. Session Fixation:

Next, the attacker needs to introduce her session ID to the user’s browser, thereby fixing his session.

3. Session Entrance:

Finally, the attacker has to wait until the user logs in to the target server using the previously fixed session ID and then enter the user’s session.

  • Attack Example :
1. First, the attacker, who in this case is also a legitimate user of the system, logs in to the server and is issued a session ID 1234.

2. Then he sends a hyperlink http://online.worldbank.dom/login.jsp?sessionid=1234 to the user, trying to lure him into clicking on it.

3. The user clicks on the link, which opens the server’s login page in his browser.



4. Upon receipt of the request for login.jsp?sessionid=1234, the web application has established.

5. Finally, the user provides his credentials to the login script and the server grants him access to his bank account.

6. At this point, knowing the session ID, the attacker can also access the user’s account via account.jsp?sessionid=1234.

  • Countermeasures :
1. Web applications must ignore any session ID provided by the user’s browser at login and must always generate a new session to which the user will log in if successfully authenticated.

2. If possible, a web application on a strict system should only issue session IDs of newly generated sessions to users after they have successfully authenticated.

3. Session identifiers in URL (GET or POST variables) are not recommended as they simplify this attack. The session identifier on most modern systems is stored by default in an HTTP cookie, which has a moderate level of security. Use of the SSL/TLS session identifier is very secure.




Happy Hacking...Enjoy...

For educational purpose only...Do not misuse it...

Comments

Popular posts from this blog

SESSION HIJACKING

What is Session Hijacking ? Session hijacking is the act of taking control of a user session after successfully obtaining or generating an authentication session ID. Session hijacking involves an attacker using captured, brute forced or reverse-engineered session IDs to seize control of a legitimate user's Web application session while that session is still in progress. TCP session hijacking is when a hacker takes over a TCP session between two machines. Since most authentication only occurs at the start of a TCP session, this allows the hacker to gain access to a machine. Techniques : There are mainly three methods used to perpetrate a session hijack. These are: 1. Session Fixation: The session fixation attack is a class of Session Hijacking, which steals the established session between the client and the Web Server after the user logs in. Instead, the Session Fixation attack fixes an established session on the victim's browser, so the attack starts...

Cookie Stealing Attack:Hack Any Account like Facebook ,Twitter , Gmail ,Hotmail ,Skype and yahoo

Cookie Stealing Attack: Hack Any Account like Facebook ,Twitter , Gmail , Hotmail , Skype and yahoo etc. Using this method you can hack Any Account like Facebook , Twitter , Gmail ,Hotmail ,Skype and yahoo etc. this works At LAN( local Area Network ) . its best place to hack at university, cafe , public place where computer are on one LAN simple Example WI-Fi. What is Cookies And how the use of stealing cookies? Cookies are file’s that stored on Any computer’s By any website when a you visits them . the cookie used by the web server to check the authenticate the Real user . like you Enter Login in Facebook then a unique string’s Generated and the one copy saved in the web server and other is saved on your Browser as a Cookie file . both are matched when you open a Account. so then finally we will start .  Step 1: Download the Wire Shark and install it.  Step 2: Next open the wire shark and then click on interface.  Step 3: Next choose a interface w...

How to Hack a Website ?

How to Hack a website First find a Vulnerable Website? Common Methods used for Website Hacking There are lots of methods that can be used to hack a website but most common ones are as follows: 1.SQL Injection 2.XSS(Cross Site Scripting) 3.Remote File Inclusion(RFI) 4.Directory Traversal attack 5.Local File inclusion(LFI) 6.DDOS attack Tools: Acunetix: Acunetix is one of my favorite tool to find a venerability in any web application It automatically checks your web applications for SQL Injection, XSS & other web vulnerabilities. Nessus: Nessus is the best unix venerability testing tool and among the best to run on windows . Key features of this software include Remote and local file security checks a client/server architecture with a GTK graphical interface etc. Retina: Retina is another Vulnerability Assessment tool,It scans all the hosts on a network and report on any vulnerabilities found. Metasploit Framework: The Metasploit Framework is the open source penetration...