Coder Social home page Coder Social logo

n0ss / realtek-rtl88xxau-dkms Goto Github PK

View Code? Open in Web Editor NEW
38.0 4.0 4.0 36.93 MB

RTL8812AU / RTL8821AU and RTL8814AU drivers

License: GNU General Public License v2.0

Makefile 0.59% C 93.85% Shell 0.04% C++ 2.73% Objective-C 0.71% Python 0.78% Perl 1.31%
rtl8812au rtl8821au rtl8814au injection driver ubuntu 8814au 8812au 8821au realtek

realtek-rtl88xxau-dkms's Introduction

realtek-rtl88xxau-dkms

Realtek RTL88XXAU Driver (sourced from : https://pkg.kali.org/pkg/realtek-rtl88xxau-dkms)

Tested in Ubuntu 20.04 LTS with AWUS1900 (RTL8814AU). Injection working, full driver support. I suggest you use the DKMS install type and reboot.

This repo was made to fill out the space left by the split of these two : https://github.com/aircrack-ng/rtl8812au & https://github.com/aircrack-ng/rtl8814au

None of which provide a RTL8814AU driver with working injection.

RTL8812AU/21AU and RTL8814AU drivers

Only for use with Linux & Android

Monitor mode Frame Injection GitHub version GitHub license

Ubuntu ParrotOS Kali Armbian ArchLinux aircrack-ng hcxdumptool wifite2

DKMS

This driver can be installed using [DKMS]. This is a system which will automatically recompile and install a kernel module when a new kernel gets installed or updated. To make use of DKMS, install the dkms package, which on Debian (based) systems is done like this:

$ sudo apt-get install dkms

Installation of Driver

In order to install the driver open a terminal in the directory with the source code and execute the following command:

$ sudo ./dkms-install.sh

Removal of Driver

In order to remove the driver from your system open a terminal in the directory with the source code and execute the following command:

$ sudo ./dkms-remove.sh

Make

For building & installing the driver with 'make' use

$ make && make install

Notes

Download

$ git clone https://github.com/n0ss/realtek-rtl88xxau-dkms.git
cd rtl*

Package / Build dependencies (Debian-based)

$ sudo apt update
$ sudo apt install build-essential libelf-dev linux-headers-`uname -r`

For Raspberry (RPI)

$ sudo apt-get install raspberrypi-kernel-headers

Then run this step to change platform in Makefile, For RPI 1/2/3/ & 0/Zero:

$ sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
$ sed -i 's/CONFIG_PLATFORM_ARM_RPI = n/CONFIG_PLATFORM_ARM_RPI = y/g' Makefile

But for RPI 3B+ & 4B you will need to run those below which builds the ARM64 arch driver:

$ sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
$ sed -i 's/CONFIG_PLATFORM_ARM64_RPI = n/CONFIG_PLATFORM_ARM64_RPI = y/g' Makefile

In addition, if you receive an error message about unrecognized command line option ‘-mgeneral-regs-only’ (i.e., Raspbian Buster), you will need to run the following commands:

$ sed -i 's/^dkms build/ARCH=arm dkms build/' dkms-install.sh
$ sed -i 's/^MAKE="/MAKE="ARCH=arm\ /' dkms.conf

For setting monitor mode

  1. Fix problematic interference in monitor mode.
$ airmon-ng check kill

You may also uncheck the box "Automatically connect to this network when it is avaiable" in nm-connection-editor. This only works if you have a saved wifi connection.

  1. Set interface down
$ sudo ip link set wlan0 down
  1. Set monitor mode
$ sudo iw dev wlan0 set type monitor
  1. Set interface up
$ sudo ip link set wlan0 up

For setting TX power

$ sudo iw wlan0 set txpower fixed 3000

LED control

statically by module parameter in /etc/modprobe.d/8812au.conf or wherever, for example:

options 88XXau rtw_led_ctrl=0

value can be 0 or 1

or dynamically by writing to /proc/net/rtl8812au/$(your interface name)/led_ctrl, for example:

$ echo "0" > /proc/net/rtl8812au/$(your interface name)/led_ctrl

value can be 0 or 1

check current value:

$ cat /proc/net/rtl8812au/$(your interface name)/led_ctrl

USB Mode Switch

0: doesn't switch, 1: switch from usb2.0 to usb 3.0 2: switch from usb3.0 to usb 2.0

$ rmmod 88XXau
$ modprobe 88XXau rtw_switch_usb_mode:int (0: no switch 1: switch from usb2 to usb3 2: switch from usb3 to usb2)

NetworkManager

Newer versions of NetworkManager switches to random MAC address. Some users would prefer to use a fixed address. Simply add these lines below

[device]
wifi.scan-rand-mac-address=no

at the end of file /etc/NetworkManager/NetworkManager.conf and restart NetworkManager with the command:

$ sudo service NetworkManager restart

Credits / Contributors

Alfa Networks - https://www.alfa.com.tw/
Realtek.      - https://www.realtek.com
aircrack-ng   - https://www.aircrack-ng.org
ParrotSec     - https://www.parrotsec.org/download/

astsam        - https://github.com/astsam
evilphish     - https://github.com/evilphish
fariouche     - https://github.com/fariouche
CGarces       - https://github.com/CGarces
ZerBea        - https://github.com/ZerBea
lwfinger      - https://github.com/lwfinger
Ulli-Kroll.   - https://github.com/Ulli-Kroll

realtek-rtl88xxau-dkms's People

Contributors

n0ss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

realtek-rtl88xxau-dkms's Issues

txpower fixed @12.00 dBm

No common command seems to work. Is it possible to change this via the parameters in "/ sys / module / 8814au / parameters /"?

Thanks

Make error on 'isFileReadable'

Hello,
I am on an Ubuntu 20.04.4 LTS and when I run make I get the following error:

/home/nobody_/realtek-rtl88xxau-dkms/os_dep/osdep_service.c: In function ‘isFileReadable’:
/home/nobody_/realtek-rtl88xxau-dkms/os_dep/osdep_service.c:2201:11: error: implicit declaration of function ‘get_fs’; did you mean ‘get_sa’? [-Werror=implicit-function-declaration]
 2201 |   oldfs = get_fs();
      |           ^~~~~~
      |           get_sa
/home/nobody_/realtek-rtl88xxau-dkms/os_dep/osdep_service.c:2201:11: error: incompatible types when assigning to type ‘mm_segment_t’ {aka ‘struct <anonymous>’} from type ‘int’
/home/nobody_/realtek-rtl88xxau-dkms/os_dep/osdep_service.c:2203:3: error: implicit declaration of function ‘set_fs’; did you mean ‘sget_fc’? [-Werror=implicit-function-declaration]
 2203 |   set_fs(KERNEL_DS);
      |   ^~~~~~
      |   sget_fc
/home/nobody_/realtek-rtl88xxau-dkms/os_dep/osdep_service.c:2203:10: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
 2203 |   set_fs(KERNEL_DS);
      |          ^~~~~~~~~
      |          KERNFS_NS
/home/nobody_/realtek-rtl88xxau-dkms/os_dep/osdep_service.c:2203:10: note: each undeclared identifier is reported only once for each function it appears in
/home/nobody_/realtek-rtl88xxau-dkms/os_dep/osdep_service.c: In function ‘retriveFromFile’:
/home/nobody_/realtek-rtl88xxau-dkms/os_dep/osdep_service.c:2243:12: error: incompatible types when assigning to type ‘mm_segment_t’ {aka ‘struct <anonymous>’} from type ‘int’
 2243 |    oldfs = get_fs();
      |            ^~~~~~
/home/nobody_/realtek-rtl88xxau-dkms/os_dep/osdep_service.c:2245:11: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
 2245 |    set_fs(KERNEL_DS);
      |           ^~~~~~~~~
      |           KERNFS_NS
/home/nobody_/realtek-rtl88xxau-dkms/os_dep/osdep_service.c: In function ‘storeToFile’:
/home/nobody_/realtek-rtl88xxau-dkms/os_dep/osdep_service.c:2282:12: error: incompatible types when assigning to type ‘mm_segment_t’ {aka ‘struct <anonymous>’} from type ‘int’
 2282 |    oldfs = get_fs();
      |            ^~~~~~
/home/nobody_/realtek-rtl88xxau-dkms/os_dep/osdep_service.c:2284:11: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
 2284 |    set_fs(KERNEL_DS);
      |           ^~~~~~~~~
      |           KERNFS_NS
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:281: /home/nobody_/realtek-rtl88xxau-dkms/os_dep/osdep_service.o] Error 1
make[1]: *** [Makefile:1879: /home/nobody_/realtek-rtl88xxau-dkms] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.13.0-48-generic'
make: *** [Makefile:2246: modules] Error 2

Low sniffing rate using Alfa AWUS1900 and rtl8814au

Hi,

I am using rtl8814au driver both in Ubuntu 16.04 and 20.04 reaching monitor mode status and sniffing different wifi channels with no problem. The issue comes with the number of packets I can capture. I am completely sure that the surroundings have a great amount of wifi traffic, but with capture times of a minute I am only able to see dozens of packets.

Do you experience this behavior?? Is there any other configuration a part from the one to put the card in monitor mode?

Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.