Hack website password using WireShark
good article
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 means someone can hack website password for 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.
Contents [hide]
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 POST
method (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:
HTTP/1.1 302 Found Date: Mon, 10 Nov 2014 23:52:21 GMT Server: Apache/2.2.15 (CentOS) X-Powered-By: PHP/5.3.3 P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM" Set-Cookie: non=non; expires=Thu, 07-Nov-2024 23:52:21 GMT; path=/ Set-Cookie: password=e4b7c855be6e3d4307b8d6ba4cd4ab91; expires=Thu, 07-Nov-2024 23:52:21 GMT; path=/ Set-Cookie: scifuser=sampleuser; expires=Thu, 07-Nov-2024 23:52:21 GMT; path=/ Location: loggedin.php Content-Length: 0 Connection: close Content-Type: text/html; charset=UTF-8
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.
root@kali:~# hashcat -m 0 -a 0 /root/wireshark-hash.lf /root/rockyou.txt (or) root@kali:~# cudahashcat -m 0 -a 0 /root/wireshark-hash.lf /root/rockyou.txt (or) root@kali:~# cudahashcat32 -m 0 -a 0 /root/wireshark-hash.lf /root/rockyou.txt (or) root@kali:~# cudahashcat64 -m 0 -a 0 /root/wireshark-hash.lf /root/rockyou.txt
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, proper SSL’s cost you upto 1500$ per URL. 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 else can hack website password so easily.
Enjoy and use this guide responsibly.
credit goes to original article
http://www.darkmoreops.com/2014/11/11/hack-website-password-using-wireshark/
All Exam call letter
ReplyDeleteApplication Forms 2016-17
All Exam Results 2016-17
its really great information i m glad you to found this kind of website..
college of hospitality administration jaipur,
ReplyDeletecha hotel management jaipur
Thank you sir And keep it up More Post And Its A Awesome Web page sir Thank You So Much ,
Vidyasthali Group of Institutions was founded by an eminent group of academics and industry leaders who are masters of the top significant achievements and accomplishments. Vidyasthali is a reputed B-school in Jaipur.
ReplyDeletevidyasthali institute of technology science&managment
vidyasthali institute of technology science and managment
vitsm
vitsm courses
top science college in jaipur.
Best science college in jaipur
Best science college in rajasthan
no 1 science college in jaipur
science & commerce college list,
best techonology science and management institute in jaipur
courses in vidyasthali group of institute
no 1 technology science & management college in jaipur
best management
Vidyasthali Law College is a self-financing Institution affiliated to the University of Rajasthan to impart qualitative instructions for the degree of LL.B. (Three-year) course.
ReplyDeletelaw college jaipur
llb college in jaipur
best law college in jaipur
law college rajasthan
rajasthan law college
colleges in jaipur for ba
ba llb colleges in jaipur
best law college in rajasthan
best law colleges in rajasthan
top law colleges in jaipur
private law colleges in jaipur
law colleges in jaipur rajasthan
5 year law colleges in jaipur
list of best college in jaipur
best law colleges
best law colleges in jaipur
best law colleges in india
colleges that do law
colleges that do law near me
law colleges for ba llb
law colleges for llb
law colleges best