﻿1
00:00:00,660 --> 00:00:06,750
When it comes to networking you probably heard of the term MAC address a lot.

2
00:00:06,750 --> 00:00:13,230
So in this lecture I'm going to cover what do we mean by MAC address what it's used for and how to change

3
00:00:13,230 --> 00:00:13,950
it.

4
00:00:20,120 --> 00:00:23,150
MAC address stands for media access control.

5
00:00:23,600 --> 00:00:31,520
It's a permanent physical and unique address assigned to network interfaces by the device manufacturer.

6
00:00:31,610 --> 00:00:38,660
So whether you have a wireless card or wired or Internet card each one of these network cards come with

7
00:00:38,660 --> 00:00:41,980
a specific address that is unique to this card.

8
00:00:41,990 --> 00:00:48,890
So there is no two devices in the world that would have the same MAC address and this address will always

9
00:00:48,890 --> 00:00:49,960
be the same.

10
00:00:49,970 --> 00:00:56,180
To this specific device even if you unplug it from your computer connected to another computer then

11
00:00:56,180 --> 00:01:03,970
this network device will always have the same address so you might already know that the IP address

12
00:01:04,240 --> 00:01:11,730
is used in the internet to identify computers and communicate between devices on the Internet.

13
00:01:11,920 --> 00:01:20,620
The MAC address is used within the network to identify devices and transfer data between devices so

14
00:01:20,650 --> 00:01:27,850
each piece of data or packet that is sent within the network contains a source Mark and a destination

15
00:01:27,850 --> 00:01:28,920
mark.

16
00:01:28,930 --> 00:01:37,480
Therefore this packet would flow from the source Mark to the destination mark so because this is a physical

17
00:01:37,480 --> 00:01:45,280
unique address to each interface to each network device and because it is used to identify devices then

18
00:01:45,280 --> 00:01:49,720
changing it will make you anonymous on the network.

19
00:01:49,720 --> 00:01:56,380
Not only that but the MAC address is often used by filters to prevent or allow devices to connect to

20
00:01:56,380 --> 00:02:00,070
networks and do specific tasks on the network.

21
00:02:00,070 --> 00:02:05,860
So being able to change your MAC address to another device as MAC address will allow you to impersonate

22
00:02:05,860 --> 00:02:10,970
this device and allow you to do things that you might not be able to do.

23
00:02:11,080 --> 00:02:17,350
So you'll be able to bypass filters or connect to networks that on these specific devices with specific

24
00:02:17,350 --> 00:02:24,740
MAC addresses can connect to and you will also be able to hide your identity no change in the MAC address

25
00:02:24,740 --> 00:02:26,350
is very very simple.

26
00:02:26,360 --> 00:02:30,260
So let me show you how to do that first of all.

27
00:02:30,290 --> 00:02:39,950
I'm going to use the if conflict command to list all the network interfaces available on my Kelly machine.

28
00:02:39,950 --> 00:02:46,400
What I mean by network interface is any device that allow us to connect to a network.

29
00:02:46,400 --> 00:02:50,210
So an example is a WI-FI card or an internet card.

30
00:02:50,330 --> 00:03:00,030
And so on so you can see first of all we have 88 0 and this is a virtual interface created by virtual

31
00:03:00,030 --> 00:03:00,660
box.

32
00:03:00,780 --> 00:03:04,450
When we said Cally to use an ad network.

33
00:03:04,890 --> 00:03:08,900
So you can see the interface name is 88 0.

34
00:03:08,940 --> 00:03:13,810
You can see it has an IP address because like I said it's connected to a network.

35
00:03:13,830 --> 00:03:18,560
So if we go here we can see it say in wired connected.

36
00:03:18,610 --> 00:03:25,210
So this is the interface that represents the wired network that Kali is connected to which is actually

37
00:03:25,210 --> 00:03:27,820
a virtual not network.

38
00:03:27,850 --> 00:03:34,840
You can also see the net mask the broadcast and a really important piece of information which is the

39
00:03:34,840 --> 00:03:36,150
other.

40
00:03:36,340 --> 00:03:42,060
This is the MAC address of this virtual interface.

41
00:03:42,350 --> 00:03:49,370
Now you can see similar information for my other two interfaces the ELO and the line zero.

42
00:03:49,400 --> 00:03:55,450
The only thing is you can see for both of these interfaces we do not have an IP address.

43
00:03:56,240 --> 00:04:03,130
And the main reason for that is because none of these interfaces is connected to a network.

44
00:04:03,440 --> 00:04:12,350
Now elo is the default interface created by Linux and land zero is my real wireless adapter so I can

