The single most common causes
of a broken Kali Linux installation are following unofficial advice, and
particularly arbitrarily populating the system’s sources.list file with unofficial repositories. The following post aims to clarify what repositories should exist in sources.list, and when they should be used.
Any additional repositories added to the Kali sources.list file will most likely BREAK YOUR KALI LINUX INSTALL.
Regular repositories
On a standard, clean install of Kali Linux, you should have the following entry present in /etc/apt/sources.list:
deb http://http.kali.org/kali kali-rolling main non-free contrib
You can find a list of official Kali Linux mirrors here.
Source repositories
In case you require source packages, you might also want to add the following repositories as well:
deb-src http://http.kali.org/kali kali-rolling main non-free contrib
The kali-dev repository
WARNING:
While kali-dev is publicly accessible to everybody on all Kali mirrors,
this distribution should not be used by end-users as it will regularly
break.
This repository is actually Debian’s
Testing distribution with all the kali-specific packages (available in
the kali-dev-only repository) force-injected. Kali packages take
precedence over the Debian packages.
Sometimes when Testing changes,
some Kali packages must be updated and this will not happen immediately.
During this time, kali-dev is likely to be broken. This repository is
where Kali developers push updated packages and is the basis used to
create kali-rolling.
About Kali-Rolling Repository.
Contrary to kali-dev, kali-rolling is
expected to be of better quality because it’s managed by a tool that
ensures installability of all the package it contains.
That tool picks
updated packages from kali-dev and copies them to kali-rolling only when
they have been verified to be installable. Note however that those
checks do not include any functional testing.
It might still contain
broken software due to other problems that are not covered by the
package dependencies.
Primary Repository is Kali Rolling Most Users Should Be Using.
They can also report any issue they have with Kali specific packages on bugs.kali.org. Make sure to select the “kali-dev” version in “Product version”.
Kali Rolling users are expected to have the following entries in their sources.list:
deb http://http.kali.org/kali kali-rolling main non-free contrib
This document will guide a reporter on
how best to present a bug report so it gets addressed as quickly as
possible. The goal of a bug report is to enable the Kali Linux
developers to reproduce the issue and see the failure, if any. If the
Kali developers can make it fail, they will work to gather extra
information until the root cause is known.
Kali Linux has official community-driven forums located here
We welcome everyone to the Kali Linux community and we have outlined a
few simple rules below. Please take a few moments to review them before
joining the forums.
Kali Linux has an official IRC channel located on the Freenode network. The official IRC channel is #kali-linux
Please take a few moments to review the rules and guidelines below before joining the channel
Kali Linux
has a number of sites available to serve our users. Listed below are
the official Kali sites and the purpose each serves. Note that these
sites are the only official Kali Linux sites and are the only authoritative sources of information available for the distribution.
Kali Linux provides three repositories
which are mirrored world-wide. When you use a mirror, you’ll be
automatically redirected to one close to you, which is guaranteed to be
up-to-date. If you prefer to manually select a mirror, click on the
mirrorlist link near each hostname and select a mirror that suits you.
When using the default hosts listed
above, you’ll automatically be redirected to a mirror site which is
geographically close to you, and which is guaranteed to be up-to-date.
If you prefer to manually select a mirror, click on the mirrorlist link near each hostname above and select a mirror that suits you. You will then need to edit your /etc/apt/sources.list file accordingly with the chosen values.
IMPORTANT! Do not add additional repositories to your /etc/apt/sources.list file.
Doing so will most likely break your Kali installation.
How to Set Up a Kali Linux Mirror
Requirements
To be an official Kali Linux mirror, you will need a web-accessible server (http required and https if possible too)
with lots of disk space, good bandwidth, rsync, and SSH access enabled.
As of early 2015, the main package repository is about 450 GB and the
ISO images repository is about 50 GB but you can expect those numbers to
grow regularly. A mirror site is expected to make the files available
over HTTP and RSYNC so those services will need to be enabled. FTP
access is optional.
Note on “Push Mirroring”
— The Kali Linux mirroring infrastructure uses SSH-based triggers to
ping the mirrors when they need to be refreshed. This currently takes
place 4 times a day.
Create a User Account for the Mirror
If you don’t have yet an account dedicated for the mirrors, create such an account (here we call it “archvsync”):
$ sudo adduser --disabled-password archvsync
Adding user 'archvsync' ...
[...] Is the information correct? [Y/n]
Create Directories for the Mirror
Create the directories that will contain the mirrors and change their owner to the dedicated user that you just created:
Configuration of your web server and FTP
server are outside the scope of this article. Ideally, you should
export the mirrors at http://yourmirror.net/kali and
http://yourmirror.net/kali-images (and do the same for the FTP protocol,
if you’re supporting it).
Now comes interesting part: the configuration of the dedicated user
that will handle the SSH trigger and the actual mirroring. You should
first unpack ftpsync.tar.gz in the user’s account:
$ sudosu - archvsync
$ wget http://archive.kali.org/ftpsync.tar.gz
$ tar zxf ftpsync.tar.gz
Now we need to create a configuration file. We start from a template and we edit at least the MIRRORNAME, TO, RSYNC_PATH, and RSYNC_HOST parameters:
If you have not unpacked the
ftpsync.tar.gz in the home directory, then you must adjust accordingly
the “~/bin/ftpsync” path, which is hard-coded in .ssh/authorized_keys.
Now you must send an email to devel@kali.org
with all the URLs of your mirrors so that you can be added in the main
mirror list and to open up your rsync access on archive.kali.org. Please
indicate clearly who should be contacted in case of problems (or if
changes must be made/coordinated to the mirror setup).
Instead of waiting for the first push from archive.kali.org, you
should run an initial rsync with a mirror close to you, using the mirror
list linked above to select one.
Assuming that you picked
archive-4.kali.org, here’s what you can run as your dedicated mirror
user:
The ISO images repository does not use
push mirroring so you must schedule a daily rsync run. We provide a
bin/mirror-kali-images script, which is ready to use that you can add in
the crontab of your dedicated user.
You just have to configure
etc/mirror-kali-images.conf.
We’ve seen many people break their Kali
Linux installations by following unofficial advice, or arbitrarily
populating their sources.list file with unneeded repositories. The
following post aims to clarify what repositories should exist in
sources.list, and when they should be used.
In keeping with the Kali Linux Network
Services Policy, there are no network services, including database
services, running on boot so there are a couple of steps that need to be
taken in order to get Metasploit up and running with database support.
This document explains how to make use
of NVIDIA video hardware and install the drivers on a Kali Linux system.
The first step is to fully update your Kali Linux system and make sure
you have the kernel headers installed.
Should you decide to install Kali Linux
within VirtualBox, you will need to follow the instructions below in
order to successfully install the Linux Guest Addition tools.
Should you decide to create your own
VMware installation of Kali Linux rather than using our pre-made VMware
images, you will need to follow the instructions below in order to
successfully install VMware Tools in your Kali installation.
Kali Linux
This Linux Distro have gained popularity recently quickly. The reason for popularity is legilized hacking, and made shiny brand new for the wife and kids.
Purely clean hacking is new in town and back as the cool-thing-to-do in pop-culture, and may-be attributed to the TV series Mr. Robot.
Kali is one of many hacking focused Linux distributions, and said by many that Mr. Robot’s popularity place a fire-cracker under Kali Linux's ass getting new users.
The graph below validates this claim.
Kali Linux popularity rises with Mr. Robot TV Series
People have little knowledge of Linux or
related to computer security are now trying to use Kali as their main
Linux distribution getting the feel of Heroin addicted Mr. Robot's hacker life style.
Look at Kali Linux tools and you’ll find so many tools that relate to ‘hacking’.
But Kali Linux was certainly not designed for that purpose.
Of course, I could easily write an article explaining why it’s wrong to use Kali as a first Linux distribution. In fact, you could find great arguments here and here to dissuade you from using Kali unless you really have specific needs.
But I wanted to do something different. So I installed Kali Linux in VirtualBox
and tried to put myself in the shoes of a ‘new user’ trying some basic
tasks on his brand new Linux system. So, will I encounter some issues or
will it be straightforward? Stay with me up until the end of this
article to read my conclusions.
To quote the official web page title:
Kali Linux is a “Penetration Testing and Ethical Hacking Linux Distribution”.
Simply said, it’s a Linux distribution packed with security-related
tools and targeted toward network and computer security experts.
A
Linux Distribution is nothing more than a bundle containing the Linux
kernel, a set of core utilities and applications and some default
settings. So, Kali Linux does not offer something unique in that sense most of the provided tools could be installed on any Linux distribution.
The difference is Kali is pre-packaged
with those tools and the default settings were chosen according to the
intended use cases of that distribution, rather than, say, to fit the
needs of the typical desktop user.
In other words, whatever is your goal, you don’t have
to use Kali. It is just a special distributions making easier the tasks
it is specifically designed for, while eventually making other tasks
more difficult.