backdooring the frontdoor - def con con 24/def con 24... · 2020-05-16 · august smart lock....

83
Backdooring the Frontdoor Hacking a "perfectly secure" smart lock.

Upload: others

Post on 25-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Backdooring the FrontdoorHacking a "perfectly secure" smart lock.

Page 2: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

About me

● Software Engineer by trade● Hacker by passion● Lock picker for fun● The best puzzles are not meant to be solved● Twitter: @jmaxxz

Page 3: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

August Smart Lock

Page 4: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 5: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

August's marketing team

Page 6: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Source: august.com (August 17th, 2015)

Page 7: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

"Unlike physical keys which can be duplicated and distributed without your knowledge, an

August lock..."

Page 8: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Source: august.com (September 14th, 2015)

Page 9: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

"Safer than … codes that can be copied."

Page 10: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

<August's video claiming perfect security>

Page 11: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 12: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Security claims

● Perfectly secure● Guest access can be revoked at any time● Guest permission can be limited to a schedule● Guest can not

○ Use auto unlock○ Invite or remove guests or owners○ View activity feed○ View Guest List○ Change lock settings

● Keys can not be duplicated or distributed

Page 13: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Mapping out theAPI

Page 14: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

WiFi | HTTPS

BLE

Page 15: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

MitM proxy

Page 16: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 17: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Certificate pinning…crap...

Page 18: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Solution

1. Use iOS SSL Kill Switch(https://github.com/iSECPartners/ios-ssl-kill-switch)

Page 19: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Disabling SSL/TLS system wide at Defcon?

Page 20: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 21: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Better solution

Page 22: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 23: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 24: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 25: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 26: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 27: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 28: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 29: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

No Jailbreak

Page 30: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Certificate Pinned!!!

Page 31: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Security claims

● Perfectly secure● Guest access can be revoked at any time● Guest permission can be limited to a schedule● Guest can not

○ Use auto unlock○ Invite or remove guests or owners○ View activity feed○ View Guest List○ Change lock settings

● Keys can not be duplicated or distributed

Page 32: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

After mapping out api

Postman collection created (see github repo)

Page 33: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 34: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Not anonymized

Page 35: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 36: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Creepy

Page 37: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Let's fix this

Page 38: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

MiTM can modify traffic

Page 39: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

FixDon't forward log data to August, and tell app logs were received

Page 40: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

What else can we do?

Page 41: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Guest to admin?

Page 42: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 43: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

User Types

Guest = userOwner = superuser

Page 44: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Replace "user"with "superuser"

Page 45: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Guests can change lock settings!

Page 46: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Guests can not use Auto-UnlockGuests can not control lock settings

Page 47: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 48: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Security claims

● Perfectly secure● Guest access can be revoked at any time● Guest permission can be limited to a schedule● Guest can not

○ Use auto unlock○ Invite or remove guests or owners○ View activity feed○ View Guest List○ Change lock settings

● Keys can not be duplicated or distributed

Page 49: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Mapping out theBLE API

Page 50: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

WiFi | HTTPS

BLE

Page 51: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Enumerate BLE services

Page 52: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 53: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 54: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 55: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Intercepting BLE

Solution: Ubertooth

Page 56: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 57: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Better solution

Page 58: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Tap

Page 59: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Replace

Page 60: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Plaintext BLE traffic in log files!

Page 61: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

No Jailbreak

Page 62: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 63: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

SEC write/indicate

1. Communicates with TI chip2. Establish session key3. Manage lock's key store [add, delete]

Page 64: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

MCU write/indicate

1. Communicates with ST chip2. Control lock3. Manage lock settings4. Firmware updates

Page 65: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Lock security model

● BLE + Just Works pairing● 256 offline key slots (0-255)● AES-128-CBC (null IV)

Page 66: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Key slot 0 is special

Page 67: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

"Safer than … codes that can be copied."

"Unlike physical keys which can be duplicated and distributed without your knowledge, an

August lock..."

Page 68: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Requesting firmware as a guest

Page 69: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

This is weird

Page 70: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 71: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

70F4F853E330BAEC27BF2724F39D147170F4F853E330BAEC27BF2724F39D147170F4F853E330BAEC27BF2724F39D147170F4F853E330BAEC27BF2724F39D147170F4F853E330BAEC27BF2724F39D147170F4F853E330BAEC27BF2724F39D147170F4F853E330BAEC27BF2724F39D147170F4F853E330BAEC27BF2724F39D147170F4F853E330BAEC27BF2724F39D147170F4F853E330BAEC27BF2724F39D147170F4F853E330BAEC27BF2724F39D147170F4F853E330BAEC27BF2724F39D147170F4F853E330BAEC27BF2724F39D147170F4F853E330BAEC27BF2724F39D147170F4F853E330BAEC27BF2724F39D147170F4F853E330BAEC27BF2724F39D147170F4F853E330BAEC27BF2724F39D147170F4F853E330BAEC27BF2724F39D1471

Page 72: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Firmware key 'can not' be changed

Page 73: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Key material in logs

Page 74: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Security claims

● Perfectly secure● Guest access can be revoked at any time● Guest permission can be limited to a schedule● Guest can not

○ Use auto unlock○ Invite or remove guests or owners○ View activity feed○ View Guest List○ Change lock settings

● Keys can not be duplicated or distributed

Page 75: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 76: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys
Page 77: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Security claims

● Perfectly secure● Guest access can be revoked at any time● Guest permission can be limited to a schedule● Guest can not

○ Use auto unlock○ Invite or remove guests or owners○ View activity feed○ View Guest List○ Change lock settings

● Keys can not be duplicated or distributed

Page 78: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Don't give guest access to someone you would not

give a key to.

Page 80: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Demo

1. Unlock without a trace <demo>2. Change Settings <demo>3. Backdooring a lock <demo>

Page 81: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Mistakes made

● Mobile app logs include key material● Lock does not differentiate between guest and owner● Firmware not signed● No apparent way to discover backdoor keys● Guest users can download key material● Access entry log can be erased by guest users● Confusing two factor with two step● No rate limiting of password reset attempts (fixed)● Mobile apps include bypass for certificate pinning● SecureRandom not used for nonce or session key generation (fixed)● Key material not stored on iOS keychain

Page 82: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

What was done correctly

● Mobile apps attempt to use certificate pinning● Protocol makes use of nonces CBC● August has been very responsive● Not reliant solely on BLE's just works security model

Page 83: Backdooring the Frontdoor - DEF CON CON 24/DEF CON 24... · 2020-05-16 · August Smart Lock. August's marketing team. Source: august.com (August 17th, 2015) "Unlike physical keys

Hackers needed

Consumers are not able to evaluate security claims made by companies

● We need more researchers investigating security claims made by companies on behalf of consumers.

● What can be asserted without evidence can be dismissed without evidence.