What is a MAC Address, what it's used for and how to change it


๐Ÿง  What is a MAC Address

A MAC address (Media Access Control address) is a unique physical identifier assigned by the manufacturer to every network card (e.g., Wi-Fi or Ethernet). Itโ€™s permanent and used to identify the device on a local network.

Example:

00:1A:2B:3C:4D:5E

๐ŸŒ MAC vs IP Address

  • MAC: fixed, physical, unique. Used to identify devices within a local network.
  • IP: dynamic, can change. Used to identify devices on the internet.

Every network packet contains a source MAC and a destination MAC.

๐ŸŽญ Why change your MAC address

Changing your MAC address can be useful to:

  • Hide your identity
  • Bypass MAC-based filters
  • Imitate another device (spoofing)

๐Ÿ› ๏ธ How to change it in Kali Linux

  1. Show network interfaces:
ifconfig

๐Ÿ” What is the lo (loopback) interface

If, listing your network interfaces, you notice a networ named โ€˜loโ€™ donโ€™t worry!

The lo interface is an internal channel in the computer. It allows the machine to communicate with itself. Common uses:

  • Local server testing
  • Inter-process communication

Associated IP: 127.0.0.1 (also known as localhost).

  1. Disable the interface (e.g., lan0):
ifconfig lan0 down
  1. Change the MAC:
ifconfig lan0 hw ether 00:11:22:33:44:55
  1. Enable the interface again:
ifconfig lan0 up
  1. Check the change:
ifconfig

โš ๏ธ Note: This change is temporary and will revert on reboot unless configured otherwise.


๐Ÿงช Interactive Quiz

1. What is the main function of a MAC address?


2. What is the IP address of the loopback interface?


3. What happens to the MAC address after rebooting the system?


4. Which interface allows a computer to communicate with itself?


5. Which command disables a network interface in Linux?


© Nc6 by Giuseppe Fanuzzi - IT08952900721 - PIQA6QP