masterzorag / RTL8192EU-linux

Realtek 8192EU Linux Driver, v5.2.7

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Monitor mode is not working

lemonade3 opened this issue · comments

Hi,

It is working well when i try to connect any Wi-Fi. But when i type ifconfig, there is nothing about any wireless interface. Also i cannot use monitor mode it causes the freeze computer.

What should i do?

Thanks in advance.

Hi @lemonade3 we need some more details about your setup:
For example output of following commands

uname -a
modinfo 8182eu

Also, how do you enter monitor mode?
Which other (network) services are you running? (NetworkManger etc.)
Which distribution?

About monitor mode

Hi @masterzorag,

Here is the result of the commands:

Linux kali 4.11.0-kali1-amd64 #1 SMP Debian 4.11.6-1kali1 (2017-06-21) x86_64 GNU/Linux

And

filename: /lib/modules/4.11.0-kali1-amd64/kernel/drivers/net/wireless/8192eu.ko version: v4.4.1_17696.20160509_BTCOEX20160412-0042 author: Realtek Semiconductor Corp. description: Realtek Wireless Lan Driver license: GPL srcversion: 76A3310A42D3D11C5AC57A4 alias: usb:v2357p0109d*dc*dsc*dp*ic*isc*ip*in* alias: usb:v2357p0108d*dc*dsc*dp*ic*isc*ip*in* alias: usb:v2357p0107d*dc*dsc*dp*ic*isc*ip*in* alias: usb:v0BDAp818Cd*dc*dsc*dp*icFFiscFFipFFin* alias: usb:v0BDAp818Bd*dc*dsc*dp*icFFiscFFipFFin* depends: cfg80211,usbcore vermagic: 4.11.0-kali1-amd64 SMP mod_unload modversions parm: rtw_ips_mode:The default IPS mode (int) parm: rtw_usb_rxagg_mode:int parm: rtw_country_code:The default country code (in alpha2) (charp) parm: rtw_channel_plan:The default chplan ID when rtw_alpha2 is not specified or valid (int) parm: rtw_excl_chs:exclusive channel array (array of uint) parm: rtw_force_igi_lb:force IGI low-bound, 0:no specified (int) parm: rtw_qos_opt_enable:int parm: ifname:The default name to allocate for first interface (charp) parm: if2name:The default name to allocate for second interface (charp) parm: rtw_pwrtrim_enable:int parm: rtw_initmac:charp parm: rtw_special_rf_path:int parm: rtw_chip_version:int parm: rtw_rfintfs:int parm: rtw_lbkmode:int parm: rtw_network_mode:int parm: rtw_channel:int parm: rtw_mp_mode:int parm: rtw_wmm_enable:int parm: rtw_vrtl_carrier_sense:int parm: rtw_vcs_type:int parm: rtw_busy_thresh:int parm: rtw_ht_enable:int parm: rtw_bw_mode:int parm: rtw_ampdu_enable:int parm: rtw_rx_stbc:int parm: rtw_ampdu_amsdu:int parm: rtw_lowrate_two_xmit:int parm: rtw_rf_config:int parm: rtw_power_mgnt:int parm: rtw_smart_ps:int parm: rtw_low_power:int parm: rtw_wifi_spec:int parm: rtw_full_ch_in_p2p_handshake:int parm: rtw_antdiv_cfg:int parm: rtw_antdiv_type:int parm: rtw_switch_usb_mode:int parm: rtw_enusbss:int parm: rtw_hwpdn_mode:int parm: rtw_hwpwrp_detect:int parm: rtw_hw_wps_pbc:int parm: rtw_max_roaming_times:The max roaming times to try (uint) parm: rtw_mc2u_disable:int parm: rtw_80211d:Enable 802.11d mechanism (int) parm: rtw_notch_filter:0:Disable, 1:Enable, 2:Enable only for P2P (uint) parm: rtw_hiq_filter:0:allow all, 1:allow special, 2:deny all (uint) parm: rtw_adaptivity_en:0:disable, 1:enable (uint) parm: rtw_adaptivity_mode:0:normal, 1:carrier sense (uint) parm: rtw_adaptivity_dml:0:disable, 1:enable (uint) parm: rtw_adaptivity_dc_backoff:DC backoff for Adaptivity (uint) parm: rtw_adaptivity_th_l2h_ini:TH_L2H_ini for Adaptivity (int) parm: rtw_adaptivity_th_edcca_hl_diff:TH_EDCCA_HL_diff for Adaptivity (int) parm: rtw_amplifier_type_2g:BIT3:2G ext-PA, BIT4:2G ext-LNA (uint) parm: rtw_amplifier_type_5g:BIT6:5G ext-PA, BIT7:5G ext-LNA (uint) parm: rtw_RFE_type:default init value:64 (uint) parm: rtw_GLNA_type:default init value:0 (uint) parm: rtw_TxBBSwing_2G:default init value:0xFF (uint) parm: rtw_TxBBSwing_5G:default init value:0xFF (uint) parm: rtw_OffEfuseMask:default open Efuse Mask value:0 (uint) parm: rtw_FileMaskEfuse:default drv Mask Efuse value:0 (uint) parm: rtw_rxgain_offset_2g:default RF Gain 2G Offset value:0 (uint) parm: rtw_rxgain_offset_5gl:default RF Gain 5GL Offset value:0 (uint) parm: rtw_rxgain_offset_5gh:uint parm: rtw_rxgain_offset_5gm:default RF Gain 5GM Offset value:0 (uint) parm: rtw_pll_ref_clk_sel:force pll_ref_clk_sel, 0xF:use autoload value (uint) parm: rtw_tx_pwr_lmt_enable:0:Disable, 1:Enable, 2: Depend on efuse (int) parm: rtw_tx_pwr_by_rate:0:Disable, 1:Enable, 2: Depend on efuse (int) parm: rtw_target_tx_pwr_2g_a:2.4G target tx power (unit:dBm) of RF path A for each rate section, should match the real calibrate power, -1: undefined (array of int) parm: rtw_target_tx_pwr_2g_b:2.4G target tx power (unit:dBm) of RF path B for each rate section, should match the real calibrate power, -1: undefined (array of int) parm: rtw_target_tx_pwr_2g_c:2.4G target tx power (unit:dBm) of RF path C for each rate section, should match the real calibrate power, -1: undefined (array of int) parm: rtw_target_tx_pwr_2g_d:2.4G target tx power (unit:dBm) of RF path D for each rate section, should match the real calibrate power, -1: undefined (array of int) parm: rtw_phy_file_path:The path of phy parameter (charp) parm: rtw_load_phy_file:PHY File Bit Map (int) parm: rtw_decrypt_phy_file:Enable Decrypt PHY File (int)

