Subject: Re: Ethernet MAC Cloning
To: Benson <peachokay@hotmail.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-security
Date: 03/01/2002 22:05:03
On Wed, Feb 27, 2002 at 12:41:57PM +0800, Benson wrote:
> Hi dear folks,
> I am looking for one simple way (.to use it is easy, to implement it is
> not easy at all~~)
> to change the MAC address of a network card in NetBSD (since some ISPs
> would use 
> the NIC's MAC address to authenticate a service), let's say card i82557
> of Intel. 
> I tried to study the source code for i82557 to know the location of the
> register on 
> the NIC to write, but I am not that good enough to understand those
> codes, 
> especially to write with ioctl. I also have an idea of modifying the
> command 'ifconfig' 
> so that it can set the hardware address as the linux's version of
> ifconfig does. 
> But again, I was knocked down with ioctl.
> I am not sure how much effort it would take to write a patch for
> ifconfig 
> with -H option to set MAC address or any other possible way one can
> provide me with.

Last time this was discussed, there is an issue with this: I think the
structure in the ioctl used for addresses isn't large enouth for a
MAC address, or something like that.
getting the hardware address is already there:
rochebonne:/usr/src/pkgsrc/mail/imp>ifconfig ne0
ne0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:40:95:45:47:02
	media: Ethernet manual
	inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255
	inet6 fe80::240:95ff:fe45:4702%ne0 prefixlen 64 scopeid 0x1

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
--