8 - Sniffing
Module 08 - Sniffing
Analysing HTTP Traffic
http.request.method == โPOSTโ
-> Wireshark filter for filtering HTTP POST requestCapture traffic from remote interface via wireshark
Capture > Options > Manage Interfaces
Remote Interface > Add > Host & Port (2002)
Username & password > Start
We can see credentials in clear going to HTML Form URL Econded.
Password Sniffing using Wireshark
Attacker
Wireshark
Target
Login
Attacker
Stop capture
File->Save as
Filter: http.request.method==POST
RDP log in Target
service
start Remote Packet Capture Protocol v.0 (experimental)
Log off Target
Wireshark->Capture options->Manage Interface->Remote Interfaces
Add a remote host and its interface
Fill info
Target
Log in
Browse website and log in
Attacker
Get packets
Detect ARP Poisoning using Wireshark
Create an attack between two machines as shown above.
Here, Attacker is 10.10.10.10. Victims are 10.10.10.11 and 10.10.10.16.
Generate some random traffic between the victims e.g from .11 machine use:
hping3 -c 100000 10.10.10.16
Open Wireshark on Attacker machine.
Click Edit -> Preferences -> Protocols -> ARP/RARP -> Detect ARP request storms and Detect duplicate IP address configuration -> Start Capture.
Analyze -> Expert Information
Cain & Abel โ MITM attack tool (via ARP Poisoning)
Click Configure.
Select Adapter with the Attackerโs IP in the Sniffer tab.
Click on Start/Stop Sniffer (2nd icon in icon list) icon.
Go to the Sniffer Sub tab.
Click the Blue + (Add) icon.
In MAC Scanner window select All Hosts and All Tests.
Click ARP on lower left corner. Then click anywhere inside ARP window to so + icon is clickable.
Select 1st victim IP (10.10.10.10), now select 2nd victim IP (10.10.10.12). Click on Start/Stop ARP (3rd icon in icon list) icon.
Now do FTP from .12 IP to .10 with credentials martin:apple.
Observe that packets will be generated in cain.
Click Passwords -> FTP -> View captured credentials.
MITM attack using BetterCAP
MAC Address Spoofing
MAC spoofing is a technique for changing a factory-assigned Media Access Control (MAC) address of a network interface on a networked device. The MAC address that is hard-coded on a network interface controller (NIC) cannot be changed. However, many drivers allow the MAC address to be changed. Additionally, there are tools which can make an operating system believe that the NIC has the MAC address of a user's choosing. The process of masking a MAC address is known as MAC spoofing. Essentially, MAC spoofing entails changing a computer's identity, for any reason, and it is relatively easy.
Why changing MAC address?
Increase anonymity.
Impersonate other devices.
Bypass filters.
Requisites
Kali Linux virtual machine.
Alfa network adapter, or other with similar chipset. [+]
Windows 7, 8 or 10 virtual machine.
Linux
Using Macchanger
Macchanger is a tool that is included with any version of Kali Linux rolling edition and can change the MAC address to any desired address until the next reboot. In this lab we will be spoofing the MAC address of our wireless adapter with a random MAC address generated by Macchanger on Kali Linux.
Repo: https://github.com/alobbs/macchanger
Use
ifconfig
to see your current MAC address of your Network adapter:ifconfig
Turn off the Network adapter:
ifconfig wlan1 down
Next, change your MAC address to a new random MAC Address using
macchanger
:macchanger -r wlan1
Changing MAC address manually
Turn off the Network adapter:
ifconfig wlan0 down
Change the address using
hw ether
option from ifconfig using any MAC address you want:ifconfig wlan0 hw ether 00:11:22:33:44:55
Enable the interface:
ifconfig wlan0 up
Check the changes of the network adapter:
ifconfig
Windows
SMAC GUI Tool
SMAC is a powerful and easy-to-use tool for MAC address changer (spoofer). The tool can activate a new MAC address right after changing it automatically.
Additional Resources
Last updated