PDA

View Full Version : How to make monitor, spoof mac and boost power without airmon-ng check kill



mmusket33
2015-09-19, 06:14
MTeams continues to see kali/aircrack-ng forum comments about airmon-ng/network-manager conflicts.

The following script will make a monitor in kali2.0 without disrupting network-manager. It sets the power to 30 and spoofs the mac address for both device and monitor. Command line sequence here is important for this routine to function.

Keep in mind that using airmon-ng check kill nukes network-manager. Full functionality cannot be restored except by rebooting the computer.

Notice when completed your monitor is mon0mon.

More advanced scripts allowing random mac address will follow.

MTeams Labs(STO)

####### Script Begins #######
#!/bin/bash

# Musket Team Labs For kali2.0
# = Remarks Comments etc.
# Allows running any device in monitor mode without using airmon-ng check kill
# Keeps Network manager functioning on other devices.
# Assigns a spoofed mac address to both device and monitor
# Boosts power to 30

# To set up:
# Change DEV variable to any device (i.e wlan0,wlan1 etc. etc.)
# Assign mac address as rqr
# Name File here we use startdevice0.sh
# Set permissions with chmod 755 startdevice0.sh
# From root run with ./startdevice0.sh
# Or place in /usr/bin/ set permissions, run with startdevice0.sh


DEV=wlan0

iw mon0 del &> /dev/null
sleep .1
iw mon0mon del &> /dev/null
sleep .1
ifconfig $DEV down
sleep .1

#Note
#GY Sets power to 30
#BO Sets power to 20

iw reg set GY

iwconfig $DEV mode manage
sleep .1
macchanger -m 00:11:22:33:44:55 $DEV

sleep 2 # Need time to complete op

iwconfig $DEV mode manage
sleep .1
ifconfig $DEV up
sleep .1
iw $DEV interface add mon0 type monitor
sleep .1
ifconfig mon0 down
sleep .1
iwconfig mon0 mode manage
sleep .1
ifconfig mon0 up &> /dev/null
sleep .1
airmon-ng start mon0 &> /dev/null
sleep .1
ifconfig $DEV down
sleep .1
iwconfig $DEV mode monitor
sleep .1
ifconfig $DEV up
sleep .1
ifconfig mon0mon down
sleep .1
macchanger -m 00:11:22:33:44:55 mon0mon

sleep 2 # Need time to complete op

iwconfig mon0mon mode monitor
sleep .1
ifconfig mon0mon up
sleep .1
# Test with airodump-ng
airodump-ng mon0mon

#######Script Ends#######