Jump to content

Guide on how to radomise wlan0 (or other interfaces) on boot-up on MKVII


Recommended Posts

Posted (edited)

Having the pineapple immediately transmit its presence via its wlan0 MAC oui is not very red team, so here we go. As usual there is many ways to accomplish the same, this is just what I have tested. First lets create the file: -

nano /etc/init.d/wlan0mac

fill it with one of the below - note you can edit the AA:BB:CC to the oui of the manufacturer of your choice, the remaining will be randomly generated. for a complete random MAC see option below.
Specify an OUI version : -

#!/bin/sh /etc/rc.common

START=17

uci set wireless.@wifi-iface[0].macaddr=AA:BB:CC:`head /dev/urandom |
                    tr -dc "0123456789abcdef" | head -c2`:`head /dev/urandom |
                    tr -dc "0123456789abcdef" | head -c2`:`head /dev/urandom |
                    tr -dc "0123456789abcdef" | head -c2`

uci commit wireless
wifi

Complete Random MAC version: -

#!/bin/sh /etc/rc.common

START=17

uci set wireless.@wifi-iface[0].macaddr=00`hexdump -n5 -e'5/1 ":%02x"' /dev/urandom`

uci commit wireless
wifi

Once done allow it's  execution

chmod +x /etc/init.d/wlan0mac

Enable the process to enable mac change on boot-up then reboot.

/etc/init.d/wlan0mac enable

Reboot to confirm or start/restart to run manually

/etc/init.d/wlan0mac start

or

/etc/init.d/wlan0mac restart

or

reboot

Hope this was helpful to some of you ❤️

Edited by Just_a_User
  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...