michael neuper

enable-monitor-mode-on-tp-link.org338 words, 1 min

Enable Monitor Mode on TP-Link TL-WN722N

#+author: Michael Neuper

#+date:

#+filetags: :linux:security:

The TP-Link TL-WN722N is a wireless network interface controller (NIC) that allows a computer to connect to a wireless network. There are three versions of this NIC: v1, v2, and v3. While all three versions are similar in many ways, there are some notable differences between them.

One of the main differences between the TP-Link TL-WN722N v1 and v2/v3 is the chipset they use.

  • The v1 version uses a Atheros AR9271 chipset
  • The v2/v3 versions use a Realtek RTL8188EUS chipset

The Atheros chip supports monitor mode and packet injection out of the box, but the Realtek chip requires changing the drivers.

Enabling Monitor Mode

v1

Run the following command:

sudo airmon-ng start wlan0

That’s it, you should see that your card is in monitor mode when running the following:

sudo iwconfig | grep "Mode"

v2/v3

Upgrade your system

On Debian-based systems (like Kali):

sudo apt update && apt upgrade

On Arch-based systems (like Blackarch):

sudo pacman -Syu

Then reboot:

sudo reboot

Install headers

Debian-based:

sudo apt install linux-headers-$(uname -r)

Arch-based:

sudo pacman -S install linux-headers-$(uname -r)

Change the kernel module

Remove the previous driver module:

sudo rmmod r8188eu.ko

Blacklist the old module:

sudo echo "blacklist r8188eu" > "/etc/modprobe.d/realtek.conf"

Clone the new driver:

git clone https://github.com/aircrack-ng/rtl8188eus

Install the new driver module:

cd rtl8188eus
make
sudo make install

Enable the new module:

sudo modprobe 8188eu

Reboot:

sudo reboot

Enable monitor mode

Kill all airmon-ng processes:

sudo airmon-ng check kill

Set adapter to monitor mode:

sudo iwconfig wlan0 mode monitor

Bring the interface up:

sudo ifconfig wlan0 up

Test to see if packet injection works:

sudo aireplay-ng --test wlan0

All posts

*comments*GitHub Discussions

Comments load from GitHub Discussions through giscus.

<N> enable-monitor-mode-on-tp-link.org Org

*Help*q or esc to close

Keys

SPC
leader key: shows every command
M-x
run a command by name (Alt+x or Option+x)
SPC h t
load a theme, with live preview
:
evil ex commands, like :q
j k
scroll down, up
d u
half a screen down, up (C-d C-u too on a Mac)
gg G
top, bottom
/
search the page; then n N for the next, previous match, and esc to clear
C-g
cancel (so does esc)

On this page

TAB
fold the heading whose stars you clicked
S-TAB
cycle the whole buffer: overview, contents, show all
SPC i
imenu: jump to a heading
SPC n
back to the list of posts
submit-flag
check a CTF flag
morse-region
turn the selected text into Morse code (unmorse-region turns it back)