SlideShare a Scribd company logo
Stanford ACM Tech Talk
                Jan 2013




     All Rights Reserved | Copyright 2011
Agenda


•   TrialPay Overview

•   Securing Your Startup: Basics

•   Two-Factor Authentication for VPN

•   Two-Factor Authentication for SSHD

•   Credit Card Vault




                                    All Rights Reserved | Copyright 2011   2
TrialPay is a transactional advertising company

     TrialPay presents consumers with relevant promotions before, during, and after
  transactions -- creating a network that allows our clients to gain access to millions of
            new customers and monetize their current visitors more effectively




                                    All Rights Reserved | Copyright 2011                     3
Tracking online promotions to sales in-store via card-loaded offers



 1 Promotion                   2 Tracking                              3 Purchase                  4 Reward




Promote offline offers:     Users activate online:                 Track offline: Offer         Reward user: We credit
Offers promoted across      Users activate offers by               redemptions tracked in-      user with their reward
the web, mobile, & social   submitting credit or debit             store via registered card    (e.g. statement
media (incl. TrialPay       card                                   to attribute online source   credit, virtual currency, gift
network of 300M+ users)                                                                         card) upon offer
                                                                                                completion




                                              All Rights Reserved | Copyright 2011                                         4
Example user registration flow – Credit Card Form




                         All Rights Reserved | Copyright 2011
Agenda


•   TrialPay Overview

•   Securing Your Data: Basics

•   Two-Factor Authentication for VPN

•   Two-Factor Authentication for SSHD

•   Credit Card Vault




                                 All Rights Reserved | Copyright 2011   6
Getting Started



•   Google Apps Two-Factor Authentication (2FA)

•   Amazon Web Services 2FA and ACLs

•   Secure Wireless Network – per-user certs

•   HTTPS for everything




                                 All Rights Reserved | Copyright 2011   7
Passwords




            Reference: http://xkcd.com/936/
                 All Rights Reserved | Copyright 2011
Passwords (cont’d)



•   14-character password minimums, but more never hurts!

    •   Basic GPU can crack 16B passwords per second

•   Make sure shadow files are configured correctly (e.g. crypt-sha512, not default
    DES or md5, 50K rounds)

    •   GOOD:
        $6$rounds=50000$usesomesillystri$D4IrlXatmP7rx3P3InaxBeoomnAihCKRVQP22JZ6E
        Y47Wc6BkroIuUUBOov1i.S5KPgErtP/EN5mcO.ChWQW21

    •   BAD: $1$DaqXb3sb$m84WH8wkxBVl2WvZQboia.:13530:0:99999:7:::




                                       All Rights Reserved | Copyright 2011           9
Agenda


•   TrialPay Overview

•   Securing Your Data: Basics

•   Two-Factor Authentication for VPN

•   Two-Factor Authentication for SSHD

•   Credit Card Vault




                                 All Rights Reserved | Copyright 2011   10
2FA for VPN – Standard VPN Login




   1) Connect to VPN Client                                          2) Enter Credentials




    3) VPN Device                                                    4) Inside the VPN!
    Authenticates
                              All Rights Reserved | Copyright 2011                          11
2FA for VPN – Traditional 2FA


•   Traditional solutions use tokens (hardware, Google Authenticator, text messages)

•   Unintuitive input of token (concatenate with password)

•   IT burden

•   Hassle for end-user accessing VPN multiple times per day

•   Wouldn’t it be nice to leverage existing security mechanism?




                                   All Rights Reserved | Copyright 2011          12
2FA for VPN – Enter Google Apps!


•   User 1-click visits a Google App Engine hosted site https://xxxxxxxx.trialpay.com
    which auto-logs you in on browsers where you already read your Google Apps
    email.

•   This page just shows a 60 second timer for the user to complete the rest of the
    VPN login process.




                                   All Rights Reserved | Copyright 2011               13
2FA for VPN – Technical Details


•   Google App Engine – python script to get username from Google Apps and
    create 60-second memcache key




•   Auth Server – add Perl script to authorize with Google App Engine site




•   Reference: http://enginerds.trialpay.com/2013/01/08/leveraging-google-apps-email-to-set-up-two-factor-authentication



                                                     All Rights Reserved | Copyright 2011                                  14