And that is what i do when i enter monitor mode:

ifconfig wlan0 down iwconfig wlan0 mode monitor ifconfig wlan0 up

But when i type (ifconfig wlan0 up), it freezes.
I didn't download or install any other service. Only NetworkManager.
And I am using Kali Linux.

Thank you..

@lemonade3 have you looked at link from my previous comment about monitor mode?

Yes i did @masterzorag,

But still it didn't work.

Also i tried to enter mode with

aircrack-ng start wlan0

The result is:

Found 3 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to run 'airmon-ng check kill'

PID Name
695 NetworkManager
804 wpa_supplicant
805 dhclient

PHY Interface Driver Chipset

phy0 wlan0 ??????
cat: /sys/class/ieee80211/phy0/device/net/wlan0mon/type: No such file or directory

Newly created monitor mode interface wlan0mon is *NOT* in monitor mode.
Removing non-monitor wlan0mon interface...

WARNING: unable to start monitor mode, please run "airmon-ng check kill"

I don't know why doesn't work.

Also like link you sent. I had downloaded rtl8xxxu before. The monitor mode was working well with it. But the signal was very very low. With this driver i can connect internet but monitor mode is not working..

Just retested Monitor Mode 💎

  • Stop all services using wlan0 (Adjust device to your needs)
# /etc/init.d/net.wlan0 -D stop
 * Bringing down interface wlan0
 *   Stopping wpa_cli on wlan0 ...                                                      [ ok ]
 *   Stopping wpa_supplicant on wlan0 ...                                               [ ok ]

