Peer-to-Peer Systems and Security



Similar documents
A Measurement of NAT & Firewall Characteristics in Peer to Peer Systems

NAT and Firewall Traversal with STUN / TURN / ICE

Bootstrapping P2P VPN

NAT Traversal for VoIP. Ai-Chun Pang Graduate Institute of Networking and Multimedia Dept. of Comp. Sci. and Info. Engr. National Taiwan University

Peer-to-Peer Networks Hole Punching 7th Week

Firewall Defaults, Public Server Rule, and Secondary WAN IP Address

Voice-Over-IP. Daniel Zappala. CS 460 Computer Networking Brigham Young University

Internet Protocol: IP packet headers. vendredi 18 octobre 13

Firewall Defaults and Some Basic Rules

MINIMUM NETWORK REQUIREMENTS 1. REQUIREMENTS SUMMARY... 1

Developing P2P Protocols across NAT

VegaStream Information Note Considerations for a VoIP installation

NAT and Firewall Traversal with STUN / TURN / ICE

What I am going to talk about. NAT IPSec and NAT Proxy, Reverse proxy P2P Firewall

How will the Migration from IPv4 to IPv6 Impact Voice and Visual Communication?

VoIP and NAT/Firewalls: Issues, Traversal Techniques, and a Real-World Solution

TECHNICAL CHALLENGES OF VoIP BYPASS

How NAT-Compatible Are VoIP Applications?

About Firewall Protection

Компјутерски Мрежи NAT & ICMP

A Brief Overview of VoIP Security. By John McCarron. Voice of Internet Protocol is the next generation telecommunications method.

NetScaler carriergrade network

Outline. CSc 466/566. Computer Security. 18 : Network Security Introduction. Network Topology. Network Topology. Christian Collberg

How To Use A Phone Over Ip (Phyto) For A Phone Call

BroadCloud PBX Customer Minimum Requirements

IPv4 and IPv6 Integration. Formation IPv6 Workshop Location, Date

Firewalls P+S Linux Router & Firewall 2013

Best Practices for Controlling Skype within the Enterprise. Whitepaper

NAT/Firewall traversal:issues and solutions

White Paper. McAfee Multi-Link. Always-on connectivity with significant savings

SIP (Session Initiation Protocol) Technical Overview. Presentation by: Kevin M. Johnson VP Engineering & Ops

NAT Traversal in SIP. Baruch Sterman, Ph.D. Chief Scientist David Schwartz Director, Telephony Research

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

Hosted Voice. Best Practice Recommendations for VoIP Deployments

Multi-Link - Firewall Always-on connectivity with significant savings

NAT Tutorial. Dan Wing, IETF78, Maastricht July 25, 2010

Transport and Network Layer

The Ecosystem of Computer Networks. Ripe 46 Amsterdam, The Netherlands

Peer-to-Peer Communication Across Network Address Translators

HOSTED VOICE Bring Your Own Bandwidth & Remote Worker. Install and Best Practices Guide

Multimedia Communication in the Internet. SIP: Advanced Topics. Dorgham Sisalem, Sven Ehlert Mobile Integrated Services FhG FOKUS

Internet Security. Prof. Anja Feldmann, Ph.D.

SIP: NAT and FIREWALL TRAVERSAL Amit Bir Singh Department of Electrical Engineering George Washington University

An Examination of the Firewall/NAT Problem, Traversal Methods, and Their Pros and Cons

Application Delivery Networking

LifeSize Transit Deployment Guide June 2011

ENUM: Migrating to VoIP. P2P Voice Applications

Virtual private network. Network security protocols VPN VPN. Instead of a dedicated data link Packets securely sent over a shared network Internet VPN

OpenScape Business V2

Chapter 3 Security and Firewall Protection

NAT TCP SIP ALG Support

Network Considerations for IP Video

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

Review: Lecture 1 - Internet History

Network layer" 1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! goals: "

A Scalable Multi-Server Cluster VoIP System

An Analysis of the Skype Peer-to-Peer Internet Telephony Protocol

