Re: TCPReplay problem



> 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@xxxxxxxxxx for details.
------------------------------------------------------------------------------



Relevant Pages

  • Re: Problem with etherchannel between 2 3550 FXs
    ... > and destination MAC addresses. ... > of the final bits of each of the source and destination ... > You get to choose which logical operation you want, ... > provided you aren't fragmenting packets; ...
    (comp.dcom.sys.cisco)
  • Re: ARP requests on my net?
    ... MAC should be dumped. ... should dump packets not destined for its MAC. ... Or does IP need the MAC of the destination ... needs to send to the router via ethernet so it ARP's the ...
    (Fedora)
  • Re: Promiscuous Mode
    ... When promiscuous mode is disabled your NIC filters anything that isn't ... Essentially enabling promiscuous mode allows ALL packets in regardless ... of what their Destination MAC address is. ...
    (Pen-Test)
  • [UNIX] Bug in Linux 2.4 and IPTables MAC Match Module
    ... Bug in Linux 2.4 and IPTables MAC Match Module ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... perform NAT, mangle packets, and access custom extensions for packet ...
    (Securiteam)
  • Re: TCPReplay problem
    ... Can we direct tcpreplay to send packets to another machine? ... When it sends out packets on an interface is are they just sent to the next ... whatever the source and destination addresses in the original pcap ... it will receive one recorded in the pcap file but it will have ...
    (Pen-Test)