[UPDATE 09.09.2022] I got new CVE for this vulnerability: CVE-2022-40297.
Ubuntu Touch allows you to "protect" devices with a 4-digit passcode. Such a code was set in a demonstration device. The problem is that the same 4-digit passcode then becomes a password that we can use with the sudo command and gain root privileges.
This means that a malicious application can do us double harm:
- Easily escalate privileges and take control of the device.
- It can pass the screen unlock passcode to a third party.
- We run poc.py as a regular user.
- App is doing bruteforce attack on password. No rate limit in system!
- Passcode to unlock the screen = password for sudo su to obtain root.
- After 1-2 minutes we have passcode on the screen, which we also save to the file /root/passcode as evidence of system compromise.
Follow me on Twitter @FilipKarc and on LinkedIn: LinkedIn.