Kali linux веб сервер

Сетевые сервисы Кали Линукс: Apache, MySQL, SSH и ещё.

Сетевые сервисы Кали Линукс: установка, запуск, проверка работы и первые шаги.

В Кали Линукс доступны сразу несколько сетевых сервисов, готовых к запуску и работе. Некоторые и самые, на мой взгляд, полезные есть смысл доустановить. И начинаем с прошитых в Кали HTTP под Apache, MySQL и SSH. Первые команды запуска сетевых служб я уже рассматривал, но кое-что в Кали стоит добавить прямо сейчас.

На каком-нибудь этапе работы по тестированию чего-либо вам обязательно понадобится отдельный веб-сервер (ну не вживую же кого-то пробивать). Например, проверить его на прочность вредоносным скриптом. И для этой цели нам послужит предустановленный в Кали Апач(и) (Apache). Чтобы запустить сервер в Кали прямо сейчас, нужно:

  • открыть окно терминала и ввести команду

откройте браузер по адресу 127.0.0.1. Вас должно встретить страница приветствия Апачи по умолчанию. Само по себе оно полезного ничего не несёт, подтверждая однако, что теперь машина готова к приёму веб-движка, который вы собираетесь тестировать:

После работы, если необходимо, остановите сервис:

Следует запомнить, что команду на запуск следует повторять всякий раз после перезагрузки Калине зависимо от того, тормозили вы сервис в предыдущем сеансе или нет. Но вариант автозапуска Апачи вместе с загрузкой Кали есть — вот команда для терминала:

Команда, которая уберёт Апачи из автозапуска в терминале выглядит так:

или при помощи systemctl:

Учтите на будущее, что последняя из команд удалит из автостарта сервис. Но если в автозапуске Кали оказались принадлежащие сервису скрипты, они так и будут лезть в систему. Их убираем по аналогии:

Опять же, если вы передумаете и решите вернуть Apache в автостарт, пригодится команда:

MySQL

Второй по счёту сервис Кали, который сразу следует узнавать в лицо, — MySQL. Это одна из систем, имеющая прямое отношение к базам данных. Очень часто используется в тройке с языком программирования PHP и сервером Apache для формирования динамических веб-приложений. В работе по тестированию мы чаще всего будем использовать MySQL для хранения результатов поиска уязвимостей и отрисовки сетей. Ну, конечно, далеко не только для этого.

Для запуска сервиса в терминале набираем почти знакомое:

Чтобы проверить результат работы терминала, можно запустить MySQL клиент для соединения с сервером. Определим в качестве логина имя пользователя root и пароль для подключения к серверу MySQL:

если работает, как и я сейчас, в сеансе от root-пользователя:

покинуть строку mysql можно командой exit или quit и остановить сервис по аналогии с вышеописанной командой:

Команды по автозапуску и, наоборот, изъятию оного сервиса аналогичны тем, что давались для Apache. Но здесь также следует заметить, что из соображений безопасности по умолчанию служба MySQL в Кали Линукс доступна исключительно с локальной машины. Подобную конфигурацию можно будет потом изменить в файле /etc/mysql/my.cnf. Однако сейчас, как и в прошлый раз, я настоятельно рекомендую всё оставить как есть.

Он же Secure Shell (защищённый сетевой протокол). Для нас он интересен тем, что SSH может быть использован для входа в удалённый компьютер в защищённом режиме, в котором обмен данными между машинами будет относительно закрыт от подсматривания и подглядывания извне. В Кали он то же уже установлен, так что запускаем:

Самым лучшим способом узнать результат ввода команды, это было бы подключение к Кали с другого сервера через SSH-клиент типа putty. Но мы сидим не на Windows, так что чтобы проверить прямо сейчас, настроился ли на прослушку портов указанный протокол, введите в терминале команду утилиты lsof. Она показывает, какие файлы используются в Кали теми или иными процессами.

Читайте также:  Command conquer 4 tiberian twilight windows 10

Ну, как закинут сервис в автозагрузку или остановить службу, вы уже знаете.

Источник

How to Configure Apache Server in Kali Linux complete Tutorial for beginner

In the article, I am going to cover how to configure apache server in Kali Linux, webserver apache in Kali Linux. Apache web server is similar methods are used in other Linux distribution. Simple commands can make an expert in using the webserver.

Originally this post is written on Jun 11, 2014, and last updated in April 2021. This article is not related to the cheap web server, web hosting, business web hosting, cloud hosting or any type of dedicated hosting service. This article defines only local webserver on Kali Linux for local Penetration testing.

What is an apache Web Server?

A web server is a type of server, that delivers web pages to the clients as per their request. Every Web server has an IP Address and domain name for identification. Server Administrator can make local webserver setup.

You can make a simple computer to work as a web server, It may be Windows, Linux or mac. You can install any web server software on your basic system. For example Xamp, Wamp etc.

