SlideShare a Scribd company logo
Tuesday, October 1, 13
2FAC:Facebook’sinternalmulti-
factorauthplatform
C O N F I D E N T I A L
FacebookSecurity
Tuesday, October 1, 13
Agenda
Attacks-AForceforChange
2FACAuthentication
Questions?
Tuesday, October 1, 13
Facebook - Big Numbers
1.15B monthly active users
699M daily active users (80+% outside US)
5K+ employees
Tuesday, October 1, 13
Identifying weakest points
Red Teams
Incident 1: Spear phishing OWA
Incident 2: Breach identified in January
Tuesday, October 1, 13
Red Team Drills - Identify weak points
Tuesday, October 1, 13
Incident: Spear Phishing OWA
Tuesday, October 1, 13
Incident: Spear Phishing OWA
Tuesday, October 1, 13
Incident: Breach discovered in Jan 2013
digitalinsight-ltd
Tuesday, October 1, 13
Incident: Breach discovered in Jan 2013
Tuesday, October 1, 13
Goal: Protect against remote attackers
•DisruptLateralMovementphase
•Ensurelocaluserisatkeyboard
•LimitoriginofillegitimateSSHaccess
Non-goal: Protect against local attackers
Why 2Fac for SSH?
Tuesday, October 1, 13
•Facebookculture:MoveFast
•Intolerantofslowdown
•Highlyskilledatfindingworkarounds
•PrimarilyworkviaSSHondevservers
Engineering @ FB
Tuesday, October 1, 13
•Facebookculture:MoveFast
•Intolerantofslowdown
•Highlyskilledatfindingworkarounds
•PrimarilyworkviaSSHondevservers
Goal:Makebeingsecureeffortless
Engineering @ FB
Tuesday, October 1, 13
State of Multi-Factor
Tuesday, October 1, 13
•Easytouse
•Goodinteroperability
•Synchronizationiseasy
•Timewindowsofacceptance
•Onlygoodforinfrequentuse
Time-based
Tuesday, October 1, 13
•Easytouse
•Goodinteroperability
•Getsoutofsync
•Mosttokensdesignedforinfrequentuse
OTP
Tuesday, October 1, 13
•Limiteddevicesupport
•Securitylimitations
•Falseacceptance
•Replay
•PracticalProblems:Howtobiometricauthtoremotemachine?
•Poorusability
Biometrics
Tuesday, October 1, 13
PKI
•Limiteddevicesupport
•Enrollmentispainful
•Managementispainful
•SmartCardProxyattack
PKI
Tuesday, October 1, 13
•Easytosetup
•Easytouse
•Push(onlyonsomedevices)
•Requiresfast,reliableonlinechannel
•Usabilityisgoodonlyforinfrequentuse
OOB / Mobile
Tuesday, October 1, 13
Tuesday, October 1, 13
•Usability
•SupportVeryFrequentuse
•Flexibleoptions
•Security
•Requirestrongerauthenticationforeverysession
•FastDeployment
•Minimalsupportoverhead
Building it Better
Tuesday, October 1, 13
•DuoSecurity+YubikeyNano
•FlexibleOptions
•Lowoperationaloverhead
•Provisioningprocessoutofthebox
•Yubikeyisawesomeforfrequentuse
•Bonus:Backuptokensfromthestart
The Solution
Tuesday, October 1, 13
Deployment: Planning
Tuesday, October 1, 13
•HowisSSHbeingused?
•Thousandsofengineers
•Tensofthousandsofsessionsperday
•Peakuserswith>3000sessions
•Usingallauthenticationmechanisms
Deployment: Planning
Tuesday, October 1, 13
•HowisSSHbeingused?
•Thousandsofengineers
•Tensofthousandsofsessionsperday
•Peakuserswith>3000sessions
•Usingallauthenticationmechanisms
•Whataretheydoing?
Deployment: Planning
Tuesday, October 1, 13
•HowisSSHbeingused?
•Thousandsofengineers
•Tensofthousandsofsessionsperday
•Peakuserswith>3000sessions
•Usingallauthenticationmechanisms
•Whataretheydoing?
sshd[87820]: Accepted keyboard-interactive/pam for twt from ::1 port 51317 ssh2
sshd[87820]: User child is on pid 87825
sshd[87825]: Received disconnect from ::1: 11: disconnected by user
Deployment: Planning
Tuesday, October 1, 13
•Adddetailsaboutwhattheuserisdoing
sshd[27587]: Accepted publickey for ::1 port 61447 ssh2
sshd[27587]: User child is on pid 27589
sshd[27589]: Exec Request for user twt with command uname -a
sshd[8540]: Accepted publickey for twt from ::1 port 50654 ssh2
sshd[8540]: User child is on pid 8548
sshd[8548]: Allocated pty /dev/pts/18 for user twt session 0
sshd[8548]: Shell Request for user twt
sshd[8548]: Received disconnect from ::1: 11: disconnected by user
Improving SSH Logs: First Attempt
Tuesday, October 1, 13
•Adddetailsaboutwhattheuserisdoing
sshd[27587]: Accepted publickey for ::1 port 61447 ssh2
sshd[27587]: User child is on pid 27589
sshd[27589]: Exec Request for user twt with command uname -a
sshd[8540]: Accepted publickey for twt from ::1 port 50654 ssh2
sshd[8540]: User child is on pid 8548
sshd[8548]: Allocated pty /dev/pts/18 for user twt session 0
sshd[8548]: Shell Request for user twt
sshd[8548]: Received disconnect from ::1: 11: disconnected by user
•Problem:requiresmultipleloglineswithdifferentPIDsforanalysis
Improving SSH Logs: First Attempt
Tuesday, October 1, 13
•AddsessionizationdatatoSSHlogs
sshd[27587]: Accepted publickey for ::1 port 61447 ssh2 session=dev123:52369e5a.c6786
sshd[27587]: User child is on pid 27589 session=dev123:52369e5a.c6786
sshd[27589]: Exec Request for user twt with command uname -a session=dev123:52369e5a.c6786
sshd[8540]: Accepted publickey for twt from ::1 port 50654 ssh2 session=dev123:5236a24d.3f32
sshd[8540]: User child is on pid 8548 session=dev123:5236a24d.3f32
sshd[8548]: Allocated pty /dev/pts/18 for user twt session 0 session=dev123:5236a24d.3f32
sshd[8548]: Shell Request for user twt session=dev123:5236a24d.3f32
sshd[8548]: Received disconnect from ::1: 11: disconnected by user session=dev123:5236a24d.3f32
Sesssionizing SSH Logs
Tuesday, October 1, 13
•Whataretheydoing?
•SFTP
•Randomscripts
•TRAMPmode
•Lotsofshells
•Usingeveryauthenticationmechanism
SSH Usage Analysis
Tuesday, October 1, 13
Deployment: Implementation
Tuesday, October 1, 13
•OpenSSH6.2-supportformultipleAuthMethods
•Publickey,kerberos,passwordarefirstfactors
•Duoissecondfactor
Deployment: Implementation
Tuesday, October 1, 13
•OpenSSH6.2-supportformultipleAuthMethods
•Publickey,kerberos,passwordarefirstfactors
•Duoissecondfactor
•Problem:passwordandDuoarebothhandledbykeyboard-interactiveauth
method
Deployment: Implementation
Tuesday, October 1, 13
•OpenSSH6.2-supportformultipleAuthMethods
•Publickey,kerberos,passwordarefirstfactors
•Duoissecondfactor
•Problem:passwordandDuoarebothhandledbykeyboard-interactiveauth
method
•Solutions:
•Submethodsforkeyboard-interactive/{pam,duo}inOpenSSH6.2p1
•KerberosAuthenticationyes
Deployment: Implementation
Tuesday, October 1, 13
Handling SFTP
Tuesday, October 1, 13
•Clientsdon’tsupportmultipleauthmechanisms
Handling SFTP
Tuesday, October 1, 13
•Clientsdon’tsupportmultipleauthmechanisms
•Primarysecurityconcern:
•Singlefactorcommandexecution
Handling SFTP
Tuesday, October 1, 13
•Clientsdon’tsupportmultipleauthmechanisms
•Primarysecurityconcern:
•Singlefactorcommandexecution
•Solution:
•SinglefactorSFTPchroot
Handling SFTP
Tuesday, October 1, 13
Handling scripts + TRAMP mode
Tuesday, October 1, 13
•SwitchtouseSFTPsolution?
Handling scripts + TRAMP mode
Tuesday, October 1, 13
•SwitchtouseSFTPsolution?
•Primarysecurityconcern:
•Singlefactorcommandexecution
Handling scripts + TRAMP mode
Tuesday, October 1, 13
•SwitchtouseSFTPsolution?
•Primarysecurityconcern:
•Singlefactorcommandexecution
•Solution:
•SSHwhitelists
Handling scripts + TRAMP mode
Tuesday, October 1, 13
•SwitchtouseSFTPsolution?
•Primarysecurityconcern:
•Singlefactorcommandexecution
•Solution:
•SSHwhitelists
•Newproblem:
• REGEX:sh	
  -­‐c	
  "cd	
  (~/|w)(((?<!..)/)|((?<!/).)|[w_-­‐])+	
  &&	
  grep	
  -­‐P	
  '[^']+t'	
  tags	
  |	
  head	
  -­‐n	
  10"
