Installing Nikto on Various Unix Server Distributions
Nikto is a popular open-source web server scanner used by security professionals to detect potential vulnerabilities. Below is a detailed guide on how to install Nikto on various Unix server distributions, including Debian-based systems, Red Hat-based systems, and others like macOS and FreeBSD.
You can read more info on nikto's official website : https://cirt.net/Nikto2
1. Debian-Based Systems (Ubuntu, Debian)
Step-by-Step Installation:
- Update Package List: Open a terminal and execute the following command to update your package list:
sudo apt-get update
- Install Nikto: Install Nikto using the
apt-get
command:
sudo apt-get install nikto -y
Verification: Check the installation by running:
nikto -Version
2. Red Hat-Based Systems (CentOS, Fedora, RHEL)
Step-by-Step Installation:
- Enable EPEL Repository: For CentOS and RHEL, enable the Extra Packages for Enterprise Linux (EPEL) repository first:
sudo yum install epel-release -y
Fedora users can skip this step as the EPEL repository is not required.
- Install Nikto: Install Nikto using the
yum
ordnf
command (for Fedora):sudo yum install nikto -y
or
sudo dnf install nikto -y
Verification: Check the installation by running:
nikto -Version
3. Arch Linux
Step-by-Step Installation:
- Use Pacman: Install Nikto directly from the community repository using pacman:
sudo pacman -S nikto
Verification: Verify the installation by running:
nikto -Version
4. macOS
Step-by-Step Installation:
- Install Homebrew: If not already installed, you can install Homebrew, a package manager for macOS, by running:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install Nikto: Once Homebrew is installed, you can install Nikto using Homebrew:
brew install nikto
Verification: Check if Nikto was installed successfully:
nikto -Version
5. FreeBSD
Step-by-Step Installation:
- Install from Ports Collection: You can install Nikto from the FreeBSD Ports Collection. First, navigate to the Nikto port directory:
cd /usr/ports/security/nikto/
Then, compile and install the port:
make install clean
Verification: Verify that Nikto is correctly installed by running:
nikto -Version
Post-Installation Steps
After installing Nikto, it's advisable to:
- Update Nikto's plugin and database: Nikto can be updated with the latest vulnerability database and plugins by running:
nikto -update
- Run an initial test: Test your Nikto installation by scanning a test website (ensure you have permission):
nikto -h http://testsite.com
This guide should help you install Nikto on various Unix-based server distributions, ensuring you're equipped to start securing your web servers effectively.