Giter Club home page Giter Club logo

Comments (6)

andreagonzalez2k avatar andreagonzalez2k commented on June 22, 2024

Sorry, my fault. I forgot to kill conflicting apps with:
airmon-ng check kill
Now it works like a charm again.
Could it be possible not to have to kill Network manager?
Thanks for your driver, it is the best for my 8812 device,

from 8812au.

morrownr avatar morrownr commented on June 22, 2024

You are welcome.

Quote: "Could it be possible not to have to kill Network manager?"

Answer: Yes, I have been working on a new guide. It seems to work well here. Can I get you to test it and advise?

Test Monitor Mode

Setup:

Install the aircrack-ng package

$ sudo apt install aircrack-ng

Ensure Network Manager doesn't cause problems

$ sudo nano /etc/NetworkManager/NetworkManager.conf

add

[keyfile]
unmanaged-devices=interface-name:mon0;interface-name:mon1

Note: The above tells Network Manager to disregard two interfaces.
I usually just use mon0 for monitor mode. I have two usb adapters
on my main box and doing it this way allows me to continue in
managed mode with internet access while I use the other adapter
for monitor mode.

Enable monitor mode using iw and ip:

$ sudo iw dev
phy#0
	Interface wlan0
		ifindex 3
		wdev 0x1
		addr 00:c0:ca:ad:4b:cc
		type managed
		txpower 12.00 dBm
$ sudo ip link set wlan0 down
$ sudo iw phy phy0 interface add mon0 type monitor
$ sudo ip link set mon0 down
$ sudo iw mon0 set monitor control
$ sudo ip link set mon0 up
$ sudo iw dev mon0 set channel 36 (or whatever channel you want)

Test injection

$ sudo aireplay-ng --test mon0

Test deauth

$ sudo airodump-ng mon0 --band ag

$ sudo airodump-ng mon0 --bssid <MAC address of router> --channel <channel of router>

$ sudo aireplay-ng --deauth 0 -c <deviceMAC> -a <routerMAC> mon0 -D

Please let me know how it goes and what changes I need to make. I realize this needs to be better documented so maybe you can help me with that.

from 8812au.

andreagonzalez2k avatar andreagonzalez2k commented on June 22, 2024

Hello, it seems that it does not work.

β”Œβ”€β”€(rootπŸ’€a)-[/home/a/Documentos/temp]
└─# more /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[keyfile]
unmanaged-devices=interface-name:mon0;interface-name:mon1

β”Œβ”€β”€(rootπŸ’€a)-[/home/a/Documentos/temp]
└─# iw dev
phy#0
Interface mon0
ifindex 4
wdev 0x2
addr 00:00:00:00:00:00
type monitor
channel 44 (5220 MHz), width: 20 MHz (no HT), center1: 5220 MHz
txpower 15.00 dBm
Interface wlan0
ifindex 3
wdev 0x1
addr 46:92:e2:0b:7b:2c
type monitor
channel 44 (5220 MHz), width: 20 MHz (no HT), center1: 5220 MHz
txpower 15.00 dBm

β”Œβ”€β”€(rootπŸ’€a)-[/home/a/Documentos/temp]
└─# aireplay-ng --test mon0
21:33:21 Trying broadcast probe requests...
21:33:23 No Answer...
21:33:23 Found 0 APs

Using "airodump-ng mon0 --band ag" it does not find any ap in any channel (a or g band).
After I executed "airmon-ng check kill" and aireplay-ng anf airodump-ng work again.
One more thing is that even when I kill NetworkManager and it works in dmesg there are two warnings. I attached the file with them.
warnings.txt

from 8812au.

morrownr avatar morrownr commented on June 22, 2024
Interface wlan0
ifindex 3
wdev 0x1
addr 46:92:e2:0b:7b:2c
type monitor

How did wlan0 get to be type monitor? It should not be monitor.

Before executing the steps I posted, you really need a clean fresh boot and don't run airmon-ng.

from 8812au.

andreagonzalez2k avatar andreagonzalez2k commented on June 22, 2024

Hello, fresh boot. It seems that when executing "iw phy phy0 interface add mon0 type monitor" already puts mon0 in monitor mode. "iw mon0 set monitor control" also puts wlan0 in monitor mode.

β”Œβ”€β”€(rootπŸ’€a)-[/home/a]
└─# more /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[keyfile]
unmanaged-devices=interface-name:mon0;interface-name:mon1

β”Œβ”€β”€(rootπŸ’€a)-[/home/a]
└─# iw dev

β”Œβ”€β”€(rootπŸ’€a)-[/home/a]
└─# iw dev
phy#0
Interface wlan0
ifindex 3
wdev 0x1
addr ca:ad:93:b2:b1:db
type managed
txpower -100.00 dBm

β”Œβ”€β”€(rootπŸ’€a)-[/home/a]
└─# ip link set wlan0 down

β”Œβ”€β”€(rootπŸ’€a)-[/home/a]
└─# iw phy phy0 interface add mon0 type monitor

β”Œβ”€β”€(rootπŸ’€a)-[/home/a]
└─# iw dev
phy#0
Interface mon0
ifindex 4
wdev 0x2
addr 00:00:00:00:00:00
type monitor
txpower -100.00 dBm
Interface wlan0
ifindex 3
wdev 0x1
addr ca:ad:93:b2:b1:db
type managed
txpower -100.00 dBm

β”Œβ”€β”€(rootπŸ’€a)-[/home/a]
└─# ip link set mon0 down

β”Œβ”€β”€(rootπŸ’€a)-[/home/a]
└─# iw mon0 set monitor control

β”Œβ”€β”€(rootπŸ’€a)-[/home/a]
└─# iw dev
phy#0
Interface mon0
ifindex 4
wdev 0x2
addr 00:00:00:00:00:00
type monitor
channel 1 (2412 MHz), width: 20 MHz (no HT), center1: 2412 MHz
txpower 17.00 dBm
Interface wlan0
ifindex 3
wdev 0x1
addr ca:ad:93:b2:b1:db
type monitor
channel 1 (2412 MHz), width: 20 MHz (no HT), center1: 2412 MHz
txpower 17.00 dBm

β”Œβ”€β”€(rootπŸ’€a)-[/home/a]
└─# ip link set mon0 up

β”Œβ”€β”€(rootπŸ’€a)-[/home/a]
└─# iw dev mon0 set channel 44

β”Œβ”€β”€(rootπŸ’€a)-[/home/a]
└─# aireplay-ng --test mon0
00:40:55 Trying broadcast probe requests...
00:40:57 No Answer...
00:40:57 Found 0 APs

from 8812au.

morrownr avatar morrownr commented on June 22, 2024

Okay, I was testing with an adapter that has a mt7612u chipset on a Linux Mint box. Let me see about setting up an adapter with a rtl8812au chipset on a Kali box to see what the difference is with the Realtek driver.

Yes, I am aware that some of the lines are not needed in some situations. I try to avoid using "airmon-ng check kill" myself. The setup with mon0 works well here with my main box but let me check it in your setup. Will report back.

from 8812au.

Related Issues (20)

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.