Re: [null] MAC address using Javascript

6,237 views
Skip to first unread message

Rajesh A.

unread,
Nov 29, 2012, 8:16:59 AM11/29/12
to null-...@googlegroups.com
You need to use Java Applet for this.

R@J
On Thu, Nov 29, 2012 at 5:41 PM, rohit verma <rohrv...@gmail.com> wrote:
Hi nulls,

Is any one aware of getting the MAC address of client machine from javascript in the same way we get session cookies.

--
Get ready for the Dilli Shakedown!
nullcon security conference Delhi Sept 26-29th 2012
http://nullcon.net
 
null - Spreading the right Information
null Mailing list charter: http://null.co.in/section/about/null_list_charter/
 
 

rohit verma

unread,
Nov 29, 2012, 8:23:50 AM11/29/12
to null-...@googlegroups.com
hi rajesh,
             It's working JAVA applet but it creates a dependency of JRE in browsers.so just looking for something like "document.cookie"  which fetches the cookie in the same way is their someother thing fetches the MAC address.
Or if it is possible to fetch MAC with some other language will also work for me.

Dinesh Shetty

unread,
Nov 29, 2012, 8:26:16 AM11/29/12
to null-...@googlegroups.com

karniv0re

unread,
Nov 29, 2012, 8:27:55 AM11/29/12
to null-...@googlegroups.com
Using pure JavaScript and ActiveX we can pull the clients MAC address using the Win32_NetworkAdapterConfiguration WMI. Somebody's already blogged about this already. First search result on Google when I query for "javascript activex mac address"

http://codingresource.blogspot.in/2010/02/get-client-mac-address-ip-address-using.html

Dunno if this will work across all browsers. Also, the client needs to enable ActiveX when the browser prompts. Very painful. Try this and let us know!

Regards,
karniv0re

Rohit Salecha

unread,
Nov 29, 2012, 8:29:57 AM11/29/12
to null-...@googlegroups.com

Search for a jquery plugin u'll surely find one serving ur purpose.

--

rohit verma

unread,
Nov 29, 2012, 8:47:40 AM11/29/12
to null-...@googlegroups.com
ya ,the problem is that there is no universal method i found yet and most of the PC's are linux based. :(

Dinesh Shetty

unread,
Nov 29, 2012, 8:51:51 AM11/29/12
to null-...@googlegroups.com
The main point here being why would you need to get MAC id of the machine? Any specific purpose?

rohit verma

unread,
Nov 29, 2012, 9:02:19 AM11/29/12
to null-...@googlegroups.com
i need to add that into other application ie some database sort of

Akash

unread,
Dec 2, 2012, 6:04:55 AM12/2/12
to null-...@googlegroups.com
There can be no jquery plugin for finding the MAC address as that would mean voilating the Browser Sandbox.
As mentioned above you need a client side tech which is allowed access outside the browser sandbox like Java Applets and ActiveX.
--
Warm regards,
Akash Mahajan

That Web Application Security Guy | +91 99 805 271 82
akashm.com | @makash on twitter | linkd.in/webappsecguy
OWASP Bangalore Chapter Lead | null Community Manager


Akash

unread,
Dec 2, 2012, 6:11:43 AM12/2/12
to null-...@googlegroups.com

rohit verma

unread,
Dec 3, 2012, 12:31:53 AM12/3/12
to null-...@googlegroups.com
So Akash, what i thought is of now is running a batch program or a shell script on client side system that would capture MAC for me..i hope this is the only way left..

Riyaz Walikar

unread,
Dec 3, 2012, 1:30:11 AM12/3/12
to null-...@googlegroups.com

The batch program/shell script will have to communicate with your webserver via a separate channel than your browser.

Abhay Rana

unread,
Dec 3, 2012, 2:41:27 AM12/3/12
to null-...@googlegroups.com
I had a similar need, but finally ended up using arp-scan, since we only cared about the local network.
--
Sent from my iPad

Naga Rohit

unread,
Dec 3, 2012, 3:02:26 AM12/3/12
to null-...@googlegroups.com
By Javascript, NO. There's absolutely no way to do that.

--
Rohit.

Aditya Vignesh Ram K

unread,
Dec 3, 2012, 3:13:39 AM12/3/12
to null-...@googlegroups.com
I created a batch file which sends the mac address of that system, and the other mac address which are connected to that system and pushes it through SMTP ....
Not purely batch , some VB too... But can some one tell me how do i make the file run    in the client machine ?
Reply all
Reply to author
Forward
0 new messages