Upgrade to Pro — share decks privately, control downloads, hide ads and more …

one, two step

one, two step

Harley Watson

April 07, 2017
Tweet

More Decks by Harley Watson

Other Decks in Technology

Transcript

  1. $ whoami • Second year student at Abertay
 (HackSoc Secretary

    + Securi-Tay 2017 Organiser) • Intern at SkyScanner (Summer 2017) • I dig • Security UX • Embedded devices • Payments technologies • Public transportation
  2. A different code is requested each time, so replay attacks

    don’t work (unless we can capture 20~30 login attempts)
  3. SS7 attacks also allow your phone number to be hijacked

    without your carrier’s cooperation
  4. The code is calculated by computing the HMAC of the

    current time using the shared secret key
  5. As long as the key is not intercepted during the

    initial setup, the key can’t be externally determined
  6. Agree on five parameters: a secret key the current time

    an interval a hash function a token length
  7. Our key is 012345ABCDEF, it is 04/06/2017 @ 11:39:58am (UTC),

    we’ll use a 30sec interval, sha1, and 6 digit tokens
  8. Take the four least significant bits and use this as

    an offset in the original hash (e -> 1110 -> 14) (e91433413775c646b2255cfa8bde51247796973e)
  9. Take four bytes starting from the offset and discard the

    most significant bit. (11000110 01000110 10110010 00100101)
  10. The token is then the lowest 6 digits (pad from

    the left if needed) (2358076490)
  11. Early Yubikeys used an internal counter to generate codes in

    a similar fashion. https://static1.squarespace.com/static/54764dcde4b0ad59b84ad859/t/ 54eccc9ce4b0328389b9b398/1424805028325/YubiKey-Standard-1030x687.png? format=1500w
  12. The Chip Authentication Program is used by several UK banks

    to verify transfers to new recipients https://www.barclays.co.uk/cs/Satellite? blobcol=urldata&blobkey=id&blobtable=MungoBlobs&blobwhere=1367516798251&ssbin ary=true
  13. (Barclays UK Debit Card issued in 2015. Inspected using Cardpeek.)

    EMV-wide payment card application selector Visa Debit application, used for most transactions. Link application, used by UK-only ATMs. CAP application, used by online banking login.
  14. The cryptogram from this fake transaction is encoded as a

    token which can be verified by your bank
  15. PKCS#11 smartcards have a limited number of identities and are

    generally unsuitable for use outwith their issuing organisation
  16. A unique private key is generated on the device for

    each account on each web service
  17. The key generation process is fully handled by the token

    in hardware and can’t be extracted
  18. U2F Token Browser Server u2f.register(); Generate challenge Wait for press

    Generate reply Store token identity Validate challenge AJAX/form submit
  19. U2F Token Browser Server u2f.sign(); Generate challenge Wait for press

    Generate reply Look up token identity Validate challenge AJAX/form submit
  20. If an adversary is able to present a valid certificate

    for a domain, they could proxy your U2F signature
  21. TLS channel ID is a proposed spec to add self-signed

    client certs to the TLS handshake
  22. Browser MITM Server u2f.sign(); Generate challenge Look up token identity

    Validate challenge AJAX/form submit Proxy Create keypair Create keypair X keypair public key