LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-18-2005, 07:49 AM   #1
outspoken
LQ Newbie
 
Registered: Nov 2004
Distribution: Gentoo
Posts: 24

Rep: Reputation: 15
MAC Destination Spoofing


I need to spoof the destination MAC address in a packet that is being sent to a test printer in a private test environment. What I have been doing so far is using the program 'macchanger' to change the source MAC where the packets are being generated and then using the program 'hping' to modify the source and destination IP address as well as the ports. I'm unable to find any information on how to change the MAC for the destination. Has anyone succeeded in doing this?

Thanks.
 
Old 03-19-2005, 06:11 AM   #2
cowanrl
Member
 
Registered: Dec 2004
Location: Western Pennsylvania, USA
Distribution: Red Hat
Posts: 150

Rep: Reputation: 15
If you want to have the destination MAC address in a packet be something other than what it actually is on the network, make a static entry in the arp cache. You should be able to do this with arp -s. See the man page on arp for details.

I don't see how this will work on your network though. Let's say your printer has an IP address of 192.168.1.1 and a MAC address of aa:bb:cc:dd:ee:ff. If you create a static entry in the arp cache so that 192.168.1.1 has a MAC address of ff:ee:dd:cc:bb:aa, when the packet is transmitted, IF your printer ever receives it, it will ignore the packet because it doesn't have it's destination address in it.
If you're on a switched network, your printer may never even receive the packet. Your switch will look up the MAC address in it's bridging table. If you've used the MAC address of another valid device on your network, your switch will transmit the packet on the port that device is attached to, not the port your printer is attached to. If the MAC address you've used is not already in your switches bridging table, it may or may not forward the packet at all.
 
Old 04-06-2005, 10:27 AM   #3
outspoken
LQ Newbie
 
Registered: Nov 2004
Distribution: Gentoo
Posts: 24

Original Poster
Rep: Reputation: 15
well messing with the arp tables was not an option that we were fond of. what i did end up finding was a utility called 'packETH' (packeth.sf.net) that is capable of faking the source/dest mac and many other options, then forming the packet and sending at any rate/duration desired. check it out for those of you who would like to do such things for testing purposes. in this scenario we were trying to crash a new printer that was being put into production.
 
Old 04-06-2005, 10:34 AM   #4
cowanrl
Member
 
Registered: Dec 2004
Location: Western Pennsylvania, USA
Distribution: Red Hat
Posts: 150

Rep: Reputation: 15
If you are successfully able to spoof the destination MAC address, how does your printer ever even receive the packet?
 
Old 04-06-2005, 10:47 AM   #5
outspoken
LQ Newbie
 
Registered: Nov 2004
Distribution: Gentoo
Posts: 24

Original Poster
Rep: Reputation: 15
this was on a closed network and we just wanted to generate packets that were not only destined for the printer itself but arbitrary packets that were randomly generated (mac destination being one of the factors).
 
  


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
Basic IP and MAC spoofing Iptable rules? stjoan1 Linux - Security 3 11-13-2005 05:17 PM
MAC Address spoofing on alias/secondary interface tara Linux - Networking 3 08-31-2005 09:22 PM
detect mac address spoofing bensky Linux - Security 1 03-13-2005 12:23 AM
Problem spoofing mac address colombo187 Linux - Networking 1 02-05-2005 08:27 PM
Need help spoofing MAC address, ifconfig down seems to remove wireless card sicc Linux - Wireless Networking 0 11-30-2004 02:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:04 PM.

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