Agenda


•   TrialPay Overview

•   Securing Your Data: Basics

•   Two-Factor Authentication for VPN

•   Two-Factor Authentication for SSHD

•   Credit Card Vault




                                 All Rights Reserved | Copyright 2011   15
2FA for SSHD – Background


•   For bastion / entrypoint servers into network, passwords by themselves are
    insufficient

•   Tokens are viable, but introduce complexity / hassle

•   SSH keys are convenient for developers

•   Passphrase-protected SSH keys are encouraged and can suffice for 2FA, but SSHD
    cannot enforce passphrase-usage

•   SSHD supports multiple authentication schemes, but they cannot be enforced
    simultaneously




                                   All Rights Reserved | Copyright 2011          16
2FA for SSHD – ForceCommand to the rescue!

•   /etc/ssh/sshd_config




•   sshd_gatekeeper.sh
    •   IP whitelisting

    •   Send intrusion alerts

    •   Don’t forget to actually check the password!

•   Reference: http://enginerds.trialpay.com/2012/07/24/dual-factor-authentication-for-sshd/




                                                     All Rights Reserved | Copyright 2011      17
Agenda


•   TrialPay Overview

•   Securing Your Data: Basics

•   Two-Factor Authentication for VPN

•   Two-Factor Authentication for SSHD

•   Credit Card Vault




                                 All Rights Reserved | Copyright 2011   18
Credit Card Vault


•   Best practice is to insulate sensitive credit card data from rest of system in a
    secure “vault”

•   Vault has two major services: tokenizer and proxy




                                     All Rights Reserved | Copyright 2011              19
Credit Card Vault – Tokenizer


                    1       Browser                                   2
  App server                                                              Vault
                            CC #
                    4       CVV                                       3

                                                      submit



    1.   HTML form is served from App server

    2.   The information provided by the user is sent directly to the vault by
         the browser (running JavaScript code from App)

    3.   The vault issues a token that maps to the credit card number

    4.   The browser sends the token and other non-sensitive information to
         App server

                               All Rights Reserved | Copyright 2011
Credit Card Vault – API request proxy


                           1                                               2
                                                                               3rd party
  App server                                 Vault
                                                                                i.e. Visa
                           4                                               3
   • This assumes that 3rd party service’s API is HTTP based
   • Vault acts as a HTTP proxy with token to CC number translation


   1.   App server sends a HTTP request via Vault
         GET /auth?cc=token:1234&amount=4.00
         Host: api.visa.com
   2.   Vault substitutes token:1234 with real CC number and relays the request to Visa
         GET /auth?cc=4444000012344321&amount=4.00
         Host: api.visa.com
   3. Visa processes the transaction and responds with a transaction id
   4. Vault passes Visa’s response back to app
                                    All Rights Reserved | Copyright 2011
Credit Card Vault – Key Encryption


•   Encrypt cardholder data using highest-grade standards (e.g. AES-256)

•   Standard mechanism is to use a global key
    •   But what if key is compromised?

•   Instead take a multi-layer approach
    •   Master key + per-card key

    •   Cardholder data stored in one DB

    •   Per-card keys stored in another DB (and managed by a separate team)




                                           All Rights Reserved | Copyright 2011   22
Credit Card Vault – Token Generation


•   Token = 64-bit unique id, maps to cardholder data

•   Exposing last 4 CC digits in app is common use case, try encoding into token, e.g.
    •   Token: 1304274640000970420
    •   Last 4: 0742

•   Even though cardholder data cannot be reverse engineered based on token,
    better safe than sorry! Encrypt token in response back to app server.
    •   payload = {“token” => “1234”, “info1” => “abc”, “info2” => “def”}
    •   message = {“payload” => aes_encrypt(payload), “aes_iv” => “09...AF” }
    •   output(json_encode(message))




                                         All Rights Reserved | Copyright 2011       23
Credit Card Vault – Other things to consider


•   2FA to physically access datacenter (password + handscan)

•   Additional firewall layer in front of CC Vault

•   Backups stored remotely for disaster recovery




                                   All Rights Reserved | Copyright 2011   24
Thank You!


•   We’re Hiring!

