Docsity

Packet Level Misadventures - Computer Network - Lecture Slides, Slides of Computer Networks

Partial preview of the text

Download Packet Level Misadventures - Computer Network - Lecture Slides and more Slides Computer Networks in PDF only on Docsity!

BLACK OPS OF TCP/IP

Spliced NAT2NAT And Other

Packet-Level Misadventures

Where I’m Coming From…

  • Black Hat / DefCon 0x7D
    • Impossible Tunnels through Improbable Networks with OpenSSH - Getting Out: ProxyCommands for Non-TCP comm layers - HTTP, SOCKS, UDP, Packet Radio, AIM/Yahoo - Coming In: Active Connection Brokering for NAT2NAT - One host exports SSHD to broker - Other host imports access from broker - Passing Through: Dynamic Forwarding for Psuedo-VPN Work - Web Browsing, Dialpad(Split-H323), etc.

On Possibility

  • Restraint Free Engineering
    • “Abandon All Practicality, Ye Who Enter Here”
    • “It’s amazing what you can do once security is no longer a concern.”
  • You’ve got what you’ve got. Make interesting things

happen.

  • It might end up practical.
  • It might end up secure.
  • Right now, it’s impossible. Fix that first.
    • Maybe.

On Packet Structure

  • Packets are “strangely ordered”
    • Where it’s ending up next, where it came from recently, how it’s hopping from one place to the next, how it’s hopping to its final destination, checksum, where the packet came from originally, where it’s going to end up, what app it came from, what app it’s going to, checksum, god knows what, ANOTHER checksum
  • Why not sort everything; put all the “came from” and

“going to’s” Why so much redundancy? Isn’t it

inefficient?

  • WHO CARES?

Error Recovery Per Layer

  • Layer 2 (Point to Point)
    • Errors are quickly recoverable, but error generation can occur at same layer as layer control - Data is destroyed and recreated each frame
    • Corporate Fertilizer
  • Layer 3 (Router to Router)
    • Many more sources of personally irrelevant error
    • Highest Traffic Link
    • Data is modulated – minimum change possible
  • Layer 4 (End to End)
    • Lowest traffic, highest personal relevance
    • Errors here actually matter
  • This slide intentionally left blank

TCP (and UDP)

Connection Traits: Ports

  • Local Port: What application requested the connection.

Usually a random number, 0-65535.

  • 0 is a valid port
  • Remote Port: What application accepted the connection.

Usually a “known number”

  • 80 for HTTP
  • 143 for IMAP
  • 443 for HTTP/SSL
  • IP handles who we’re talking to; Ports handle what we

want from them

TCP Connection Traits: Sequences

• Sequence Numbers

  • 32 bit number, randomly generated, must be

reflected by the opposite party in a TCP

handshake

  • After initial reflection, used to relay information

about successful packet acquisition

Stateless Pulse Scanning

  • Instant Portscan
    • “Is it possible to discover instantaneously what network services have been made available, even on massive networks?”
  • Answer: Yes, practically, even securely
    • Separate scanner and listener processes
    • Sending
      • Directly send n SYN packets
      • Same local port
      • SYN cookies
    • Receiving
      • Kernel filter packets arriving to local port
      • Record connection phase: Port up(SYN|ACK) or host up, port down(RST|ACK)

Issue: Spoofed Responses

• Easy to spoof hosts being up if the scanner

isn’t tracking who (or how it scanned)

• Solution: Invert SYN Cookies!

Implementation: Scanrand 1.

• Element of: Paketto Keiretsu

• 384 lines of libnet and libpcap, w/ trivial MD

include

  • No state stored
  • Scans at ~11-20mbit
  • Possibly even portable

• 100% complete, release imminent

Implications

  • Userspace manipulation of packets can lead to less
overhead
  • Kernels are optimized to talk to other hosts, not simply to scan them
  • Packet content can be overloaded
  • A random field can always be replaced with encrypted data (and vice versa)
  • This is the heart of kleptography
  • Elegant solutions sometimes can be reapplied elsewhere
  • SYN(really SYN|ACK) cookies made SYN reception more efficient
  • Inverse SYN cookies make SYN transmission more efficient

Layer Redundancy

  • L2: Broadcast MAC Address
    • FF:FF:FF:FF:FF:FF
    • Absolute
  • L3: Broadcast IP Address
    • Last IP of Subnet
    • Relative
    • Sending to it is known as a Directed Broadcast
      • Often blocked, if it can be detected
      • Detection can be…suppressed.