b0N3z Posted July 4, 2018 Share Posted July 4, 2018 Ive tried to change the mac address of wlan1 but after it gets put in monitor mode it reverts back to the default 00-13-37-xx-xx-xx. Is there a way to change this or should I just move on? Quote Link to comment Share on other sites More sharing options...
Just_a_User Posted July 4, 2018 Share Posted July 4, 2018 (edited) On 7/4/2018 at 1:42 PM, b0N3z said: Is there a way to change this or should I just move on? yep - although i thought this happened using the GUI macchanger but it seems i was wrong or it changed. EDIT - it was possible on FW 2.0.2 airmon-ng start wlan1 ifconfig wlan1mon down macchanger wlan1mon -r ifconfig wlan1mon up Edited July 5, 2018 by Just_a_User Quote Link to comment Share on other sites More sharing options...
b0N3z Posted July 4, 2018 Author Share Posted July 4, 2018 8 minutes ago, Just_a_User said: yep - although i thought this happened using the GUI macchanger but it seems i was wrong or it changed. airmon-ng start wlan1 ifconfig wlan1mon down macchanger wlan1mon -r ifconfig wlan1mon up you can change it with the GUI but the format for wlan1mon is different than wlan1. for example wlan1 is 00:13:37:xx:xx:xx and once put in monitor mode it changes to 00-13-37-xx-xx-xx-00-44-00-00-00-00-00-00-00-00 I can change wlan1 in the gui no biggie but once set in monitor mode it reverts back to the above. I dont know if its something that I should just blow off or not? Ive been changing all the mac address to 00:20:91:xx:xx:xx if you know the prefix of who that is, if not give it a look. I already changed wlan0 via GUI and it stays persistant after a reboot, I added eth0 but had to set that up via /etc/rc.local Quote Link to comment Share on other sites More sharing options...
Foxtrot Posted July 4, 2018 Share Posted July 4, 2018 3 minutes ago, b0N3z said: Ive been changing all the mac address to 00:20:91:xx:xx:xx if you know the prefix of who that is, if not give it a look. Nice, I didn't know about that haha. The reason you're seeing the original MAC address come back is because it is pulled from a system script whenever an interface comes up or goes down. 1 Quote Link to comment Share on other sites More sharing options...
Just_a_User Posted July 4, 2018 Share Posted July 4, 2018 1 minute ago, b0N3z said: you can change it with the GUI but the format for wlan1mon is different than wlan1. for example wlan1 is 00:13:37:xx:xx:xx and once put in monitor mode it changes to Yeah i know, thats what i thought used to happen when macchanging an interface in monotor mode (e.g. wlan1moon) from the GUI. I thought it used to change the first half of the mac string. Anyway the method i put above allows you to do that manually so you can use a monitor interface with a changed mac. But your right if you currently try to change a monitor interface now it resets the first half of the mac string to the hardware mac. Quote Link to comment Share on other sites More sharing options...
Just_a_User Posted July 4, 2018 Share Posted July 4, 2018 4 minutes ago, Foxtrot said: 9 minutes ago, b0N3z said: Ive been changing all the mac address to 00:20:91:xx:xx:xx if you know the prefix of who that is, if not give it a look. thats very cool ? 1 Quote Link to comment Share on other sites More sharing options...
b0N3z Posted July 4, 2018 Author Share Posted July 4, 2018 @Foxtrot Is this something that I can edit myself or a proprietary hak5 script for pineap Quote Link to comment Share on other sites More sharing options...
Foxtrot Posted July 4, 2018 Share Posted July 4, 2018 It's an OpenWRT script that is editable, but I forgot the path for it and I'm not at the computer right now. In any case; I wouldn't recommend editing the script, but instead would recommend just spoofing the MAC of the monitor interface once it comes up. 1 1 Quote Link to comment Share on other sites More sharing options...
b0N3z Posted July 4, 2018 Author Share Posted July 4, 2018 sounds like a plan, thank you!! Quote Link to comment Share on other sites More sharing options...
Just_a_User Posted July 4, 2018 Share Posted July 4, 2018 2 minutes ago, Foxtrot said: In any case; I wouldn't recommend editing the script, but instead would recommend just spoofing the MAC of the monitor interface once it comes up. Haven't you got to do it when interface is down? [ERROR] Could not change MAC: interface up or insufficient permissions: Device or resource busy Quote Link to comment Share on other sites More sharing options...
Foxtrot Posted July 4, 2018 Share Posted July 4, 2018 airmon-ng start wlan1 ifconfig wlan1mon down macchanger -m 00:20:91:13:37:00 wlan1mon ifconfig wlan1mon up Should work fine, if memory serves Quote Link to comment Share on other sites More sharing options...
Just_a_User Posted July 4, 2018 Share Posted July 4, 2018 (edited) OK thats what i thought and suggested bar the random or fixed mac part. cool. Could that not be built into the GUI mac changer script for monitor interfaces? @Foxtrot FW 2.0.2 changes monitor macs without reverting to hardware mac so looks like we have lost that functionality on latest firmware. Heh that mac made me look further you also have - 00-1C-3F Edited July 5, 2018 by Just_a_User Quote Link to comment Share on other sites More sharing options...
b0N3z Posted July 5, 2018 Author Share Posted July 5, 2018 On 7/4/2018 at 9:07 AM, Just_a_User said: Heh that mac made me look further you also have - 00-1C-3F That's awesome. I'm definitely going to use that one for the nano lol 2 Quote Link to comment Share on other sites More sharing options...
Just_a_User Posted July 29, 2018 Share Posted July 29, 2018 (edited) This might work : - #!/bin/bash # Cobbled together by Just_a_User # Awful script to set monitor mode and change its MAC # Forces first 3 Hex sets and randomises the last 3 # 00:1C:3F = In-ter-pol # 00:20:91 = NoSuchAgency iface=wlan1 #select interface here ifacemon=$iface"mon" hexchars="0123456789ABCDEF" end=$( for i in {1..6} ; do echo -n ${hexchars:$(( $RANDOM % 16 )):1} ; done | sed -e 's/\(..\)/:\1/g' ) genmac=00:1C:3f$end #enter first 3x hex set here airmon-ng stop $ifacemon airmon-ng start $iface ifconfig $ifacemon down macchanger -m $genmac $ifacemon ifconfig $ifacemon up clear echo "mac change completed" Edited July 30, 2018 by Just_a_User 1 1 Quote Link to comment Share on other sites More sharing options...
b0N3z Posted July 30, 2018 Author Share Posted July 30, 2018 this is great! I also editted the rc.local to change the mac of eth0 on boot so that it also changes and shows the same first 3 hex as all the wifi interfaces. After this I got distracted with some other things and never did come back to it. Ill to give this a try later tonight! Quote Link to comment Share on other sites More sharing options...
b0N3z Posted August 1, 2018 Author Share Posted August 1, 2018 (edited) @Just_a_User this script did not work. I don't quite know why yet but im goin to dig into it a bit. I hard coded a couple things and it worked just fine. Edit: not the greatest at creating scripts but if we could get the last 3 hex of the users wlan1 mac and use that vs randomizing, I think it would work better. Edited August 1, 2018 by b0N3z Quote Link to comment Share on other sites More sharing options...
b0N3z Posted August 1, 2018 Author Share Posted August 1, 2018 #!/bin/bash # Cobbled together by Just_a_User # Heavily edited and hardcoded by b0n3z # Version 1.1 # 00:1C:3F = In-ter-pol # 00:20:91 = NoSuchAgency end=:XX:XX:XX #keep the colon at the beginning and choose your last 3 hex genmac=00:20:91$end #enter first 3x hex set here ifconfig wlan1mon down sleep 1 macchanger -m $genmac wlan1mon sleep 1 ifconfig wlan1mon up sleep 1 clear read MAC </sys/class/net/wlan1mon/address echo "wlan1mon $MAC" echo "mac change completed" Got this to work, had some errors with the randomizer and then iface"mon" in the original script. Hard coded wlan1mon and the mac itself. would cool to find the last 3 hex of the tetras original mac and use that for $end but im not really looking that hard to figure it out. Quote Link to comment Share on other sites More sharing options...
Just_a_User Posted August 1, 2018 Share Posted August 1, 2018 (edited) 8 hours ago, b0N3z said: this script did not work. Strange, i just copy paste it into a quick test.sh and it works for me on my tetra. I did remove the guts of it from another script of mine but all seems fine - for me at least. The random part on its own to test would be #!/bin/bash hexchars="0123456789ABCDEF" end=$( for i in {1..6} ; do echo -n ${hexchars:$(( $RANDOM % 16 )):1} ; done | sed -e 's/\(..\)/:\1/g' ) echo $end The ifacemon also works for me, so double weird ? as a quick test try One way to grab your last 3 hex sets from an interface could be using: - #!/bin/bash iface=wlan1mon cat /sys/class/net/$iface/address | cut -c 9-17 Hope that helps, I am also terrible at bash but its fun to try? Edited August 1, 2018 by Just_a_User 1 Quote Link to comment Share on other sites More sharing options...
b0N3z Posted August 1, 2018 Author Share Posted August 1, 2018 (edited) Ill give it another try later. Stackoverflow is my friend sometimes lol Edited August 1, 2018 by b0N3z Quote Link to comment Share on other sites More sharing options...
Just_a_User Posted August 1, 2018 Share Posted August 1, 2018 12 minutes ago, b0N3z said: Stackoverflow is my friend sometimes lol heh sometimes? its my homepage ? 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.