UIP1868P User Interface Guide

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

IP addressing and forwarding Network layer

Skype network has three types of machines, all running the same software and treated equally:

Security vulnerabilities in the Internet and possible solutions

Chapter 12 Supporting Network Address Translation (NAT)

nexvortex SIP Trunking Implementation & Planning Guide V1.5

Federal Computer Incident Response Center (FedCIRC) Defense Tactics for Distributed Denial of Service Attacks

Network Address Translation (NAT) Adapted from Tannenbaum s Computer Network Ch.5.6; computer.howstuffworks.com/nat1.htm; Comer s TCP/IP vol.1 Ch.

ICS 351: Today's plan. IP addresses Network Address Translation Dynamic Host Configuration Protocol Small Office / Home Office configuration

Enabling NAT and Routing in DGW v2.0 June 6, 2012

Datagram-based network layer: forwarding; routing. Additional function of VCbased network layer: call setup.

Deploying Secure Enterprise Wide IP Videoconferencing Across Virtual Private Networks

VLAN und MPLS, Firewall und NAT,

Virtual Private Network Using Peer-to-Peer Techniques

Firewalls. Chien-Chung Shen

Secure VoIP for optimal business communication

We will give some overview of firewalls. Figure 1 explains the position of a firewall. Figure 1: A Firewall

Voice over IP Communications

Carrier Grade NAT. Requirements and Challenges in the Real World. Amir Tabdili Cypress Consulting

Network: several computers who can communicate. bus. Main example: Ethernet (1980 today: coaxial cable, twisted pair, 10Mb 1000Gb).