45
00:04:12,350 --> 00:04:20,990
use it to connect to Wi-Fi networks but if I go on the network and here you'll see Wi-Fi is not connected

46
00:04:21,170 --> 00:04:29,310
because I actually didn't connect to any network and that's why it does not have an IP address.

47
00:04:29,440 --> 00:04:35,710
Now this doesn't matter because what we want to do is to just change the MAC address which again is

48
00:04:35,710 --> 00:04:44,650
shown here under the other part so similar to what you're seeing here for 88 0 now in order to change

49
00:04:44,860 --> 00:04:47,480
any of the values that you see here.

50
00:04:47,560 --> 00:04:52,070
You have to first disable the interface.

51
00:04:52,180 --> 00:04:58,790
So in this example we want to change the MAC address so that is represented by the other.

52
00:04:58,900 --> 00:05:08,010
And the value is right here so in order to disable an interface we're going gonna do if config followed

53
00:05:08,010 --> 00:05:15,560
by the interface name which is land zero in my example followed by down to disable it.

54
00:05:15,720 --> 00:05:19,720
Now if I had enter you'll see the command runs with no errors.

55
00:05:19,770 --> 00:05:26,850
So it means that it got executed properly and the next thing that we need to do is to change the option

56
00:05:27,030 --> 00:05:28,780
that we want to change.

57
00:05:28,830 --> 00:05:33,780
And in this example we want to change the other which is the MAC address.

58
00:05:34,840 --> 00:05:41,640
So first we're going to type if config we're going to type the interface that we want to change one

59
00:05:41,640 --> 00:05:50,900
of its options then we're going to type the option that we want to change and what we want to change

60
00:05:51,200 --> 00:05:53,090
is the hardware address.

61
00:05:53,150 --> 00:06:01,060
So we're going to do hate w you then we're going to give it the address that we want to change the MAC

62
00:06:01,120 --> 00:06:02,550
address too.

63
00:06:02,590 --> 00:06:11,880
So for example I'm going to use 0 0 1 1 2 2 3 3 4 4 5 5 very very simple.

64
00:06:11,880 --> 00:06:18,280
Command will do an if config lands Euro to select the interface that we want to change its option.

65
00:06:18,450 --> 00:06:25,950
We want to set the hardware address and we want to set this address to this specific address so you

66
00:06:25,950 --> 00:06:30,390
can use any address that you want to follow in the same format shown here.

67
00:06:30,390 --> 00:06:34,690
Just make sure your address starts with 0 0.

68
00:06:34,950 --> 00:06:41,310
So I'm going to hit enter and again we don't see any error messages so it means the command get executed

69
00:06:41,310 --> 00:06:42,570
properly.

70
00:06:42,570 --> 00:06:49,650
And finally we just need to enable the interface because we disabled it by doing if config lines zero

71
00:06:49,650 --> 00:06:50,430
down.

72
00:06:50,430 --> 00:07:00,410
So we just need to do if config lines zero up to enable it now the interface is enabled.

73
00:07:00,520 --> 00:07:09,960
If we do if config again and look at the other part in here you can see that it is changed to the MAC

74
00:07:09,960 --> 00:07:13,730
address that we specified.

75
00:07:14,020 --> 00:07:15,070
Now this is done.

76
00:07:15,190 --> 00:07:16,780
And your MAC address is changed.

77
00:07:16,870 --> 00:07:24,190
Now you can go ahead and start using the interface and it will appear to have this MAC address instead

78
00:07:24,190 --> 00:07:26,260
of its original MAC address.

79
00:07:26,350 --> 00:07:30,460
And like I said this can be useful in so many scenarios.

80
00:07:32,070 --> 00:07:37,200
Now keep in mind the MAC address will revert back to the original one.

81
00:07:37,230 --> 00:07:44,010
Once you restart the computer because we're only changing the MAC address in memory we're not really

82
00:07:44,010 --> 00:07:46,190
changing the physical MAC address.

83
00:07:47,070 --> 00:07:54,300
But if you're MAC address is resetting to the original one without restarting then something is going

84
00:07:54,300 --> 00:08:00,810
wrong and it's probably happening because your network manager is resetting the MAC address.

85
00:08:01,020 --> 00:08:07,020
Not everybody will face this issue so I'm not going to cover it in this lecture but if you faced this

86
00:08:07,020 --> 00:08:13,560
issue if your mac address goes back to the original one without restarting the computer then checkout

87
00:08:13,740 --> 00:08:19,410
the YouTube video in the resources of this lecture it'll show you how to fix this issue.