•   Eddie Lim (eddie@trialpay.com)




                                 All Rights Reserved | Copyright 2011   25

More Related Content

What's hot

Introduction to Public Key Infrastructure
Introduction to Public Key InfrastructureIntroduction to Public Key Infrastructure
Introduction to Public Key Infrastructure
Theo Gravity
 
Apache Milagro Presentation at ApacheCon Europe 2016
Apache Milagro Presentation at ApacheCon Europe 2016Apache Milagro Presentation at ApacheCon Europe 2016
Apache Milagro Presentation at ApacheCon Europe 2016
Brian Spector
 
Digital signature & PKI Infrastructure
Digital signature & PKI InfrastructureDigital signature & PKI Infrastructure
Digital signature & PKI Infrastructure
Shubham Sharma
 
Digital Certificates and Secure Web Access
Digital Certificates and Secure Web AccessDigital Certificates and Secure Web Access
Digital Certificates and Secure Web Access
bluntm64
 
Smart Card Authentication
Smart Card AuthenticationSmart Card Authentication
Smart Card AuthenticationDan Usher
 
Null talk
Null talkNull talk
Null talk
Agam Jain
 
Public key Infrastructure (PKI)
Public key Infrastructure (PKI)Public key Infrastructure (PKI)
Public key Infrastructure (PKI)
Venkatesh Jambulingam
 
Impact of digital certificate in network security
Impact of digital certificate in network securityImpact of digital certificate in network security
Impact of digital certificate in network security
rhassan84
 
OpenID Connect - An Emperor or Just New Cloths?
OpenID Connect - An Emperor or Just New Cloths?OpenID Connect - An Emperor or Just New Cloths?
OpenID Connect - An Emperor or Just New Cloths?
Oliver Pfaff
 
Pki for dummies
Pki for dummiesPki for dummies
Pki for dummies
Alex de Jong
 
PKI and Applications
PKI and ApplicationsPKI and Applications
PKI and ApplicationsSvetlin Nakov
 
Two factor authentication-in_your_network_e_guide
Two factor authentication-in_your_network_e_guideTwo factor authentication-in_your_network_e_guide
Two factor authentication-in_your_network_e_guideNick Owen
 
Ch12 Cryptographic Protocols and Public Key Infrastructure
Ch12 Cryptographic Protocols and Public Key InfrastructureCh12 Cryptographic Protocols and Public Key Infrastructure
Ch12 Cryptographic Protocols and Public Key Infrastructure
Information Technology
 
Seminar ppt on digital signature
Seminar ppt on digital signatureSeminar ppt on digital signature
Seminar ppt on digital signature
jolly9293
 
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tk
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tkOAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tk
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tkNov Matake
 
Digital certificates
Digital certificates Digital certificates
Digital certificates Sheetal Verma
 
Understanding Digital Certificates & Secure Sockets Layer
Understanding Digital Certificates & Secure Sockets LayerUnderstanding Digital Certificates & Secure Sockets Layer
Understanding Digital Certificates & Secure Sockets Layer
CheapSSLUSA
 
Authentication techniques
Authentication techniquesAuthentication techniques
Authentication techniques
IGZ Software house
 

What's hot (20)

Introduction to Public Key Infrastructure
Introduction to Public Key InfrastructureIntroduction to Public Key Infrastructure
Introduction to Public Key Infrastructure
 
Apache Milagro Presentation at ApacheCon Europe 2016
Apache Milagro Presentation at ApacheCon Europe 2016Apache Milagro Presentation at ApacheCon Europe 2016
Apache Milagro Presentation at ApacheCon Europe 2016
 
Digital signature & PKI Infrastructure
Digital signature & PKI InfrastructureDigital signature & PKI Infrastructure
Digital signature & PKI Infrastructure
 
Digital Certificates and Secure Web Access
Digital Certificates and Secure Web AccessDigital Certificates and Secure Web Access
Digital Certificates and Secure Web Access
 
Smart Card Authentication
Smart Card AuthenticationSmart Card Authentication
Smart Card Authentication
 
Null talk
Null talkNull talk
Null talk
 
Final ppt ecommerce
Final ppt ecommerceFinal ppt ecommerce
Final ppt ecommerce
 
