Managing Kali Linux Services
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.
[email protected] :~# passwd
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
[email protected] :~# service ssh start
Now we can verify the SSH service is running and listening TCP port 22 as using follow netstat command.
[email protected] :~# netstat -antp | grep sshd
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.
[email protected] :~# update-rc.d ssh enable
Opening Terminal on a Remote Machine using SSH
[email protected] :~# ssh [email protected]
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.
[email protected] :~# service apache2 start
we also verify HTTP service by using netstat command and filter this by grep command.
[email protected] :~# netstat -antp | grep apache
To start HTTP service at boot time, like SSH service using
[email protected] :~# update-rc.d apache2 enable
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.