‫Instructor: Hi, within this lecture,
‫we are going to see how we can manipulate the activities.
‫So before we begin the CTF,
‫I have told you we don't even need a user login
‫and password in order to see the activities that we want.
‫And right now we are going to see how it's done
‫even though it's given to us in the CTF,
‫and maybe it will not be given
‫to us in real life examples or if we want
‫to see some administrator activity for example.
‫And in order to do that, we have a way.
‫So what I'm going to do,
‫I'm going to uninstall this app, okay?
‫And I'm going to actually delete this APK
‫and APK tool created folder because we have manipulated it.
‫And I'm going to start with the original one.
‫So I'm going to copy this again to my desktop
‫and of course we are gonna have to run APK tool
‫from the beginning, but it's not a very hard thing to do.
‫All you have to do is just run APK tool
‫D and the APK name like that.
‫So we're going to decompile it first, okay?
‫And we are going to start analyzing the app
‫from scratch as if we don't know anything about this app.
‫So I'm going to open this and all I want to do
‫is just to see the content of the Android manifest.
‫So I'm going to open the Android manifest in Genie
‫or you can just run it with our text editor or any editor.
‫Okay, because all we want to do is just to see the content.
‫So over here, let me zoom in a little bit, okay?
‫And one more time.
‫And yeah, I believe this will be good.
‫So over here as you can see we have the activity names.
‫So we can see this main launcher tag,
‫which is the opening tag.
‫And we have all the other information here like minimum SDK
‫or the permissions and some of the packaging names or stuff.
‫And over here we have the activities.
‫So it starts with this activity and as you can see
‫this is the login activity, okay.
‫So this is the one.
‫So once we see the intent filter of main and launcher
‫we know this is the first activity to be shown,
‫first screen that a user sees when this app is launched.
‫So this is the first thing that we see.
‫And if we don't know the username or password,
‫we can still see the other activities as well.
‫So we can get the names of the other activities
‫from the smally files
‫or from the manifest itself, right?
‫Like as you can see, we have this activity like post login,
‫and wrong login, do transfer or real statement.
‫So post login is actually pretty self explanatory, okay?
‫So this is what happens when a user logs in.
‫So if we want to see that, but if we don't know the password
‫or if we want to explore
‫for other ways to see the other activities
‫then we are going to have to learn a new skill.
‫It will be very good for you to learn this
‫so that you can actually implement this technique
‫in your real life examples as well.
‫And of course there are some other activities over here
‫you can try with this technique,
‫with other activities as well.
‫But make sure you copy or just take note
‫of the activity that you may want to see, okay?
‫And you're going to need it
‫of course when you run some commands.
‫So what is the command that we are looking for?
‫Just let me install this new APK over here, okay?
‫And leave the username and password blank.
‫And let me open my terminal.
‫And of course our server is running at the left hand side.
‫So over here I'm gonna run adb.
‫So remember adb, it stands for Android Debugging Bridge.
‫And by this command,
‫we can actually manipulate the emulators.
‫However, there is some problem in Macs'.
‫So you can actually face this problem with a common thing.
‫Even though you fix it, it just comes back.
‫So if you experience this problem,
‫you can search for the adbexe
‫so that you can use it directly.
‫So I'm gonna search for adb okay?
‫And of course you can do this inside of Windows as well.
‫I'm gonna search for adbexe, and when I find it
‫I'm just going to use it on my terminal.
‫So let me find the adbexe
‫and let me show you where it's located on my machine.
‫It's under the sdk folder that I have downloaded over here.
‫So if you have chosen your sdk downloaded to reside
‫in any folder, just open this
‫and you can find the sdk folder.
‫And then under sdk folder, you can search for adb.
‫And of course there are a lot of folders over here
‫but you can find the adb on platform tools like this.
‫So all you have to do is just write the path over here
‫or just drag and drop it onto your terminal
‫so that it will run it or it'll just display it over here.
‫Of course you can say get info and see where it's located
‫and try to run it manually as well.
‫So after you get this adb like that, it can be run.
‫So why are we using this adb?
‫We can install the APKs manually
‫by dragging and dropping them, okay?
‫But we can't just run adb shell,
‫in order to have a shell connection
‫to the current working session.
‫So what does it mean?
‫Now we can actually run some commands, okay,
‫on our emulator.
‫For example, let me just make this a little bit bigger
‫so you can see my commands a little bit better, okay?
‫I'm going to run a command over here
‫and this command will allow us to manipulate
‫the activity itself.
‫So I'm gonna say am start-n.
‫After that, you can specify the activity to be executed,
‫activity to be shown on the emulator itself.
‫So this is pretty cool and we're going to see other examples
‫of this adb shell thing later on.
‫But right now, this is a very good opportunity for you
‫to understand why you should use adb when it's needed.
‫So I'm gonna say com.android.insecurebankv2.
‫So this is the package name.
‫Of course you can get it from the Android manifest
‫or any folder from here like this
‫com.android.insecurebankv2.
‫So remember what a package name is, right?
‫So after you get that, you can just run /.PostLogin.
‫Of course this can be changed.
‫You have to specify the activity that you should see.
‫And once I do that, as you can see, it starts an intent
‫which takes us to the other activity like this.
‫So it's that simple.
‫Now we see the activity even though
‫we are not even logged in.
‫So we can actually browse through this app
‫using this intent technique.
‫And we can try to understand what is inside
‫of these activities, and we can gather much more information
‫or we can try to interact
‫with these activities and try to break the app,
‫or try to understand the app in a better way.
‫So this is a very good technique, as I said before.
‫So make sure, take a note about this am start
‫because it will be very beneficial for you
‫in real life examples.
‫So we're gonna stop here and continue within the next one.