Compare commits
9 Commits
kali/5.3.9
...
kali/5.3.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a7fc4699b | ||
|
|
92f8278d8b | ||
|
|
f3d9c10358 | ||
|
|
661846d873 | ||
|
|
e396b4e6ce | ||
|
|
88c8fcfece | ||
|
|
4486ebf4dc | ||
|
|
b374d14770 | ||
|
|
69059a85ae |
4
Makefile
4
Makefile
@@ -10,10 +10,6 @@ EXTRA_CFLAGS += -Wno-unused
|
||||
EXTRA_CFLAGS += -Wno-vla
|
||||
EXTRA_CFLAGS += -Wno-date-time
|
||||
|
||||
REDHAT_VER := $(shell cut -f4 -d" " /etc/redhat-release |cut -d"." -f1,2 )
|
||||
ifeq ($(REDHAT_VER), 7.9)
|
||||
EXTRA_CFLAGS += -DRHEL79
|
||||
endif
|
||||
|
||||
GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc )
|
||||
ifeq ($(GCC_VER_49),1)
|
||||
|
||||
27
README.md
27
README.md
@@ -1,3 +1,24 @@
|
||||
If you are are taking "Learn Ethical Hacking From Scratch | Udemy" by Zaid Sabih and using Kali 2022 x64 Customized by zSecurity 1.0.7 and TP-Link TL-WN722N v2/v3 [Realtek RTL8188EUS], you might find this helpful. In the begining, I am able to enter monitor mode. However after a few days, I found out it doesn't allow to enter monitor mode. I think TP-Link TL-WN722N v2/v3 have automatically updated its driver. Then, I find a video from David Bombal (https://www.youtube.com/watch?v=tYnjMiTTdms) but still can't perfectly solve the issue. However, I find below steps work fine for me.
|
||||
|
||||
1. sudo apt update
|
||||
2. sudo apt upgrade
|
||||
3. sudo apt-get dist-upgrade
|
||||
4. reboot
|
||||
5. sudo apt-get install linux-headers-$(uname -r)
|
||||
6. sudo apt install bc
|
||||
7. sudo apt-get install build-essential
|
||||
8. sudo apt-get install libelf-dev
|
||||
10. sudo apt install dkms
|
||||
11. sudo rmmod r8188eu.ko
|
||||
12. git https://github.com/drygdryg/rtl8188eus (This works for me 😂)
|
||||
13. cd rtl8188eus
|
||||
14. sudo -i
|
||||
15. echo 'blacklist r8188eu'|sudo tee -a '/etc/modprobe.d/realtek.conf'
|
||||
16. reboot
|
||||
17. cd rtl8188eus
|
||||
18. sudo make && make install
|
||||
19. reboot
|
||||
|
||||
Like https://github.com/cccooo/rtl8812au-centos-7.6, forked from aircrack-ng/rtl8188eus and modified for CentOS 7.9
|
||||
as CentOS Kernel 3.10 contains many code from 4.x
|
||||
|
||||
@@ -27,8 +48,10 @@ as CentOS Kernel 3.10 contains many code from 4.x
|
||||
# Howto build/install
|
||||
1. You will need to blacklist another driver in order to use this one.
|
||||
2. `echo 'blacklist r8188eu'|sudo tee -a '/etc/modprobe.d/realtek.conf'`
|
||||
3. `make && sudo make install`
|
||||
4. Reboot in order to blacklist and load the new driver/module.
|
||||
3. Reboot
|
||||
4. cd rtl8188eus
|
||||
5. `make && sudo make install`
|
||||
6. Reboot in order to blacklist and load the new driver/module.
|
||||
|
||||
# MONITOR MODE howto
|
||||
Use these steps to enter monitor mode.
|
||||
|
||||
@@ -15,9 +15,12 @@
|
||||
#define _RTW_BR_EXT_C_
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/version.h>
|
||||
#include <linux/if_arp.h>
|
||||
#include <net/ip.h>
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
|
||||
#include <net/ipx.h>
|
||||
#endif
|
||||
#include <linux/atalk.h>
|
||||
#include <linux/udp.h>
|
||||
#include <linux/if_pppox.h>
|
||||
@@ -948,6 +951,7 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
|
||||
}
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
|
||||
/* IPX */
|
||||
if (ipx != NULL) {
|
||||
switch (method) {
|
||||
@@ -1016,8 +1020,12 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* AARP */
|
||||
else if (ea != NULL) {
|
||||
#else
|
||||
if (ea != NULL) {
|
||||
#endif
|
||||
/* Sanity check fields. */
|
||||
if (ea->hw_len != ETH_ALEN || ea->pa_len != AARP_PA_ALEN) {
|
||||
DEBUG_WARN("NAT25: Appletalk AARP Sanity check fail!\n");
|
||||
|
||||
@@ -1831,11 +1831,13 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame)
|
||||
ptable->func = &OnAuth;
|
||||
else
|
||||
ptable->func = &OnAuthClient;
|
||||
_mgt_dispatcher(padapter, ptable, precv_frame);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
|
||||
__attribute__ ((fallthrough));
|
||||
#else
|
||||
__attribute__ ((__fallthrough__));
|
||||
#endif
|
||||
break;
|
||||
case WIFI_ASSOCREQ:
|
||||
case WIFI_REASSOCREQ:
|
||||
_mgt_dispatcher(padapter, ptable, precv_frame);
|
||||
|
||||
23
debian/changelog
vendored
23
debian/changelog
vendored
@@ -1,3 +1,26 @@
|
||||
realtek-rtl8188eus-dkms (5.3.9~git20220319.0958f29-0kali2) kali-dev; urgency=medium
|
||||
|
||||
* Add a patch to fix build build with kernel 5.17
|
||||
|
||||
-- Sophie Brun <sophie@offensive-security.com> Wed, 18 May 2022 17:50:10 +0200
|
||||
|
||||
realtek-rtl8188eus-dkms (5.3.9~git20220319.0958f29-0kali1) kali-dev; urgency=medium
|
||||
|
||||
* New upstream version 5.3.9~git20220319.0958f29
|
||||
* Refresh patches
|
||||
|
||||
-- Sophie Brun <sophie@offensive-security.com> Thu, 12 May 2022 11:02:51 +0200
|
||||
|
||||
realtek-rtl8188eus-dkms (5.3.9~git20210504.6146193-0kali2) kali-dev; urgency=medium
|
||||
|
||||
[ Ben Wilson ]
|
||||
* Remove template comment and switch spaces to tabs
|
||||
|
||||
[ Sophie Brun ]
|
||||
* Add a patch to fix the compilation with kernel 5.15
|
||||
|
||||
-- Sophie Brun <sophie@offensive-security.com> Tue, 14 Dec 2021 17:56:08 +0100
|
||||
|
||||
realtek-rtl8188eus-dkms (5.3.9~git20210504.6146193-0kali1) kali-dev; urgency=medium
|
||||
|
||||
* New upstream version 5.3.9~git20210504.6146193
|
||||
|
||||
4
debian/patches/Change-dkms-version.patch
vendored
4
debian/patches/Change-dkms-version.patch
vendored
@@ -8,13 +8,13 @@ Forwarded: not-needed
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dkms.conf b/dkms.conf
|
||||
index 1c14127..bc56f1e 100644
|
||||
index 1c14127..1708d4c 100644
|
||||
--- a/dkms.conf
|
||||
+++ b/dkms.conf
|
||||
@@ -1,5 +1,5 @@
|
||||
PACKAGE_NAME="realtek-rtl8188eus"
|
||||
-PACKAGE_VERSION="5.3.9~20200316"
|
||||
+PACKAGE_VERSION="5.3.9~git20210504.6146193"
|
||||
+PACKAGE_VERSION="5.3.9~git20220319.0958f29"
|
||||
CLEAN="'make' clean"
|
||||
BUILT_MODULE_NAME[0]=8188eu
|
||||
PROCS_NUM=`nproc`
|
||||
|
||||
72
debian/patches/add-support-kernel-5.17.patch
vendored
Normal file
72
debian/patches/add-support-kernel-5.17.patch
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
From: Sophie Brun <sophie@offensive-security.com>
|
||||
Date: Wed, 18 May 2022 17:47:55 +0200
|
||||
Subject: Build support with kernel v5.17
|
||||
|
||||
|
||||
Origin: https://github.com/aircrack-ng/rtl8188eus/commit/13cc38399eb44f234a52dde5f94509e54a09c71f
|
||||
---
|
||||
os_dep/linux/os_intfs.c | 8 ++++++++
|
||||
os_dep/linux/rtw_proc.c | 4 ++++
|
||||
os_dep/osdep_service.c | 4 ++++
|
||||
3 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c
|
||||
index bd7da8b..f006fc8 100644
|
||||
--- a/os_dep/linux/os_intfs.c
|
||||
+++ b/os_dep/linux/os_intfs.c
|
||||
@@ -1199,7 +1199,11 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *addr)
|
||||
}
|
||||
|
||||
_rtw_memcpy(adapter_mac_addr(padapter), sa->sa_data, ETH_ALEN); /* set mac addr to adapter */
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
|
||||
+ eth_hw_addr_set(pnetdev, sa->sa_data);
|
||||
+#else
|
||||
_rtw_memcpy(pnetdev->dev_addr, sa->sa_data, ETH_ALEN); /* set mac addr to net_device */
|
||||
+#endif
|
||||
|
||||
#if 0
|
||||
if (rtw_is_hw_init_completed(padapter)) {
|
||||
@@ -1628,7 +1632,11 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
|
||||
/* alloc netdev name */
|
||||
rtw_init_netdev_name(ndev, name);
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
|
||||
+ eth_hw_addr_set(ndev, adapter_mac_addr(adapter));
|
||||
+#else
|
||||
_rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN);
|
||||
+#endif
|
||||
#if defined(CONFIG_NET_NS)
|
||||
dev_net_set(ndev, wiphy_net(adapter_to_wiphy(adapter)));
|
||||
#endif //defined(CONFIG_NET_NS)
|
||||
diff --git a/os_dep/linux/rtw_proc.c b/os_dep/linux/rtw_proc.c
|
||||
index 8a0fd3e..8b1a424 100644
|
||||
--- a/os_dep/linux/rtw_proc.c
|
||||
+++ b/os_dep/linux/rtw_proc.c
|
||||
@@ -45,6 +45,10 @@ inline struct proc_dir_entry *get_rtw_drv_proc(void)
|
||||
#define get_proc_net init_net.proc_net
|
||||
#endif
|
||||
|
||||
+#if(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
|
||||
+#define PDE_DATA(inode) pde_data(inode)
|
||||
+#endif
|
||||
+
|
||||
inline struct proc_dir_entry *rtw_proc_create_dir(const char *name, struct proc_dir_entry *parent, void *data)
|
||||
{
|
||||
struct proc_dir_entry *entry;
|
||||
diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c
|
||||
index 81b951d..7367bca 100644
|
||||
--- a/os_dep/osdep_service.c
|
||||
+++ b/os_dep/osdep_service.c
|
||||
@@ -1268,8 +1268,12 @@ u32 _rtw_down_sema(_sema *sema)
|
||||
inline void thread_exit(_completion *comp)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
|
||||
+ kthread_complete_and_exit(comp, 0);
|
||||
+#else
|
||||
complete_and_exit(comp, 0);
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
printf("%s", "RTKTHREAD_exit");
|
||||
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@@ -1 +1,2 @@
|
||||
Change-dkms-version.patch
|
||||
add-support-kernel-5.17.patch
|
||||
|
||||
3
debian/rules
vendored
3
debian/rules
vendored
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/make -f
|
||||
#export DH_VERBOSE = 1
|
||||
|
||||
# output every command that modifies files on the build system.
|
||||
#export DH_VERBOSE = 1
|
||||
include /usr/share/dpkg/pkg-info.mk
|
||||
export DEB_VERSION_UPSTREAM
|
||||
|
||||
|
||||
@@ -160,6 +160,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
|
||||
{USB_DEVICE(0x2001, 0x3311), .driver_info = RTL8188E}, /* DLink GO-USB-N150 REV B1 */
|
||||
{USB_DEVICE(0x2001, 0x331B), .driver_info = RTL8188E}, /* DLink DWA-121 REV B1 */
|
||||
{USB_DEVICE(0x056E, 0x4008), .driver_info = RTL8188E}, /* Elecom WDC-150SU2M */
|
||||
{USB_DEVICE(0x7392, 0xB811), .driver_info = RTL8188E}, /* Edimax EW-7811UN v2 */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTL8812A
|
||||
|
||||
Reference in New Issue
Block a user