Public key Infrastructure (PKI)
Public key Infrastructure (PKI)Public key Infrastructure (PKI)
Public key Infrastructure (PKI)
 
Impact of digital certificate in network security
Impact of digital certificate in network securityImpact of digital certificate in network security
Impact of digital certificate in network security
 
OpenID Connect - An Emperor or Just New Cloths?
OpenID Connect - An Emperor or Just New Cloths?OpenID Connect - An Emperor or Just New Cloths?
OpenID Connect - An Emperor or Just New Cloths?
 
PKI by Tim Polk
PKI by Tim PolkPKI by Tim Polk
PKI by Tim Polk
 
Pki for dummies
Pki for dummiesPki for dummies
Pki for dummies
 
PKI and Applications
PKI and ApplicationsPKI and Applications
PKI and Applications
 
Two factor authentication-in_your_network_e_guide
Two factor authentication-in_your_network_e_guideTwo factor authentication-in_your_network_e_guide
Two factor authentication-in_your_network_e_guide
 
Ch12 Cryptographic Protocols and Public Key Infrastructure
Ch12 Cryptographic Protocols and Public Key InfrastructureCh12 Cryptographic Protocols and Public Key Infrastructure
Ch12 Cryptographic Protocols and Public Key Infrastructure
 
Seminar ppt on digital signature
Seminar ppt on digital signatureSeminar ppt on digital signature
Seminar ppt on digital signature
 
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tk
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tkOAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tk
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tk
 
Digital certificates
Digital certificates Digital certificates
Digital certificates
 
Understanding Digital Certificates & Secure Sockets Layer
Understanding Digital Certificates & Secure Sockets LayerUnderstanding Digital Certificates & Secure Sockets Layer
Understanding Digital Certificates & Secure Sockets Layer
 
Authentication techniques
Authentication techniquesAuthentication techniques
Authentication techniques
 

Similar to TrialPay Security Tech Talk at Stanford ACM

Web authentication
Web authenticationWeb authentication
Web authenticationPradeep J V
 
2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET Core
2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET Core2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET Core
2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET Core
Vladimir Bychkov
 
TrustBearer - Virginia Security Summit - Web Authentication Strategies - Apri...
TrustBearer - Virginia Security Summit - Web Authentication Strategies - Apri...TrustBearer - Virginia Security Summit - Web Authentication Strategies - Apri...
TrustBearer - Virginia Security Summit - Web Authentication Strategies - Apri...
TrustBearer
 
CIS 2015 Extreme OpenID Connect - John Bradley
CIS 2015 Extreme OpenID Connect - John BradleyCIS 2015 Extreme OpenID Connect - John Bradley
CIS 2015 Extreme OpenID Connect - John Bradley
CloudIDSummit
 
How to write secure code
How to write secure codeHow to write secure code
How to write secure code
Flaskdata.io
 
2022 APIsecure_Why Assertion-based Access Token is preferred to Handle-based ...
2022 APIsecure_Why Assertion-based Access Token is preferred to Handle-based ...2022 APIsecure_Why Assertion-based Access Token is preferred to Handle-based ...
2022 APIsecure_Why Assertion-based Access Token is preferred to Handle-based ...
APIsecure_ Official
 
Introduction to Web Security
Introduction to Web SecurityIntroduction to Web Security
Introduction to Web Security
Kamil Lelonek
 
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
Brian Campbell
 
Adaptive Payments SDK - Magento Developers Paradise
Adaptive Payments SDK - Magento Developers ParadiseAdaptive Payments SDK - Magento Developers Paradise
Adaptive Payments SDK - Magento Developers Paradise
PayPal
 
Let's get started with passwordless authentication using windows hello in you...
Let's get started with passwordless authentication using windows hello in you...Let's get started with passwordless authentication using windows hello in you...
Let's get started with passwordless authentication using windows hello in you...
Chris Ryu
 
HTTP Services & REST API Security
HTTP Services & REST API SecurityHTTP Services & REST API Security
HTTP Services & REST API Security
Taiseer Joudeh
 
Mobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patternsMobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patterns
Pieter Ennes
 
