Thursday, July 23, 2020

RT5572 + Linux kernel 3.13.x Exploration

RT5572 Exploration 
HW: get rt5572 usb WiFi adapter from EBay, Aliexpress, 
PC: Alienware Alpha ASM100 i3-4170T

Ubuntu 14.04 first release
Install w/ OpenSSH
sudo apt install flex bc texinfo build-essential aircrack-ng

Driver
Note: this driver won't build with latest kernels (tried 5.4.x) 

$ sudo mkdir /tftpboot
$ sudo chmod 777 /tftpboot
$ cd DPO_RT5572_LinuxSTA_2.6.1.3_20121022/
$ vi include/os/rt_linux.h
change struct _OS_FS_INFO_ to the following
typedef struct _OS_FS_INFO_
{
        kuid_t                          fsuid;
        kgid_t                          fsgid;
        mm_segment_t    fs;
} OS_FS_INFO;
$ make -j100
$ sudo rmmod rt2800usb
$ sudo rmmod rt2x00usb
$ sudo rmmod rt2800lib
$ sudo rmmod rt2x00lib
$ sudo mkdir -p /etc/Wireless/RT2870STA/
$ sudo cp RT2870STA.dat /etc/Wireless/RT2870STA
$ sudo insmod /tftpboot/rt5572sta.ko
$ sudo ifconfig ra0 up
$ sudo iwconfig ra0 mode monitor
$ sudo airodump-ng --output-format pcap -w /tmp/tx ra0

Reference

No comments:

Post a Comment