Home Linux & Systems Cybersecurity Cloud & DevOps Networks & Infrastructure SIEM & Monitoring DFIR & Threat Intel Development & Other All categories Projects About Tools

Change the Mac address in GNU/Linux

Leer en espanol
Change the Mac address in GNU/Linux

Table of contents

In computer networks, the MAC address (acronym in English for Media Access Control) is a 48-bit identifier (6 blocks). ===

What is a MAC address? (Wikipedia definition)

In computer networks the MAC address (English acronym for Media Access Control either media access control) is a 48-bit (6 hexadecimal blocks) identifier that uniquely corresponds to a network Ethernet. It is also known as the physical address in terms of identifying network devices. It is individual, each device has its own MAC address determined and configured by theIEEE (the last 24 bits) and the manufacturer (the first 24 bits) using the OUI. Most of the protocols that work in the layer 2 of the OSI model They use one of the three numbers used by the IEEEMAC-48, EUI-48, and EUI-64 which have been designed to be globally unique identifiers. Not all communication protocols use MAC addresses, and not all protocols require globally unique identifiers.

MAC addresses are unique worldwide, since they are written directly, in binary form, in the hardware at the time of manufacture. Because of this, MAC addresses are sometimes called “Burned Inside Addresses” (BIA). Burned-in Address).

Install Macchanger

We log in as root

Bash
rokitoh@redorbita:~$ su
Contraseña:
Install Packages
Bash
rokitoh@redorbita:~# apt-get install macchanger-gtk
We start Macchanger
Bash
rokitoh@redorbita:~# macchanger-gtk

We select the interface and click Change Mac

Pantallazo 7

By console:

If we want to change our address but without changing the manufacturer

Bash
rokitoh@redorbita:~# macchanger –endding eth0
Current MAC: 02:70:b3:68:76:e3 (Data Recall Ltd)
Faked MAC:   02:70:b3:f5:af:c2 (Data Recall Ltd)

If we want to enter a custom address:


Bash
rokitoh@redorbita:~# macchanger –mac 02:70:b3:01:0b:41 eth0
Current MAC: 02:70:b3:f5:af:c2 (Data Recall Ltd)

Randomly set a MAC provider of the same type

Bash
rokitoh@redorbita:~# macchanger –another eth0
Current MAC: 02:70:b3:01:0b:41 (Data Recall Ltd)
Faked MAC:   00:0c:ed:a0:de:4c (Real Digital Media)

Other ways to change Mac address

In order to change the MAC, no program must be using the corresponding network interface and the interface must also be “downloaded.”

Bash
rokitoh@redorbita:~# /etc/init.d/networking stop

With ifconfig

Bash
rokitoh@redorbita:~# ifconfig eth0 down hw ether 08:09:0a:fa:ba:da

With ip (from the iproute package)

Bash
rokitoh@redorbita:~# ip link set eth0 down address 08:09:0a:fa:ba:da
Bash
rokitoh@redorbita:~#  ip link set eth0 up

If you need the change to be “permanent” you can indicate it in /etc/network/interfaces:

text
auto eth0
iface eth0 inet dhcp
…
hwaddress ether 08:09:0a:fa:ba:da

Reactivate the network.

Bash
rokitoh@redorbita:~# /etc/init.d/networking start

Keep in mind that if we use DHCP, it is most likely that the DHCP server will now assign us a different IP since it will think it is another PC.

Sources:

http://www.ubuntugeek.com/macchanger-utility-for-manipulating-the-mac-address-of-network-interfaces-included-gui-utility.html

http://crysol.org/node/46

http://mymanuel.wordpress.com/tag/macchanger/

http://www.ubuntu-ve.org/node/1201



Faked MAC: 02:70:b3:01:0b:41 (Data Recall Ltd)

Comments