Who moved my strings-session hijacking

Source: Internet
Author: User
Who moved my strings-session hijacking

Let's take a look at the most common example-session hijacking, as shown in 10-2.

Figure 10-2 session hijacking description

As shown in figure 10-2, the normal login website of the victim Alice is www.buybook.com, and her session
The ID is 1234567. The attacker Bob obtains Alice's session ID and user logon information in the cookie through network sniffing, so that he can simulate Alice's login and operations, at this moment, Alice may not know.

The most common way to obtain the session ID is the XSS described above. The following describes how to simulate session hijacking.

Login we normally log on to a website (Google Chrome is used here). The username for logon is admin, And the JSESSIONID after logon is recorded, as shown in 10-3.

Figure 10-3 normal logon session ID

When we open another browser Firefox, we try to access a private link: http: // localhost/puzzlemall/private/viewprofile. jsp. Then the browser will prompt us to log on. This indicates that this link can be viewed only after logon, as shown in Figure 10-4.

Figure 10-4 we are attempting to access a Private Link

➌ Enable webscrab and enable the "intercept requests" function in the proxy, set the Firefox proxy to the IP address and port (8008) of webscrab, and then access this private link again, webscrab intercepts this request, modifies jsessionid to the jsessionid of the admin user above, as shown in 10-5, and submits the request.

Figure 10-5 capture and modify a request using webscrab

Then, we will find that the admin user's profile page is displayed. This indicates that we have successfully logged on as the admin user, as shown in 10-6. Of course, this example is just a simulation of session hijacking. In the actual network, JSESSIONID is often leaked through XSS (or not sniffed through a secure protocol ).

Figure 10-6 the private page is successfully accessed using others' sessions

This article is excerpted from Web Application Security Threats and prevention-based on OWASP top 10 and esapi

Edited by Wang Wenjun Li jianmeng

Published by Electronic Industry Publishing House

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.