Both of these software has apache web server.

I dont want to go in depth related this topic. So come back on the topic Web server in Kali Linux.

This is time to say thanks to Kali Linux developers, who have installed already Apache webserver in Kali Linux. But by default, apache service is not running.

I will explain in this article about configuration of apache server.

How do you know you web server is running or not? what happened if server is running.

When your server is ready to deliver web pages then you can access through web browser.

Clients access the web pages through a Web browser like Google Chrome, Firefox, Safari, etc.

You need to enter URL or IP address into the address bar of the web browser and the page will be delivered by Web server scripting.

If you enter https://www.cyberpratibha.com/blog in the Address bar it will be served by Web Server.

How to Configure Apache Server in Kali Linux?

In Kali Linux, you don’t need to set up a web server because Kali Linux has a pre-installed apache server. Hacker uses this webserver to deliver a web page containing malicious code to the victim by the help of a local webserver or by doing port forwarding.

We can trap them by using social engineering method for example Phishing. There are others who use the HTTP service in penetration testing.

it manages dedicated web server capacity to deliver pages and have web server load balancing.

OLD Method to start Restart Apache2 web service

Use GUIs to Start Restart Apache2 web Server in Linux

It is the easiest way to start, stop and restart the Apache2 service in GUI mode. Select Applications from the top bar of the Kali screen, next sub-menu bar will be displayed, Select Kali Linux menu, another fly-out display bar will appear, then go on the services menu, again next fly-out menu bar will display, In this bar web service can be start, stop and restart.

Once a selection happened, a command shell will open and the status of service will be displayed. When the Apache server has been started, the default page will be display by typing Attacker’s ip address in the web browser. IceWeasle is default web browser in Kali Linux distribution.

Note: GUI to start, stop, restart apache2 is not support in Kali Linux 2016.2 version.

Читайте также:  Не устанавливается realtek для windows 10 64 bit

Check the status of Apache server

Your first step to check the apache server is installed on your machine or not. Use the following command to check installed package apache2

apt list –installed apache2

In the above result, you can see apache2 installed.

Next check the status of apache web server in Kali Linux. Use the following command to do that:

Press the “q” to exit command.

You can see in the result apache service status is inactive. If the service is inactive then you can access its web pages.

Open a web browser and type localhost/127.0.0.1 then hit enter.

You will get an error “Unable to connect”.

It means the webserver is not running on your Kali Linux machine. Now your next step to start the apache server.

Start, Stop and Restart the Apache webserver in Kali Linux

It is easy to start, stop and restart Web Server using the simple command in the terminal /etc/init.d/apache2 followed by requested action (stop, start or restart). Following commands are used
#/etc/init.d/apache2 start

Another way to start, stop of restart Apache2 service by following commands

#service apache2 start

#service apache2 stop

#service apache2 restart

The Default Web Page

Once the Apache service is up and running the default (It works!) page may need to be changed, to do this make the web content that ought to be shown on the page and spare it as index.html in the /var/www/ index. Then again, the current index.html document in this area could be modified what’s more new pages might be included.

MODULE 3:- Basics of Kali Linux

Источник

Packages and Binaries:

apache2

The Apache HTTP Server Project’s goal is to build a secure, efficient and extensible HTTP server as standards-compliant open source software. The result has long been the number one web server on the Internet.

Installing this package results in a full installation, including the configuration files, init scripts and support scripts.

Installed size: 614 KB
How to install: sudo apt install apache2

  • apache2-bin
  • apache2-data
  • apache2-utils
  • dpkg
  • init-system-helpers
  • lsb-base
  • mime-support
  • perl
  • procps
a2disconf

Enable or disable an apache2 configuration file

a2dismod

Enable or disable an apache2 module

a2dissite

Enable or disable an apache2 site / virtual host

a2enconf

Enable or disable an apache2 configuration file

a2enmod

Enable or disable an apache2 module

a2ensite

Enable or disable an apache2 site / virtual host

a2query

Retrieve runtime configuration from a local Apache 2 HTTP server

apache2ctl

Apache HTTP server control interface

apachectl

Apache HTTP server control interface

apache2-bin

The Apache HTTP Server Project’s goal is to build a secure, efficient and extensible HTTP server as standards-compliant open source software. The result has long been the number one web server on the Internet.

This package contains the binaries only and does not set up a working web-server instance. Install the “apache2” package to get a fully working instance.

Installed size: 4.90 MB
How to install: sudo apt install apache2-bin

  • libapr1
  • libaprutil1
  • libaprutil1-dbd-sqlite3 | libaprutil1-dbd-mysql | libaprutil1-dbd-odbc | libaprutil1-dbd-pgsql | libaprutil1-dbd-freetds
  • libaprutil1-ldap
  • libbrotli1
  • libc6
  • libcrypt1
  • libcurl4
  • libjansson4
  • libldap-2.4-2
  • liblua5.3-0
  • libnghttp2-14
  • libpcre3
  • libssl1.1
  • libxml2
  • perl
  • zlib1g
apache2

Apache Hypertext Transfer Protocol Server

apache2-data

The Apache HTTP Server Project’s goal is to build a secure, efficient and extensible HTTP server as standards-compliant open source software. The result has long been the number one web server on the Internet.

This package contains architecture-independent common files such as icons, error pages and static index files.

Installed size: 848 KB
How to install: sudo apt install apache2-data

apache2-dev

The Apache HTTP Server Project’s goal is to build a secure, efficient and extensible HTTP server as standards-compliant open source software. The result has long been the number one web server on the Internet.

This package provides development headers and the apxs2 binary for the Apache 2 HTTP server, useful to develop and link third party additions to the Debian Apache HTTP server package.

It also provides dh_apache2 and dh sequence addons useful to install various Debian Apache2 extensions with debhelper. It supports

  • Apache 2 module configurations and shared objects
  • Site configuration files
  • Global configuration files

Installed size: 1.09 MB
How to install: sudo apt install apache2-dev

  • debhelper
  • libapr1-dev
  • libaprutil1-dev
  • openssl
  • perl

APache eXtenSion tool

apxs2

APache eXtenSion tool

dh_apache2

Register configuration snippets to the Apache web server

apache2-doc

The Apache HTTP Server Project’s goal is to build a secure, efficient and extensible HTTP server as standards-compliant open source software. The result has long been the number one web server on the Internet.

This package provides the documentation for the Apache 2 HTTP server. The documentation is shipped in HTML format and can be accessed from a local running Apache HTTP server instance or by browsing the file system directly.

Installed size: 24.40 MB
How to install: sudo apt install apache2-doc

apache2-ssl-dev

The Apache HTTP Server Project’s goal is to build a secure, efficient and extensible HTTP server as standards-compliant open source software. The result has long been the number one web server on the Internet.

This package provides the development header and the dependencies for modules that interact with mod_ssl’s internal openssl state.

Installed size: 13 KB
How to install: sudo apt install apache2-ssl-dev

apache2-suexec-custom

Provides a customizable version of the suexec helper program for mod_suexec. This is not the version from upstream, but can be configured with a configuration file.

If you do not need non-standard document root or userdir settings, it is recommended that you use the standard suexec helper program from the apache2-suexec-pristine package instead.

Installed size: 235 KB
How to install: sudo apt install apache2-suexec-custom

apache2-suexec-pristine

Provides the standard suexec helper program for mod_suexec. This version is compiled with document root /var/www and userdir suffix public_html. If you need different settings, use the package apache2-suexec-custom.

Installed size: 225 KB
How to install: sudo apt install apache2-suexec-pristine

apache2-utils

Provides some add-on programs useful for any web server. These include:

  • ab (Apache benchmark tool)
  • fcgistarter (Start a FastCGI program)
  • logresolve (Resolve IP addresses to hostnames in logfiles)
  • htpasswd (Manipulate basic authentication files)
  • htdigest (Manipulate digest authentication files)
  • htdbm (Manipulate basic authentication files in DBM format, using APR)
  • htcacheclean (Clean up the disk cache)
  • rotatelogs (Periodically stop writing to a logfile and open a new one)
  • split-logfile (Split a single log including multiple vhosts)
  • checkgid (Checks whether the caller can setgid to the specified group)
  • check_forensic (Extract mod_log_forensic output from Apache log files)
  • httxt2dbm (Generate dbm files for use with RewriteMap)

Installed size: 477 KB
How to install: sudo apt install apache2-utils

Apache HTTP server benchmarking tool

check_forensic

Tool to extract mod_log_forensic output from apache log files

checkgid
fcgistarter

Start a FastCGI program

htcacheclean

Clean up the disk cache

htdbm

Manipulate DBM password databases

htdigest

Manage user files for digest authentication

htpasswd

Manage user files for basic authentication

httxt2dbm

Generate dbm files for use with RewriteMap

logresolve

Resolve IP-addresses to hostnames in Apache log files

rotatelogs

Piped logging program to rotate Apache logs

split-logfile

Split combined virtual hosts access log into one file per virtual host

libapache2-mod-md

This is a transitional package to apache2 for users of libapache2-mod-md. It can be safely removed after the installation is complete.

Installed size: 6 KB
How to install: sudo apt install libapache2-mod-md

libapache2-mod-proxy-uwsgi

This is a transitional package to apache2 for users of libapache2-mod-proxy-uwsgi. It can be safely removed after the installation is complete.

Installed size: 10 KB
How to install: sudo apt install libapache2-mod-proxy-uwsgi

Источник

Читайте также:  Как установить mozilla firefox windows 10
Оцените статью