Controling Segment Contents in TCP Stream

From: Crist J. Clark (crist.clark_at_attbi.com)
Date: 06/11/03

  • Next message: Marc Sherman: "RE: Controling Segment Contents in TCP Stream"
    Date: Wed, 11 Jun 2003 10:52:04 -0700
    To: pen-test@securityfocus.com
    
    

    I am looking for a simple tool that I can use to control how TCP data
    is split up among segments. I can't seem to figure out how to coax
    Netcat into doing this.

    What I am trying to do is mess with some firewall/proxy software by
    screwing with (unfounded) assumptions it makes about the contents of
    individual packets. For example, I am seeing some Widely Used
    Commercial Firewall Software choke when an FTP client sends a packet
    containing just,

      "USER "

    That is, U, S, E, R, and a space. The next segment carries the rest of
    the line,

      "anonymous\r\n"

    Now, since TCP is a stream-oriented protocol, this is actually
    perfectly acceptable behavior. The TCP stack of the server will handle
    this just fine, and the FTP server software will see the perfectly
    Standard-compliant input,

      "USER anonymous\r\n"

    At the other end.

    This is an old and well known problem with firewall/proxies, yet we
    see it all of the time. The problem I am having is finding a tool that
    lets me easily control the data in each segement of the TCP
    stream. I've manually crafted some packets with hping2 to do some
    testing, but it is a huge PITA to build the whole SYN/SYN-ACK/ACK
    handshake each time. Can anyone recommend a tool or show me how to get
    Netcat to do this? Or am I going to have to build something myself or
    hack Netcat code?

    Since this is a well known issue, I was hoping someone already had
    done the work and made it available. Thanks.

    -- 
    Crist J. Clark                     |     cjclark@alum.mit.edu
                                       |     cjclark@jhu.edu
    http://people.freebsd.org/~cjc/    |     cjc@freebsd.org
    ---------------------------------------------------------------------------
    ----------------------------------------------------------------------------
    

  • Next message: Marc Sherman: "RE: Controling Segment Contents in TCP Stream"

    Relevant Pages

    • Re: Broken TCP/IP packets
      ... it a single transaction. ... packets are broken in parts. ... You cannot expect TCP to give you pakets on the remote end the way you ... segments to what ever degree seems good to get a good performance. ...
      (comp.arch.embedded)
    • Re: Broken TCP/IP packets
      ... it a single transaction. ... packets are broken in parts. ... You cannot expect TCP to give you pakets on the remote end the way you ... segments to what ever degree seems good to get a good performance. ...
      (comp.arch.embedded)
    • Re: Broken TCP/IP packets
      ... it a single transaction. ... packets are broken in parts. ... You cannot expect TCP to give you pakets on the remote end the way you ... segments to what ever degree seems good to get a good performance. ...
      (comp.arch.embedded)
    • Re: why the ip packet size is too small
      ... Keeping in mind that "fragment" has particular meaning in the context ... of IP datragams - when IP is given a datagram that is larger than the ... TCP, on the other hand, does segmentation of the data it is presented ... TCP segments that fit in the MTU. ...
      (comp.os.linux.networking)
    • Re: embedded gigabit ethernet
      ... That's why TCP is reliable after all. ... > bandwidth the number of not yet acked segments will be impressive. ... > your aquiered data there is no way around local buffering. ... with a strictly local link. ...
      (comp.arch.embedded)