December 17, 2017, 09:30:26 AM
Welcome, Guest. Please login or register.

Author Topic: [REQ] Automatic mac address filter bypass script  (Read 8528 times)

Offline wget

  • Enthusiast
  • **
  • Posts: 53
  • Internets: +0/-1
[REQ] Automatic mac address filter bypass script
« on: July 06, 2013, 06:48:15 PM »
Well i figured i'd give this forum a shot on trying to find someone whos a good bash scripter to help me with a bash script.

I'm looking to get a Automatic Mac Address filtering script made something that has options and you can fill in to have the bash script so all the typing for me.

Haven't ever seen a script like this but im sure anyone who knows how to make bash scripts and knows how the commands for mac address filter bypassing could make a nice script.

Offline R4v3N

  • Administrator
  • Super Elite
  • *****
  • Posts: 3693
  • Internets: +160/-1
  • The googles and the metasploits...
    • Top-Hat-Sec
Re: [REQ] Automatic mac address filter bypass script
« Reply #1 on: July 06, 2013, 07:13:25 PM »
Are you wanting to just change the Mac at random ?

Offline wget

  • Enthusiast
  • **
  • Posts: 53
  • Internets: +0/-1
Re: [REQ] Automatic mac address filter bypass script
« Reply #2 on: July 06, 2013, 09:00:30 PM »
Would be nice if it could have a option to ask you what you want to set the mac address to.
I think alot of people would find this kinda script to be useful if someone could make it.

I'm not sure if you ever looked at like airoscript before but if you have a script like that where it has options you pick and then you give it the answers and it preforms the steps for you based on the information you give it.

Myself im getting lazy in my days i prefer to have a script ask me what i want to do then have to manually type it out everytime it gets old fast.

Offline R4v3N

  • Administrator
  • Super Elite
  • *****
  • Posts: 3693
  • Internets: +160/-1
  • The googles and the metasploits...
    • Top-Hat-Sec
Re: [REQ] Automatic mac address filter bypass script
« Reply #3 on: July 06, 2013, 10:07:40 PM »
We have a script changer. I actually use it in my weppy and wepwap tools. I am not home right now but I can make one pretty easily. I'm assuming it would be changing mon0 ?

Offline wget

  • Enthusiast
  • **
  • Posts: 53
  • Internets: +0/-1
Re: [REQ] Automatic mac address filter bypass script
« Reply #4 on: July 06, 2013, 10:15:06 PM »
correct.

Offline TAPE

  • Top Hat Member Moderator
  • Elite
  • ********
  • Posts: 1249
  • Internets: +193/-0
Re: [REQ] Automatic mac address filter bypass script
« Reply #5 on: July 07, 2013, 01:02:16 AM »
Sounds like a fun idea, might have a shot as well :)

Of course mac filtering by-passing requires scanning of the targetted AP to get info on associated clients.

So I am assuming what you want automated is ;

> You enter SSID or BSSID to scan
> The script scans until associated clients are found
> The script then spoofs your mon0 mac address to one of the found associated clients
> The script either deauths,( or not, should be a choice) the client which mac you want to use.

Now of course spoofing the mac is only helpful if you have got the credentials to the network..
(thinking of wireless)
So should that be included as well ? (password entry for use with WPA supplicant fopr instance)
Take all the advice you like and then tell everyone to **** off and do your own thing -- Gitsnik

Offline wget

  • Enthusiast
  • **
  • Posts: 53
  • Internets: +0/-1
Re: [REQ] Automatic mac address filter bypass script
« Reply #6 on: July 07, 2013, 06:28:42 AM »
@TAPE sounds about right im sure changes could be made if needed. But i've never seen a script like this online so could be a useful script to add to google code site.

Could be called like Automatic MAC Filtering Bypass Script.

Offline Gingerbread Man

  • *High Tech Low-life*
  • Administrator
  • Elite
  • *****
  • Posts: 938
  • Internets: +93/-0
Re: [REQ] Automatic mac address filter bypass script
« Reply #7 on: July 07, 2013, 06:39:37 AM »
Like this?:

Code: [Select]
#!/bin/bash
clear
RED=$(tput setaf 1 && tput bold)
GREEN=$(tput setaf 2 && tput bold)
STAND=$(tput sgr0)
BLUE=$(tput setaf 6 && tput bold)
echo $RED"##################################################"
echo $RED"##       This script will Help Prep Your        ##"
echo $RED"##    Wireless Card for Penetration Testing     ##"
echo $RED"##     We are going to Spoof your MACs and      ##"
echo $RED"## Optionally Place Your Card into Monitor Mode ##"
echo $RED"##################################################"
echo
echo "Press ENTER to Continue to the MAC Address Spoofing"
echo "Press 'm' to Place Interface into Monitor Mode as Well"
read choice
echo $STAND""
if [[ $choice = "" ]]; then
echo
iwconfig
echo
echo $RED"What is your WLAN device?"
echo $STAND ""
read IFACE
echo $RED"Please Specify the MAC to be Spoofed: xx:xx:xx:xx:xx:xx"
echo $RED"Enter R for random MAC"
echo $STAND ""
read MMAC
if [ ${MMAC,,} = "r" ]; then
ifconfig $IFACE down
macchanger -r $IFACE
ifconfig $IFACE up
else
ifconfig $IFACE down
macchanger -m $MMAC $IFACE
ifconfig $IFACE up
fi
if [ ${MMAC,,} = "r" ]; then
echo $BLUE"-""Your MAC has been set to a Random Value"
else
echo $BLUE"-""Your MAC has been set to $MMAC"
fi
else
if [ ${choice,,} = "m" ]; then
echo
iwconfig
echo
echo $RED"What is your WLAN device?"
echo $STAND ""
read IFACE
echo $RED"Please Specify the MAC to be Spoofed: xx:xx:xx:xx:xx:xx"
echo $RED"Enter R for random MAC"
echo $STAND ""
read MMAC
if [ ${MMAC,,} = "r" ]; then
ifconfig $IFACE down
macchanger -r $IFACE
ifconfig $IFACE up
airmon-ng start $IFACE
echo
sleep 1
ifconfig mon0 down
macchanger -r mon0
ifconfig mon0 up
else
ifconfig $IFACE down
macchanger -m $MMAC $IFACE
ifconfig $IFACE up
airmon-ng start $IFACE
echo
sleep 1
ifconfig mon0 down
macchanger -m $MMAC mon0
ifconfig mon0 up
fi
if [ ${MMAC,,} = "r" ]; then
echo $BLUE"-""Your MAC has been set to a Random Value"
else
echo $BLUE"-""Your MAC has been set to $MMAC"
fi
echo $BLUE"-""$IFACE Has Been Placed Into Monitor Mode"
echo $STAND ""
fi
fi
echo $STAND""



