“Please do not make it public” - Vulnerabilities in Sogou Keyboard encryption expose keypresses to network eavesdropping
The Sogou Input Method used a custom encryption scheme called EncryptWall to protect keystroke data sent over plain HTTP, but a padding oracle in the server's responses let a network eavesdropper decrypt the traffic. This revealed what users were typing, and on Android also leaked parts of the encryption keys.
Published on citizenlab.ca
We urge Sogou Input Method users to immediately update to the most recent version of the app (at least Windows version 13.7, Android version 11.26, or iOS version 11.25).
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the custom EncryptWall scheme used CBC mode with PKCS#7 padding and exposed a padding oracle through differing HTTP status codes, compounded by weak key generation and hard-coded values.
Impact
A network eavesdropper could decrypt keystrokes and other sensitive data, but only for EncryptWall requests sent over plain HTTP; requests over HTTPS were protected by TLS.
What the attacker needed
Network eavesdropping position; traffic sent over plain HTTP; affected app version
The fix
Sogou released fixed versions of the affected software as of July 20, 2023, and the researchers recommend using well-supported encryption such as TLS instead of custom designs.
How it was found
- Capture EncryptWall requests sent over plain HTTP.
- Send modified ciphertext in the U field and observe whether the server returns 400, 200 or 500.
- Use the differing responses as a padding oracle to decrypt the U field byte by byte.
- Recover the IV where it is encrypted, using the predictable URL and an all-zero IV assumption.
- Decrypt the G and P fields with the same key and IV to read the tunneled data.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
An input method is the software that turns what you type into characters, and for Chinese it often sends your typing to a cloud service for suggestions. The app wrapped this data in its own encryption instead of standard HTTPS, and the server's error messages leaked enough to let someone watching the network work out the original text. This means a person on the same network could read what you type.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.