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

Random issues that I found while using the script #2

Closed
MrPowerGamerBR opened this issue Aug 12, 2024 · 1 comment
Closed

Random issues that I found while using the script #2

MrPowerGamerBR opened this issue Aug 12, 2024 · 1 comment

Comments

@MrPowerGamerBR
Copy link

MrPowerGamerBR commented Aug 12, 2024

First things first: Thanks for the script! Finally decided to dump my tokens from Authy, I hate that they deprecated the desktop app and haven't provided any way of creating a offline backup.

For some reason, when I tried to dump my tokens, some of them do not have all of the keys that the script expects, here's all the errors that I found.

Here's my patched up script that I made that fixes these issues, if you think that it is good enough, I can PR the changes :3: https://gist.github.com/MrPowerGamerBR/0b34232c319fe044d22d4cd42d0a9b07

What I also noticed is that the script should use name instead of originalName, a lot of the dumped accounts end up with my email as its name because Authy stored the originalName as my email, while name has the name of the service (yes, the originalIssuer should have the service name... but in my case not all of them have it...).

Script skips accountType that aren't authenticator, even tho the script can successfully dump them

Some of my accountType are weird... My Discord has discord as its account type, my Stripe account is stripe, so on and so forth, and because of that, the script skips the account, even tho it can successfully dump it.

I haven't thoroughly tested it yet, but the script does generate valid TOTP codes (I tested with the dumped discord and twitter accountType, and I was able to login with no issues) for these accounts.

Maybe it would be better for the script to attempt to dump any accountType, and if it fails, skip it.

Here's a reference of all the accountType that I found that weren't authenticator:

  • discord
  • stripe
  • dropbox
  • twitter

KeyError: 'originalName'

Traceback (most recent call last):
  File "C:\Users\leona\AppData\Local\Programs\Python\Python312\Lib\site-packages\frida\core.py", line 562, in _on_message
    callback(message, data)
  File "C:\Users\leona\AppData\Local\Programs\Python\Python312\Scripts\authy-totp.py", line 60, in onMessage
    parseXML(dataFile)
  File "C:\Users\leona\AppData\Local\Programs\Python\Python312\Scripts\authy-totp.py", line 97, in parseXML
    "name": data[i]["originalName"],
            ~~~~~~~^^^^^^^^^^^^^^^^
{'accountType': 'authenticator', 'decryptedSecret': '{secret_here}', 'digits': 6, 'encryptedSecret': '{encrypted_secret_here}', 'key_derivation_iterations': 100000, 'logo': 'proxmox', 'timestamp': 1568657426, 'salt': '{salt_here}', 'upload_state': 'uploaded', 'hidden': False, 'id': '1577886906', 'isNew': False, 'name': 'Stardust Proxmox'}

KeyError: 'originalIssuer'

Traceback (most recent call last):
  File "C:\Users\leona\AppData\Local\Programs\Python\Python312\Lib\site-packages\frida\core.py", line 562, in _on_message
    callback(message, data)
  File "C:\Users\leona\AppData\Local\Programs\Python\Python312\Scripts\authy-totp.py", line 60, in onMessage
    parseXML(dataFile)
  File "C:\Users\leona\AppData\Local\Programs\Python\Python312\Scripts\authy-totp.py", line 95, in parseXML
    "issuer": data[i]["originalIssuer"],
              ~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'originalIssuer'
{'accountType': 'authenticator', 'decryptedSecret': '{secret_here}', 'digits': 6, 'encryptedSecret': '{encrypted_secret_here}', 'key_derivation_iterations': 100000, 'originalName': '{my_email}', 'timestamp': 1568657426, 'salt': '{salt_here}', 'upload_state': 'uploaded', 'hidden': False, 'id': '1561743679', 'isNew': False, 'name': 'Foxbit'}
@markuta
Copy link
Owner

markuta commented Aug 13, 2024

Hey @MrPowerGamerBR glad it sort of worked for you :D

I must admit it was a really fast and dirty script, I didn't put too much effort into testing (as it shows) many different accounts.

Hmm, interesting, I guess they use that field for popular services and icon packs? anyway, Happy to do a PR.

@markuta markuta closed this as completed Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants