+ All Categories
Transcript
Page 1: "Defending the Bird". Justin Collins, Alex Smolen, Twitter
Page 2: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Defending the Bird

Product Security Engineering at Twitter

Alex Smolen (@alsmola)

Justin Collins (@presidentbeef)

YAC, Moscow, 2013

Page 3: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

What does it mean to “Defend the Bird”?

Page 4: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

500+ million Tweets a day

Hyper-growth

2000+ employees around the world

200+ million daily active users

Page 5: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Twitter as the global town square.

Page 6: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

3 floors~700 employees

1 floor~100 employees

5+ floors~2000+ employees

Page 7: "Defending the Bird". Justin Collins, Alex Smolen, Twitter
Page 8: "Defending the Bird". Justin Collins, Alex Smolen, Twitter
Page 9: "Defending the Bird". Justin Collins, Alex Smolen, Twitter
Page 10: "Defending the Bird". Justin Collins, Alex Smolen, Twitter
Page 11: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

https://twitter.com

Page 27: "Defending the Bird". Justin Collins, Alex Smolen, Twitter
Page 28: "Defending the Bird". Justin Collins, Alex Smolen, Twitter
Page 29: "Defending the Bird". Justin Collins, Alex Smolen, Twitter
Page 30: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

We are 1 out of 100 engineers.

Page 31: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

We can’t do everything.

Page 32: "Defending the Bird". Justin Collins, Alex Smolen, Twitter
Page 33: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Automation

Code review

Security features

Page 34: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Automating Security

Avoid tedious tasks

Catch issues early

Notify right people

Page 35: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

We need a central location where information is collected and transferred.

Page 36: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Static analysisDynamic analysisInternal metrics

Page 37: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

How do we let developers know when they check in bad code?

Page 38: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Brakeman

Static analysis for Rails

Needs infrastructure for integration

Reports to SADB

Page 39: "Defending the Bird". Justin Collins, Alex Smolen, Twitter
Page 40: "Defending the Bird". Justin Collins, Alex Smolen, Twitter
Page 41: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Coffee Break

Javascript static analysis

Catch DOM-based XSS

Reports to SADB

Page 42: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Phantom Gang

Dynamic HTTP scanning

Specific, not full scan

Reports to SADB

Page 43: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

We manually review what slips through the cracks.

Page 44: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Code Reviews

Code goes through a review system

Security is automatically added to sensitive reviews

Security can be manually added to any review

Page 45: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Accountability

Email when there are new reviews

Dashboard of pending reviews

Once a month clean sweep

Page 46: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Teams request security reviews through a self-service form.

Page 47: "Defending the Bird". Justin Collins, Alex Smolen, Twitter
Page 48: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Security features

Page 49: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Two-factor authentication

Something we’ve wanted to build for a long time

Designed and implemented by the product security team

How do you build a robust yet simple solution?

Page 50: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

SMS-based two-factor

Send a six digit code the user

Requires a temporary password to sign in to other apps and devices

Page 51: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Native two-factor

Client has a private/public keypair

Signs request sent by server over push, which has public key

One-tap sign in

Page 52: "Defending the Bird". Justin Collins, Alex Smolen, Twitter
Page 53: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Two-factor challenges

Happy case is easy, sad case is hard

Doesn’t deal with many-to-many account access

People can’t manage their own keys

Page 54: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Twitter was one of the first major

services to require 100% SSL.

Page 55: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

HTTP Strict Transport Security

How do you bootstrap?

Tells browser not to use HTTP

Sub-domains, CDNs, mobile

Page 56: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Certificate pinning

Implemented in mobile apps, Chrome

Only one certificate is valid

Also working on TACK

Page 57: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

ECDHE

SSL mode with perfect forward secrecy

Ephemeral keys used for conversations

Page 58: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

We need to build security in to our custom frameworks.

Page 61: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

The bird is big, and we’re small.

Page 62: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

We use tools to accomplish more.

Page 63: "Defending the Bird". Justin Collins, Alex Smolen, Twitter

Top Related