Handling scripts + TRAMP mode
Tuesday, October 1, 13
•Keyboardlayouts
•Explodingcomputers
•Possessedyubikeys
•Accidentaldischarge
•Clientsshconfigproblems
•NeedmoarUSBports
•Enrollmentissues
Unexpected Issues
Tuesday, October 1, 13
•more2Fac:
•sudo
•SSHalternatives:mosh,VNC,NX
•privescpoints
•replace/supplementothermulti-factorsolutions
•2Faceverywhere
•Getridofcommandwhitelists
•MakeSFTPclients supportmulti-factor
Ongoing Work
Tuesday, October 1, 13
FacebookSecurity
Tuesday, October 1, 13

More Related Content

PDF
OWASP – Internet of Things (IoT) – Top 10 Vulnerabilities List
PDF
The net is dark and full of terrors - James Bennett
PDF
OSINT tools for security auditing with python
PDF
DEFCON 20 (2012) – Tenacious Diggity – 29July2012 – Slides.PDF
PPTX
Introduction to Dynamic Malware Analysis ...Or am I "Cuckoo for Malware?"
PPTX
Tcpdump hunter
PDF
Two-factor Authentication
PDF
3 reasons your business can't ignore Two-Factor Authentication
OWASP – Internet of Things (IoT) – Top 10 Vulnerabilities List
The net is dark and full of terrors - James Bennett
OSINT tools for security auditing with python
DEFCON 20 (2012) – Tenacious Diggity – 29July2012 – Slides.PDF
Introduction to Dynamic Malware Analysis ...Or am I "Cuckoo for Malware?"
Tcpdump hunter
Two-factor Authentication
3 reasons your business can't ignore Two-Factor Authentication

Viewers also liked (19)

PPT
Jasig Central Authentication Service in Ten Minutes
PDF
Google Authenticator, possible attacks and prevention
PDF
2013.devcon3 liferay and google authenticator integration rafik_harabi
PDF
Two factor authentication-in_your_network_e_guide
PDF
Two Factor Authentication and You
PDF
SSO using CAS + two-factor authentication (PyGrunn 2014 talk)
PPTX
Seminar-Two Factor Authentication
PPT
Simple Two Factor Authentication
PDF
Securing Your Salesforce Deployment with Two Factor Authentication
PDF
THOR Apt Scanner
PDF
2 factor authentication 3 [compatibility mode]
PDF
Combat the Latest Two-Factor Authentication Evasion Techniques
PPTX
Two Factor Authentication: Easy Setup, Major Impact
PPTX
Plex Systems EECS 441 Company Presentation
PDF
Duo Security Company Presentation
PDF
Лучшие практики Continuous Delivery с Docker / Дмитрий Столяров (Флант)
PDF
Instant Single Sign-On and Two-Factor Authentication
PPTX
Two factor authentication presentation mcit
PPT
Facebook Presentation
Jasig Central Authentication Service in Ten Minutes
Google Authenticator, possible attacks and prevention
2013.devcon3 liferay and google authenticator integration rafik_harabi
Two factor authentication-in_your_network_e_guide
Two Factor Authentication and You
SSO using CAS + two-factor authentication (PyGrunn 2014 talk)
Seminar-Two Factor Authentication
Simple Two Factor Authentication
Securing Your Salesforce Deployment with Two Factor Authentication
THOR Apt Scanner
2 factor authentication 3 [compatibility mode]
Combat the Latest Two-Factor Authentication Evasion Techniques
Two Factor Authentication: Easy Setup, Major Impact
Plex Systems EECS 441 Company Presentation
Duo Security Company Presentation
Лучшие практики Continuous Delivery с Docker / Дмитрий Столяров (Флант)
Instant Single Sign-On and Two-Factor Authentication
Two factor authentication presentation mcit
Facebook Presentation
Ad

More from Yandex (20)

PDF
Предсказание оттока игроков из World of Tanks
PDF
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...
PDF
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров Яндекса
PDF
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров Яндекса
PDF
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...
PDF
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...
PDF
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...
PDF
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...
PDF
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...
PDF
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...
PDF
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...
PDF
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...
PDF
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеров
PDF
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...
PDF
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...
PDF
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...
PDF
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...
PDF
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...
PDF
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...
PDF
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...
Предсказание оттока игроков из World of Tanks
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров Яндекса
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров Яндекса
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеров
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...
Ad

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
MYSQL Presentation for SQL database connectivity
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Encapsulation theory and applications.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
cuic standard and advanced reporting.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Spectral efficient network and resource selection model in 5G networks
Unlocking AI with Model Context Protocol (MCP)
CIFDAQ's Market Insight: SEC Turns Pro Crypto
MYSQL Presentation for SQL database connectivity
NewMind AI Monthly Chronicles - July 2025
Chapter 3 Spatial Domain Image Processing.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Encapsulation theory and applications.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Machine learning based COVID-19 study performance prediction
Building Integrated photovoltaic BIPV_UPV.pdf

"2Fac: Facebook's internal multi-factor authentication". Tim Tickel, Chad Greene, Facebook