May come back, guys, to our final challenge for our reverse engineering sector.
And this one, I find this challenge pretty amazing because it will recap everything we have learned
so far, not only in this chapter, also in the chapter before.
So therefore, let's have a look.
So we are talking about the insecure bank application, which I really like.
So the author of this one really appreciate all the work you have put into this one.
This challenge consists of an APK and also on web server, so we have to set up a little bit stuff before.
But don't worry, it isn't that much what we have to do to get started with this one.
And first of all, we have to install it on our device.
Okay, no problem.
But then we also having a web server which consists of Python and therefore we require some modules
to be installed first.
So what we need to do next is we need to run pip three dash ah on the requirements text in the given
directory.
Don't worry, we will set it up together afterwards.
But that you know what's going on over here.
Okay.
After installing all those requirements, we can then start our web server and this is simply just in
Python three API.
I have converted it to Python three because the original application is designed for Python two.
And this doesn't work on modern systems anymore because Python two is now out of date.
Therefore I have already ported it for you.
Okay.
After installing all those requirements, we can simply run this python three at Python and then the
web server is running and the mobile connection or the mobile application can make in connection to
our web server over here.
These are the steps we need to do.
Okay, now the question we are having different setups and which setup we should use right now for this
application.
I mean, we've got our emulator, we've got a device like this one over here and we might have also
this better machine, this x86 virtual machine, what should we use in which set up to do this?
Right now, in my opinion, the best idea is using the emulator because this application has been designed
to work as its best in the emulator.
There's also some interaction with SMS and stuff like this which might not work on the x86 virtual machine.
You could also use your device, but then please use a testing device.
This application requires a lot of permission.
And yes, this might be something you do not want to run on your own private form.
The x86 virtual machine might also work but be like a few features, for example, the SMS feature or
other things.
So in case if you're running the system or the emulator on your whole system, please go for the emulator.
The user experience is it's absolutely fantastic.
Even if you're using a virtual machine, you can still use the emulator because you do not need to have
much interaction with this application.
And last but not least, there's this testing device.
All right, now some safety notes.
I mean, these points should be clear, but nevertheless, let's let's recap this over here.
I mean, we are running Python code on our system, and we haven't written the python code on ourself.
Therefore, we should have at least a quick look into this one.
Nevertheless, we should always use only testing equipment.
So a testing notebook, a testing VM or an testing device.
Otherwise, if you mix testing with your private stuff, this could be absolutely horrible.
So you never know what is happening.
Don't get me wrong, I trust the author, but these are general recommendations we should keep in mind.
And also following this guideline through this course, in my case, right now, I'm using the whole
system which is in testing system.
Therefore, I can easily run the emulator on the testing system in case if you still want to separate
those things.
I mean, you could use an virtual machine where you take a snapshot and a select host only adapter.
If you run this emulator on this virtual machine, it's super laggy, but it works, so it's not that
nice.
But you can perform all these tasks without having this running on your whole system or without having
a real device.
In my case right now, I will run everything on the virtual machine which which will show that the user
experience is not that nice, but it works there.
So you could also do all these tasks without having a real device and without running this on your whole
system.
Okay.
All right.
So now the question, what we are looking for and the answer is everything we have talked about so far.
So this challenge is amazing because it will recap everything we have learned so far.
I have not made these topics regarding to this challenge.
This challenge has been made regarding to my topics.
So we are looking for insecure activities, broadcast receivers and content provider services, login
credentials which are stored inside there and stuff like this.
So this challenge is pretty amazing because it will it will reflect some real world applications and
they are misconfigurations or coding errors.
And therefore we can now or we now understand everything here to Yeah.
To exploit them.
For example, those activities, I mean we are pretty familiar with them right now and yeah, maybe
you will find flaws, but you can bypass certain features.
So if you start another activity, it does mean that we have successfully bypassed it already.
We have to figure out if we can still do some task in there because if this application requires some
set.
For example, there are some looking credentials which needs to be decrypted first.
And if we skip this part, then the application might not function correctly anymore.
But this is something we have to figure out.
Regarding to the content providers.
I have a special task for you.
Let's assume we have hacked into this application, which is a banking application, and we have performed
some malicious transactions inside there.
There's also unlocking feature within the content provider and we definitely want to hide our tricks.
So maybe you will find a way to to get rid of these log files in there, which would be absolutely amazing.
Last but not least, there is something going on with the login credentials.
So there is an encryption and there might be also some additional logging credentials.
So things you you should look for in real world applications also.
I have taken a quick look into this application and I have played around with these things, but there
might be tons of other things inside there, which I haven't seen so far.
So unfortunately we cannot talk about all of them because then the video might be 4 hours long, and
yet no one wants to watch this.
But I will also provide you some additional hints or features in a separate cheatsheet where you can
have a look into.
If you are stuck at this right now, at least you should give it a try.
So we are now doing this setup together and then you can have a look into this application.
Alrighty.
Okay, let's have a look.
All right.
So here we are back in the Ubuntu VM and now let's do the setup really quick together.
So you will find all these files in the attachment of this section and these files over here.
So this is the that's the Python web server and this one is the APK for our device.
All right.
First of all, we need to have an Internet connection and we need to install all those libraries and
tools that Python requires right now.
So tip three install dash are requirements.
And then you can see I have already installed them.
Okay, now we can simply start this web server by running Python three API.
As already mentioned, internet connection is not required anymore.
Okay.
This Python web server is now running on all interfaces we are having.
So let's see.
This means we are having no IP address or internet phase running up on here and here.
So where should this this emulator now connect to?
This emulator has its own network interface from our Android studio.
So there are some DHCP settings and the IP address is ten 00.2, I guess.
So this is pre-installed in this application.
This means on this interface we are having this 88, 88 port listening right now, which is our web
server and this one, and we can simply connect to this one.
But to get this interface up, we first have to start our emulator.
So let's do this emulator.
And I do not know what's the name.
So list AVD.
Emulator list AVD.
List of these.
No, I wasn't.
S missing oc.
That's the name.
So emulator.
And then add and the name.
Woops.
Once again, that's not that fast anymore.
Okay, now we have it.
The emulator is starting and we are already getting this node running in virtual machine in another
virtual machine.
It's not a good idea because they have to share those resources.
And even one virtual machine, it's yeah, it's struggling with this one maybe.
But we can see the Nexus emulator over here.
It's working perfectly fine.
So even in virtual machine.
Okay.
Here we have the device.
And you can see.
Yes, that's that's that's well enough.
All right.
Now, we need to install this application.
So under the lab server, here we have it in secure bank.
The ADB connection needs to be established right now.
Success and to have it perfect.
I also recommend using this Nexus emulator because the other one are more powerful and require more
resources.
But we do not need a powerful emulator right now.
We need some basic concepts and that's good to go.
All right.
Starting this application, we can see a lot of permissions files and media, something pretty interesting.
We have to take a look into the SD card because there might be some some files stored on a public available
directory.
SMS, auto, interesting contacts, phone call, log and location continue.
And.
This application has been built for an older version.
Not sure what's running right now I guess android 11, but it works perfectly fine on this one.
We can simply click okay and then we should be good to go.
All right.
Now, if you open the Web server and we have it.
I guess it's this one.
Yes.
So let's put this on the left.
Can we clear the screen?
No.
Then we are running it simply once again.
Okay.
Now we are having this application and here we are having a web server as an attacker.
We do not have access to this log file over here because this is running on the only real web server.
We can only interact with the application on the device.
But it's nice to see some some feedback.
Look over here.
Okay.
Let's see if everything works.
Therefore we should have or we need to configure the web server first.
But as already mentioned, if we click on these three dots, then we can see preferences.
And here we can see the server IP is ten 022 88, 80, 80.
Let's see, do we see this interface here?
No, it's not a network interface within our Ubuntu VM, it's network interface in the emulator right
now and this emulator is being provided or this network interface by the Android studio.
So we are having also this one running on this interface, which means if we clink, sorry, if you
click submit.
Then we we can see safe configuration successfully, but we do not know if it's working.
So therefore let's try to lock in at.
It looks a little bit, but for running it in another machine, I guess it's fine.
And I'm just using eight gigabyte of RAM.
I guess that's not that much anymore.
I grew up in a time where 128 and B was was quite a big deal.
But nowadays eight gigabyte, I guess that's that's pretty standard.
Okay.
We click login.
And invalid credentials.
So that's appearing here and we can see user does not exist.
Okay, perfect.
This works perfectly fine.
I mean, here we have now this information leak that the user admin doesn't exist, but this is happening
on the web server part and as an attacker, we do not have access to this one.
All right.
This is the whole setup.
I wish you good luck with this one.
But most important.
Have some fun.
Okay.
As always, I will do the solution video afterwards in the next video, and then I will provide you
some hints if you get stuck at a certain point.
So therefore, let's go and I'll see you in the next video.