LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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, 07: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, 07:50 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

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


All times are GMT -5. The time now is 02:38 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration