Search For Tutorial

Sunday, 16 July 2017

How To Setup Basic Apache Web Server using Xampp and Ngrok

Posted by Desi Boys
While learning Ethical Hacking, we need basic webserver to host our files like viruses, web pages or any phishing pages. Because you cant host your phishing pages on other free hosting hosting provider, they will detect it and ban your account.

So here we have simple solution for it. That is, we will setup our own basic apache web server using xampp and ngrok to host our phishing pages and much more.

You can also use ngrok to provide  your localhost server access outside your LAN or say over internet.
What is Xampp and Ngrok ?
Xampp is cross platform local server software program,  having Apache server, PHP, MySQL etc. This software is mostly used to install a localhost server and test web apps. In other words, most coders use it as a Environment Setup program to test their PHP or MySQL codes.

Ngrok can be used to tunnel from a public URL to our locally running services. Like you are running xampp localhost server and you want one of your friend to access it over internet. In that case, you can use ngrok to get a public URL and your friend can use this public URL to access your localhost server.

apache web server setup using xampp ngrok

Download Xampp and Ngrok

Apache Web Server Setup using Xampp and Ngrok

Step 1 :- Download and install Xampp using above links. (Kid’s Stuff)

Step 2  :– Open Xampp control panel and start Apache server.

apache webserver xampp control panel


Step 3:- Download ngrok compatible with your OS and Extract it. Now you have to create an account on ngrok.com and login.
After logging in, you will see your dashboard. Copy your authtoken from here.

apache webserver setup ngrok dashboard

I erased my authtoken from this pic because of some security reasons.

Step 4:- Now got to the extracted folder, where you ngrok.exe file is located, press Shift + Right Click, then click Open Command Windows Here from options to open command prompt here.

Step 5 :- Type this command to save your authtoken for first time.
ngrok.exe authtoken your_unique_authtoken
Press enter.

ngrok save authtoken


Step 6:- Use this command to start a basic http webserver and get your public URL.
ngrok.exe http 80

webserver started ngrok public url


So, here you have your public url to access your localhost xampp server over internet. Type it in browser like this.
https://url.ngrok.io:80
Be sure to add :80 at the end of URL otherwise you will 502 bad gateway error.
Here 80 is port number of http service.

What are DOS and DDOS Attacks?

To host and access any file, just put it in C:\xampp\htdocs\
Now you can host your files and phishing pages using this basic xampp and apache web server setup.



0 comments:

Post a Comment