‫Instructor: Hi.
‫Within this lecture we are gonna see how to create a server
‫in order to place the vAPI that we have downloaded inside
‫of it so that we can solve the CTFs.
‫And we're going to use a service called Digital Ocean
‫for that.
‫But in fact, you don't have to use it.
‫You're not obligated to.
‫I'm gonna show you all about it, don't worry.
‫But for right now, I just downloaded that folder
‫and it's in the zip file, it's in a zip format right now.
‫So I'm gonna double click on it and just unzip it.
‫So if you have a WinZip,
‫WinRAR, just make sure you unzip it
‫before you see the contents of it.
‫So let me show you what's inside of that folder.
‫So as you can see, we can see all the codes
‫all the files and folders inside of it.
‫Of course, if you know the php then you can just take a look
‫at the codes and try to figure it out.
‫But I won't suggest that because we don't have to
‫understand the vulnerabilities by looking at the code.
‫We have to find it in a real website.
‫Okay? But the point over here is
‫that we have a resources folder
‫in which we have two folders for API2 and API3.
‫Okay? Once the time comes, we need to come back here.
‫And also there is a Postman folder over here.
‫Postman is kind of a tool that we are going to
‫be using in this section.
‫So I'm going to show you how to use them
‫but that is the reason why we have downloaded it.
‫Okay? Make sure you download it
‫make sure you have the resources folder
‫and also the Postman folder as well.
‫So what we are going to do, we are going to actually
‫use the Digital Ocean service in order to create a server
‫and just directly copy these codes inside of that server so
‫that we can launch this vAPI inside of that server so
‫that we can reach it later on.
‫And as you can see, there is a manual over here
‫in order to actually create the server.
‫Once we create the server, we can install it using
‫that manual or using that readme.
‫So Digital Ocean is this website, digitalocean.com.
‫It provides some cloud solutions.
‫And there reason why I'm showing you this
‫because the servers are not for free, right?
‫So Digital Ocean has given me some link.
‫If you click on that link, it will give you some credits
‫like $25 to $100.
‫But all we need is 5 or 6 dollars
‫in order to create the server and just test it.
‫Of course, if you don't like it, you don't have to do it
‫okay? Because Digital Ocean will ask for your credit card no
‫matter what, even if you have credit.
‫So if you don't wanna give your credit
‫card number, then don't do it because
‫sometimes it charges you with $1
‫and it gives back that $1 eventually.
‫But people get suspicious about it.
‫So if you don't wanna do it, just don't do it.
‫Digital Ocean is a credible platform that
‫provides cloud solutions to very respectable firms.
‫That's why I chose it.
‫And of course the credit is one
‫of the reasons that I chose it, and it's very
‫easy to use the Docker in order to install that
‫vAPI inside of the the Digital Ocean.
‫But again, if you have your own server
‫for some reason, for example, then just use that server.
‫If you don't wanna use the Digital Ocean, then don't.
‫Okay? But if you want, I will give you some link
‫and you will click on it in order to sign-up
‫and it'll give you some free credits
‫and you will be creating that server for free.
‫And you will be using it for free.
‫Just make sure you click on that link
‫and sign-up and then it will lead you
‫to the dashboard of Digital Ocean.
‫So once I click on that
‫let me show you where it will lead you.
‫So it will lead you at in a dashboard like this, okay?
‫You will see the menu on the left hand side
‫and you will see the details on the main page.
‫So if you don't see something like this
‫this is a project, okay?
‫It created a default project for me.
‫You can create a project
‫by clicking on this new project button over here.
‫And let me just create a new project
‫so that you can see what's going on. Inside of this project
‫all you gotta do is just come up with a name.
‫I'm going to say something like vapiTest or
‫vapiChallenge or CTF, anything you want.
‫You can give a description if you want.
‫You can just say Just trying out Digital Ocean
‫and it will create your project.
‫Now I don't wanna move any resources in this, okay?
‫Just say skip for now, and here you go.
‫Here is your project.
‫But in order to create a server inside of a project
‫you need to create something called droplet.
‫Okay? So find this droplet and click on it.
‫It will just actually show you a page like this where
‫you will choose the version or the distribution
‫of your server.
‫So I'm gonna go with Ubuntu or "Yubuntu" whatever you
‫may wanna call it.
‫But you can go with the Debian or any other thing
‫that you're familiar with.
‫If you're familiar with Kali Linux, then I suggest you go
‫with Ubuntu or Debian. Okay?
‫Don't go with CentOS or FreeBSD
‫because they're a little bit different.
‫It's always a good idea to go with
‫the same thing with mine.
‫Okay so I'm gonna go
‫with Ubuntu without even changing the version of it.
‫So once you choose the Ubuntu
‫then you can come over here and choose the CPU options.
‫I'm gonna go for the cheapest one.
‫Okay? So right now it seems to be $6 a month.
‫So let me just try to change this like
‫from premium Intel to regular Intel.
‫Yeah, here you go.
‫I have one for $5 a month, but it really doesn't matter
‫because we are not even going to use it for a month.
‫We already have that credit
‫so we can just delete it later on.
‫And of course
‫you're gonna have to choose a datacenter region.
‫I'm gonna go for Amsterdam.
‫It doesn't have a meaning.
‫You can just choose whatever you want from here, okay?
‫And I'm going to choose a password rather than an SSH key
‫so that it would be very simple for us.
‫Of course, SSH key is much more preferable when
‫it comes to security, but we're gonna delete the server like
‫in a couple of days or a couple of hours, okay?
‫So choose the password.
‫So this will be the root password of your server.
‫Just make sure you take a note of it, okay?
‫So that you can use it to connect it to your server.
‫So as you can see, it has some kind of requirements.
‫Make sure you follow these requirements
‫and create a root password for you.
‫Again, don't lose that password, it won't get sent
‫to you via email or something like that.
‫Make sure you take a note of that.
‫So here you go.
‫Let's see.
‫We want only one droplet.
‫Yep, that's right.
‫We don't care about backups right now.
‫We're just gonna destroy this droplet when the time comes.
‫So I'm gonna say create droplet.
‫Here you go.
‫Now it's creating the droplet for us.
‫And once it is created, once it is initialized
‫we are gonna see the IP address of it.
‫So we can use that IP address in order to connect
‫to our server and also in order to host the vAPI
‫inside of the server and reach it.
‫Okay? That's all you gotta do in order to create
‫a Ubuntu server inside of the Digital Ocean.
‫As I said before
‫if you don't wanna use the Digital Ocean for any reason
‫then don't do it.
‫Just use another service, another server, anything
‫you want just to accommodate or host the vAPI inside of it.
‫So here you go.
‫That is my IP address.
‫And as you can see, once I see the IP address
‫then I can just copy it, okay?
‫Use it to connect it.
‫And since I'm using a MacBook right now
‫I'm not even going to use Kali Linux inside of this section
‫by the way.
‫I'm just gonna go
‫with my own computer and you can do that too.
‫But of course there might be some challenges
‫for you to connect to the server if you are not
‫using Kali Linux or any Linux or MacBook or MacOS.
‫If you're using Windows, there is no SSH key
‫or SSH client for you to just directly connect it.
‫Don't worry about it.
‫I'm just gonna show you some other various ways
‫for you to connect to, okay?
‫But if you're using Mac or if you're using Kali Linux
‫or any kind of distribution or Linux
‫just open your terminal and connect to this IP address.
‫I'm gonna show you how to do it, don't worry about it.
‫And later on
‫once I connected to that server, I'm going to
‫show you how to connect it using Windows as well.
‫So I'm gonna open my terminal inside of the MacBook.
‫If you're inside of MacBook, you can hit command
‫and space and search for terminal, inside of Linux,
‫I believe you already know how to open the terminal.
‫All you gotta do is just run this command:
‫SSH root@, an IP address.
‫Of course, this IP address will be different for you.
‫I'm gonna say yes to this and here you go.
‫It asks me for my password.
‫So this is the root password that we have just defined.
‫So I type it and hit enter
‫but it doesn't show up on the screen because of
‫the security reasons and I mistyped it I believe.
‫So I'm gonna try it one more time.
‫And again, if you're using Windows, just bear with me.
‫I'm gonna show you have to do that.
‫Here we go. Now,
‫I'm inside of the root of Ubuntu right now.
‫If I run ifconfig,
‫it says that even ifconfig is not installed in the server
‫I'm just gonna run: "apt install net-tools", okay?
‫So that it will be installed in our own server.
‫And here you go.
‫Right now if I run ifconfig, you will see the
‫eth0 is 134, 209, 206, 33
‫32, sorry.
‫So this is my own server right now.
‫I'm inside of this terminal
‫but this terminal doesn't control my own computer.
‫It controls the server.
‫As you can see, I'm connected as a root.
‫Great, that's what I was looking for.
‫Okay, so if you are on Windows
‫if you're on Linux, it's the same thing.
‫But if you're on Windows
‫how to connect it? So you can download an SSH client.
‫So I'm gonna show you what I mean.
‫If you search for Windows SSH connection
‫you will see something called PuTTY or "PuTTY".
‫So this one, P U T T Y.
‫Okay? So this is an SSH client.
‫This is a program that you can freely download
‫and you have to just give the IP
‫you have to give the password, and then you are in.
‫So let me show you the PuTTY interface
‫if I can find a picture of it.
‫Okay? So as you can see
‫there are a lot of tutorials over here.
‫Like start the PuTTY, just give the host name
‫and if you wanna change the port, then change the port
‫but don't change the port.
‫The SSH port is 22 and it's okay by default.
‫Okay? And then you're just gonna give your password
‫and then you're in.
‫So let me open the Google one more time
‫and search for PuTTY.
‫I just wanna show you the interface of it.
‫And here you go.
‫This is the user interface of the PuTTY.
‫If you download it, you can give the host name, okay?
‫If you choose the SSH as a connection type
‫the port will be 22 by default.
‫Don't change it.
‫And then you just gonna say open or connect
‫and it will ask you
‫for your password and just you give it, okay?
‫You can use this, but if you don't wanna use this
‫if you don't wanna download it, if you don't want to
‫or maybe you couldn't download the PuTTY for some reason
‫then there is another option
‫for you you can directly connect to
‫terminal via using the web interface.
‫Okay? If you come over here to that menu
‫you can see access Console.
‫Once you click on the access console
‫it will prompt you to open a web dialogue
‫like a web interface for a terminal.
‫And it will give you root access
‫one more time.
‫You can just launch this droplet console from the web.
‫So if you're using Windows, I suggest you download the PuTTY
‫because I believe it's a great tool for you to learn, okay?
‫If you're into cyber security.
‫But again, you don't have to do it.
‫You can just use the web interface as well.
‫But you need to find a way to connect to that server
‫because we are going to have to just install the
‫vAPI inside, inside of the server so that we can actually
‫reach it via that IP address.
‫And maybe you are thinking right now, since you're
‫creating the server, why not just share the IP address
‫with us?
‫Why not just leave it open?
‫Because once we start to pen-test the IP address
‫pen-test the API, it will cause
‫some changes in the server.
‫And once you go to that server
‫once you do the pen-test, after somebody does it
‫it may give you some different results depending
‫on the situation.
‫So it's better for you to start with a fresh server.
‫That's why I'm just showing you all of this stuff.
‫And also, it's a good idea
‫for you to learn about creating servers like this
‫Ubuntu over here and connect it,
‫and just install some API on it.
‫It's a great skill set, right?
‫So what we are gonna do
‫we are gonna stop here, and within the next lecture
‫we are going to download the vAPI inside
‫of this server and try to understand how to install it.
‫And we are going to do that using the terminal.
‫So you better connect to your server right now.