Evil Twin Attack on the Broadlink A1

. 5 min read

Broadlink A1 is an Air Quality monitoring device. It has the capability to measure and report the air temperature, air quality, humidity, light and sound levels in real time. Based on the environment conditions, the device can be programmed to take actions such as turning on the dehumidifier if the humidity levels are high or switching on the lights if it’s too dark. The device is intended to be managed by means of a mobile app available for Android and iOS platforms. The device communicates entirely over WiFi which makes this an ideal candidate for wireless pentesting.

What’s an Evil-Twin Attack?

In simpler words, an evil twin is a malicious AP which appears to be exactly same as a legitimate one.

Let’s say your home WiFi network is named as “Dans-network”. Now suppose your nosy neighbor has set up WiFi network with the same name as yours. As he doesn’t know the password he left it open. If you’re not careful you can inadvertently connect to that network. On connecting to the network a fake firmware upgrade notification pops up prompting you to enter your WiFi login password. Without suspecting a thing you enter your credentials and now the attacker has access to your home WiFi network. This is an example of an Evil Twin attack. In this document, we are going to show how to perform a similar attack on the Broadlink A1, the difference being in this case the attacker needs to know the WiFi password beforehand.

Broadlink A1 network setup

As mentioned, the sensor is managed by the mobile app. When setting up the device for the first time, we need to provide the password of our WiFi network. This information will be transmitted to the device which in turn will use them to connect to our network. Once the device is provisioned, from then on it will automatically connect to our network and we can use the mobile app to view the stats in real time.

Scanning the WiFi networks around us

We will be using Kali Linux on VMware for wireless pentesting. We choose Kali as it comes pre-bundled with the necessary pentest tools and saves our time from installing and configuring those. Also, make sure to have a USB wireless adapter which supports packet injection. Connect it to the VM.

The default wireless adapter is named wlan0. In case you're not sure, just run ifconfig.

The next step is to put the wireless adapter into monitor mode. This allows us to monitor all WiFi traffic in the air without needing to connect to an Access Point (AP). This can be done using airmon-ng as shown below.

Airmon-ng starts an interface named wlan0mon. We will be using this interface to monitor the traffic around us. In case airmon-ng fails to turn on monitor mode or shows an error, disable the interface by running ifconfig wlan0 down and re-running airmon-ng. Now run airodump-ng specifying the interface wlan0mon just created.

Airodump-ng begins scanning the WiFi networks in its vicinity. Hit Ctrl + C to stop the scan at any point. The result shown  by airodump-ng will look like below.

The output consist of two parts. At the top is the list of all Access Points (AP) along with their MAC address, channel, encryption mode and the wifi name (SSID). Our network is the topmost named “husky”. The bottom half of the result shows the stations (STA) which are connected to the above AP’s. STA are nothing but the end-user devices.

We know the mac address of the air sensor is 34:ea:34:b2:ab:71. From the list above, we can see it’s connected to the network whose mac address is c4:64:1f:d4:ee:b6 (which is that of "husky"). The other device connected to the same network is the android phone(highlighted in green) which has the app running.

In this way, we can know which devices are associated with a network. Now our objective is to launch an evil twin attack on the air sensor. We will do this by creating another network named "husky" which will serve as the evil twin.

Creating an evil twin

First install hostapd and dnsmasq using apt-get. The former is a user space daemon for managing wireless access points. We will be using this for creating the evil access point. For issuing IP addresses to the connected clients, we will use dnsmasq. Next, we need to create the config files for hostapd and dnsmasq.

Since we are creating an evil twin, be sure to use the same ssid and password of the network we are attacking. In a similar way create the config file for dnsmasq.

Once this is done, start both the access point and the dhcp server.

Add the netmask and the default gateway on the wlan0mon interface.

Forcefully disconnecting the device from the network

At this point our evil twin is set up, but the sensor will not automatically connect to it. We need to disassociate the device from the existing network. This can be done by sending deauthentication packets using aireplay-ng.

