Performing Mitm Attacks Within A Wlan
Performing Mitm Attacks Within A Wlan
Performing Mitm Attacks Within A Wlan
Area Network
This paper was downloaded from TechRxiv (https://www.techrxiv.org).
LICENSE
CC BY-NC-SA 4.0
21-09-2022 / 28-09-2022
CITATION
Buckle, Reece (2022): Performing Man in the Middle Attacks Within a Wireless Local Area Network.
TechRxiv. Preprint. https://doi.org/10.36227/techrxiv.21176347.v1
DOI
10.36227/techrxiv.21176347.v1
Performing Man in the Middle Attacks Within a
Wireless Local Area Network
Reece Buckle
Department of Electronics and Computer Science
University of Southampton
Southampton, UK
[email protected]
Abstract—This paper explores the ease of us of standard Kali Regarding the VPN server, a static DNS address (with NoIP)
Linux tools to analyse network activity, and conduct a series of was used to enable remote access from any network.
man-in-the-middle attacks within a wireless local area network.
These tests primarily include ARP poisoning, deauthentication
attacks and finally cloning a rogue access point to carry out
further social engineering attacks and web browser control (with
BeEF). Lastly this paper explores the usage of VPNs to protect
a user’s privacy as it is difficult to prevent packet sniffing and
man-in-the-middle attacks outright.
Index Terms—WLAN, Wi-Fi, Rogue Access Points, ARP
Poisoning, Deauthentication, Evil Twin Attack, MitM, Packet
Sniffing, Nmap, Wireshark, Tcpdump, Ettercap, Wifipumpkin3,
Aircrack-ng, BeEf, VPN, PiVPN, OpenVPN, WireGuard
Fig. 1. Equipment Used
I. I NTRODUCTION
Despite the existence of Wi-Fi security protocols, such as
WPA2-PSK (Wi-Fi Protected Access 2 with Pre-Shared Key
III. PACKET S NIFFING WITH W IRESHARK & T CPDUMP
authentication), an adversary can still probe network devices
and intercept and sniff traffic within a wireless local area
Traffic intercepted (from ARP spoofing or rogue APs) can be
network (WLAN). In a coffee shop style scenario, an adversary
captured and analysed with Tcpdump or Wireshark. Tcpdump is
could deploy low budget remote access tools to disconnect
a command line interfance (CLI) tool which is suited for remote
users from an access point (AP), clone the AP, and trick a
SSH. Packet information can be saved to a pcap file with the
user into joining the cloned AP. Such as example is the evil
following command: ‘tcpdump -w output.pcap -i eth0’ where
twin attack (ETA) which is designed to circumvent WPA2-PSK
eth0 is the Ethernet interface the Raspberry Pi is listening
protection by sniffing the 4-way handshake that occurs during
on. However, Wireshark is a graphical tool which is more
authentication, and using social engineering to capture login
appropriate when using RDP.
details directly. However, even if an adversary cannot gain
access into a WLAN, they can still perform man-in-the-middle HTTP and Telnet are examples of deprecated non-encrypted
(MitM) attacks such as ARP cache poisoning to intercept andprotocols in which no privacy is offered and a MitM can ‘sniff’
easily. HTTP is an original protocol used to transfer web-page
sniff user traffic. This report investigates the usage Kali Linux
tools to perform network analysis and MitM attacks such as data whereas Telnet is used for remote access, similar to SSH.
ARP poisoning and ETA. Following this, a VPN server was HTTP websites are denoted with ‘Not secure’ in the web
established to compare its effect on intercepted traffic. browser as they lack any authentication certificate provided by
the web server.
II. S ETUP HTTPS (Hypertext Transfer Protocol Secure) protocol is a
To perform several MitM attacks, analyse and manipulate direct upgrade to HTTP, in which a secure connection to the
traffic, the following equipment was used: web server is made with SSL (Secure Sockets Layer), or TLS
• Raspberry Pi 3 Model B+ (Pi VPN server)
(Transport Layer Security) [1]. To successfully decrypt HTTPS
traffic, an adversary must obtain the certificate key generated
• Raspberry Pi 4 Model B (with Kali Linux)
during the TLS handshake. However, this is crytographically
• TurboTenna Wi-Fi Antenna (2200mW, 802.11n) - capable infeasible, and generally the information they acquire is trivial
of monitor mode, hosting APs and packet injection) in most cases. Alternatively, an adversary could use SSLStrip
Both Raspberry Pis were configured with SSH and Xrdp to downgrade a website from HTTPS to HTTP (e.g., a login
for remote desktop protocol (RDP). This allows deployment page), and then redirect the user to the HTTP version. This
and remote access from a computer within the same WLAN. can then be used to ‘sniff’ login details in plain-text.
IV. ARP C ACHE P OISONING B. ARP Poisoning with Ettercap
Address Resolution Protocol (ARP) is used to map a device’s Ettercap can facilitate a variety of MitM attacks, including
physical MAC address to its IP address [2]. ARP packet are ARP poisoning. Regarding Figure 2, Ettercap was used to
broadcast to all devices within a network, which instructs poison the iPad’s ARP cache, and then spoof the MAC address
them to respond with their MAC address. These mappings of the router to re-route traffic through the Raspberry Pi. This
are then stored in a device’s ARP cache which enables the was achieved with: ‘ettercap -T -S -i eth0 -M arp:remote
device to communicate with other devices directly (e.g., to /192.168.1.254// /192.168.1.161// ’ where:
the router); this means the device does not need to broadcast • -T enables a command line input (not using the GUI)
their activity to all other devices within a WLAN. However, • -S instructs to not use SSL
because a router may assign new IP addresses dynamically • -i specifies the network interface (Ethernet)
(e.g., when restarting), entries in the ARP cache are deleted • -M arp:remote instructs the usage of ARP poisoning
after 20 minutes [2]. • 192.168.1.254 is the router’s IP address
An ARP poisoning attack works by listening for ARP • 192.168.1.161 is the iPad’s IP address
requests and then responding with a ‘spoofed’ MAC address To sniff this traffic in Wireshark, packet information from
(namely that of another device) [3]. An adversary can then use the iPad can be filtered out with ‘ip.addr == 192.168.1.161’,
this to position themselves between the two communicating and chained with ‘&& HTTP’ to present non-encrypted HTTP
devices by imposing the MAC address of each device. Figure packets.
2 demonstrates this attack, which was carried out with Nmap
and Ettercap. C. ARP Poisoning Mitigations & Prevention
• VPN tunnelling can be used to encrypt all intercepted
traffic. This is shown later on with the Pi VPN server.
i Pad Router • Static IP addresses can be assigned to each device such that
192.168.1.161 192.168.1.254
each ARP mapping has one unique IP address. However,
this is more challenging to maintain than using Dynamic
Host Configuration Protocol (DHCP).
• ARP spoofing detection tools can be used (e.g., XArp).
However, these can often return false positives and usually
only detect ARP spoofing (without prevention).
• Secure ARP [5] is a proposed solution which extends
A RP Attack upon the ARP protocol by incorporating an authentication
scheme in ARP responses (using public key cryptography).
This should prevent an attacker from being able to spoof
their MAC address and poison an ARP cache.