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

Easier and Safer LINE Account Transfer

Easier and Safer LINE Account Transfer

Tech-Verse2022
PRO

November 18, 2022
Tweet

More Decks by Tech-Verse2022

Other Decks in Technology

Transcript

  1. Easier and Safer LINE
    Account Transfer
    Sangwook Ma / LINE Plus

    View Slide

  2. Agenda
    - Background
    - Challenges of LINE Account Transfer
    - Easier transfer using biometric authentication
    - Letter Sealing key transfer via secure backup
    - Summary and upcoming plans

    View Slide

  3. Agenda
    - Background
    - Challenges of LINE Account Transfer
    - Easier transfer using biometric authentication
    - Letter Sealing key transfer via secure backup
    - Summary and upcoming plans

    View Slide

  4. User-first Development in LINE
    - LINE developer’s goal
    - Providing convenient features without compromising security
    - We are often at a crossroads between user experience and security
    - We always endeavor to find a solution to achieve both for our users

    View Slide

  5. LINE Account Transfer
    LINE Servers
    Current Device’s
    LINE Client
    New Device’s
    LINE Client
    LINE
    Account
    Account Identification
    & Authentication

    View Slide

  6. LINE Account Transfer
    - Available authentication factors
    - Phone number, password, PIN, device ownership, …
    - Some are not good as a means of identification
    - Phone number ownership is mutable
    - And not good as a means of authentication
    - Knowledge factors(password, PIN, …) are too easy to forget & be leaked
    - We cannot expect users to use highly secure password

    View Slide

  7. LINE Letter Sealing
    LINE Official Blog: New generation of safe messaging: "Letter Sealing"

    View Slide

  8. Agenda
    - Background
    - Challenges of LINE Account Transfer
    - Easier login using biometric authentication
    - Letter Sealing key transfer via secure backup
    - Summary and upcoming plans

    View Slide

  9. Challenges of Account Transfer
    Seamless
    Transfer of
    Chat history
    Easy Feature
    for users
    Prevention of
    Account
    Takeovers

    View Slide

  10. Easy Feature for users
    - Knowledge factors are vulnerable to account takeover attacks
    - Our familiar weapon: Multi-factor authentication
    - Ex) Device ownership verification
    - Transfer sequence becomes longer and longer..
    - Longer the transfer sequence is, harder for users to complete the transfer
    - More than 30% of incoming CS inquiries are about Account Transfer

    View Slide

  11. Prevention of Account Takeovers
    - Account takeover can cause severe damages to users
    - Data leakage, financial losses, …
    - Phishing page dupes user to provide ID, password, PIN code, …
    - Not easy to detect and find from service side
    - Our countermeasures: History of LINE's Phishing Fraud Countermeasures
    LINE Official Webpage: Real Examples of Phishing Scams

    View Slide

  12. Seamless Transfer of Chat history
    - Users usually expect to see all of previous chats on the new device
    - Not only chat history but Letter Sealing key should also be transferred
    - Limitation of the current cloud-based backup feature
    - It depends on external services like iCloud or Google Drive
    - Currently it cannot be restored across different device platforms

    View Slide

  13. Agenda
    - Background
    - Challenges of LINE Account Transfer
    - Easier transfer using biometric authentication
    - Letter Sealing key transfer via secure backup
    - Summary and upcoming plans

    View Slide

  14. Advantages of Biometric Auth
    - Biometric authentication on your device
    - More secure auth factor than password
    - Enabling better identification via device ownership
    - Easier transfer feature utilizes biometric authentication
    for user before accessing device’s key store
    - Note: LINE also supports biometric auth via FIDO2
    - Applied to account login on LINE desktop clients

    View Slide

  15. LINE Account Transfer using Biometric Auth
    Initialize a session
    Generate and show QR code
    Scan QR code
    Receive current device’s data (encrypted)
    Notify to send current device’s data
    Wait for current device’s data
    Decrypt and save data
    Server
    New Device
    Current Device
    Ask user to confirm the transfer
    & proceed biometric auth
    to unlock client’s key store
    Send current device’s data (encrypted)

    View Slide

  16. LINE Account Transfer using Biometric Auth
    Initialize a session
    Generate and show QR code
    Scan QR code
    Receive current device’s data (encrypted)
    Notify to send current device’s data
    Wait for current device’s data
    Decrypt and save data
    Server
    New Device
    Current Device
    Send current device’s data (encrypted)
    Ask user to confirm the transfer
    & proceed biometric auth
    to unlock client’s key store

    View Slide

  17. LINE Account Transfer using Biometric Auth
    Initialize a session
    Generate and show QR code
    Scan QR code
    Receive current device’s data (encrypted)
    Notify to send current device’s data
    Send current device’s data (encrypted)
    Wait for current device’s data
    Decrypt and save data
    Server
    New Device
    Current Device
    Ask user to confirm the transfer
    & proceed biometric auth
    to unlock client’s key store

    View Slide

  18. LINE Account Transfer using Biometric Auth
    Initialize a session
    Generate and show QR code
    Scan QR code
    Receive current device’s data (encrypted)
    Notify to send current device’s data
    Wait for current device’s data
    Decrypt and save data
    Server
    New Device
    Current Device
    Send current device’s data (encrypted)
    Ask user to confirm the transfer
    & proceed biometric auth
    to unlock client’s key store

    View Slide

  19. Current Device New Device

    View Slide

  20. Current Device New Device

    View Slide

  21. Current Device New Device

    View Slide

  22. Current Device New Device

    View Slide

  23. Current Device New Device

    View Slide

  24. Current Device New Device

    View Slide

  25. Current Device New Device

    View Slide

  26. Current Device New Device

    View Slide

  27. Advantages over existing flow
    Key Transfer
    via E2EE
    Simple and
    Intuitive
    More Secure
    against
    Phishing

    View Slide

  28. Advantages over existing flow
    Key Transfer
    via E2EE
    Simple and
    Intuitive
    More Secure
    against
    Phishing

    View Slide

  29. LINE Account Transfer using Biometric Auth
    Server
    New Device
    Current Device
    Data
    (ex. Letter Sealing Key)

    View Slide

  30. LINE Account Transfer using Biometric Auth
    Initialize a session
    Server
    New Device
    Current Device
    C-PUB C-PVT Data
    Nonce

    View Slide

  31. LINE Account Transfer using Biometric Auth
    Initialize a session
    Server
    New Device
    Current Device
    N-PUB N-PVT
    C-PUB C-PVT Data
    Nonce

    View Slide

  32. LINE Account Transfer using Biometric Auth
    Initialize a session
    Scan QR code
    Server
    New Device
    Current Device
    C-PUB C-PVT Data
    Nonce
    N-PUB N-PVT Nonce
    C-PUB

    View Slide

  33. LINE Account Transfer using Biometric Auth
    Initialize a session
    Server
    New Device
    Current Device
    N-PUB Nonce
    Shared Secret
    to decrypt data
    Scan QR code
    C-PUB C-PVT Data
    Nonce

    View Slide

  34. LINE Account Transfer using Biometric Auth
    Initialize a session
    Server
    New Device
    Current Device
    Wait for current device’s data
    N-PUB Nonce
    Shared Secret
    to decrypt data
    Scan QR code
    C-PUB C-PVT Data
    Nonce
    N-PUB Nonce

    View Slide

  35. LINE Account Transfer using Biometric Auth
    Server
    New Device
    Current Device
    Data
    Notify to send current device’s data
    N-PUB Nonce
    C-PUB C-PVT N-PUB Nonce

    View Slide

  36. LINE Account Transfer using Biometric Auth
    Server
    New Device
    Current Device
    Notify to send current device’s data
    Data
    C-PUB Nonce
    Shared Secret
    to encrypt data
    N-PUB Nonce

    View Slide

  37. LINE Account Transfer using Biometric Auth
    Server
    New Device
    Current Device
    Notify to send current device’s data
    Send current device’s encrypted data
    Encrypted data
    Data
    C-PUB Nonce
    Shared Secret
    to encrypt data
    N-PUB Nonce

    View Slide

  38. LINE Account Transfer using Biometric Auth
    Server
    New Device
    Current Device
    Notify to send current device’s data
    Send current device’s encrypted data
    Receive current device’s data
    Encrypted data
    Data
    C-PUB Nonce
    Shared Secret
    to encrypt data
    Encrypted data
    N-PUB Nonce
    N-PUB Nonce
    Shared Secret
    to decrypt data

    View Slide

  39. LINE Account Transfer using Biometric Auth
    Server
    New Device
    Current Device
    Notify to send current device’s data
    Data
    C-PUB Nonce
    Shared Secret
    to encrypt data
    N-PUB Nonce
    Shared Secret
    to decrypt data Data
    Receive current device’s data
    Encrypted data
    N-PUB Nonce
    Send current device’s encrypted data

    View Slide

  40. Agenda
    - Background
    - Challenges of LINE Account Transfer
    - Easier transfer using biometric authentication
    - Letter Sealing key transfer via secure backup
    - Summary and upcoming plans

    View Slide

  41. Account Transfer without Current Device
    - It happens when user loses or breaks their current device
    - No way to transfer current device’s Letter Sealing key without a backup
    - Challenge: How can we backup & restore Letter Sealing key securely?
    - Server must not know the raw key value under any circumstances

    View Slide

  42. Recap: Securing Letter Sealing Key Backup
    LINE Dev Day 2019: Seamless device migration using LINE secure backups
    Worse UX
    High Entropy
    Better Security
    Better UX

    Low Entropy
    Worse Security
    No Encryption
    Randomly
    Generated
    Password
    Wordlist Based
    Password
    User Chosen
    Password
    PIN

    View Slide

  43. Recap: Securing Letter Sealing Key Backup
    LINE Dev Day 2019: Seamless device migration using LINE secure backups
    Worse UX
    High Entropy
    Better Security
    Better UX

    Low Entropy
    Worse Security
    No Encryption
    Randomly
    Generated
    Password
    Wordlist Based
    Password
    User Chosen
    Password
    PIN

    View Slide

  44. Trusted Execution Environment
    Recap: Concept of Key Transfer using PIN
    Encrypt /
    Decrypt
    Backup
    User Input (PIN)
    Remaining 

    attempt?
    Correct PIN?
    Backup / Restore
    Chat History
    Permanently Locked
    No remaining attempt
    Attempt
    counts
    LINE Dev Day 2019: Seamless device migration using LINE secure backups

    View Slide

  45. Core measures of Secure Key Backup
    1. Executing backup & restoration in Trusted Execution Environment(TEE)
    - Based on Intel’s Software Guard Extensions(SGX)
    - For more details, check our twin session in Tech-Verse Day1:
    - High Assurance Secure Software Development on the Server Side
    2. Enforcing limits in key restoration attempts to prevent brute-force attacks
    - Must be resistant to internal threats from company network as well
    - Versioning the backup state and storing the restoration attempt count

    View Slide

  46. Attempt
    counts
    Private Key
    Server
    Trusted Environment
    (Isolated)
    Key Backup & Restoration Process
    Extended storage (Persistent)
    Attempt
    counts
    Encrypted
    Backup
    +
    Encrypt/
    Decrypt
    &
    count++
    Public Key
    LINE Client
    User PIN
    Data

    View Slide

  47. Attempt
    counts
    Private Key
    Server
    Trusted Environment
    (Isolated)
    Key Backup & Restoration Process
    Extended storage (Persistent)
    Attempt
    counts
    Encrypted
    Backup
    +
    Encrypt/
    Decrypt
    &
    count++
    These were sealed inside of
    Trusted Environment
    Public Key
    LINE Client
    User PIN
    Data

    View Slide

  48. Overview of Letter Sealing Key Transfer
    Tech-Verse 22: High Assurance Secure Software Development on the Server Side
    Trusted
    Execution
    Environment
    (Isolated servers)
    Company Network
    LINE Client LINE
    Server
    Backup
    server
    Encrypted
    Backup
    Internet
    User PIN Public Key
    Private
    Key
    Backup Data
    Attempt
    counts
    Extended
    storage

    View Slide

  49. Attempt
    counts
    Private Key
    Server
    Trusted Environment
    (Isolated)
    Key Backup & Restoration Process
    Extended storage (Persistent)
    Attempt
    counts
    Encrypted
    Backup
    +
    Encrypt/
    Decrypt
    &
    count++
    Request
    backup or
    restore
    Public Key
    LINE Client
    User PIN
    Data

    View Slide

  50. Attempt
    counts
    Private Key
    Server
    Trusted Environment
    (Isolated)
    Key Backup & Restoration Process
    Extended storage (Persistent)
    Attempt
    counts
    Encrypted
    Backup
    +
    Encrypt/
    Decrypt
    &
    count++
    Retrieve sealed data
    containing
    backup & attempt count
    Request
    backup or
    restore
    Public Key
    LINE Client
    User PIN
    Data

    View Slide

  51. Attempt
    counts
    Private Key
    Server
    Trusted Environment
    (Isolated)
    Key Backup & Restoration Process
    Extended storage (Persistent)
    Attempt
    counts
    Encrypted
    Backup
    +
    Encrypt/
    Decrypt
    &
    count++
    Execute only when
    condition meets
    Retrieve sealed data
    containing
    backup & attempt count
    Request
    backup or
    restore
    Public Key
    LINE Client
    User PIN
    Data
    Send sealed data
    containing
    backup & count

    View Slide

  52. Attempt
    counts
    Private Key
    Server
    Trusted Environment
    (Isolated)
    Key Backup & Restoration Process
    Extended storage (Persistent)
    Attempt
    counts
    Encrypted
    Backup
    +
    Encrypt/
    Decrypt
    &
    count++
    Execute only when
    condition meets
    Store sealed data
    where backup data and
    count are updated
    Request
    backup or
    restore
    Public Key
    LINE Client
    User PIN
    Data

    View Slide

  53. Attempt
    counts
    Private Key
    Server
    Trusted Environment
    (Isolated)
    Key Backup & Restoration Process
    Extended storage (Persistent)
    Attempt
    counts
    Encrypted
    Backup
    +
    Encrypt/
    Decrypt
    &
    count++
    Execute only when
    condition meets
    Store sealed data
    where backup data and
    count are updated
    Result is
    returned
    Public Key
    LINE Client
    User PIN
    Data

    View Slide

  54. Attempt
    counts
    Private Key
    Server
    Trusted Environment
    (Isolated)
    Key Backup & Restoration Process
    Extended storage (Persistent)
    Attempt
    counts
    Encrypted
    Backup
    +
    Encrypt/
    Decrypt
    &
    count++
    Retrieve sealed data
    containing
    backup & attempt count
    Request
    backup or
    restore
    Public Key
    LINE Client
    User PIN
    Data
    Send sealed data
    containing
    backup & count
    Execute only when
    given count is equal or
    larger than TEE’s count

    View Slide

  55. Attempt
    counts
    Private Key
    Server
    Trusted Environment
    (Isolated)
    Prevention of brute-forcing backup PIN
    Extended storage (Persistent)
    Attempt
    counts
    Encrypted
    Backup
    +
    Encrypt/
    Decrypt
    &
    count++
    Brute-forcing on
    client app
    increases counts

    Permanently locked
    when max limit is reached
    Public Key
    User PIN
    Data

    View Slide

  56. Attempt
    counts
    Private Key
    Server
    Trusted Environment
    (Isolated)
    Prevention of brute-forcing backup PIN
    Extended storage (Persistent)
    Attempt
    counts
    Encrypted
    Backup
    +
    Encrypt/
    Decrypt
    &
    count++
    Company Network
    Replay attack inside of
    company network
    Rejected based on
    attempt count condition

    Public Key
    User PIN

    View Slide

  57. Field Issues during the project
    1. Enhancing the access control and monitoring in extended storage
    - Our colleagues might cover this as a session at future events 🙂
    2. Mitigating possible count inconsistency between TEE and extended storage
    - Attempt count resides at both of TEE and extended storage

    View Slide

  58. Mitigating Inconsistency: Backgrounds
    1. Independent attempt counts by TEE
    - TEEs does not sync attempt counts
    2. Default routing strategy towards TEE
    - “Sticky” strategy based on user ID
    - Same account’s attempts are counted in
    the same TEE server to limit max count
    LINE
    Servers
    Extended
    storage
    User PIN
    All attempts on
    account A
    All attempts
    on account B
    TEE Servers

    View Slide

  59. Attempt Count Inconsistency
    - Role of two attempt counts
    - TEE’s count
    - “reference count” of limiting attempts
    - Extended storage’s count
    - Required for persistence
    - Storage failures lead to inconsistencies in
    attempt counts

    5. Count after failure: N
    (Increased count is not applied)
    2. Count
    after ops:
    N+1
    4. Failed to store
    backup & count
    1. Given
    count: N
    LINE
    Servers
    Extended
    storage
    TEE Servers
    3. Returned
    count: N+1
    User PIN

    View Slide

  60. Impact of Attempt Count Inconsistency
    - TEE rejects the next attempt because
    storage’s count is smaller than TEE’s count
    - User’s attempt is aborted even though they
    entered a correct PIN.
    0. Current count: N
    (Inconsistent)
    2. Current
    count:
    N+1
    3. Rejected
    by TEE

    LINE
    Servers
    Extended
    storage
    User PIN
    (Next
    attempt)
    4. Aborted
    1. Given
    count: N

    View Slide

  61. Mitigating Inconsistency: Measure #1
    - Retry until storage update succeeds
    - Based on Kafka + Decaton
    (LINE’s streaming task proc framework)
    - No user impact as inconsistency is fixed
    - Focus on reducing storage failure’s impact
    5. Count after retry succeeds: N+1
    (consistent)
    4. Retry until storage
    update succeeds
    LINE
    Servers
    Extended
    storage
    2. Count
    after ops:
    N+1
    1. Given
    count: N
    3. Returned
    count: N+1
    User PIN

    View Slide

  62. Mitigating Inconsistency: Measure #2
    - Measure to mitigate storage failure impacts
    - Changing the routing strategy from
    ‘sticky’ strategy to round-robin
    - Attempt count starts on the new TEE
    without inconsistency
    - Next attempt succeeds while maintaining
    the proper resistance to brute-forcing
    2. TEE
    #2’s count
    starts
    from N
    Current count: N
    TEE #1’s
    count:
    N+1
    0. Rejected
    by TEE

    1. Retry
    Returned
    count: N + 1
    LINE
    Servers
    Extended
    storage
    User PIN
    (Next
    attempt)

    View Slide

  63. Agenda
    - Background
    - Challenges of LINE Account Transfer
    - Easier transfer using biometric authentication
    - Letter Sealing key transfer via secure backup
    - Summary and upcoming plans

    View Slide

  64. Summary
    - Challenges of LINE account transfer feature
    - Easy feature for users
    - Preventing account takeover
    - Seamless chat transfer
    - Our improvements balancing UX and security
    - New transfer flow based on biometric auth for device-on-hand case
    - New Letter Sealing key transfer function for device-not-on-hand case
    झ௼݀౟੘ࢿ઺

    ӝࠄ੸ਵ۽ठۄ੉٘ղਊਸࢸݺೞחߑೱ

    View Slide

  65. Upcoming Plans
    - Improved Account Transfer feature to protect against phishing
    - Even when user doesn't have the previous device
    - Better UX using biometric authentication across our features
    - Applying LINE client’s biometric auth to LINE login for 3rd parties
    - Broader coverage of message backup & restoration feature
    - Supporting cross-platform cloud-based chat backup

    View Slide

  66. Remark
    - This talk’s improvements are outcomes of two major projects
    - Dozens of people from various teams have worked for several months
    - We promise to continue our journey
    - The journey to keep enhancing feature usability and user data security

    View Slide