48
Deep Packet Inspection Challenges in a Transport Network Artyom Gavrichenkov <[email protected]> GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7 94bc 4d08 9191

Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

  • Upload
    ngothu

  • View
    221

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

Deep Packet Inspection Challengesin a Transport Network

ArtyomGavrichenkov<[email protected]>

GPG:2deb97b10a3c151db67f1ee500e794bc4d089191

Page 2: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

Qrator Traffic Filtering Network

A global anycast network for traffic filteringand DDoS mitigation

Each point of presence:•A properly chosen generic hardware•A custom-built DPI software

Page 3: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

Qrator Traffic Filtering Network

A 8 years experience in:•DPI appliance design•DPI R&D•Deployment and integration:• ISP networks• Enterprise networks

Page 4: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

Qrator Traffic Filtering Network

The main purpose is availability

• Traffic analysis•Monitoring and provisioning• DDoS mitigation

Page 5: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

DDoS Mitigation

L3:L4-6:

L7:

simple traffic filtering,complex network scanning and mapping

A full OSI stack traffic analysis

simple flow assessment,complex aspects of TCP/TLS edge cases

complex session analysis, simple Big Data tooling

(haha, not really)

Page 6: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

“L7 Packet Filtering”

An assumption:

“a simple packet-based analysis is just enough to tell malicious intent from a legitimate one,L3-L7-wise”

Page 7: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

“L7 Packet Filtering”

This is convenient.

• Computational complexity• Implied unreliability of sec. appliances• SPAN, Netflow/IPFIX

Page 8: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

“L7 Packet Filtering”

This is convenient approach,contradicting the nature of TCP/IP layering.

It was theoretically vulnerableeven in the age of cleartext.

Page 9: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

“L7 Packet Filtering”

This is convenient approach,contradicting the nature of TCP/IP layering.

It was theoretically vulnerableeven in the age of cleartext.

Page 10: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

GoodbyeDPI

https://github.com/ValdikSS/GoodbyeDPI

Page 11: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

GoodbyeDPI

• IP ID Analysis•TCP Fragmentation•HTTP Header Mangling

Page 12: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

GoodbyeDPI

• IP ID Analysis•TCP Fragmentation•HTTP Header Mangling

•Game over for most of DPI deployed by ISP

Page 13: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7
Page 14: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7
Page 15: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

“L7 Packet Filtering”

This is convenient approach,contradicting the nature of TCP/IP layering.

It was theoretically vulnerableeven in the age of cleartext.

Page 16: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

With heavy TLS and PFS deploymenthappening recently,

packet-based approach is helplesseven for the means of DDoS mitigation.

Page 17: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

Perfect Forward Secrecy

•Present in ephemeral Diffie-Hellman ciphers•Mandatory in TLS v1.3•Makes out-of-path analysis impossible•Makes historic data analysis impossible

Page 18: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

Perfect Forward Secrecy

Good catch for an out-of-path DPI and/or WAF

70% HTTPS requests come and go without analysis

Page 19: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

Perfect Forward Secrecy

Good catch for an out-of-path DPI and/or WAF

70% HTTPS requests come and go without analysis60% legitimate90% malicious

Page 20: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

The Purpose of DPI

Page 21: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

The Purpose of DPI

• DDoS mitigation(enough said already)• General QoS and shaping• Parental control

Page 22: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

The Purpose of DPI

• DDoS mitigation(enough said already)• General QoS and shaping• Parental control

• Targeted advertisement• Copyright abuse

countermeasures• Lawful interception and

filtering of unwanted content

(no matter the definition of “unwanted”)

Page 23: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

The Purpose of DPI

• DDoS mitigation(enough said already)• General QoS and shaping• Parental control

• Targeted advertisement• Copyright abuse

countermeasures• Lawful interception and

filtering of unwanted content

(no matter the definition of “unwanted”)

Page 24: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

The Purpose of DPI

• DDoS mitigation(enough said already)• General QoS and shaping• Parental control

• Targeted advertisement• Copyright abuse

countermeasures• Lawful interception and

filtering of unwanted content

(no matter the definition of “unwanted”)

Page 25: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

Catastrophic backtracking

•RegEx over every single packet

Page 26: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

Catastrophic backtracking

•RegEx over every single packet

O(n2) behaviour!

https://blog.codinghorror.com/regex-performance/

(x+x+)+yxxxxxxxxxxxxxxxxxxxxxxxxxxxx...x

Page 27: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