How To Understand The Purpose Of A Sip Aware Firewall/Alg (Sip) With An Alg (Sip) And An Algen (S Ip) (Alg) (Siph) (Network) (Ip) (Lib

Multi-Homing Security Gateway

SIP and VoIP 1 / 44. SIP and VoIP

Network Security. Marcus Bendtsen Institutionen för Datavetenskap (IDA) Avdelningen för Databas- och Informationsteknik (ADIT)

Network Convergence and the NAT/Firewall Problems

Goal We want to know. Introduction. What is VoIP? Carrier Grade VoIP. What is Meant by Carrier-Grade? What is Meant by VoIP? Why VoIP?

Application Notes for Avaya IP Office 7.0 Integration with Skype Connect R2.0 Issue 1.0

Presentation_ID. 2001, Cisco Systems, Inc. All rights reserved.

Network and Services Discovery

VoIP Impairment, Failure, and Restrictions

Ethernet. Ethernet. Network Devices

SIP OVER NAT. Pavel Segeč. University of Žilina, Faculty of Management Science and Informatics, Slovak Republic

SIP : Session Initiation Protocol

Transcription:

Peer-to-Peer Systems and Security Network Address Translation Christian Grothoff Technische Universität München April 8, 2013 Freedom of connection with any application to any party is the fundamental social basis of the Internet. And now, is the basis of the society built on the Internet. Tim Berners-Lee

Network Address Translation Why NAT? IPv4 address shortage private network / firewall

Network Address Translation Why is NAT relevant for P2P networks? common type of middlebox Many variations in the specific implementation IP violation creates issues for TCP, UDP, ICMP, SCTP,... Problems: classification, detection, traversal, application impact

Network Address Translation Why is NAT relevant for P2P networks? common type of middlebox Many variations in the specific implementation IP violation creates issues for TCP, UDP, ICMP, SCTP,... Problems: classification, detection, traversal, application impact Thousands of papers (Google Scholar gives 1 million results for network address translation )

Network Address Translation: Classification A well-known classification scheme uses: Full-cone NAT (Address)-restricted-cone NAT Port-restricted cone NAT Symmetric NAT

Full-Cone NAT NAT 2 Server 1 Client 1 3 Server 2

Address-restricted NAT NAT 2 Server 1 Client 1 3 Server 2

Port- and Address-restricted NAT NAT 2 Server 1 Client 1 Server 2

Symmetric NAT NAT Server 1 Client Server 2

General Properties for NAT Which fields have to match for the NAT to map a packet from the outside? How long do mappings last? Does the NAT track the TCP session state? How does the NAT select the external port? (port preservation, linear, random) What happens with multiple inside devices using the same source port? How are errors (TCP RST, ICMP) processed? Which protocols (UDP, TCP, ICMP, SCTP, IPSec) are supported?

NAT hair-pinning Client 2 3 NAT 2 Client 1? Server 1

NAT Protocol Translation (NAT-PT) NAT-PT can be used to translate from IPv4 to IPv6 (or vice versa),

NAT Protocol Translation (NAT-PT) NAT-PT can be used to translate from IPv4 to IPv6 (or vice versa), but... IP options missmatch ICMP code missmatch DNS return values need to be translated (DNS-ALG)

Problems with NAT NAT breaks the end-to-end principle! Global IP unknown to local software Incoming connections not possible Protocols may include (LAN) addresses in WAN traffic payload Communication becomes difficult Particularly bad if both peers are behind NAT

Example: SIP

SIP Payload

Simple solutions NATed peer initiates connection (Gnutella s PUSH) Require super peers to not be behind NAT, limit all-to-all communication to super peers Use common ports (80, 443) to get past firewall rules

NAT Traversal [5] Explicit support by the NAT (Static port forwarding, UPnP, NAT-PMP, ALG) NAT-behaviour based approaches (Hole punching, STUN [4]) External data-relay (TURN [1]) Autonomous NAT Traversal [2]

DNAT / PMP / UPnP DNAT / port forwarding allows inbound connections

DNAT / PMP / UPnP DNAT / port forwarding allows inbound connections Port Mapping Protocol (PMP) allows LAN applications to request DNAT entries and discover external IP

DNAT / PMP / UPnP DNAT / port forwarding allows inbound connections Port Mapping Protocol (PMP) allows LAN applications to request DNAT entries and discover external IP UPnP is an insane protocol, that (among other things) also allows applications to request DNAT entries and determine external IP Both usually fail for cascaded NATs, and are often disabled for security reasons

Application Layer Gateway (ALG) implemented by NAT common protocols that include addresses: SIP, FTP, IRC NAT may or may not support it!

Application Layer Gateway (ALG) implemented by NAT common protocols that include addresses: SIP, FTP, IRC NAT may or may not support it! Idea: use pretend FTP to open port for non-ftp applications! [6]

Session Traversal Utilities for NAT (STUN) Determines external transport address (IP + port) Lightweight client-server protocol on top of UDP Algorithm to discover NAT type (server needs 2 public IPs) STUN server can also act as rendezvous point

STUN Algorithm

STUN for Rendezvous and Hole Punching

UDP hole punching with ICMP Unreachable H1 MB1 Hop MB2 H2 exchange endpoints through 3rd party endpoints UDP (lost) ICMP port unreachable UDP (payload) UDP (payload)

UDP hole punching with ICMP TTL exceeded H1 MB1 Hop MB2 H2 exchange endpoints through 3rd party endpoints UDP (low TTL, lost) ICMP TTL exceeded UDP (payload) UDP (payload)

Example: UDP-based traversal Given a NAT that preserves ports for UDP with external address natip, this can suffice: nat/1 $ nc -u -l -p 20000 client$ watch echo "hello" nc -p 5000 -u natip 20000 -w 1 nat/2 $ echo hello nc -p 20001 -u clientip 5000 If UDP hole punching is used, how could a STUN server launch a MitM attack?

TCP hole punching with RST H1 MB1 Hop MB2 H2 exchange endpoints through 3rd party endpoints TCP SYN TCP RST TCP SYN TCP SYN / ACK TCP ACK

TCP hole punching with ICMP TTL H1 MB1 Hop MB2 H2 exchange endpoints through 3rd party endpoints TCP SYN (low TTL) ICMP TTL exceeded TCP SYN TCP SYN / ACK TCP ACK

Autonomous NAT Traversal 1.2.3.4 2 Non-NAT Host 1 NAT Host

Autonomous NAT Traversal: discussion Enables initiation of connections to hosts behind NAT without involving a third party at the time. + Simpler to implement + Efficient, completely distributed method + Third party can not observe connections + Works well for UDP and TCP - Does not work as often as techniques involving 3rd party

Using UDP instead of ICMP ECHO REQUEST + No RAW sockets required for sending periodic requests + Might help punch hole - Slightly bigger messages - Smaller response payload (32 bits only) - May fail if NAT remaps ports

NAT Traversal Summary There are many non-trivial methods for NAT traversal: Explicit support by the NAT (Static port forwarding, UPnP, NAT-PMP, ALG) NAT-behaviour based approaches (Hole punching, STUN) External data-relay (TURN) Autonomous NAT Traversal None of these is perfect, NAT traversal usually uses a combination of techniques (see ICE [3]).

Network Neutrality Phone system design: Quality-of-service for voice (provisioned bandwidth) Payment models: charges based on source and destination (country, mobile / landline / service numbers) caller-pays

Network Neutrality Phone system design: Quality-of-service for voice (provisioned bandwidth) Payment models: charges based on source and destination (country, mobile / landline / service numbers) caller-pays callee-pays

Network Neutrality Phone system design: Quality-of-service for voice (provisioned bandwidth) Payment models: charges based on source and destination (country, mobile / landline / service numbers) caller-pays callee-pays everybody-pays: {roaming-, per-call-, monthly service-, directory listing-, phone number-, caller-id-, billing-...} charges

Network Neutrality Phone system design: Quality-of-service for voice (provisioned bandwidth) Payment models: charges based on source and destination (country, mobile / landline / service numbers) caller-pays callee-pays everybody-pays: {roaming-, per-call-, monthly service-, directory listing-, phone number-, caller-id-, billing-...} charges Internet design: best-effort IP forwarding, agnostic to source, destination and payload

Network Neutrality Phone system design: Quality-of-service for voice (provisioned bandwidth) Payment models: charges based on source and destination (country, mobile / landline / service numbers) caller-pays callee-pays everybody-pays: {roaming-, per-call-, monthly service-, directory listing-, phone number-, caller-id-, billing-...} charges Internet design: best-effort IP forwarding, agnostic to source, destination and payload Payment model? DARPA!

Paradoxes in Phones Systems Alice can call Bob for free (flatrate), but Bob pays to call Alice ( call me back, please? )

Paradoxes in Phones Systems Alice can call Bob for free (flatrate), but Bob pays to call Alice ( call me back, please? ) Calling mobile phones in the US costs the callee, but calling mobile phones in Europe costs the caller

Paradoxes in Phones Systems Alice can call Bob for free (flatrate), but Bob pays to call Alice ( call me back, please? ) Calling mobile phones in the US costs the callee, but calling mobile phones in Europe costs the caller Phone companies charge where they can, not where it makes technical sense!

Ideas for Internet Surcharges

Ideas for Internet Surcharges Global IP address (IPv4, IPv6)

Ideas for Internet Surcharges Global IP address (IPv4, IPv6) Incoming connections

Ideas for Internet Surcharges Global IP address (IPv4, IPv6) Incoming connections non-http traffic

Ideas for Internet Surcharges Global IP address (IPv4, IPv6) Incoming connections non-http traffic Using Voice-over-IP

Ideas for Internet Surcharges Global IP address (IPv4, IPv6) Incoming connections non-http traffic Using Voice-over-IP Downloading videos

Ideas for Internet Surcharges Global IP address (IPv4, IPv6) Incoming connections non-http traffic Using Voice-over-IP Downloading videos Accessing Google (advanced search) in addition to Bing (basic search)

Ideas for Internet Surcharges Global IP address (IPv4, IPv6) Incoming connections non-http traffic Using Voice-over-IP Downloading videos Accessing Google (advanced search) in addition to Bing (basic search) Accessing non-european service providers

Ideas for Internet Surcharges Global IP address (IPv4, IPv6) Incoming connections non-http traffic Using Voice-over-IP Downloading videos Accessing Google (advanced search) in addition to Bing (basic search) Accessing non-european service providers Using UDP

Ideas for Internet Surcharges Global IP address (IPv4, IPv6) Incoming connections non-http traffic Using Voice-over-IP Downloading videos Accessing Google (advanced search) in addition to Bing (basic search) Accessing non-european service providers Using UDP Privacy (not selling your connection data)

Ideas for Internet Surcharges Global IP address (IPv4, IPv6) Incoming connections non-http traffic Using Voice-over-IP Downloading videos Accessing Google (advanced search) in addition to Bing (basic search) Accessing non-european service providers Using UDP Privacy (not selling your connection data)

Have you read your ISP s terms of service?

Have you read your ISP s terms of service? Would your friends understand such restrictions?

Have you read your ISP s terms of service? Would your friends understand such restrictions? Would enough of them care to switch providers?

Have you read your ISP s terms of service? Would your friends understand such restrictions? Would enough of them care to switch providers? Can they switch providers?

Have you read your ISP s terms of service? Would your friends understand such restrictions? Would enough of them care to switch providers? Can they switch providers? Should business models be regulated?

Creative Methods

Creative Methods Sell low-latency plan to service providers Micosoft pays for 50 ms Bing, Google gets 5s penalty latency

Creative Methods Sell low-latency plan to service providers Micosoft pays for 50 ms Bing, Google gets 5s penalty latency Give customers illusion of speed Prefer traffic to URLs with speedtest in them

Creative Methods Sell low-latency plan to service providers Micosoft pays for 50 ms Bing, Google gets 5s penalty latency Give customers illusion of speed Prefer traffic to URLs with speedtest in them Reduce quality of VoiP calls via artifical drops Force customers to pay extra for voice service

Creative Methods Sell low-latency plan to service providers Micosoft pays for 50 ms Bing, Google gets 5s penalty latency Give customers illusion of speed Prefer traffic to URLs with speedtest in them Reduce quality of VoiP calls via artifical drops Force customers to pay extra for voice service Reduce bandwidth for P2P traffic Entice users to pay for services

Can we detect such creative methods?

Can we detect such creative methods? How can we circumvent them?

Can we detect such creative methods? How can we circumvent them? Can enough of society understand the problem?

Can we detect such creative methods? How can we circumvent them? Can enough of society understand the problem? Will society establish laws to ward against this?

Questions?? Just as we are beginning to see the power that free resources produce, changes in the architecture of the Internet both legal and technical are sapping the Internet of this power. Fueled by bias in favor of control, pushed by those whose financial interest favor control, our social and political institutions are ratifying changes in the Internet that will reestablish control, in turn, reduce innovation on the Internet and in society generally. Lawrence Lessig

References R. Mahy, P. Matthews, and J. Rosenberg. Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN). RFC 5766 (Proposed Standard), April 2010. Andreas Müller, Nathan Evans, Christian Grothoff, and Samy Kamkar. Autonomous nat traversal. In 10th IEEE International Conference on Peer-to-Peer Computing (IEEE P2P 2010), pages 61 64, 2010. J. Rosenberg. Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal for Offer/Answer Protocols. RFC 5245 (Proposed Standard), April 2010. Updated by RFC 6336. J. Rosenberg, R. Mahy, P. Matthews, and D. Wing. Session Traversal Utilities for NAT (STUN). RFC 5389 (Proposed Standard), October 2008. P. Srisuresh, B. Ford, and D. Kegel. State of Peer-to-Peer (P2P) Communication across Network Address Translators (NATs). RFC 5128 (Informational), March 2008. M. Wander, S. Holzapfel, A. Wacker, and T. Weis. Ntalg - tcp nat traversal with application-level gateways. In Consumer Communications and Networking Conference (CCNC), 2012 IEEE, pages 46 47, 2012.