Managing Kali Linux Services

 

Kali Linux

Kali Linux is a specialized Linux distribution aimed to test Network. The default Kali installation comes with several services preinstall like SSH, HTTP, MySQL, etc. These services would loaded at boot time,this result in Kali Linux exposing several open ports by default some time we avoid for security reasons, also Kali support both whitelist and blacklist  mechanism for various services.We discuss some of these services here and how to manage them.

1. Default root Password

If you are using the Kali Linux in VMware the default root password is toor, to change default password or weak password  to complex one and secure before starting any services such as SSH.The root password change by using passwd command show as below.

root@kali :~# passwd

Kali password change command

2. SSH Service

SSH stands for Secure Shell (SSH) is cryptographic network protocol and also a most common service used to remotely access a computer using encrypted protocol. SSH is TCP based service and listen by default port 22. SSH having a surprising feature beyond providing terminal access. To start SSH service in Kali by using below command

  • Open kali terminal and type follow command
root@kali :~# service ssh start

Kali ssh enable command 

Now we can verify the SSH service is running and listening TCP port 22 as using follow netstat command.

root@kali :~# netstat -antp | grep sshd

netstat in ssh command

If you want to run SSH service automatically at boot time, you need to enable by using update-rc.d script. This script is used to enable or disable most of the services in Kali Linux.

root@kali :~# update-rc.d ssh enable

ssh in boot time command

Opening Terminal on a Remote Machine using SSH

root@kali :~# ssh username@hostname

3. HTTP Services

HTTP services can be use during penetration test, either for hosting a site or providing a platform for download files to a target machine. It is also a TCP based services which listen by default port no 80. To start this service in Kali Linux use following command.

root@kali :~# service apache2 start

apache service start command

we also verify HTTP service by using netstat command and filter this by grep command.

root@kali :~# netstat -antp | grep apache

apache netstat command

To start HTTP service at boot time, like SSH service using

root@kali :~# update-rc.d apache2 enable

apache run at boot time command

Most of the service in Kali are operate same way which will follow above in SSH and HTTP demons through their service or init script. To get more control  of these Services you can use tools such as reconf or sysvrc-conf  both designed to simplify and manage the boot persistence of these services.
Have something to add in story?? Please share in comments.

Follow us on Facebook, Google Plus and Twitter.