‫Instructor: Hi, within this lecture,
‫we're going to discuss tunnel link services,
‫in order to overcome the problems that we have seen
‫in the previous lecture.
‫So in order to do that,
‫we're going to use something called ngrok.com, okay.
‫So this is a tunnel link service,
‫but what is a tunnel link service,
‫and why do we want to use one?
‫Of course, we are going to use it for our backdoor,
‫but there are other various uses
‫in order to leverage this kind of tunnel link services
‫in real life.
‫For example, in our Kali Linux, we have actually
‫a web server, okay.
‫You can actually host a web service in your Kali Linux.
‫So let me clear this tab right now,
‫we are going to write it later on, anyway.
‫So I'm going to write service apache2 start.
‫So when you do that,
‫it will run a web service in your Kali Linux.
‫So actually there is a web server going on
‫in your Kali Linux right now and you can change the content
‫of it in order to host a web server
‫or I don't know, website in your Kali Linux.
‫For example, if you go to your file system, okay,
‫to your folders, I will show you where your website is
‫right now, so that you can edit it and use it
‫if you need it.
‫We're not going to need it, anyway,
‫but I'm going to show it to you
‫so that you know how to use it.
‫So if you open your file system, I'm going to
‫wander into file system and a directory called V-A-R var.
‫Okay.
‫So if you go over to this var,
‫you will see a folder called www, which is your website,
‫and gonna have to double click on this html
‫and you will see this index.html.
‫So index.html is the file that you see
‫when you brows into a website.
‫So whatever is written over here
‫will be displayed if someone browsers to your website.
‫Right now, I'm running this web server,
‫but since my Kali Linux is on the net network,
‫only the files or only the computers on the net network
‫can actually see those files,
‫see the website that we are running.
‫But we can use ngrok to open this website
‫to the world as well.
‫So if you open your browser, okay in your Kali Linux,
‫like yeah, your Firefox, and if you're on ifgonfig
‫to see your IP address,
‫you will see mine is 10.0.2.15, I'm going to write 10.0.2.15
‫in my browser and you will write your own IP address.
‫And what I will see is the content of my index.html.
‫As you can see, this is a default page that is created
‫as a test or as a default website,
‫and I'm now seeing it.
‫If I had another machine on my virtual box,
‫I could have written 10.0.2.15 to any browser
‫from that machine and I can reach this website as well.
‫And if I use ngrok, I will be able to open this website
‫to the public.
‫That's not what we are looking for,
‫but tunneling service lets us connect our local IP addresses
‫or local machines to the internet using their own services
‫so that we can actually gather the information
‫to the ngrok IPs from the back door, from the Android phone,
‫and forward that information
‫to the Kali Linux using the same system, okay?
‫We're going to use it for this reason,
‫but remember, the tunneling services
‫may provide much more broader or greater
‫advantages in given time.
‫So what we want to do is to set the ngrok up
‫in our computer so that we can reach their services
‫so that we can actually forward that information
‫when it comes to the ngrok , to the Kali Linux,
‫so that we can create our session,
‫so that we can hack into the Android phone
‫and get access to their privileges,
‫browser files and folders and everything.
‫So that's what we are gonna do.
‫So first of all, I want to go to ngrok again
‫and download some files and folders
‫and set up some account information with ngrok,
‫because we will need those information.
‫You won't be able to use the ngrok
‫without creating any account, okay?
‫So what I would suggest is to close this down
‫because we are done with it and minimize this tab
‫and open the Firefox.
‫And then next thing we are gonna do, we are going to write
‫N-G, like thism N-G-R-O-K dot com over here.
‫And once we do that, we are going to register
‫for an account.
‫So you'll see login and sign up buttons over here.
‫Of course, this team or some kind of user interface
‫may change in over time,
‫but they will always provide some kind of login
‫or sign up register options.
‫So you want to register for an account,
‫don't worry, it's free by the way,
‫but you're going to have to provide some kind of email
‫then other stuff in order to create an account.
‫So I already have an account so I can go to log in,
‫but I'm going to show you how to sign up as well.
‫So let me click on sign up, and as you can see,
‫you will only provide your name, your email, and email again
‫and a password, and it will create your account for you.
‫So it's fairly easy.
‫So rather I'm going to log in
‫with the previously created account of mine
‫and it will direct me to the same page
‫that you are going to see when you sign up.
‫So I made up an email for this like
‫jackkirocs@gmail.com and password, something like this.
‫Let me save this.
‫Yeah, let me update this,
‫and it will ask me to complete an installation
‫or set up process.
‫So this is what we are looking for.
‫As you can see, ngrok can be used in macOS, in Windows,
‫and in Linux as well.
‫Since we are in Linux, we are seeing the button for Linux,
‫but if you want to use this in Windows or in Mac
‫for some reason, of course you are allowed to use it.
‫But I'm going to download for Linux.
‫So I'm going to click on this button
‫and I'm going to say save file, okay?
‫It will download the file for me
‫and then, of course, I'm going to have to unzip it
‫because it will be kind of zipped.
‫You can use unzip command in order to unzip it
‫or you can just right click on it and unzip it yourself.
‫So let me open the download file and show you what I mean.
‫So open your download file from your file system, okay.
‫It should be under root.
‫So root, downloads.
‫Once you double click on the downloads,
‫you will see the ngrok downloaded file over here.
‫So this is a zip file,
‫and Kali Linux also have its own archiver.
‫So if you double click on that, you can see the ngrok,
‫you can just drag and drop it to your own folder
‫like this, okay?
‫So it will be unzipped,
‫of course, you can use the unzip command as well
‫in order to get familiarized
‫with Kali Linux a little bit more.
‫So after that, let me come over here.
‫You are gonna have to connect your account.
‫So since you have created this account,
‫it will give you this kind of an authentication token.
‫So yours will be different from mine,
‫so you are gonna have to copy it from your own account.
‫I'm going to close down my account
‫so don't try to write my own token over here,
‫create your own accounts
‫and just copy this command from here.
‫So I'm going to copy everything and I'm going to paste it
‫on my terminal so that it will be authenticated
‫so that it will be ready to use.
‫And don't skip anything,
‫just make sure you get the whole line over here, okay?
‫Because otherwise it won't be authenticated
‫and it won't work.
‫So once you are ready,
‫you have to open your terminal one more time
‫and change your directory into the downloads folder
‫or any other folder that you have downloaded your tool into.
‫So mine is in downloads, so I'm going to say cd downloads
‫and now I'm inside of downloads.
‫If I just paste this selection or clipboard over here,
‫it will run the ngrok and it will authenticate me
‫using the token, okay?
‫Now my token is saved.
‫I am free to use ngrok services.
‫So that's how you install and that's how you set up
‫your environment for tunneling services.
‫Next, we are going to provide some information
‫to the back door that we have been trying to create
‫and use it.
‫See you in the next lecture.