Home page logo
/

pen-test logo Penetration Testing mailing list archives

Re: TCPReplay problem
From: Graeme Connell <gconnell () middlebury edu>
Date: Fri, 28 Apr 2006 08:31:52 +0000

> Can we direct tcpreplay to send packets to another machine?

Yes.

> If so what is the command for that.

You can use tcpreplay to send packets to another machine. You have to do a bit of work, though. First, you can change the source and destination IP addresses for all packets with the '-e' flag. So calling

./tcpreplay -i eth0 -e 1.1.1.1:2.2.2.2 test.pcap

will send all packets in 'test.pcap' through interface 'eth0', rewriting the source IP for all packets to '1.1.1.1' and the destination IP to '2.2.2.2'. However, you should also change the layer 2 source and destination MAC, which can be done with the '-I' and '-k' flags.

./tcpreplay -i eth0 -e 1.1.1.1:2.2.2.2 test.pcap -I 11:11:11:11:11:11 -k 22:22:22:22:22:22

This rewrites the source MAC to '22:22:22:22:22:22' and the destination MAC to '11:11:11:11:11:11'. Of course, if the destination computer is in your subnet, the dest MAC should be its MAC, otherwise, it should be the MAC of your gateway. The source MAC should be your compy's, but this shouldn't really be necessary.

So, to recap, get the IP of the machine you want to send to, then the MAC of that machine (if it's in your subnet) or your gateway (if it's not), then place that info into the tcpreplay call, and you should be able to resend captured packet data to another computer.

                --Graeme Connell


------------------------------------------------------------------------------
This List Sponsored by: Cenzic

Concerned about Web Application Security? Why not go with the #1 solution - Cenzic, the only one to win the Analyst's Choice Award from eWeek. As attacks through web applications continue to rise, you need to proactively protect your applications from hackers. Cenzic has the most comprehensive solutions to meet your application security penetration testing and vulnerability management needs. You have an option to go with a managed service (Cenzic ClickToSecure) or an enterprise software (Cenzic Hailstorm). Download FREE whitepaper on how a managed service can help you: http://www.cenzic.com/news_events/wpappsec.php And, now for a limited time we can do a FREE audit for you to confirm your results from other product. Contact us at request () cenzic com for details.
------------------------------------------------------------------------------


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
AlienVault