Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Insert the 4th TCP packet after TCP three-times handshakes

by mstone (Deacon)
on May 04, 2005 at 01:06 UTC ( [id://453790]=note: print w/replies, xml ) Need Help??


in reply to Insert the 4th TCP packet after TCP three-times handshakes

I'm provisionally with merlyn on this. While the code may be an interesting example of how to do TCP/IP, please give us some discussion on that subject. All we have here is a code listing and an output dump.

Yes, the code is interesting, in the sense that all non-trivial code is interesting, but as mentioned, it also has the whiff of potential naughtiness. Without some other information to give this node/thread more oomph, I don't see how the monastery would be harmed by having the Powers That Be say, "thank you, that was very nice, and now we're making it go away."

  • Comment on Re: Insert the 4th TCP packet after TCP three-times handshakes

Replies are listed 'Best First'.
Re^2: Insert the 4th TCP packet after TCP three-times handshakes
by jacques (Priest) on May 04, 2005 at 04:26 UTC
    it also has the whiff of potential naughtiness

    Oh, great. Republicans have made it in here, too.

      Pardonnez? I vote a straight-Pogo ticket. ;-)

      I also happen to do network security, which involves paranoia and concepts like, "trust, but verify." I've requested verification, and will be happy to support the node if I see some. In the absence of verification, I will consider witholding my trust.

Re^2: Insert the 4th TCP packet after TCP three-times handshakes
by shanleiguang (Initiate) on May 08, 2005 at 02:59 UTC
    Okay, firstly sorry to my poor english.

    (1).TCP three-times handshakes: A( SYN, ISN_A ) -> B A <- B( SYN/ACK, ISN_B/ACK_AISN_A+1 ) A( SYN/ACK, ACK_A/ACK_BISN_B+1 ) -> B Socket API 'connect()' just does the 3times handshakes. 'sleep(1)' is to sure that sniffer child is running. In sniffer child, only captures the related packets, it's object is to get the ISN_B of this connection. After the handshakes is over, pack a packet to B and inject it into the connection. And if you don't want the connection closed, you must pack a correct packet to A too. (2).Blind handshakes If the ISN of B is predicted. You can capture ISNs of each connection and analyst the numbers. For example, the ISN of B is not change anytime. A - i B - you, ISN will not change. C - he I: A(src_ip:C, SYN, ISN_Cany) -> B II: C <- B(dest_ip:C, SYN/ACK, ISN_B/ACK_CISN_C+1 ) if C is active: III: C(dest_ip:B, RST) -> B if C is not active: IV: A(src_ip:C, SYN/ACK, ACK_C/ACK_BISN_B+1 ) -> B If i can 'see' the packet II(for example, C and A are in the same network), i can get the ISN_B correctly. And if the C is not alive, i can generate the packet IV to complete the 3times handshakes from C->B. And if i can not 'see' the packet II(C is not in my networks and not in my HUB/Switch device), i could guess the ISN_B as before analyst. This is called ip spoof. ... It's an old tcp game.
    -------------------------- I 4m jU$t A $cRipt /<iddi3

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://453790]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-25 22:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found