Tuesday, September 26, 2017 14:42

Perl Cookie Stealing

There are a serious lack of good “wireless / mitm” cookie stealers on the internet. I guess that is a good thing, but still, I thought it was about time a good one was released. Needless to say, mine is not it. It does however have potential and already works better than other well known cookie stealers like Hamster.

Speaking of which, if anyone has ever used / read about hamster, you can probably relate to this when I call them all really lame. They think they are so smart inventing a new security breaking technique called which they call “side-jacking”, but all they are doing is simple cookie stealing. AND they are not even doing it very well because for some reason they don’t set-cookie the root of the host, so often, despite you having enough cookies to access a page, hamster does not set them to the right path and you will get access denied, etc, from the page (unless it is that one is a blue moon time when someone actually goes to the root / after they have logged in, very rare).

Ok so anyway, mine is made in perl and is not very neat but surprisingly functional (I was surprised at least). It very easily is able to steal the sessions for facebook and hotmail (gmail used to work but they wisely went the way of https), and other random websites which send plaintext session cookies.

Read the README for info on how it is run (very easy to run), and its inner workings without having to go through the code. In a nutshell though, there are 3 parts: a packet sniffer, an http proxy, and an interface in the form of a website. The packet sniffer finds any plaintext cookies from nearby packets, and then saves them. When the cookie is set using the website interface, the proxy transparently adds a “set-cookie” header for the correct website using path /. The browser now has someone’s session cookies, or in simple terms, you are “logged in” as them. :D

Download it here.  (Note: you will need tshark / wireshark to run)

Leave a Reply