Jump to content
Nytro

WordPress Session Hijack (Seshn Proof of Concept)

Recommended Posts

Posted

WordPress Session Hijack (Seshn Proof of Concept)

So, I recently got an beta invite to the new(ish) website Seshn. I’ve been giving them plenty of feedback via twitter. One of my latest tweets to them, I made a bold claim: Their website is at risk of session hijacks (in theory).

Why do I saw this? Well, as it turned out, Seshn is powered by WordPress and if my research serves me correctly, many installations of WordPress are vulnerable to this type of attack without some backend changes.

For those of you who don’t know, a session hijack is when I, the bad guy, somehow get a hold of your cookies and then impersonate you (And by impersonate I mean I can be logged in as you without knowing your password.) So, how would this work?

My setup for the test was two chrome windows, one in incognito mode. Both have the extention Edit This Cookie installed. On window 1 (The one I am logged in as, if I open edit this cookie I can see the cookies currently on my computer from that website.

1-300x268.png

As you can see, one of those cookies is called “wordpress_logged_in_138ec16e1cd2a6203cb11a99a9cd21b0?. It is marked as a session cookie and it is marked as http only (Which is GOOD. That helps protect against XSS attacks). HOWEVER, it is not secure. (AKA: It is transferred freely with no encryption (plain text). So, if I, the attacker from windows 2 (incognito mode) somehow got a hold of window 1?s cookies (through something like wire tapping), what could I do with them? Let’s find out.

2-300x56.png

So here we are, not logged in. Let’s open up Edit This Cookie, click “Add New Cookie” and add that “wordpress_logged_in_138ec16e1cd2a6203cb11a99a9cd21b0? cookie with the value that we stole from window 1.

3-300x184.png

Save changes…. and voila! Windows 2 is now logged in as window 1!

4.png

I suppose I could have gone into more detail and showed more screenshots, but it is a “proof of concept” after all.

Troy Hunt on Session Hijacking:

Troy Hunt: ASP.NET session hijacking with Google and ELMAH

Troy Hunt: Is Stack Overflow “secure”? Kind of…

Troy Hunt: C is for cookie, H is for hacker – understanding HTTP only and Secure cookies

Sursa: WordPress Session Hijack (Seshn Proof of Concept) | Andrew McGivery

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...