Spoofing
279
Disable the eth0 NIC by typing
ifconfig eth0 down
.
In this example, the default MAC address was changed by typing:
ifconfig eth0 hw ether 11:22:33:44:55:66
280 Practical Hacking Techniques and Countermeasures
Enable the eth0 NIC by typing ifconfig eth0 up.
Verify on the Linux machine that the MAC address has changed by typing
ifconfig and pressing Enter. In this example, the results verify:
The new MAC address has been changed to 11:22:33:44:55:66.
Spoofing 281
Repeat the ping process as above to validate the new results across the network.
Repeat the Ethereal process as above. In this example, the results:
Verify that the new MAC address of 11:22:33:44:55:66 travels across
the network.
282 Practical Hacking Techniques and Countermeasures
To automatically have the eth0 NIC run with a ???spoofed??? MAC address open:
/etc/sysconfig/networking/devices/ifcfg-eth0
Edit the BOOTPROTO=dhcp line to BOOTPROTO=none. Save and close
the file to prevent the eth0 NIC from activating on boot.
Spoofing 283
Open the rc.local file for editing at: /etc/rc.d/rc.local. Add the ???spoofed???
MAC address by typing:
ifconfig eth0 hw ether 12:34:56:78:90:10
If the machine requires a DHCP connection to obtain an IP address:
Type the line: /sbin/dhcpcd eth0
Save and close the file
Reboot the Linux machine and the new ???spoofed??? MAC address will now
be used.
*Note: Sometimes it is the simple things that work either the quickest or the best.
Pages:
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123