We are sending 10 directed deauthentication packets to the device having the mac address of 34:ea:34:b2:ab:71 (which is the sensor). We also have to specify the mac address of the AP C4:6E:1F:D4:EE:B6.

If the signal strength of our evil twin is strong enough, we can see it connecting to our access point. The hostapd log shows the successful association.

The dnsmasq log below shows that the device was assigned an IP of We were able to knock off the device from the original network by sending deauthentication packets. If the signal strength of the evil twin is strong the device automatically connects to it.


Once connected to the network, we can read the value from the sensors. For this purpose we will be using an unofficial python library to interact with  the device without using the mobile app.


Install the module by running pip install broadlink preferably in a virtual environment. Once this is done we can query the device from the terminal as shown below.

Thus we see that by setting up an evil twin access point we can make the device forcefully connect to it and also was able to interact with it.


Reverse Engineer with an interest in low level stuff and anything about security.

Get IoT Security Training

IoT Pentesting Exploitation Training


analog modulation Android android application security android hands on security and exploitation training android security Apktool application auditing application security auditing appsec usa appwatch arduino nano arm ARM binaries ARM course ARM exploitation book ARM exploitation video training ARM gadgets ARM Training attify attify badge attify training best security practices biggest iot attacks of all time binwalk blackberry pentesting blackhat ble BLE attacks BLE dangers BLE hacking and exploitation BLE security issues BLE sniffing BLE vulnerabilities bleah bluetooth technology box brut Exception BtleJuice capture radio traffic career in cybersecurity CCTV cameras challenges in iot retail chroot cloud based mobile application security scanner consulting CTF cyber attacks cybersecurity Damn Vulnerable iOS App dangers of iot DDoS attacks devops digital modulation dumping memory embedded hacking expert Exploit ARM devices exploitation exploiting ble exploiting smart devices firmadyne firmware analysis toolkit firmware emulation Firmware hacking firmware reverse engineering Flare-on frida getting started with firmware hacking ghidra GSMA guide to ARM exploitation hacked security IP cameras hacked smart devices hackers hackfest hacking smart devices healthcare business protection against iot threats healthcare cyber security how can healthcare fight iot threats How Mirai botnet infects your device How Mirai works how retail can prevent cyber attacks how to exploit ble how to hack radio waves how to protect iot devices how to secure iot device IDA internet of things Internet of Things Security internet security ios application security ios security iot iot attacks iot bots, malwares iot device IoT Devices IoT Exploitation iot hacking iot hacks IoT hacks on ARM devices iot penetration testing iot pentest iot pentesting iot security IoT security guidelines iot security training iot threats iot threats to healthcare industry iotsecurity IP cameras jtag jtag debugging latest iot attacks learn ARM exploitation measures to prevent cyber attacks on healthcare organisations Mirai Botnet mirai history mobile app mobile application security mobile application security testing mobile security monitor iot devices Mozilla network security in retail ninja recon technique NIST offensive iot exploitation ola cabs owasp owasp appsec penetration testers penetration testing pentesting pentesting mobile apps phishing attacks powerofcommunity PrinterSecurity privacy protection profession professional qemu quizup radio communication protocol radio coomunication radio waves hacking recent ARM attacks recent cyber attacks recent iot attacks recent security camera attacks retail iot Reversing safety measures to protect privacy sdr secure coding guidelines security security cameras security challenges in retail IoT security in healthcare iot security issue security issues faced by e-retailers security services security training security vulnerability setup smart devices smart user security social networking spi steps to prevent iot attacks on healthcare surveillance cameras hijacked threat modeling tools to exploit ble training uart Understanding Mirai Botnet virus vulnerabilities discovered in popular IoT IP cameras vulnerabilities in internet connected cameras vulnerability vulnerable ARM devices What is mirai botnet? why choose career in cybersecurity writeups xposed hooking zigbee zigbee exploitation zigbee security zwave