DPI Caveats

A DPI is commonly believed to be a silver bullet,

a sort of products, supposedly availablefor purchase and deployment,

designed to handle every DPI goal out there.

Page 28: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

DPI Caveats

A DPI is commonly believed to be a silver bullet,

designed to handle every DPI goal out there.

In reality, DPI is just a common characteristicsof a broad range of solutions,each designed to handle a single DPI goal

Page 29: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

In reality, DPI is just a common characteristicsof a broad range of solutions,each designed to handle a single DPI goal

A single piece of equipmentwon’t cope with every DPI goal

A DPI is commonly believed to be a silver bullet,

designed to handle every DPI goal out there.

Page 30: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

Even with a single goal,

there’s a trade-offbetween the packet processing speed

and the expected functionalityto a certain extent.

Page 31: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

Network design: transparent IP network

•VoIP•Gaming•Overlay networks

Page 32: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

Network design: transparent IP network

•VoIP•Gaming•Overlay networks

•Enterprise VPN•Modern Web:

HTTP/2, MPTCP, QUIC…

•Modern Net:TLS v1.3, DNSSEC, CAA…

Page 33: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

DPI breaks this transparency.

Network design: transparent IP network

Page 34: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

The outcome

Page 35: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

The outcome

•Several importantapplications suffer

(slides by Eric Rescorla, http://tinyurl.com/tls13ietf99 )

Page 36: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

The outcome

•Several importantapplications suffer•Others adapt

Page 37: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

• ENOG 13: the ISP Security Roundtable• It takes up to 4-6 months

to deploy an updated network firmwareeven in case of a vulnerability discovered

An Arms Race

Page 38: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

4-6 months

• 2-3 monthson the vendor sidealone.

Page 39: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

4-6 months

• 2-3 monthson the vendor sidealone.

• 2-3 months more to roll out the update all across the IP network.

Page 40: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

An Arms Race

• It takes up to 4-6 monthsto deploy an updated network firmware.

• A modern application(including, but not limited to IoT and malware)

makes heavy use of the CI/CD approach,enabling it to roll out a new release several times a day.

Page 41: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

An Arms Race

• It takes up to 4-6 monthsto deploy an updated network firmware.

• A modern application(including, but not limited to IoT and malware)

makes heavy use of the CI/CD approach,enabling it to roll out a new release several times a day.

Page 42: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

An Arms Race is lost at that point.

• It takes up to 4-6 monthsto deploy an updated network firmware.

• A modern application(including, but not limited to and malware)

makes heavy use of the CI/CD approach,enabling it to roll out a new release several times a day.

Page 43: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

The Day after Tomorrow

• A packet-based DPI is unsufficientIt has its regions of applicability though – it’s when you’re fine with 80/20 rule:• Parental control• Simple QoS• Targeted advertisement• General lawful interception and copyright enforcement

• A session-based DPI is vulnerablewhen neither a client nor a server is under the DPI vendor control

The implied heavy computational complexityrenders a DPI unable to transparently handleevery new network activity in time, as it goes.

Page 44: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

Security Considerations

• DPI: complex solution• Security awareness of

vendors?• FinFisher spyware as a PoC• The risk and the implied

loss potential are beyond imagination(i.e. a “futurological congress” scale)

Page 45: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

Therightwayforanetworkentity,destinedtobuildsomenon-transparentsolutionsinamiddleofIPtransportnetwork,

Page 46: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

Therightwayforanetworkentity,destinedtobuildsomenon-transparentsolutionsinamiddleofIPtransportnetwork,istojoinRIPE,IETF,andICANN activitiesinordertoclarifytherequirementsandtobuildanetworksolutionthatwillsurvivethedayaftertomorrow.

Page 47: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

Therightwayforanetworkentity,destinedtobuildsomenon-transparentsolutionsinamiddleofIPtransportnetwork,istojoinRIPE,IETF,andICANN activitiesinordertoclarifytherequirementsandtobuildanetworksolutionthatwillsurvivethedayaftertomorrow.

Eitherthis,oranunreliableIPtransport,ad-hocapplications,andaninherentinstabilityofthecore infrastructure.

Page 48: Deep Packet Inspection Challenges in a Transport Network · PDF fileDeep Packet InspectionChallenges in a Transport Network Artyom Gavrichenkov GPG: 2deb 97b1 0a3c 151d b67f 1ee5 00e7

Q&A

ArtyomGavrichenkov<[email protected]>