Showing posts with label wireshark. Show all posts
Showing posts with label wireshark. Show all posts

Wednesday, 19 March 2014

How Hack (HTTP) Passwords With Wireshark

Most of the websites on the Internet use HTTP protocol for comunication which runs on Port 80, The data send to the server is Un-encrpypted and goes in plain text. If you are using HTTPS (Port 443), The data will be send to the server encrypted. When ever you enter the data in a Form, Your browser either sends a POST Or Get Request to the webserver, In most cases you will see POST methodused in forms. Now most of the websites on the internet use Http protocol for theauthentication, which enables an attacker on the local area network to sniff every thing that goes through that form, That's the reason why you see websites like Paypal, Ebay, Gmail with https.


In this tutorial, I will show you how a hacker can hack passwords sent via http to the server with wireshark. Wireshark is a network analysis tool used to capture and analyze all the packets being send from your computer to the server.
Attack Scenario
Let's suppose that you went to starbucks to have a coffee with your friend, You have connected to the wifi hotspot, An attacker comes in and starts wireshark and captures your HTTP Post passwords and therefore compromising your security.
How To Hack HTTP Passwords With Wireshark
Before, you i show you how to hack http passwords, i would like to let you know that for a successful capture, your network card should be in Promiscuous mode,which will enable to capture all the traffic going through your network.

Step 1 - First of all download wireshark from the official website and install it on your computer.

Step 2 - Next open up wireshark click on analyze and click on interfaces at the top.


Step 3 - Next choose the appropriate interface and click on start. Wireshark would start sniffing the network.

Step 4 - Continue sniffing for around 10 minutes. Step 5 - After 10minutes stop the packet sniffing by going to the capture menu and clicking on Stop.

In the mean time, Log into any website (For Testing Purposes), having httpAuthentication.

Step 6 - Next set the filter to http.request.method == "POST", This will enable it to capture all the HTTP Post request going through your computer. Start analyzing the packets and locate the website in which you logged in having http authentication.



Step 7 - Next click on Follow TCP stream. You will see the username and password that you entered. In this particular senario i logged in my wordpress account, where i entered the username:admin and password:rafayhackingarticles, Since wordpress uses http for authentication, The data that was entered was successfully captured.

Saturday, 7 December 2013

Packet sniffing (Wireshark) and injecting (Wireless)

Uses :

-Disrupting certain services (file sharing or HTTP) by internet service providers and wireless access points
-Compromising wireless access points and circumventing their security
-Exploiting certain functionality in online games
-Determining the presence of internet censorship
-Allows for custom packet designers to test their custom packets by directly placing them onto a computer network
-Simulation of specific network traffic and scenarios
-Testing of network firewalls and intrusion detection systems
-Computer network auditing and troubleshooting computer network related issues
-Man in the middle attack

Requirements :

Backtrack
Wireshark
MAC address of your wireless access point
Your wireless access point channel

SEQUENCE 1. - Sniffing

Part 1. - Sniffing packets via Wireshark

1.Open up Wireshark.
2.Click on Interface List.Captureable packets will begin to list.
3.To sniff listed packets,just click Start button.

Part 2. - Sniffing packets (WEP encrypted) via Backtrack

1.Open up terminal.
2.Type in:

Quote:airodump-ng --bssid your_wireless_MAC_address mon0

3.Wait till airodump-ng is finished.
4.After it has finished,you should see the number of your channel under CH label.
5.Now we need to target our access point so it show only packets from our access point,using this command:

Quote:iwconfig mon0 channel channel_here

Now let's see packets coming from our access point over Wireshark!

6.Go to Wireshark window.
7.Type this in filter box:

(wlan.bssid == your_MAC_address_here) && (wlan.fc.type_subtype == 0×20)

8.You can see packets coming from our access point only!

SEQUENCE 2. - Injecting

Part 1. - Injecting via Wireshark and Backtrack

1.Go to Wireshark window.
2.Type this in filter box:

Quote:bssid == your_MAC_address_here) && !(wlan.fc.type_subtype == 0×08)

3.Finally,go to Backtrack window and type.

Quote:aireplay-ng -9 -e "your_SSID_here" -a your_MAC_address_here mon0