De la bonne utilisation de OAuth2
De la bonne utilisation de OAuth2 De la bonne utilisation de OAuth2
De la bonne utilisation de OAuth2
Leonard Moustacchis
 
Spring4 security oauth2
Spring4 security oauth2Spring4 security oauth2
Spring4 security oauth2
Sang Shin
 
CIS13: Introduction to OAuth 2.0
CIS13: Introduction to OAuth 2.0CIS13: Introduction to OAuth 2.0
CIS13: Introduction to OAuth 2.0
CloudIDSummit
 
Securing Microservices in Hybrid Cloud
Securing Microservices in Hybrid CloudSecuring Microservices in Hybrid Cloud
Securing Microservices in Hybrid Cloud
VMware Tanzu
 
Secured REST Microservices with Spring Cloud
Secured REST Microservices with Spring CloudSecured REST Microservices with Spring Cloud
Secured REST Microservices with Spring Cloud
Orkhan Gasimov
 
CIS 2015 OpenID Connect and Mobile Applications - David Chase
CIS 2015 OpenID Connect and Mobile Applications - David ChaseCIS 2015 OpenID Connect and Mobile Applications - David Chase
CIS 2015 OpenID Connect and Mobile Applications - David Chase
CloudIDSummit
 
Creating a Sign On with Open id connect
Creating a Sign On with Open id connectCreating a Sign On with Open id connect
Creating a Sign On with Open id connect
Derek Binkley
 
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...
Vladimir Bychkov
 

Similar to TrialPay Security Tech Talk at Stanford ACM (20)

Web authentication
Web authenticationWeb authentication
Web authentication
 
2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET Core
2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET Core2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET Core
2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET Core
 
TrustBearer - Virginia Security Summit - Web Authentication Strategies - Apri...
TrustBearer - Virginia Security Summit - Web Authentication Strategies - Apri...TrustBearer - Virginia Security Summit - Web Authentication Strategies - Apri...
TrustBearer - Virginia Security Summit - Web Authentication Strategies - Apri...
 
CIS 2015 Extreme OpenID Connect - John Bradley
CIS 2015 Extreme OpenID Connect - John BradleyCIS 2015 Extreme OpenID Connect - John Bradley
CIS 2015 Extreme OpenID Connect - John Bradley
 
How to write secure code
How to write secure codeHow to write secure code
How to write secure code
 
2022 APIsecure_Why Assertion-based Access Token is preferred to Handle-based ...
2022 APIsecure_Why Assertion-based Access Token is preferred to Handle-based ...2022 APIsecure_Why Assertion-based Access Token is preferred to Handle-based ...
2022 APIsecure_Why Assertion-based Access Token is preferred to Handle-based ...
 
Introduction to Web Security
Introduction to Web SecurityIntroduction to Web Security
Introduction to Web Security
 
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
 
Adaptive Payments SDK - Magento Developers Paradise
Adaptive Payments SDK - Magento Developers ParadiseAdaptive Payments SDK - Magento Developers Paradise
Adaptive Payments SDK - Magento Developers Paradise
 
Let's get started with passwordless authentication using windows hello in you...
Let's get started with passwordless authentication using windows hello in you...Let's get started with passwordless authentication using windows hello in you...
Let's get started with passwordless authentication using windows hello in you...
 
HTTP Services & REST API Security
HTTP Services & REST API SecurityHTTP Services & REST API Security
HTTP Services & REST API Security
 
Mobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patternsMobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patterns
 
De la bonne utilisation de OAuth2
De la bonne utilisation de OAuth2 De la bonne utilisation de OAuth2
De la bonne utilisation de OAuth2
 
Spring4 security oauth2
Spring4 security oauth2Spring4 security oauth2
Spring4 security oauth2
 
CIS13: Introduction to OAuth 2.0
CIS13: Introduction to OAuth 2.0CIS13: Introduction to OAuth 2.0
CIS13: Introduction to OAuth 2.0
 
Securing Microservices in Hybrid Cloud
Securing Microservices in Hybrid CloudSecuring Microservices in Hybrid Cloud
Securing Microservices in Hybrid Cloud
 
Secured REST Microservices with Spring Cloud
Secured REST Microservices with Spring CloudSecured REST Microservices with Spring Cloud
Secured REST Microservices with Spring Cloud
 
