classifying encrypted traffic with tls-aware telemetry€¦ · blake anderson, david mcgrew, and...

24
Blake Anderson, David McGrew, and Alison Kendler [email protected] , [email protected] , [email protected] FloCon 2016 Classifying Encrypted Traffic with TLS- aware Telemetry

Upload: others

Post on 08-Aug-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

Blake Anderson, David McGrew, and Alison [email protected], [email protected], [email protected]

FloCon 2016

Classifying Encrypted Traffic with TLS-aware Telemetry

Page 2: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

• “I need to understand traffic even when it is encrypted”• Malware detection• Application identification

• “I need to understand how crypto is being used on my network”• Weak crypto algorithms and/or key sizes• Vulnerable cryptographic library detection• The ports where TLS shows up

Problem Statement

00.05

0.10.15

0.20.25

0.3

Port

Non-443 Malicious TLS

Page 3: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

• Our solution is to gather additional, TLS-aware telemetry.

• This solution:• Could be baked into a flow telemetry exporting device• Can be run in a VM off a SPAN port (with our open source package)

• Passive monitoring is used to gather all data.• Not costly or difficult to deploy (as opposed to MITM solution)

Solution

Page 4: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

TLS-aware Telemetry Data TypesClient Server

Client Hello

Server Hello / Certificate

Client Key Exchange / Change Cipher Spec

Application Data

Change Cipher Spec

TLS Version, Offered Ciphersuites, TLS Extensions

Selected Ciphersuite

Client Key Length

Sequence of Record Lengths, Times, and Types

Page 5: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

Cisco Confidential 5© 2013-2014 Cisco and/or its affiliates. All rights reserved.

Malware Detection

Page 6: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

• Malware is making use of TLS to communicate.• We observed that 7-13% of malware communication is over TLS

• Traditional IPS/IDS signatures fail.• Malicious communication is encrypted

• We leverage TLS-aware telemetry for malware classification.• Increases classification accuracy• Reduces false positives

Malware Detection

Page 7: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

TLS Versions

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

TLS 1.2 TLS 1.1 TLS 1.0 SSL 3.0

TLS Versions in Use

DMZ

Malware

Page 8: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

Ciphersuites

00.10.20.30.40.50.60.70.80.9

Recommended Legacy AvoidCiphersuite Security Category

Offered Ciphersuites

DMZ

Malware

00.10.20.30.40.50.60.70.80.9

1

Recommended Legacy AvoidCiphersuite Security Category

Selected Ciphersuites

DMZ

Malware

Page 9: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

TLS Extensions

00.10.20.30.40.50.60.70.80.9

1

TLS Extension Hex Code

Percentage of TLS Flows that Use Each Extension

DMZ

Malware

Page 10: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

Client Key Lengths

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

520 2048 776 1024 4096 768 512 1016 3072Key Size (bits)

Client Key Length

DMZ

Malware

Page 11: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

• Malware• September 2015 pcaps from ThreatGRID• TLS (443) traffic, > 100 in and out bytes• 26,404 flows, Telemetry enhanced with TLS extensions, ciphersuites, and client key lengths

• Benign• traffic taken from a large enterprise DMZ• TLS (443) traffic, > 100 in and out bytes• 50,848 flows, Telemetry enhanced with TLS extensions, ciphersuites, and client key lengths

• 10-fold CV

Test Setup

Page 12: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

• SPLT – Sequence of Packet Lengths and Arrival Times

• Byte Distribution• Relative frequency for each byte in a flow

• traditional: sp, dp, prot, ib, ip, ob, op, dur

Telemetry Data Types

src dst

Page 13: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

• L1-logistic regression

• SPLT + 7-tuple + BD

• L1-logistic regression

• SPLT + 7-tuple + BD + TLS

Results

Page 14: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

• L1-logistic regression

• SPLT + 7-tuple + BD• 172.2 non-zero parameters• 0.01 FDR: 0.1%• Total Accuracy: 96.1%

• L1-logistic regression

• SPLT + 7-tuple + BD + TLS• 138.1 non-zero parameters• 0.01 FDR: 90.4%• Total Accuracy: 99.7%

Results

Page 15: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

Cisco Confidential 15© 2013-2014 Cisco and/or its affiliates. All rights reserved.

Crypto Audit

Page 16: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

• We observe what cryptography is being used in TLS (same principles can be applied to SSH, IPsec, etc.).• Who is using weak crypto on my network?

• We infer the version of the cryptographic library in use.• Initial results with OpenSSL• Vulnerable implementations, not active attacks

• We passively monitor traffic, no active probing.

Crypto Audit

Page 17: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

Client Key Lengths (DMZ)

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

520 2048 776 1024 4096 768 512 1016 3072Key Size (bits)

TLS Client Key Lengths

Page 18: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

Selected Ciphersuites (DMZ)

0

0.05

0.1

0.15

0.2

0.25

0.3

c02f c028 0035 c02b c014 c030 0004 c013 002f c027hex code

Selected Ciphersuites

Page 19: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

OpenSSL Similarity Matrix

0.9.8

1.0.0

1.0.1

1.0.2

Page 20: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

TLS Extensions

0.9.8

1.0.0

1.0.1

1.0.2

TLS Extensions by Default

Page 21: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

Heartbleed

0.9.8

1.0.0

1.0.1

1.0.2

TLS pad extension to fixTLS hang bug

Page 22: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

logjam

0.9.8

1.0.0

1.0.1

1.0.2

Removed the exportciphers from the DEFAULT ciphers

Page 23: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

• TLS-aware telemetry provides a passive monitoring approach for:• Improved malware classification• The ability to audit an enterprise network’s crypto usage

• TLS-aware telemetry is a relatively light weight system compared to MITM solutions or full packet capture.

• joy (our open source package) currently implements the described functionality (https://github.com/davidmcgrew/joy).

Benefits of TLS-awareness

Page 24: Classifying Encrypted Traffic with TLS-aware Telemetry€¦ · Blake Anderson, David McGrew, and Alison Kendler. blaander@cisco.com, mcgrew@cisco.com, alkendle@cisco.com FloCon 2016

Cisco Confidential 24© 2013-2014 Cisco and/or its affiliates. All rights reserved.

Thank You