Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore keys from TWRP backup #24

Closed
chertov opened this issue Nov 19, 2022 · 6 comments
Closed

Restore keys from TWRP backup #24

chertov opened this issue Nov 19, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@chertov
Copy link

chertov commented Nov 19, 2022

Today a column in /data/data/com.google.android.apps.authenticator2/databases/databases is encrypted.
Is it possible to get private key from backup and decrypt keys?

@scito
Copy link
Owner

scito commented Nov 19, 2022

I have no idea.

The extract_otp_secret_keys script works only with QR exports from the app. The secrets are already decrypted.

@brand1970
Copy link

I tried importing the decrypted keys into a new database (not the encrypted keys ) with a command line via sqlite3 and it works.
The headers of the file "/data/data/com.google.android.apps.authenticator2/databases/databases" (type .db) is :
0|_id|INTEGER|0||1
1|email|TEXT|1||0
2|secret|TEXT|1||0
3|counter|INTEGER|0|0|0
4|type|INTEGER|0||0
5|provider|INTEGER|0|0|0
6|issuer|TEXT|0|NULL|0
7|original_name|TEXT|0|NULL|0

@scito
Copy link
Owner

scito commented Nov 20, 2022

I tried importing the decrypted keys into a new database (not the encrypted keys ) with a command line via sqlite3 and it works.

I do not understand what you want to achieve.
How did you decrypt the keys?

@brand1970
Copy link

I did a simulated restore, nothing more...
When restoring I didn't use the secret keys but the decrypted ones
which anyone can find either with https://play.google.com/store/apps/details?id=com.beemdevelopment.aegis&hl=en
( https://github.com/beemdevelopment/Aegis )

@scito scito added the enhancement New feature or request label Nov 27, 2022
@shokolatha
Copy link

Aegis only decrypts databases of Google Authenticator prior to version 5.10, not the updated versions.
Without the decrypted keys you can't recreate a new database file.
So that's not a correct answer to chertov's question.

I did a simulated restore, nothing more... When restoring I didn't use the secret keys but the decrypted ones which anyone can find either with https://play.google.com/store/apps/details?id=com.beemdevelopment.aegis&hl=en ( https://github.com/beemdevelopment/Aegis )

@scito
Copy link
Owner

scito commented Feb 25, 2023

I think nothing can be done within the extract_otp_secrects script. Thus, I close this issue.

@scito scito closed this as completed Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants