Skip to content
Kovynev Maxim edited this page Feb 1, 2021 · 3 revisions

Protocol

Actual information for v2.8. Default constants:

g = 7
p = 564715289491

How to get constants: Frida+js

  1. When the application is launched for the first time, a request is sent: https://github.com/kovinevmv/getcontact/wiki/Requests#register-user
  • PRIVATE_KEY also known as:
    • PRIVATE_KEY in /data/data/app.source.getcontact/shared_prefs/GetContactSettingsPref.xml
    • a in picture
    • Randomly generate on start. For example: 13316781
  • peerKey also known as:
    • peerKey in request Register
    • PUBLIC_KEY in /data/data/app.source.getcontact/shared_prefs/GetContactSettingsPref.xml
    • A in picture (A = g ^ a mod p = 7 ^ 13316781 mod 564715289491 = 113912769647)
  1. The server calculates its own constant b and sends B.
  • serverKey also known as:
    • serverKey in response Register
    • B in picture (B = g ^ b mod p = 7 ^ "UNKNOWN" mod 564715289491 = 435365781764)
  1. The client computes the shared key
  • K in picture (K = B ^ a mod p = 435365781764 ^ 13316781 mod 564715289491 = 529166312551)
  1. The client computes the AES key
  • AES key also known as:
    • AES_KEY = SHA256(K) = SHA256('529166312551') = '53ce613ec0c806087b9045ab0e76f63a925175c210d7092d7ed3368b3d0043a4'
    • PUBLIC_KEY in /data/data/app.source.getcontact/shared_prefs/GetContactSettingsPref.xml

Diffie-Hellmann

  • Possible new HMAC_KEY:
    Nq-X!X@lE>vGD?w3BtCg:Fq(!|y/ZK/Z{N?l|jx2 CFA_0GoM2/??u`}NT9FJe
Clone this wiki locally