My understanding of cURL
Note : In this I will be using kali-linux and metasploitable3 . It is recommended to setup your lab by downloading both , before following the blog.
cURL ( yes , you are right it is Client URL )
It is a tiny and simple command line tool that lets you talk to any website without even touching browser . Most beginners, including me, eventually make up using it. We use it for automation and small scripts. Because it's simple , fast and works with almost all the protocols you will ever meet .
curl -L helps follow redirects.Setting up Metasploitable3 for cURL
We use Metasploitable3 because it has many intentionally vulnerable services to test against. To do so we need it's IP address .
Steps to get IP address
1) Login in into your metasploitable3 . Admin - vagrant ; Password - vagrant
2) Run ifconfig and note the inet address under eth0.
Starting with cURL
We have done a good chunk of work by just knowing the metaspolitable3 IPv4 address . Now , we need to move on to cURL who is the actual hero 😎 of our blog .
Steps to follow
1) Log into Kali (username: kali, password: kali, unless you changed it). .
2) Access the terminal and type
ping -c 3 192.168.182.131
3) Now we will use the actual cURL type
curl 192.168.182.131
The output you see is a raw html response from the metasploitable3 server.
Note : You can also type the domain name of any website if you want to .Type the following command:
curl https://example.com
Note: If you see a lot of certificate errors and warnings no need to worry. We will cover this later .
To access any page (not api) you need to know the exact location of the page on the website . Then you can run the following commands :
curl 192.168.182.131/chat/
This will help you access the chat page in metasploitable3
Comments
Post a Comment