Aug 21 12:16:37 blackbox kernel: +rtw_indicate_disconnect
Aug 21 12:16:37 blackbox kernel: RTL871X:  [0x00000010,5]
Aug 21 12:16:37 blackbox kernel: rtw_free_assoc_resources : pwlan== NULL \x0a
Aug 21 12:16:41 blackbox kernel: RTL871X: nolinked power save enter
Aug 21 12:16:41 blackbox kernel: RTL871X:  [0x00100000,5]
Aug 21 12:16:41 blackbox kernel: +usb_intf_stop
Aug 21 12:16:41 blackbox kernel: RTL871X:  [0x00100000,5]
Aug 21 12:16:41 blackbox kernel: SurpriseRemoved==_FALSE
Aug 21 12:16:41 blackbox kernel: RTL871X:  [0x00100000,5]
Aug 21 12:16:41 blackbox kernel: -usb_intf_stop
  • Check interface
# iw dev
phy#0
        Interface wlan0
                ifindex 3
                wdev 0x1
                addr 18:d6:c7:18:7e:18
                type managed
  • Set monitor mode
# iw dev wlan0 set monitor none
  • If RFKILL is blocking interface, unblock it
# rfkill list
0: phy0: Wireless LAN
        Soft blocked: yes
        Hard blocked: no
# rfkill unblock 0
  • Now start interface
# ifconfig wlan0 up

Aug 21 12:17:30 blackbox kernel: RTL871X:  [0x00004000,5]
Aug 21 12:17:30 blackbox kernel: -rtl871x_hal_init:status=0x1
Aug 21 12:17:30 blackbox kernel: RTL871X:  [0x00100000,5]
Aug 21 12:17:30 blackbox kernel: +usb_intf_start
Aug 21 12:17:30 blackbox kernel: RTL871X:  [0x00100000,5]
Aug 21 12:17:30 blackbox kernel: -usb_intf_start
Aug 21 12:17:30 blackbox kernel: RTL871X: nolinked power save leave
  • Check
# iw dev
phy#0
        Interface wlan0
                ifindex 3
                wdev 0x1
                addr 18:d6:c7:18:7e:18
                type monitor
  • Listen air
# airodump-ng wlan0

Aug 21 12:19:45 blackbox kernel: device wlan0 entered promiscuous mode

@lemonade3, Note I'm using newer iw tool to manage wireless interface, instead of iwconfig, with newer linux-4.12.8;
I'm not using third party script to manage interface, no other services are using the wireless interface (wpa_supplicant, in my case)

Hi,

Tried here:

ifconfig wlan0 down
iwconfig wlan0 mode monitor
ifconfig wlan0 up

Resulted in:

