Did you knew every time you fill in your username and password on a website and press ENTER, you are sending your password. Well, of course you know that. How else you’re going to authenticate yourself to the website?? But, (yes, there’s a small BUT here).. when a website allows you to authenticate using HTTP (PlainText), it is very simple to capture that traffic and later analyze that from any machine over LAN (and even Internet). That bring us to this website password hacking guide that works on any site that is using HTTP protocol for authentication. Well, to do it over Internet, you need to be able to sit on a Gateway or central HUB (BGP routers would do – if you go access and the traffic is routed via that).
But to do it from a LAN is easy and at the same time makes you wonder, how insecure HTTP really is. You could be doing to to your roommate, Work Network or even School, College, University network assuming the network allows broadcast traffic and your LAN card can be set to promiscuous mode.
So lets try this on a simple website. I will hide part of the website name (just for the fact that they are nice people and I respect their privacy.). For the sake of this guide, I will just show everything done on a single machine. As for you, try it between two VirtualBox/VMWare/Physical machines.
p.s. Note that some routers doesn’t broadcast traffic, so it might fail for those particular ones.
Step 1: Start Wireshark and capture traffic
In Kali Linux you can start Wireshark by going to
Application > Kali Linux > Top 10 Security Tools > Wireshark
In Wireshark go to Capture > Interface and tick the interface that applies to you. In my case, I am using a Wireless USB card, so I’ve selected wlan0.
Ideally you could just press Start button here and Wireshark will start capturing traffic. In case you missed this, you can always capture traffic by going back to Capture > Interface > Start
Step 2: Filter captured traffic for POST data
At this point Wireshark is listening to all network traffic and capturing them. I opened a browser and signed in a website using my username and password. When the authentication process was complete and I was logged in, I went back and stopped the capture in Wireshark.
Usually you see a lot of data in Wireshark. However are are only interested on POST data.
Why POST only?
Because when you type in your username, password and press the Login button, it generates a a POSTmethod (in short – you’re sending data to the remote server).
To filter all traffic and locate POST data, type in the following in the filter section
http.request.method == “POST”
See screenshot below. It is showing 1 POST event.
Step 3: Analyze POST data for username and password
Now right click on that line and select Follow TCP Steam
This will open a new Window that contains something like this:
I’ve highlighted the user name and password field.
So in this case,
- username: sampleuser
- password: e4b7c855be6e3d4307b8d6ba4cd4ab91
But hang on, e4b7c855be6e3d4307b8d6ba4cd4ab91 can’t be a real password. It must be a hash value.
Note that some website’s doesn’t hash password’s at all even during sign on. For those, you’ve already got the username and password. In this case, let’s go bit far and identify this hash value
Step 4: Identify hash type
I will use hash-identifier to find out which type of hash is that. Open terminal and type in hash-identifier and paste the hash value. hash-identifier will give you possible matches.
See screenshot below:
Now one thing for sure, we know it’s not a Domain Cached Credential. So it must be a MD5 hash value.
I can crack that using hashcat or cudahashcat. There’s an extensive guide on how to do that here.
Step 5: Cracking MD5 hashed password
I can easily crack this simple password using hashcat or similar softwares.
Because this was a simple password that existed in my password list, hashcat cracked it very easily.
Cracking password hashes
Out final outcome looks like this:
- username: sampleuser
- password: e4b7c855be6e3d4307b8d6ba4cd4ab91:simplepassword
Conclusion
Well, to be honest it’s not possible for every website owner to implement SSL to secure password, some SSL’s cost you upto 1500$ per URL (well, you can get 10$ ones too but I personally never used those so I can’t really comment). But the least website owners (public ones where anyone can register) should do is to implement hashing during login-procedures. In that way, at least the password is hashed and that adds one more hurdle for someone from hacking website password easily. Actually it’s a big one as SSL encryption (theoretically) can take 100+years even with the best SuperComputer of today.
Enjoy and use this guide responsibly. Please Share and RT. Thanks.
Source : http://www.blackmoreops.com