I'm going to be teaching you how to gain access to any of these applications within the mobile device.
So for example, in this case, I have a specific mobile app here, and we will learn how to get the
username and password to log in to any of these mobile apps.
Now, kids, before we go any further, remember hacking is illegal.
Before you start hacking, remember to ask your mom for permission first.
So right here we have our best friend Carla Linux.
Or of course, you can also be using windows XP to run any of this hacking operations.
So in this case, what I need to do is enter the following of ADB devices.
So in this case we have not had the daemon started.
So we have it running right now.
So if I enter ADB devices you can see that there are no lists of devices attached.
So what we need to do is to go back into the target device over here.
And what I can do now is to go over into Wi-Fi.
So let's say I'm connected over into Wi-Fi.
I can pull down from the top and you can see the WiFi setting over here.
And what I can do now is to go ahead and click onto it.
So when I click onto it I can get my IP address.
So here in this case I have the IP address of 192.168.0.205.
So let's go ahead and try to connect over to it using adb.
So I enter adb connect 192168.0.205 and then followed by port 5555.
Hit enter on that.
Okay, done.
So if I enter ADB devices now, we now have remote access over into the device.
Next up we can go ahead and enter ADB shell.
So we now have shell access I can enter Su.
So right now we are using the user of root.
So we have root access inside the mobile device.
So this is really powerful.
And what I can do next is to CD over to data data com dot android dot.
In this case we have the following.
All right hit enter on that enter LZ and enter into Sharedpreferences.
Enter Alice again and this is the part where we can view the username as well as the password that is
in use to log in over into the mobile application.
So I can say, for example cat my Sharedpreferences dot XML, I'll hit enter on this.
There you go.
We got one the encrypted username as well as two the super secure password.
Now that is not the real username or password that is stored inside the mobile device.
In fact, it is protected.
So what we need to do now is to decrypt it unprotected gain access to the plaintext information.
So I went over to launch Mouse Pad, our editor so I can go ahead and copy this first.
So copy selection head over here I paste it.
All right.
So I have saved it into a location.
So we'll be using this later on.
So what I can do now is to head over and break down the application itself.
So I can enter say for example in this case RLS.
And we have, of course, I have downloaded this Android insecure banking app.
I can enter this again and we have in this situation an insecure bank v2 apk.
So I've downloaded this apk file and we want to extract it and see what is inside of it, so that we
gain some kind of credentials or password information that can allow us to decrypt the username, as
well as the password to get direct access to some of these APK files that are downloaded, or you got
them from different kind of play stores, you can go to APK mirror.
So this is the place where you can download the specific APK file, and then you'll be able to extract
and do your analysis from there.
So what we can do right now is to go in and extract it.
And I'll be introducing a tool here called Dex.
And we do a dash D and we do an add in the absolute path.
So in this case we have home slash hacker slash Android dash insecure bank v2 followed by extracted
folder.
And then we target the apk file that we have downloaded in this situation.
We have home again slash hacker slash Android insecure bank v2 followed by insecure bank v2 dot apk.
Hit enter on this and now we are extracting.
So you can see over here we are loading and it's going to be a progress.
All right 24%.
And we're extracting more and more of the information over here.
And with that we can look into the source of the APK file.
And we can see deeply what is going on and the one that we'll be inspecting over here.
Let me show you just that as we navigate over.
So I CD over into extracted.
And I can see over here we have resources as well as sources.
So I can see the over into sources and then into com into Android.
And then right here we can see that we have the insecure bank V2.
And I can enter LZ.
Again this are the files.
This is the information right here.
And the one that we're targeting in this situation can do a mouse pad over into say for example, do
log in.
So the one you were trying to target is what is happening?
What is the logic behind it.
When we're logging in I hit enter on that.
So we now open this up and let me just zoom in a little more so it's easier for you to see.
And you can see this is the logic behind what's going on.
So if there is a correct credentials so you can see the pop up over here and of course the one that
will be investigating further.
Like for example, the earlier part, you'll be saying, hey, how did hacker Lloyd knew about the path
where the encrypted username and password were stored?
So in that case we have the shared preferences and the dual login get shared preferences.
So this is the one that we're seeing right here.
And what happens next is it commits over into the storage folder or directory.
And this is how we are able to get that specific file or storage file name.
Additionally, you can see right here we have a crypto class.
So they are using some kind of encryption technology.
So in this situation for the encrypted username it uses base64.
So base64 is not encryption.
All right.
So we can directly be able to go over into the base64 decode and get the information out for the username.
And then the secure or the super secure password.
So do log in this super secure password okay.
So what we need to do then if you go over here going back to the directory again we can see that there
is a crypto class Java.
So this is another one that we can target to see what's the logic behind it.
All right.
Now whatever we are doing is pretty raw.
So I want to introduce to you Jade GUI.
And this is so much easier to use as compared to seeing some of the raw sources of information.
So I can head over to file and I can go ahead and enter, Say for example open files and we have the
following of insecure bank v2 dot apk.
So it's literally the same thing, just that it gives you a graphical user interface.
You can see it loaded right now on the left.
So I can extend on to source code comm Android.
And I can now double click onto it.
So the one that we saw earlier is do login.
So you can see right here we have all the information.
All right.
And I can also click on the crypto class.
So in crypto class what's really interesting right now is you can see here we have the string key.
So this is the key that is used to encrypt as well as decrypt the information.
And we also have the initialization vector which is set to all zeros.
So with this two information right here we can do a lot of things.
So you can see and investigate.
It uses as Advanced Encryption Standard 256 encrypt followed by.
You can see the five bytes the key bytes the text bytes.
All right.
And we can see the cipher is aes CBC pq cs five padding.
So we can use this information right here.
And you can see the decryption option as well which is similar.
So we can use this to help us get that password.
Now heading back to the collected information I can copy the information here which is the encrypted
username.
I head over to a site like Base64 decode.
I can paste the information right here, and I can click on to decode.
And from the decoded result we can get hacker Lloyd.
So the username is hacker Lloyd.
So right here the next target attribute is going to be the password field.
So what we have now is I can head back over into the super secure password.
I can copy the selection right here.
And I can go over into website like encode decode comm.
And we have the supported encryption option.
So in this situation with Ax 56.
I paste the encrypted string right here and what we have is the secret key.
So if you head back over into this part, we have the string key.
So I can copy.
This is the super secret key 123.
I head back over to the browser.
I paste the key right here, and all I have to do is click decrypt string and you can see we have Handsome
Loy as the password.
Last but not the least, let's head back over into the mobile application.
So we're here right now and I can head over into the app.
So we have the insecure Bank V2.
I hit enter on this, and all I have to do right now is enter the username and the password of Handsome
Loy, and go ahead and click on to login.
Boom.
And we now have access to the account.
So once again I hope you've learned something useful, something valuable.
And there will be a lot more of this mobile application hacking tutorials coming your way, so stay
tuned for that.