[ 8273.999203] RTL871X: rtw_cfg80211_indicate_connect(wlan0) BSS not found !!
[ 8273.999208] RTL871X: assoc success
[ 8273.999231] ------------[ cut here ]------------
[ 8273.999287] WARNING: CPU: 3 PID: 20138 at net/wireless/sme.c:756 __cfg80211_connect_result.cold.19+0x29/0x4d [cfg80211]
[ 8273.999287] Modules linked in: snd_seq_dummy snd_seq snd_seq_device xt_MASQUERADE nf_conntrack_netlink xfrm_user xfrm_algo nft_counter nft_chain_nat xt_addrtype nft_compat nf_tables nfnetlink xt_conntrack nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c br_netfilter bridge stp llc overlay pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) tun binfmt_misc nls_ascii nls_cp437 fuse vfat fat snd_hda_codec_hdmi intel_rapl snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass i915 joydev usblp crct10dif_pclmul crc32_pclmul snd_hda_intel drm_kms_helper snd_hda_codec evdev ghash_clmulni_intel snd_hda_core cryptd snd_hwdep drm intel_cstate snd_pcm efi_pstore snd_timer intel_uncore snd eeepc_wmi asus_wmi intel_rapl_perf pcspkr sg sparse_keymap wmi_bmof i2c_algo_bit efivars iTCO_wdt iTCO_vendor_support soundcore mei_me mei watchdog ie31200_edac loop pcc_cpufreq button 8192eu(OE) cfg80211 rfkill
[ 8273.999307]  parport_pc ppdev lp parport efivarfs ip_tables x_tables autofs4 ext4 crc16 mbcache jbd2 crc32c_generic sd_mod hid_generic usbhid ata_generic hid ata_piix libata scsi_mod i2c_i801 xhci_pci crc32c_intel xhci_hcd ehci_pci ehci_hcd lpc_ich mfd_core usbcore usb_common wmi fan video
[ 8273.999322] CPU: 3 PID: 20138 Comm: kworker/u8:2 Tainted: G           OE     5.2.0-3-amd64 #1 Debian 5.2.17-1
[ 8273.999322] Hardware name: System manufacturer System Product Name/P8H77-M LE, BIOS 0903 09/03/2012
[ 8273.999334] Workqueue: cfg80211 cfg80211_event_work [cfg80211]
[ 8273.999348] RIP: 0010:__cfg80211_connect_result.cold.19+0x29/0x4d [cfg80211]
[ 8273.999350] Code: c3 48 c7 c7 e0 b9 68 c0 e8 16 60 66 e6 0f 0b e9 9f c7 fd ff e8 4a ff ff ff e9 b1 c7 fd ff 48 c7 c7 e0 b9 68 c0 e8 f9 5f 66 e6 <0f> 0b e9 93 c6 fd ff 48 c7 c7 e0 b9 68 c0 e8 e6 5f 66 e6 0f 0b e9
[ 8273.999350] RSP: 0018:ffffb372cd227dd0 EFLAGS: 00010246
[ 8273.999351] RAX: 0000000000000024 RBX: ffff9c860f61ac00 RCX: 0000000000000006
[ 8273.999352] RDX: 0000000000000000 RSI: 0000000000000082 RDI: ffff9c8617d97680
[ 8273.999353] RBP: ffffb372cd227e20 R08: 00000000000004b4 R09: 0000000000000004
[ 8273.999353] R10: 0000000000000000 R11: 0000000000000001 R12: ffff9c859585ea18
[ 8273.999354] R13: 0000000000000000 R14: ffffb372cd227dd0 R15: dead000000000100
[ 8273.999355] FS:  0000000000000000(0000) GS:ffff9c8617d80000(0000) knlGS:0000000000000000
[ 8273.999355] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 8273.999356] CR2: 00007f1d75c79b22 CR3: 000000019cb32005 CR4: 00000000001626e0
[ 8273.999356] Call Trace:
[ 8273.999362]  ? __switch_to_asm+0x34/0x70
[ 8273.999363]  ? __switch_to_asm+0x34/0x70
[ 8273.999373]  ? cfg80211_process_wdev_events+0x186/0x1b0 [cfg80211]
[ 8273.999384]  cfg80211_process_wdev_events+0x186/0x1b0 [cfg80211]
[ 8273.999396]  cfg80211_process_rdev_events+0x32/0x70 [cfg80211]
[ 8273.999409]  cfg80211_event_work+0x1a/0x20 [cfg80211]
[ 8273.999412]  process_one_work+0x1a7/0x3b0
[ 8273.999413]  worker_thread+0x30/0x390
[ 8273.999415]  ? create_worker+0x1a0/0x1a0
[ 8273.999417]  kthread+0x112/0x130
[ 8273.999419]  ? __kthread_parkme+0x70/0x70
[ 8273.999420]  ret_from_fork+0x35/0x40
[ 8273.999423] ---[ end trace 571d205e91db2818 ]---

well, seems you run a recent kernel, 5.2.0-3-amd64 1 Debian 5.2.17-1
as you can see, this version of driver is tested on linux 4.x, so for linux 5.x more patches will be needed to port
in your case kernel crashes, something has to be fixed
if you can, retry with an older kernel version

It's exactly the same with 4.19.0-6-amd64 (4.19.67-2)

Please sirs did you find the solution on how to get rtl8192eu chipset to enter monitor mode?

Hi,

It is working well when i try to connect any Wi-Fi. But when i type ifconfig, there is nothing about any wireless interface. Also i cannot use monitor mode it causes the freeze computer.

What should i do?

Thanks in advance.

hey,
Have you tried sudo ifconfig instead?