-
Notifications
You must be signed in to change notification settings - Fork 33
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
Accout verification #31
Comments
The captcha verification method has been removed in version 4.48. (see also #22) Now you can only verify an account using google cloud messaging. This should be reversable as well, but I didn't have the time to look at that yet. |
I currently don't see how this can be "easily" reversed as you will have to get a valid InstanceID from Googles Servers and you will need (probably) the server-secret from jodel |
Worst case is we need a dummy android app that runs on a phone and talks to the gcm-servers to verify the account. But I believe it should be possible to do that without an actual device. We need the gcm ApiKey and an InstanceId (probably the deprecated push_token would still work as well). We can pull the apiKey from the apk. InstanceId, I don't know yet, I haven't looked at the gcm libs yet. What worries me more at the moment is that they changed the hmac request signing method. Look at the pull request for 4.48, registering an account works, but posting doesn't. Maybe they have different keys for different api methods now. I don't have any experience reverse engineering C code, so any help here is appreciated. |
I can give it a try but yeah, looks like it is now shuffling based on path too somehow. |
FYI Here's some discussion on reverse engineering libhmac.so: And an archive of all apks since 4.40: Looking at the diff of libhmac between 4.47 and 4.48 might be interesting. |
My assembly is quite rusty but I am doing progress. Got it disassambled and I believe I got a/the secret atleast: swbBCdBLdtvSqgflkjyrvVwiVHMZSQDQzQWsPiMg (not tested yet) The sign function is giving me headaches but the other atleast I know the parameters.
|
I will reverse it as soon as I get some time for it. @donmahallem Can you tell us your steps? |
I just figured this out a bit. The problem isn't with the key, or the native signing function. The key from PR #33 is correct and working. But as soon as we log into a verified account with v4.48 it becomes unverified again (and also can't be downgraded to 4.47). |
@nborrmann Thanks for the information! Can you open a new repo for the GCM reversing, so I could contribute to it? |
I haven't really coded anything, just looked at mitm traffic, decompiled source and documentation. But I'll open a repo and document the stuff in the readme. |
Here's what I have so far: https://github.com/nborrmann/gcmreverse Pleae feel free to send pull requests. |
Boom!
|
Update: I've got everything working pretty stable. Gonna post it to a branch on this repo soon. |
nice! |
Tested, merged and published. Kinda ironic that it's now easier than before to verify accounts ˙ ͜ʟ˙ |
Nice. Well done and thank you for the work |
@nborrmann |
I mostly use Fiddler. But the GCM connection isn't a http request, that's just a tcp socket (an encrypted one). It won't show up in http proxies. You can try wireshark or message analyzer, but setting up ssl/tls decryption is kinda hard for these programs. |
@nborrmann |
@gitarre94 You have to activate HTTPS decryption. |
yes |
should i use transparent proxy? |
I does not work with the most android applications... |
@gitarre94 What do you mean? Fiddler works generally for all applications. It wont work if they implemented some sort of certificate pinning. |
Ok. I think that they use certpinning. How can i remove that part from the app? |
@gitarre94 Reverse Engineering |
Ok. Should i root my android device and remove the cert pinning? |
@gitarre94 You don't have to root your phone if it's Android. You have to jailbreak iOS if you want to load patched binaries without developer certificate, unless they sideload the apps, but you have to resign them every week. |
The key that is used to sign every request (basically the thing we need to change with every release) depends on the app's signature. When you rebuild the app you need to sign it with your own keys and that changes the signature. You can work around that by hardcoding the original signature into the signing-routine before rebuilding. You can also use this tool: https://github.com/JesusFreke/smali |
dont really know what you mean... I have only .smali files. This code is really new for me. Where can i get the original signature? And how can I hardcode the original signature? |
@gitarre94 as @nborrmann said, you have to modify the signing routine to use the secret for your apk version. Basically, you have to extract the secret for each update and implement it in your modded function. Either use smali or patch the VM opcodes manually, it's actually not too hard for this situation, since everything is located and bootstrapped at the same location. |
@ioncodes which modded function? where can i find the secret? I just want to see the traffic. I think i have too little knowledge in reverse engineering. |
@gitarre94 You have to mod the sign function, you have to teach yourself RE. |
can i go that way?
|
@gitarre94 No, you gotta inform yourself first. |
Hello There,
Issue
I cloned latest package and tested but while when I use verify account call I get following error
(500, {u'metadata': None, u'error': u'Invalid Version: 4.47'})
...
Environment
As mentioned I cloned latest package which is 4.47. Which is mentioned in error also but not sure why it is giving this error.
Thanks
The text was updated successfully, but these errors were encountered: