LinuxQuestions.org
Visit Jeremy's Blog.
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 06-24-2009, 06:17 AM   #1
Tex-Twil
LQ Newbie
 
Registered: Feb 2008
Posts: 8

Rep: Reputation: 0
Replay tcp connection


Hello,
I was wondering if it's possible to replay a TCP connection from a previously captured .cap file.

I had a look around and found Tcpreplay but the limit is that it cannot handle the SYN/SYN-ACK/ACK negotiation with a server. The FAQ itself says it:
Quote:
he biggest issue is that tcpreplay doesn't understand the state of common protocols like TCP. This means it is unable to syncronize Syn/Ack's to create valid TCP sessions.
Apparently, there was a tentative to solve this with flowreplay but it did not work and the project is dead.

Is there another tool that could do it ?

gracias,
T.
 
Old 06-24-2009, 06:50 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I don't really understand how this would work... whilst what tcpreplay does makes sense, if you are trying to replay a tcp level connection you can't make this automatically work with a server as the act of establishing the connection means creating new tcp packets from scratch at the least, which wouldn't be replaying. if you just want to replay payloads, not tcp then you can probably do something much simpler and extract the payload with tcpdump / wireshark and then use something like netcat to fire the data into a normal tcp connection.

Maybe it'd be useful to explain more about what you're actually trying to achieve?
 
Old 06-24-2009, 07:12 AM   #3
Tex-Twil
LQ Newbie
 
Registered: Feb 2008
Posts: 8

Original Poster
Rep: Reputation: 0
ok
Quote:
Originally Posted by acid_kewpie View Post
Maybe it'd be useful to explain more about what you're actually trying to achieve?
I'm just playing around with the network Actually what I would like to do is to capture a packet and:

- replay it as it is. I will try your solution with netcat, it makes more sense.

- replay the same data content but with another source (source IP)

- replay it with different data and different header (source IP)


How can I export just the TCP payload of a packet with wireshark ?
Edit: ok I got it, just right click on the protocol being transported by TCP e.g. http and "Export Selected Packet Bytes"



Thx,
Tex

Last edited by Tex-Twil; 06-24-2009 at 07:26 AM.
 
  


Reply

Tags
tcp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
tcp connection problem alfred2g Linux - Networking 4 06-24-2009 11:13 AM
log for TCP/IP (TCP) connection? fireball003 Linux - Server 4 12-04-2008 01:58 PM
how do i kill a tcp connection sunlinux Linux - Security 1 08-24-2007 07:33 AM
hijacking tcp connection atul_mehrotra Linux - Networking 4 04-30-2005 12:50 AM
Unable to get TCP/IP connection kgunnar Linux - Newbie 9 05-01-2002 04:24 AM

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

All times are GMT -5. The time now is 04:39 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