(1) AST of method: a(InputStream) class: com.lifx.app.config.FileVerifer
Unique Nodes with their domain types.
Node: final InputStream inputStream2 = inputStream Domain Type: cert public_key -> certificateNode: inputStream2 Domain Type: cert public_key -> certificateNode: (InputStream) CertificateFactory.getInstance("X509").generateCertificate(new ByteArrayInputStream(a)) Domain Type: certificateNode(Input Param): inputStream Domain Type: cert public_key -> certificateNode: (InputStream) ((Certificate) inputStream).getPublicKey() Domain Type: cert public_key -> certificateNode: ((Certificate) inputStream).getPublicKey() Domain Type: cert public_keyNode: ((Certificate) inputStream) Domain Type: certificateNode(Return Statement): return (PublicKey) inputStream; Domain Type: cert public_key -> certificate(2) AST of method: getSha256OfByteArray(byte[]) class: com.lifx.core.util.ByteUtil
Unique Nodes with their domain types.
Node: final MessageDigest instance = MessageDigest.getInstance("SHA-256") Domain Type: hashNode: MessageDigest.getInstance("SHA-256") Domain Type: hashNode: instance Domain Type: hashNode: instance.digest() Domain Type: hashNode(Return Statement): return digest; Domain Type: hashNode(Input Param) : digest Domain Type: hash(3) AST of method: certificatesMatch(X509Certificate,X509Certificate) class: com.lifx.core.transport.rx.LifxBulbTrustManager
Unique Nodes with their domain types.
Node: x509Certificate2 Domain Type: certificateThe extracted specification of the LIFX system as a list of Protocol Information (PIL)
PIL1 = ['1','SD, *, wifi0', 'msg=(LifxWiFiBeacon,SSID,BSSID)', 'ACSeq=<(SD,send,{msg}),(CP,receive, {msg})>', 'ch=wifi0', 'rLC=-', 'BR={1}']PIL2 = ['2', 'CP, SD, wifi0', 'msg=(SSID,OpenSystemAuthenticationRequest)', 'ACSeq =<(CP,send,{msg}),(SD,receive, {msg})>', 'ch=wifi0', 'rLC=-', 'BR={-}']PIL3 = ['3', 'SD,CP,wifi0', 'msg=(AssociationResponse)', 'ACSeq =<(SD,send,{msg}),(CP,receive, {msg})>', 'ch=wifi0', 'rLC=-', 'BR={-}']PIL4 = ['4','CP,SD,openwifi','msg=(GetService)', 'ACSeq=<(CP,send,{msg}),(SD,receive,{msg})>', 'ch=openwifi', 'rLC=-', 'BR={-}']PIL5 = ['5', 'SD,CP,openwifi', 'msg=(StateService}', 'ACSeq=<(SD,send,{msg}),(CP,receive,{msg})>', 'ch=openwifi', 'rLC=-', 'BR={4,8,10,12,14}']PIL6 = ['6', 'CP,SD,openwifi', 'msg=(Station,Username,Password)', 'ACSeq=<(CP,send,{msg}),(SD,receive, {msg})>','ch=openwifi', 'rLC=-', 'BR={-}']PIL7 = ['7', 'SD,CP,openwifi', 'msg=(Station,Username,EncodedPassword)', 'ACSeq =<(SD,send,{msg}),(CP,receive,{msg})>' , 'ch=openwifi', 'rLC=-', 'BR={8}']PIL8 = ['8', 'CP,SD,wifi', 'msg=(GetService)', 'ACSeq=<(CP,send,{msg}),(SD,receive,{msg})>', 'ch=wifi', 'rLC=-', 'BR={-}' ]PIL9 = ['9','SD,CP,wifi','msg=(StateService,Configured)', 'ACSeq=<(SD,send,{msg}),(CP,receive, {msg})>', 'ch=wifi', 'rLC=-', 'BR={8,16,18,20}']PIL10 = ['10', 'CP,SD,openwifi', 'msg=(SetPowerRequest)', 'ACSeq =<(CP,send,{msg}), (SD,receive,{msg}), (SD, executeCommand, {msg})>', 'ch=openwifi','rLC=-', 'BR={-}']PIL11 = ['11','SD,CP,openwifi', 'msg=(Success)', 'ACSeq =<(SD, send,{msg}),(CP,receive,{msg})>', 'ch=openwifi', 'rLC=-', 'BR={10}']PIL12 = ['12', 'CP,SD,openwifi', 'msg=(SetColorRequest)', 'ACSeq =<(CP,send,{msg}),(SD,receive,{msg}), (SD, executeCommand, {msg})>','ch=openwifi', 'rLC=-', 'R={-}']PIL13 = ['13', 'SD,CP,openwifi', 'msg=(Success)', 'ACSeq =<(SD, send,{msg}),(CP,receive,{msg})>', 'ch=openwifi', 'rLC=-', 'BR={12}']PIL14 = ['14', 'CP,SD,openwifi', 'msg=(GetLights)', 'ACSeq =<(CP, send,{msg}),(SD,receive,{msg})>', 'ch=openwifi', 'rLC=-', 'BR={-}']PIL15 = ['15', 'SD,CP,openwifi', 'msg=(LightsState)', 'ACSeq =<(SD, send,{msg}),(CP,receive,{msg})>', 'ch=openwifi', 'rLC=-', 'BR={14}']PIL16 = ['16', 'CP,SD,wifi', 'msg=(SetPowerRequest)', 'ACSeq =<(CP,send,{msg}),(SD,receive,{msg}),(SD, executeCommand, {msg})>', 'ch=wifi', 'rLC=-', 'BR={-}']PIL17 = ['17', 'SD,CP,wifi', 'msg=(Success)', 'ACSeq =<(SD, send,{msg}),(CP,receive,{msg})>', 'ch=wifi', 'rLC=-', 'BR={16}']PIL18 = ['18', 'CP,SD,wifi', 'msg=(SetColorRequest)', 'ACSeq =<(CP,send,{msg}),(SD,receive,{msg}),(SD, executeCommand, {msg})>', 'ch=wifi', 'rLC=-', 'BR={-}']PIL19 = ['19', 'SD,CP,wifi', 'msg=(Success)', 'ACSeq =<(SD, send,{msg}),(CP,receive,{msg})>', 'ch=wifi', 'rLC=-', 'BR={18}']PIL20 = ['20', 'CP,SD,wifi', 'msg=(GetLights)', 'ACSeq =<(CP, send,{msg}),(SD,receive,{msg})>', 'ch=wifi', 'rLC=-', 'BR={-}']PIL21 = ['21', 'SD,CP,wifi', 'msg=(LightsState)', 'ACSeq =<(SD, send,{msg}),(CP,receive,{msg})>', 'ch=wifi', 'rLC=-', 'BR={20 }']The Local LTS of the LIFX CP and SD generated by HomeScan.
Model, Attackers and Security Properties
The CP of both systems discovers the SD by the MAC address pattern (e.g., “D0:71:23” for LIFX and “FA:8F:CA” for Chromecast) of its Wi-Fi hotspot which is assigned by their manufacturers. As a consequence, these CPs are vulnerable to connecting to a fake SD’s hotspot with a valid MAC address pattern. Furthermore, it is common that the CP in smart home systems sends the SSID and password of the home Wi-Fi over the SD’s open hotspot while configuring the system.In the LIFX system, the credentials are sent in plain text over the SD’s hotspot. Hence an attacker can obtain the access to the home Wi-Fi by receiving the credentials over a fake LIFX SD’s hotspot. Consequently, these attacks suggest that using open Wi-Fi hotspots to send Wi-Fi credentials in plain text is inadvisable for smart home systems (even for initial configurations).
In the LIFX system, the first CP which joins the open Wi-Fi, or any CP which joins the home Wi-Fi of the benign user (e.g.,a malicious app installed on the user’s mobile phone), can send control commands to the SD. Since the SD does not have an authentication mechanism to authenticate the CP, a malicious CP which joins either of these networks can control the benign SD by sending control commands (e.g., SetPowerRequest and SetColorRequest).
(Here we demonstrate the attack using the official LIFX desktop app.)
LIFX uses UDP protocol to exchange messages over Wi-Fi between the CP and the SD. These UDP packets do not include any session related data (e.g.,timestamp and nonce). Thus, these packets can be intercepted and later replayed by the network attacker who taps into the communication channel between the CP and the SD to control the SD.