How can I encrypt Cookies sqlite3 database stored in localstorage of my android app?

282 views Asked by At

I am using webview in order to open and navigate backend endpoints inside my android app. These endpoints are authenticated using username+password+mfa combination and on successful authentication webview stores the cookies inside /data/data/com.example.app/webview/Cookies database which is a sqlite3 database. These cookies are stored in clear text. So an adversary having access to my phone can perform an adb backup and extract these cookies to abuse. Is there a way I can store these cookies in an encrypted format? Although the cookies have expiration set, is a good security practice to encrypt the cookies and store them?

0

There are 0 answers