« Last Edit: July 07, 2013, 07:57:54 AM by Gingerbread Man »

Offline wget

  • Enthusiast
  • **
  • Posts: 53
  • Internets: +0/-1
Re: [REQ] Automatic mac address filter bypass script
« Reply #8 on: July 07, 2013, 06:41:50 AM »
Looks about right i'd have to test it on my own network is it normal to have two #!/bin/bash one on line 1 and line 2?

Offline Gingerbread Man

  • *High Tech Low-life*
  • Administrator
  • Elite
  • *****
  • Posts: 938
  • Internets: +93/-0
Re: [REQ] Automatic mac address filter bypass script
« Reply #9 on: July 07, 2013, 06:56:41 AM »
LOL nope...it is not...

Offline wget

  • Enthusiast
  • **
  • Posts: 53
  • Internets: +0/-1
Re: [REQ] Automatic mac address filter bypass script
« Reply #10 on: July 07, 2013, 07:07:48 AM »
Script works pretty good the only thing its missing is to run a airodump-ng mon0 to find the the networks and scan the ESSID for clients connected.

I'll hang on to this curious to see what everyone else comes up with.

Offline TAPE

  • Top Hat Member Moderator
  • Elite
  • ********
  • Posts: 1249
  • Internets: +193/-0
Re: [REQ] Automatic mac address filter bypass script
« Reply #11 on: July 07, 2013, 08:34:55 AM »
I always tend to go way overboard with scripts .. lol.. so might take a while before you hear anything from me..

Gingerbread Man has the right idea though.
Take all the advice you like and then tell everyone to **** off and do your own thing -- Gitsnik

Offline Malachai

  • Top Hat Member
  • Super Elite
  • ********
  • Posts: 2806
  • Internets: +18/-7
  • #!/bin/sh Day/Night (Grey Hat)
Re: [REQ] Automatic mac address filter bypass script
« Reply #12 on: July 07, 2013, 09:33:55 AM »
I have to disagree on your comment "Myself im getting lazy in my days i prefer to have a script ask me what i want to do then have to manually type it out everytime it gets old fast."

that's the best way of learning things. what happen if you move into other linux OS and the script doesn't work. it's always good to learn what the script is doing and look at the script code to see how it was built. I know for myself I learned that way when I arrived at the forum i didn't know anything about scripts unit I started looking at n1tr0g3n scripts how he created them. now I have a script that puts my wlan0 and mon0 in monitor mode by it self. I couldn't of done it without know how to type out the commands.
** Dont' judge me! **

*//
  Hope that Firewall works because your SCREWED  
  //*

Offline wget

  • Enthusiast
  • **
  • Posts: 53
  • Internets: +0/-1
Re: [REQ] Automatic mac address filter bypass script
« Reply #13 on: July 07, 2013, 11:29:21 AM »
Trust me i know the commands for it @Malachai im just lazy and im only trying to speed up my pentesting time as you should know time is money and when you have to take awhile to type out a long commands it can cost you.

I know nothing of bash scripting so i was looking for some help thats the point of having a GUI unless you prefer to try everything you want to do.
Something i don't wanna spend alot of time doing i've made a video on bypassing mac filter just looking for a script to help me speed up the time.

Offline TAPE

  • Top Hat Member Moderator
  • Elite
  • ********
  • Posts: 1249
  • Internets: +193/-0
Re: [REQ] Automatic mac address filter bypass script
« Reply #14 on: July 09, 2013, 11:34:35 AM »
Still working on getting something pretty :D
I am calling it McFiB :D
Yeah, I know, but I still got love for the Quarter Pounder...

Have the basic ideas sorted out, with the below screeny of an option '-m' allowing menu based input.

Basically you choose the interface, a scan is done, you choose which client mac you want to spoof.
(what you dont see is that an xterm window opens for the duration of the scan time running airodump)
This is just on my test router so I dont expose all my neighbours to you gentle folks :) but of course can
choose from however many associated clients are there.

Now to get it more streamlined with direct from command line ;)
Gonna try to get it so that you can enter just ESSID or AP from command line or else choose from list.
Then maybe include an option to have it run wpa_supplicant to allow for connection to wireless network.
Ah well, maybe getting ahead of myself here lol.. quit with da beer TAPE.. !

Its a nice idea, but really, its quicker to do it by hand lol..
Anyways I will probably wind up spending friggin ages on making a useless script that does it nicely anyway :D


Take all the advice you like and then tell everyone to **** off and do your own thing -- Gitsnik