Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 32 guests and 1 member online
 
Advertisement

You are here: Home arrow Ethical Hacking Discussions and Related Certificationsarrow Forensicsarrow Automatically gathering a MAC address
EH-Net
May 26, 2013, 04:30:19 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Go back to The Ethical Hacker Network Online Magazine Home Page
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Automatically gathering a MAC address  (Read 7482 times)
0 Members and 1 Guest are viewing this topic.
baghtal
Newbie
*
Offline Offline

Posts: 1


View Profile
« on: October 02, 2007, 02:00:53 PM »

I work with a large network that spans several subnets. I am trying to find a way to automatically include the MAC address when my users visit a tracking web page to report problems they are having. Most of my users I don't expect to know how to find their MAC on their own so pulling automatically would be best.

IP addresses are assigned by DHCP and I would like to track issues that are machine specific, which is why i need MAC tracing instead of IP.

Has anyone got any idea how to do this without ActiveX controls or a local client on the users machine?

Thanks!
Logged
Negrita
Sr. Member
****
Offline Offline

Posts: 299



View Profile
« Reply #1 on: October 02, 2007, 06:07:01 PM »

The first thing that pops into mind is snmpwalk on the ARP tables, though there is probably an easier solution.
Logged

CEH, CCSA NG/AI, NNCSS, MCP, MCSA 2003

There are 10 kinds of people, those that understand binary, and those that don't.
dannioni
Newbie
*
Offline Offline

Posts: 44


View Profile
« Reply #2 on: October 03, 2007, 12:50:11 PM »

You could send a arp request:

Who has 192.168.1.14?
Ans: 192.168.1.14 is on 00:72:B5:F8:83:CA:B4:44

That is if your network structure allows it (don't know anything about networks that big).
Logged
dean
Guest
« Reply #3 on: October 03, 2007, 02:21:17 PM »

if you are directing your users to an internal help desk web page you can use a tool like nbtscan and a little bit of perl cgi to do this for you.

Something like this should work and output what you need to a file.

Code:
$ip = $ENV{'REMOTE_ADDR'};
$command = "/path/to/tool/nbtscan -v -h -q -s "$ip"";

open(FH, ">>filename")
or die "error creating or opening file: $!\n";

# Print outtput to file.
$tm = localtime;
print FH "Record added : $tm\n\n";

open (S, "$command |") || die "Cannot run $command! : $!\n";
while (<S>){
print FH $_;
  }

close(FH);

The environment variable REMOTE_ADDR will get the user's IP address for you. feed that to the tool and it should give you the data that you need.

This might be limited by your routing topology as the server will need to directly connect to the machines using the tool.

Not sure what DHCP server you're using but that should hold MAC to IP mappings too.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.059 seconds with 23 queries.
 
Exclusive Deal

sansfire13_245x90_cw90.jpg
SANSFIRE 2013
June 15 - 22

5% Off w/ Code: EHN_5

SANS Deals 4 EH-Netters
5% OFF Any SANS Course in Any Format!
Coupon Code: EHN_5 Including SANS Rocky Mountain 2013 & SANS Boston 2013
Polls
Compared to this year, 2013 will be:
 
Recent Forum Topics
EH-Net News Feeds
Latest Additions
 
         
Free Business and Tech Magazines and eBooks

© 2013 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.