1. RE: NIC Hardware Address

Well, if you want support for all OSes you could use the Netbios 
function but that assumes your card is bound to NetBIOS (MSDN provides 
an example in C). Or you could use the GetAdaptersInfo function, but 
that is only supported in Windows XP, Windows 2000 Professional, Windows 
Me, and Windows 98.

Which method would you prefer to use?  I could try translating C code 
that I've found... (Also, I don't know whether there are any libs in the 
archive that might help.)

-- Brian

C. K. Lester wrote:
> 
> 
> Good stuff... 'cept I need it for Windows! getlost
> 
> ----- Original Message ----- 
> From: <codepilot at netzero.net>
> To: "EUforum" <EUforum at topica.com>
> Sent: Tuesday, September 30, 2003 1:04 PM
> Subject: Re: NIC Hardware Address
> 
> 
> > its real easy in dos
> 
> <snippage occurred>
> 
>

new topic     » topic index » view message » categorize

2. RE: NIC Hardware Address

Hi C.K.

I tried the 'GetAdaptersInfo' function and got a working demo.

Get it from http://cnw.com/~bkb/Eu/MAC.zip (case sensitive)

Let me know if that works for you...
-- Brian

Brian Broker wrote:
> 
> 
> Well, if you want support for all OSes you could use the Netbios 
> function but that assumes your card is bound to NetBIOS (MSDN provides 
> an example in C). Or you could use the GetAdaptersInfo function, but 
> that is only supported in Windows XP, Windows 2000 Professional, Windows 
> 
> Me, and Windows 98.
> 
> Which method would you prefer to use?  I could try translating C code 
> that I've found... (Also, I don't know whether there are any libs in the 
> 
> archive that might help.)
> 
> -- Brian
> 
> C. K. Lester wrote:
> > 
> > 
> > Good stuff... 'cept I need it for Windows! getlost
> > 
> > ----- Original Message ----- 
> > 
> > 
> > > its real easy in dos
> > 
> > <snippage occurred>
> > 
> >

new topic     » goto parent     » topic index » view message » categorize

3. RE: NIC Hardware Address

Hi all,

Brian's code is certainly useful.  You should check to make sure that the 
system isn't setup to report a custom (or 'spoofed') MAC address.

Try this (Windows XP).

Run Brian's program.  It should correctly ID the MAC address (it worked 
perfectly on my machine).

Then do this:
Open a cmd prompt and type:
net config rdr

You will see a line something like this in the output:
NetBT_Tcpip_{9C2C2745-99DF-46E9-8345-4BF5198A1629} (00D059D97B88)

The second number is the MAC address (or not, you'll see).  But the number 
in the squiggly brackets is what you're interested in.  Copy it to the 
clipboard.

Open the registry using regedt32, and browse to this exact key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11
CE-BFC1-08002bE10318}

Here, you will see a bunch of subkeys, 0000, 0001, and so on.  These 
represent the different possible network devices in your system.  Look 
through the keys until you find the one with a value 'NetCfgInstanceId' 
whose data is set to the big number in squiggly brackets you copied from 
the DOS prompt.

Suppose yours matched in the 0001 key (that's where mine did, but it could 
be in the 0000 key or wherever).  Add the following STRING value there:
Name: NetworkAddress
Value: For now, just set it the same as your real MAC address, but change 
only the last digit.  For instance, my registry entry for the 
NetworkAddress value in the 0001 subkey looks like:

NetworkAddress      REG_SZ     00D059D97B22

Now to see the change, either Disable/enable the network interface, or 
reboot windows.

Lastly, run Brian's program again.  It now reports your fake MAC address. 
Run 'net config rdr' again from the cmd prompt.  It too reports the fake 
address.

So if you're doing something that checks for a MAC address, it should also 
check for the 'NetworkAddress' value in one of the 0000,0001, etc. subkeys, 
to see if someone has altered Windows to report an alternate address.

You also should consider that some cards can have their nvram reprogrammed 
with an alternate MAC address.  What this shows is that even on a card that 
doesn't have that feature, or where that feature has been disabled, MAC 
spoofing is still entirely possible.

This may have no bearing on what you're ('you' being whoever asked about 
this) doing, and I don't mean to detract from Brian's program.  It does 
exactly what he says it does.  I just wanted to point out that it is almost 
impossible to be absolutely certain of a system's MAC address.

And also, this is just kind of interesting.

More info: <http://www.klcconsulting.net/>

Ted

--On Wednesday, October 01, 2003 1:07 AM +0000 Brian Broker <bkb at cnw.com> 
wrote:

>
>
> Hi C.K.
>
> I tried the 'GetAdaptersInfo' function and got a working demo.
>
> Get it from http://cnw.com/~bkb/Eu/MAC.zip (case sensitive)
>
> Let me know if that works for you...
> -- Brian
>
> Brian Broker wrote:
>>
>>
>> Well, if you want support for all OSes you could use the Netbios
>> function but that assumes your card is bound to NetBIOS (MSDN provides
>> an example in C). Or you could use the GetAdaptersInfo function, but
>> that is only supported in Windows XP, Windows 2000 Professional, Windows
>>
>> Me, and Windows 98.
>>
>> Which method would you prefer to use?  I could try translating C code
>> that I've found... (Also, I don't know whether there are any libs in the
>>
>> archive that might help.)
>>
>> -- Brian
>>
>> C. K. Lester wrote:
>> >
>> >
>> > Good stuff... 'cept I need it for Windows! getlost
>> >
>> > ----- Original Message -----
>> >
>> >
>> > > its real easy in dos
>> >
>> > <snippage occurred>
>> >
>> >
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

4. RE: NIC Hardware Address

I discovered that I needed to make this a bit more dynamic when I got 
home because of my bad assumption about having only one NIC.  I just 
wanted to release a quick demo before I ran out of time earlier this 
evening.  I'll let this evolve a bit more then release it to the 
archive...

http://cnw.com/~bkb/Eu/MAC2.zip  -- now with more comments!

This will enumerate and give info for each adapter:
  -- adapter name (the long number in squiggle brackets)
  -- adapter description
  -- MAC/physical address

Still waiting to hear if this helps (C.K.?),

-- Brian

Earlier I wrote:
> 
> 
> Hi C.K.
> 
> I tried the 'GetAdaptersInfo' function and got a working demo.
> 
> Get it from http://cnw.com/~bkb/Eu/MAC.zip (case sensitive)
> 
> Let me know if that works for you...
> -- Brian
> 
> > C. K. Lester wrote:
> > > 
> > > 
> > > Good stuff... 'cept I need it for Windows! getlost

new topic     » goto parent     » topic index » view message » categorize

5. RE: NIC Hardware Address

Hi George,

Yes, the first version was released quickly and only supports having one 
NIC.  The error 111 is a buffer overflow error because you have two 
NICs.  The demo in the MAC2 package should handle multiple NICs.  Try it 
and let me know if that works.

-- Brian

George Walters wrote:
> 
> 
> When I run MAC on my P3 with 98 2nd I get error 111..(I have 2 nics if 
> that
> makes any diff)
> 
> george
> 
> ----- Original Message -----
> From: "Brian Broker" <bkb at cnw.com>
> To: "EUforum" <EUforum at topica.com>
> Sent: Wednesday, October 01, 2003 5:29 AM
> Subject: RE: NIC Hardware Address
> 
> 
> > I discovered that I needed to make this a bit more dynamic when I got
> > home because of my bad assumption about having only one NIC.  I just
> > wanted to release a quick demo before I ran out of time earlier this
> > evening.  I'll let this evolve a bit more then release it to the
> > archive...
> >
> > http://cnw.com/~bkb/Eu/MAC2.zip  -- now with more comments!
> >
> > This will enumerate and give info for each adapter:
> >   -- adapter name (the long number in squiggle brackets)
> >   -- adapter description
> >   -- MAC/physical address
> >
> > Still waiting to hear if this helps (C.K.?),
> >
> > -- Brian
> >
> > Earlier I wrote:
> > >
> > >
> > > Hi C.K.
> > >
> > > I tried the 'GetAdaptersInfo' function and got a working demo.
> > >
> > > Get it from http://cnw.com/~bkb/Eu/MAC.zip (case sensitive)
> > >
> > > Let me know if that works for you...
> > > -- Brian
> > >
> > > > C. K. Lester wrote:
> > > > >
> > > > >
> > > > > Good stuff... 'cept I need it for Windows! getlost
> >
> >
> > TOPICA - Start your own email discussion group. FREE!
> >
> >

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu