Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Pen-Test
[Top] [All Lists]

Re: TCPReplay problem

Subject: Re: TCPReplay problem
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.
------------------------------------------------------------------------------


<Prev in Thread] Current Thread [Next in Thread>