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 55 guests and 5 members online
EH-Net News Feeds
Latest Additions
 
Advertisement

You are here: Home arrow Forum arrow Ethical Hacking Discussions and Related Certificationsarrow Forensicsarrow Automatically gathering a MAC address
EH-Net
May 24, 2012, 07:58:14 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Advertise on EH-Net!! - Reasonable Rates, Highly Targeted Audience.
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Automatically gathering a MAC address  (Read 6832 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: 298



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.16 | SMF © 2011, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.208 seconds with 22 queries.
 

gk_static-ad_feb2012.jpg
Global Knowledge: Build Security Skills to Protect & Defend

els_130x200fixed2.gif
eLearnSecurity Student Course Now Live!
5% Off with Code
ELS-EH-5

SANS Deals 4 EH-Netters
$150 OFF Any SANS Course in Any Format!
Coupon Code: EHN_Connect Including SANS Security West 2012 & SANSFIRE 2012
Recent Forum Topics

cbtnuggets_logo_125.jpg
Try CBT Nuggets Free!

Vote For EH-Net

Add to Technorati Favorites
technorati fave

 
         
Advertisement

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