Change MAC Address Linux - aleff-github/my-flipper-shits GitHub Wiki
Change Linux MAC Address Documentation
This script changes the MAC address of a Linux machine using the DuckyScript language.
Script Information
- Title: Change Linux MAC Address
- Author: Aleff
- Version: 1.0
- Category: Execution
- Target: Linux
Requirements
- Permissions to run commands with
sudo
.
Script Execution
- The script waits for 1 second (1000 milliseconds) using the
DELAY
command. - The script opens a terminal window by simulating the keyboard shortcut
CTRL-ALT t
using theCTRL-ALT
command and thet
character. - The script waits for 2 seconds (2000 milliseconds) using the
DELAY
command.
Permissions Section
- The script simulates typing the command
sudo su
to gain root access. - The script waits for 1 second (1000 milliseconds) using the
DELAY
command. - The script types the
SUDO_PASS
variable value (which is defined as "example") to enter the sudo password. - The script waits for 1 second (1000 milliseconds) using the
DELAY
command.
MAC Section
- The script simulates typing the command
apt install net-tools
to install thenet-tools
package. - The script waits for 2 seconds (2000 milliseconds) using the
DELAY
command. - The script defines the
NEW_MAC
variable as the preferred MAC address to set. - The script simulates typing the command to get the net interface name by running
ip route get 8.8.8.8 | awk '{print $5}'
. - The script waits for 500 milliseconds using the
DELAY
command. - The script simulates typing the command
ifconfig $INTERFACE down
to take down the network interface. - The script waits for 500 milliseconds using the
DELAY
command. - The script simulates typing the command
ifconfig $INTERFACE hw ether NEW_MAC
to set the new MAC address. - The script waits for 500 milliseconds using the
DELAY
command. - The script simulates typing the command
ifconfig $INTERFACE up
to bring up the network interface. - The script waits for 500 milliseconds using the
DELAY
command.
Remove Traces Section
- The script waits for 2 seconds (2000 milliseconds) using the
DELAY
command. - The script simulates typing the command
history -c
to remove the command history. - The script simulates typing the command
exit
to close the terminal window.