LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 11-11-2015, 06:20 AM   #1
dorsio
Member
 
Registered: Apr 2014
Distribution: Debian
Posts: 92

Rep: Reputation: 1
Find MAC in memory dump


I tried to find MAC address string in raw memory dump, by viewing dump content in HEX editor, but it looks that dump does not contain any useful details. Can anyone point me in the right direction for this?

http://s29.postimg.org/9y9a2ayzr/screen.png
Attached Thumbnails
Click image for larger version

Name:	screen.png
Views:	78
Size:	56.7 KB
ID:	20023  

Last edited by dorsio; 11-11-2015 at 07:26 AM.
 
Old 11-11-2015, 07:31 AM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
It would help to understand why you are looking for the MAC Address. There might be a better way.
 
Old 11-11-2015, 03:12 PM   #3
dorsio
Member
 
Registered: Apr 2014
Distribution: Debian
Posts: 92

Original Poster
Rep: Reputation: 1
In general, I want to find offset address for MAC address in memory address space. Debugging has a few commands that use memory address space to read or write data. But any instructions on how to find that registers in memory address space is completely missing. Is there programming way to to find that offset? If MAC address is hard code into the NVRAM, possibly there is way to find an offset.
 
Old 11-12-2015, 10:09 AM   #4
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Not sure if this will help as I don't do this normally.

I used lshw to list installed hardware. In htere is a section for network and here is what it showed me;

Code:
        *-network
             description: Ethernet interface
             product: 82567LM-3 Gigabit Network Connection
             vendor: Intel Corporation
             physical id: 19
             bus info: pci@0000:00:19.0
             logical name: enp0s25
             version: 02
             serial: 78:ac:c0:b2:d1:09
             size: 1Gbit/s
             capacity: 1Gbit/s
             width: 32 bits
             clock: 33MHz
             capabilities: bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
             configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=2.3.2-k duplex=full firmware=0.5-3 ip=10.5.32.50 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
             resources: irq:46 memory:f0500000-f051ffff memory:f0525000-f0525fff ioport:1100(size=32)
At the bottom it looks like memory off-sets. Not sure.

Sorry I couldn't be of more help.
 
Old 11-12-2015, 01:30 PM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by dorsio View Post
In general, I want to find offset address for MAC address in memory address space. Debugging has a few commands that use memory address space to read or write data. But any instructions on how to find that registers in memory address space is completely missing.
Instructions are missing where? Which program do you use to find the MAC address?
Quote:
Is there programming way to to find that offset? If MAC address is hard code into the NVRAM, possibly there is way to find an offset.
If you know the MAC address, a C program to find it is almost trivial, as long as you have a way to access the NVRAM from C.

Can't you just write the NVRAM content to a file and use the xd command and vi to find the offset of your MAC address?
 
Old 11-12-2015, 03:01 PM   #6
dorsio
Member
 
Registered: Apr 2014
Distribution: Debian
Posts: 92

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by berndbausch View Post
Instructions are missing where? Which program do you use to find the MAC address?

If you know the MAC address, a C program to find it is almost trivial, as long as you have a way to access the NVRAM from C.

Can't you just write the NVRAM content to a file and use the xd command and vi to find the offset of your MAC address?
It's limited Busybox shell on embedded system, no access to nvram from C.
Command usage:
Code:
macread - <offset address from 0x90000000> Read from MAC register.
macwrite - <val> <offset address from 0x90000000> Write to MAC register.
So I need to know the offset address of register.

Last edited by dorsio; 11-12-2015 at 03:18 PM.
 
Old 11-12-2015, 03:07 PM   #7
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by dorsio View Post
It's limited Busybox shell on embedded system, no access to nvram from C.
Command usage:
Code:
macread - <offset address from 0x90000000> Read from MAC register.
macwrite - <val> <offset address from 0x90000000> Write to MAC register.
So I need to know the register numbers.
Your original post contains a screenshot of what looks like a hexdump of NOVRAM. So you are able to look at NOVRAM content. Can this tool copy the dump to a file? If yes, you can use vi or any other editor to search for the MAC address in the dump.
 
Old 11-12-2015, 03:42 PM   #8
dorsio
Member
 
Registered: Apr 2014
Distribution: Debian
Posts: 92

Original Poster
Rep: Reputation: 1
I copied the raw memory dump and save it to a file, but I can't find Mac address there. Also, I'm not sure that MAC is stored on NVRAM, it can be hard coded in config file or other file within /usr/sbin.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to take memory dump in Linux rhel1984 Red Hat 4 10-01-2012 08:08 AM
Read Core dump to find memory leak mmc18 Linux - Server 0 06-29-2011 06:04 AM
data acquisition device and wireless data dump frares Linux - Networking 2 08-24-2010 06:45 PM
SLES 9 Memory Dump help djcrash1981 SUSE / openSUSE 6 01-10-2010 05:43 AM
Memory dump command? fanoliv Linux - General 1 03-29-2008 12:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 04:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration