So I have always heard that it is possible to use a Man-in-the-Middle attack to completely control the network traffic of your victim. I got to thinking about this and decided to find out just how hard it would be. I found out that it was not hard at all. My goal was to execute a Man-in-the-Middle attack that redirected my victim to my own server when they tried to access the page www.gmail.com. So I used my favorite Man-in-the-Middle tool Cain and Able to execute the Man-in-the-Middle portion of the attack. I then did an nslookup on www.gmail.com and added their IP address as a second address on my attack machine. So now when my victim requests gmail.com my web server responds before the request ever hits the real gmail.com server. I then saved the source of the Gmail login page to my own machine. I took my new page that looks exactly like Gmail's login and made a few modifications. Instead of the login form sending its data to the Gmail server I sent it to my own JSP page called Save_info.jps. The save info page takes their username and password and stores it to a text file on the server and then logs them in to the real Gmail and redirects them to the mail.google.com. The user never even knows that they were just hacked because they get logged into their Gmail account as expected. The only indicator of trouble is that my page will appear as http://www.gmail.com while the real page would appear as https://www.gmail.com. It is really kind of frightening because most users would never even check to make sure there is an https in the url. It took me about 1 hour to craft this attack.
Attack Mitigation:
1.If possible you can make a static ARP entry for you gateway. This will stop the Man-in-the-Middle attack from working.
2.Use a program like Arpwatch that checks for changes in your arp table.
3.Watch for the https in the url.
Tuesday, March 18, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment