Giter VIP home page Giter VIP logo

rtl8192eu's Introduction

RTL8192EU

Linux driver for Realtek RTL8192EU based on official's TP Link TL - WN823N V3 Beta v5.2.19.1 from 2018-05-08
Supports monitor mode and frame injection for penetration testing abilities.

Supported devices:

  • DWA-131 (untested)
  • GW-300S Katana (untested)
  • TL-WN821N V6 (untested)
  • TL-WN822N V5 (untested)
  • TL-WN823N V3 (tested)

Changelog:

  • Added frame injection support
  • Monitor mode is now supported
  • Turned of powersaving
  • Turned of debug
  • Added compatibility for Linux Kernel v5.0-rc1
  • Added compatibility for Linux Kernel v4.20
  • Added compatibility for Linux Kernel v4.19+
  • Added compatibility for Linux Kernel v4.15+

Build guide

  1. Make sure you have installed the following packages:
    - make (Tested on 4.2.1)
    - gcc (Tested on 8.2.0)
    - git (OPTIONAL, Tested on 2.18.0)
    - libelf-dev
  1. Download and unpack this repo, or just clone with git:
    $ git clone https://github.com/ZeeRooo/RTL8192EU.git
    $ cd RTL8192EU/
  1. Build the module:
   $ make clean
   $ make
   $ make install
  1. Load our shiny module:
   $ modprobe 8192eu

Original TP Link driver:

https://static.tp-link.com/2018/201805/20180514/TP-Link_Driver_Linux_series8_beta.zip

rtl8192eu's People

Contributors

kimocoder avatar zeerooo avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

rtl8192eu's Issues

Kernel 5.19.0-kali, cannot compile

on 5.19.0-kali2-amd64 there are some issues, I manged to install a different driver for TL-WN821N V6 and that works fine however monitor mode won't work in my current state. currently on this code I can't compile it since I face errors while using make, here are the errors I receive:

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.19.0-kali2-amd64/build M=/root/RTL8192EU  modules
make[1]: Entering directory '/usr/src/linux-headers-5.19.0-kali2-amd64'
  CC [M]  /root/RTL8192EU/core/rtw_cmd.o
  CC [M]  /root/RTL8192EU/core/rtw_security.o
  CC [M]  /root/RTL8192EU/core/rtw_debug.o
  CC [M]  /root/RTL8192EU/core/rtw_io.o
  CC [M]  /root/RTL8192EU/core/rtw_ioctl_query.o
  CC [M]  /root/RTL8192EU/core/rtw_ioctl_set.o
  CC [M]  /root/RTL8192EU/core/rtw_ieee80211.o
  CC [M]  /root/RTL8192EU/core/rtw_mlme.o
  CC [M]  /root/RTL8192EU/core/rtw_mlme_ext.o
/root/RTL8192EU/core/rtw_mlme_ext.c: In function ‘mgt_dispatcher’:
/root/RTL8192EU/core/rtw_mlme_ext.c:1638:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1638 |                 if (MLME_IS_AP(padapter))
      |                    ^
/root/RTL8192EU/core/rtw_mlme_ext.c:1643:9: note: here
 1643 |         case WIFI_ASSOCREQ:
      |         ^~~~
  CC [M]  /root/RTL8192EU/core/rtw_mi.o
  CC [M]  /root/RTL8192EU/core/rtw_wlan_util.o
  CC [M]  /root/RTL8192EU/core/rtw_vht.o
  CC [M]  /root/RTL8192EU/core/rtw_pwrctrl.o
  CC [M]  /root/RTL8192EU/core/rtw_rf.o
  CC [M]  /root/RTL8192EU/core/rtw_recv.o
  CC [M]  /root/RTL8192EU/core/rtw_sta_mgt.o
  CC [M]  /root/RTL8192EU/core/rtw_ap.o
  CC [M]  /root/RTL8192EU/core/rtw_xmit.o
  CC [M]  /root/RTL8192EU/core/rtw_p2p.o
  CC [M]  /root/RTL8192EU/core/rtw_rson.o
  CC [M]  /root/RTL8192EU/core/rtw_tdls.o
  CC [M]  /root/RTL8192EU/core/rtw_br_ext.o
/root/RTL8192EU/core/rtw_br_ext.c:20:18: fatal error: net/ipx.h: No such file or directory
   20 |         #include <net/ipx.h>
      |                  ^~~~~~~~~~~
compilation terminated.
make[2]: *** [/usr/src/linux-headers-5.19.0-kali2-common/scripts/Makefile.build:254: /root/RTL8192EU/core/rtw_br_ext.o] Error 1
make[1]: *** [/usr/src/linux-headers-5.19.0-kali2-common/Makefile:1870: /root/RTL8192EU] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.19.0-kali2-amd64'
make: *** [Makefile:1829: modules] Error 2

I guess this won't work on my current kernel version, I'll try downgrading and test this out again.

Monitor mode comment

Hi,

I was wondering to know whether the expected way to turn the monitor mode on would be through "airmon-ng start " or whether it should be donw by using ifconfig + iwconfig?

In case the anser is the second alternative, is this working normally when using Wireshark? or which are the expected steps to make this work?

I have tried this with TL-WN821N v6 and, although it seems to be working (monitor and injection), I am not being able to do packet sniffing through Wireshark.

Kindly let me know your comments.

Regards.
Alejandro.

make file error

when i type "sudo make clean" it shows me this:

#make -C /lib/modules/5.18.0-kali5-amd64/build M=/home/kali/Desktop/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047 clean
cd hal ; rm -fr ///.mod.c ///.mod ///.o ///..cmd ///.ko
cd hal ; rm -fr //.mod.c //.mod //.o //..cmd //*.ko
cd hal ; rm -fr /.mod.c /.mod /.o /..cmd /.ko
cd hal ; rm -fr *.mod.c *.mod .o ..cmd *.ko
cd core/efuse ; rm -fr *.mod.c *.mod .o ..cmd *.ko
cd core ; rm -fr *.mod.c *.mod .o ..cmd *.ko
cd os_dep/linux ; rm -fr *.mod.c *.mod .o ..cmd *.ko
cd os_dep ; rm -fr *.mod.c *.mod .o ..cmd *.ko
cd platform ; rm -fr *.mod.c *.mod .o ..cmd *.ko
rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
rm -fr *.mod.c *.mod .o ..cmd *.ko *~
rm -fr .tmp_versions

Then i type "sudo make" it shows me this:

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.18.0-kali5-amd64/build M=/home/kali/Desktop/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047 modules
make[1]: Entering directory '/usr/src/linux-headers-5.18.0-kali5-amd64'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc-11 (Debian 11.3.0-3) 11.3.0
You are using: gcc-11 (Debian 11.3.0-5) 11.3.0
CC [M] /home/kali/Desktop/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/core/rtw_cmd.o
In file included from /home/kali/Desktop/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/include/osdep_service.h:47,
from /home/kali/Desktop/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/include/drv_types.h:27,
from /home/kali/Desktop/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/core/rtw_cmd.c:17:
/home/kali/Desktop/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/include/osdep_service_linux.h: In function ‘_init_timer’:
/home/kali/Desktop/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/include/osdep_service_linux.h:299:15: error: ‘_timer’ {aka ‘struct timer_list’} has no member named ‘data’
299 | ptimer->data = (unsigned long)cntx;
| ^~
/home/kali/Desktop/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/include/osdep_service_linux.h:300:9: error: implicit declaration of function ‘init_timer’; did you mean ‘_init_timer’? [-Werror=implicit-function-declaration]
300 | init_timer(ptimer);
| ^~~~~~~~~~
| _init_timer
cc1: some warnings being treated as errors
make[2]: *** [/usr/src/linux-headers-5.18.0-kali5-common/scripts/Makefile.build:293: /home/kali/Desktop/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/core/rtw_cmd.o] Error 1
make[1]: *** [/usr/src/linux-headers-5.18.0-kali5-common/Makefile:1858: /home/kali/Desktop/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.18.0-kali5-amd64'
make: *** [Makefile:1828: modules] Error 2

Please help😭😭😭. i am new to kali

injection test observations

hi, successfully installed driver. i followed your readme.md and by that it looks to me that the original zeerooo's git is cloned/ compiled.
there after loading the modul i had little trouble to find how to unbind from rtlxxxu and bind it to rtl8192eu. finally i figured it and my "tenda u1" (FCC ID: V7TU1DET) sticks running with this driver.
Unfortunately after reboot the binding returns to rtl8xxxu driver, so i have to rebind it every time with a script after reboot. (i gave 0bda:818b new_id).
So observations: as soon your driver in charge the sticks start up in promiscuous mode without any user involvement, and they got wlan1/wlan2 names.
airodump-ng / aireplay-ng work directly, airmon-ng showing the rtl8192eu driver.

with aireplay-ng i made card to card test (both card is the tenda u1):
on all 3 APs in vicinity made 30/30 100%
attack -0 ok
attack -1 open ok
attack -1 psk ok
the rest of attacks -2,3,4,5,6,7 all failed.

is that supposed to mean that deauth and fakeauth work only?

after using one or few times the cards stop finding ap-s.
even i set airodump on a single channel.
stations show up but no APs.
probably networkmanager messed it up. after reboot and rebind again working.

cheers, lev

Redefinition of struct

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.10.16.3-microsoft-standard-WSL2/build M=/media/D/home/waldo/Downloads/rtl8192eu-master  modules
make[1]: Entering directory '/tmp/WSL2-Linux-Kernel-linux-msft-wsl-5.10.16.3'
  CC [M]  /media/D/home/waldo/Downloads/rtl8192eu-master/core/rtw_cmd.o
In file included from /media/D/home/waldo/Downloads/rtl8192eu-master/include/drv_types.h:78,
                 from /media/D/home/waldo/Downloads/rtl8192eu-master/core/rtw_cmd.c:17:
/media/D/home/waldo/Downloads/rtl8192eu-master/include/rtw_security.h:243:8: error: redefinition of ‘struct sha256_stat
’
  243 | struct sha256_state {
      |        ^~~~~~~~~~~~
In file included from ./include/linux/filter.h:24,
                 from ./include/net/sock.h:59,
                 from ./include/linux/tcp.h:19,
                 from ./include/linux/ipv6.h:88,
                 from ./include/net/addrconf.h:50,
                 from /media/D/home/waldo/Downloads/rtl8192eu-master/include/osdep_service_linux.h:48,
                 from /media/D/home/waldo/Downloads/rtl8192eu-master/include/osdep_service.h:47,
                 from /media/D/home/waldo/Downloads/rtl8192eu-master/include/drv_types.h:27,
                 from /media/D/home/waldo/Downloads/rtl8192eu-master/core/rtw_cmd.c:17:
./include/crypto/sha.h:84:8: note: originally defined here
   84 | struct sha256_state {
      |        ^~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:279: /media/D/home/waldo/Downloads/rtl8192eu-master/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1801: /media/D/home/waldo/Downloads/rtl8192eu-master] Error 2
make[1]: Leaving directory '/tmp/WSL2-Linux-Kernel-linux-msft-wsl-5.10.16.3'
make: *** [Makefile:1829: modules] Error 2

(include/rtw_security.h:243:8)

Lots of errors after make

Is Kali 20.2 supported?

sudo make

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.6.0-kali2-amd64/build M=/home/kali/RTL8192EU modules
make[1]: вход в каталог «/usr/src/linux-headers-5.6.0-kali2-amd64»
CC [M] /home/kali/RTL8192EU/core/rtw_cmd.o
CC [M] /home/kali/RTL8192EU/core/rtw_security.o
CC [M] /home/kali/RTL8192EU/core/rtw_debug.o
CC [M] /home/kali/RTL8192EU/core/rtw_io.o
CC [M] /home/kali/RTL8192EU/core/rtw_ioctl_query.o
CC [M] /home/kali/RTL8192EU/core/rtw_ioctl_set.o
CC [M] /home/kali/RTL8192EU/core/rtw_ieee80211.o
CC [M] /home/kali/RTL8192EU/core/rtw_mlme.o
CC [M] /home/kali/RTL8192EU/core/rtw_mlme_ext.o
/home/kali/RTL8192EU/core/rtw_mlme_ext.c: In function ‘mgt_dispatcher’:
/home/kali/RTL8192EU/core/rtw_mlme_ext.c:1638:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
1638 | if (MLME_IS_AP(padapter))
| ^
/home/kali/RTL8192EU/core/rtw_mlme_ext.c:1643:2: note: here
1643 | case WIFI_ASSOCREQ:
| ^~~~
CC [M] /home/kali/RTL8192EU/core/rtw_mi.o
CC [M] /home/kali/RTL8192EU/core/rtw_wlan_util.o
CC [M] /home/kali/RTL8192EU/core/rtw_vht.o
CC [M] /home/kali/RTL8192EU/core/rtw_pwrctrl.o
CC [M] /home/kali/RTL8192EU/core/rtw_rf.o
CC [M] /home/kali/RTL8192EU/core/rtw_recv.o
CC [M] /home/kali/RTL8192EU/core/rtw_sta_mgt.o
CC [M] /home/kali/RTL8192EU/core/rtw_ap.o
CC [M] /home/kali/RTL8192EU/core/rtw_xmit.o
CC [M] /home/kali/RTL8192EU/core/rtw_p2p.o
CC [M] /home/kali/RTL8192EU/core/rtw_rson.o
CC [M] /home/kali/RTL8192EU/core/rtw_tdls.o
CC [M] /home/kali/RTL8192EU/core/rtw_br_ext.o
CC [M] /home/kali/RTL8192EU/core/rtw_iol.o
CC [M] /home/kali/RTL8192EU/core/rtw_sreset.o
CC [M] /home/kali/RTL8192EU/core/rtw_btcoex_wifionly.o
CC [M] /home/kali/RTL8192EU/core/rtw_btcoex.o
CC [M] /home/kali/RTL8192EU/core/rtw_beamforming.o
CC [M] /home/kali/RTL8192EU/core/rtw_odm.o
CC [M] /home/kali/RTL8192EU/core/efuse/rtw_efuse.o
CC [M] /home/kali/RTL8192EU/os_dep/osdep_service.o
CC [M] /home/kali/RTL8192EU/os_dep/linux/os_intfs.o
CC [M] /home/kali/RTL8192EU/os_dep/linux/usb_intf.o
CC [M] /home/kali/RTL8192EU/os_dep/linux/usb_ops_linux.o
CC [M] /home/kali/RTL8192EU/os_dep/linux/ioctl_linux.o
CC [M] /home/kali/RTL8192EU/os_dep/linux/xmit_linux.o
CC [M] /home/kali/RTL8192EU/os_dep/linux/mlme_linux.o
CC [M] /home/kali/RTL8192EU/os_dep/linux/recv_linux.o
CC [M] /home/kali/RTL8192EU/os_dep/linux/ioctl_cfg80211.o
/home/kali/RTL8192EU/os_dep/linux/ioctl_cfg80211.c: In function ‘cfg80211_rtw_change_iface’:
/home/kali/RTL8192EU/os_dep/linux/ioctl_cfg80211.c:2069:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
2069 | is_p2p = _TRUE;
/home/kali/RTL8192EU/os_dep/linux/ioctl_cfg80211.c:2071:2: note: here
2071 | case NL80211_IFTYPE_STATION:
| ^~~~
/home/kali/RTL8192EU/os_dep/linux/ioctl_cfg80211.c:2093:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
2093 | is_p2p = _TRUE;
/home/kali/RTL8192EU/os_dep/linux/ioctl_cfg80211.c:2095:2: note: here
2095 | case NL80211_IFTYPE_AP:
| ^~~~
CC [M] /home/kali/RTL8192EU/os_dep/linux/rtw_cfgvendor.o
CC [M] /home/kali/RTL8192EU/os_dep/linux/wifi_regd.o
CC [M] /home/kali/RTL8192EU/os_dep/linux/rtw_android.o
CC [M] /home/kali/RTL8192EU/os_dep/linux/rtw_radiotap.o
CC [M] /home/kali/RTL8192EU/os_dep/linux/rtw_proc.o
/home/kali/RTL8192EU/os_dep/linux/rtw_proc.c: In function ‘rtw_proc_create_entry’:
/home/kali/RTL8192EU/os_dep/linux/rtw_proc.c:72:71: error: passing argument 4 of ‘proc_create_data’ from incompatible pointer type [-Werror=incompatible-pointer-types]
72 | entry = proc_create_data(name, S_IFREG | S_IRUGO | S_IWUGO, parent, fops, data);
| ^~~~
| |
| const struct file_operations *
In file included from /home/kali/RTL8192EU/include/../os_dep/linux/rtw_proc.h:18,
from /home/kali/RTL8192EU/include/osdep_intf.h:128,
from /home/kali/RTL8192EU/include/drv_types.h:104,
from /home/kali/RTL8192EU/os_dep/linux/rtw_proc.c:17:
/usr/src/linux-headers-5.6.0-kali2-common/include/linux/proc_fs.h:59:31: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
59 | extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-5.6.0-kali2-common/scripts/Makefile.build:273: /home/kali/RTL8192EU/os_dep/linux/rtw_proc.o] Ошибка 1
make[2]: *** [/usr/src/linux-headers-5.6.0-kali2-common/Makefile:1704: /home/kali/RTL8192EU] Ошибка 2
make[1]: *** [/usr/src/linux-headers-5.6.0-kali2-common/Makefile:180: sub-make] Ошибка 2
make[1]: выход из каталога «/usr/src/linux-headers-5.6.0-kali2-amd64»
make: *** [Makefile:1829: modules] Ошибка 2

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.