CIS 2015 OpenID Connect and Mobile Applications - David Chase
CIS 2015 OpenID Connect and Mobile Applications - David ChaseCIS 2015 OpenID Connect and Mobile Applications - David Chase
CIS 2015 OpenID Connect and Mobile Applications - David Chase
 
Creating a Sign On with Open id connect
Creating a Sign On with Open id connectCreating a Sign On with Open id connect
Creating a Sign On with Open id connect
 
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...
 

Recently uploaded

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 

Recently uploaded (20)

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 

TrialPay Security Tech Talk at Stanford ACM

  • 1. Stanford ACM Tech Talk Jan 2013 All Rights Reserved | Copyright 2011
  • 2. Agenda • TrialPay Overview • Securing Your Startup: Basics • Two-Factor Authentication for VPN • Two-Factor Authentication for SSHD • Credit Card Vault All Rights Reserved | Copyright 2011 2
  • 3. TrialPay is a transactional advertising company TrialPay presents consumers with relevant promotions before, during, and after transactions -- creating a network that allows our clients to gain access to millions of new customers and monetize their current visitors more effectively All Rights Reserved | Copyright 2011 3
  • 4. Tracking online promotions to sales in-store via card-loaded offers 1 Promotion 2 Tracking 3 Purchase 4 Reward Promote offline offers: Users activate online: Track offline: Offer Reward user: We credit Offers promoted across Users activate offers by redemptions tracked in- user with their reward the web, mobile, & social submitting credit or debit store via registered card (e.g. statement media (incl. TrialPay card to attribute online source credit, virtual currency, gift network of 300M+ users) card) upon offer completion All Rights Reserved | Copyright 2011 4
  • 5. Example user registration flow – Credit Card Form All Rights Reserved | Copyright 2011
  • 6. Agenda • TrialPay Overview • Securing Your Data: Basics • Two-Factor Authentication for VPN • Two-Factor Authentication for SSHD • Credit Card Vault All Rights Reserved | Copyright 2011 6
  • 7. Getting Started • Google Apps Two-Factor Authentication (2FA) • Amazon Web Services 2FA and ACLs • Secure Wireless Network – per-user certs • HTTPS for everything All Rights Reserved | Copyright 2011 7
  • 8. Passwords Reference: http://xkcd.com/936/ All Rights Reserved | Copyright 2011
  • 9. Passwords (cont’d) • 14-character password minimums, but more never hurts! • Basic GPU can crack 16B passwords per second • Make sure shadow files are configured correctly (e.g. crypt-sha512, not default DES or md5, 50K rounds) • GOOD: $6$rounds=50000$usesomesillystri$D4IrlXatmP7rx3P3InaxBeoomnAihCKRVQP22JZ6E Y47Wc6BkroIuUUBOov1i.S5KPgErtP/EN5mcO.ChWQW21 • BAD: $1$DaqXb3sb$m84WH8wkxBVl2WvZQboia.:13530:0:99999:7::: All Rights Reserved | Copyright 2011 9
  • 10. Agenda • TrialPay Overview • Securing Your Data: Basics • Two-Factor Authentication for VPN • Two-Factor Authentication for SSHD • Credit Card Vault All Rights Reserved | Copyright 2011 10
  • 11. 2FA for VPN – Standard VPN Login 1) Connect to VPN Client 2) Enter Credentials 3) VPN Device 4) Inside the VPN! Authenticates All Rights Reserved | Copyright 2011 11
  • 12. 2FA for VPN – Traditional 2FA • Traditional solutions use tokens (hardware, Google Authenticator, text messages) • Unintuitive input of token (concatenate with password) • IT burden • Hassle for end-user accessing VPN multiple times per day • Wouldn’t it be nice to leverage existing security mechanism? All Rights Reserved | Copyright 2011 12
  • 13. 2FA for VPN – Enter Google Apps! • User 1-click visits a Google App Engine hosted site https://xxxxxxxx.trialpay.com which auto-logs you in on browsers where you already read your Google Apps email. • This page just shows a 60 second timer for the user to complete the rest of the VPN login process. All Rights Reserved | Copyright 2011 13
  • 14. 2FA for VPN – Technical Details • Google App Engine – python script to get username from Google Apps and create 60-second memcache key • Auth Server – add Perl script to authorize with Google App Engine site • Reference: http://enginerds.trialpay.com/2013/01/08/leveraging-google-apps-email-to-set-up-two-factor-authentication All Rights Reserved | Copyright 2011 14
  • 15. Agenda • TrialPay Overview • Securing Your Data: Basics • Two-Factor Authentication for VPN • Two-Factor Authentication for SSHD • Credit Card Vault All Rights Reserved | Copyright 2011 15
  • 16. 2FA for SSHD – Background • For bastion / entrypoint servers into network, passwords by themselves are insufficient • Tokens are viable, but introduce complexity / hassle • SSH keys are convenient for developers • Passphrase-protected SSH keys are encouraged and can suffice for 2FA, but SSHD cannot enforce passphrase-usage • SSHD supports multiple authentication schemes, but they cannot be enforced simultaneously All Rights Reserved | Copyright 2011 16
  • 17. 2FA for SSHD – ForceCommand to the rescue! • /etc/ssh/sshd_config • sshd_gatekeeper.sh • IP whitelisting • Send intrusion alerts • Don’t forget to actually check the password! • Reference: http://enginerds.trialpay.com/2012/07/24/dual-factor-authentication-for-sshd/ All Rights Reserved | Copyright 2011 17
  • 18. Agenda • TrialPay Overview • Securing Your Data: Basics • Two-Factor Authentication for VPN • Two-Factor Authentication for SSHD • Credit Card Vault All Rights Reserved | Copyright 2011 18
  • 19. Credit Card Vault • Best practice is to insulate sensitive credit card data from rest of system in a secure “vault” • Vault has two major services: tokenizer and proxy All Rights Reserved | Copyright 2011 19
  • 20. Credit Card Vault – Tokenizer 1 Browser 2 App server Vault CC # 4 CVV 3 submit 1. HTML form is served from App server 2. The information provided by the user is sent directly to the vault by the browser (running JavaScript code from App) 3. The vault issues a token that maps to the credit card number 4. The browser sends the token and other non-sensitive information to App server All Rights Reserved | Copyright 2011
  • 21. Credit Card Vault – API request proxy 1 2 3rd party App server Vault i.e. Visa 4 3 • This assumes that 3rd party service’s API is HTTP based • Vault acts as a HTTP proxy with token to CC number translation 1. App server sends a HTTP request via Vault GET /auth?cc=token:1234&amount=4.00 Host: api.visa.com 2. Vault substitutes token:1234 with real CC number and relays the request to Visa GET /auth?cc=4444000012344321&amount=4.00 Host: api.visa.com 3. Visa processes the transaction and responds with a transaction id 4. Vault passes Visa’s response back to app All Rights Reserved | Copyright 2011
  • 22. Credit Card Vault – Key Encryption • Encrypt cardholder data using highest-grade standards (e.g. AES-256) • Standard mechanism is to use a global key • But what if key is compromised? • Instead take a multi-layer approach • Master key + per-card key • Cardholder data stored in one DB • Per-card keys stored in another DB (and managed by a separate team) All Rights Reserved | Copyright 2011 22
  • 23. Credit Card Vault – Token Generation • Token = 64-bit unique id, maps to cardholder data • Exposing last 4 CC digits in app is common use case, try encoding into token, e.g. • Token: 1304274640000970420 • Last 4: 0742 • Even though cardholder data cannot be reverse engineered based on token, better safe than sorry! Encrypt token in response back to app server. • payload = {“token” => “1234”, “info1” => “abc”, “info2” => “def”} • message = {“payload” => aes_encrypt(payload), “aes_iv” => “09...AF” } • output(json_encode(message)) All Rights Reserved | Copyright 2011 23
  • 24. Credit Card Vault – Other things to consider • 2FA to physically access datacenter (password + handscan) • Additional firewall layer in front of CC Vault • Backups stored remotely for disaster recovery All Rights Reserved | Copyright 2011 24
  • 25. Thank You! • We’re Hiring! • Eddie Lim (eddie@trialpay.com) All Rights Reserved | Copyright 2011 25