This vulnerability does not affect people who are using the genuine app from the Google Play Store. It would only harm people who are tricked into installing a modified app from a Web site, email, etc.
The Proof of Concept code below merely logs the username and password, where other apps on the phone can see it, but there's nothing preventing a better programmer from sending that data, and all the other data the app has, out over the Net.
TD Ameritrade should add integrity-checking to their server-side code. Obfuscating their smali code with a real obfuscator that works, like DashO, and not just the useless Proguard, would also be an improvement.
Pull the APK file from the device with adb, as shown below.
Decode the APK file with apktool, as shown below.
Modify the ConsumerApi.smali.smali file to steal the user ID and password, as shown below.
Build the APK and sign it, as shown below.
Drag the APK file from the dist/ directory and drop it on the emulator to install it.
Launch the app.
Click on "Log In"
Enter a user ID and password. Click "Log In".
The User ID and password are in the logs, as shown below.
But the same Trojan still works:
Here's the app I tested:
I log in with test credentials:
TD Ameritrade logs my credentials:
I went back to test the earlier version of the app, and it did not have this problem. TD Ameritrade is moving backwards.