Kali linux: подробный обзор дистрибутива
Содержание:
ARM Device Updates
Notable changes in ARM’s 2020.3 release:
- All of the ARM images come with metapackage installed, bringing them in line with the rest of our releases, so more tools are available when you first boot
- We have reduced the size of all our ARM images that are created, so downloads should be smaller. However, you will still need to use at least a 16GB sdcard/USB drive/eMMC
- Pinebook and Pinebook Pro images can now be used on either sdcard or eMMC
- The Pinebook image now has the WiFi driver built during image creation, instead of on first boot, this should speed up first boot time massively
- The Pinebook Pro has a change from the upstream firmware, which changes to – this allows access to more 2.4GHz and 5GHz channels
- The 64-bit RaspberryPi images now have the RaspberryPi userland utilities built during image creation, so and various other utilities that were previously only available on the 32-bit image are now usable on 64-bit as well
- The ODROID-C2 image now uses the Kali kernel, instead of a vendor provided one. This means in the future, an will get you kernel updates instead of waiting for a new Kali release
- The file now includes the root partition via UUID, this should make it easier when trying to use a USB drive instead of sdcard on devices that support it
A few things which are work in progress:
- RaspberryPi images are using 4.19 kernels. We would like to move to 5.4 however, isn’t working properly with it (as the new kernel requires firmware version => 7.45.202) for which no nexmon patch exists yet
- Veyron image will be released at a later date to kernel issues that haven’t yet been tracked down
Kali Linux Live USB Install Procedure
The specifics of this procedure will vary depending on whether you’re doing it on a Windows, Linux, or macOS/OS X system.
Creating a Bootable Kali USB Drive on Windows (Etcher)
-
Plug your USB drive into an available USB port on your Windows PC, note which drive designator (e.g. “F:\“) it uses once it mounts, and launch Etcher.
-
Choose the Kali Linux ISO file to be imaged with “select image” and verify that the USB drive to be overwritten is the correct one. Click the “Flash!” button once ready.
3. Once Etcher alerts you that the image has been flashed, you can safely remove the USB drive and proceed to boot into Kali with it.
Determining Package Priorities
In order to determine what packages get installed, APT has priorities assigned for all package sources, with the highest priority number taking precedence. A package with a priority of will never be installed and a package with a priority over 1000 will always be installed, even if it means downgrading the package.
This is all well and good for APT but how can you, the user, see what the priority is of a given package? Enter the little-known ‘apt-cache’ command and its ‘policy’ option, which displays all of your configured repositories and their priorities.
root@kali:~# apt-cache policy
Package files:
100 varlibdpkgstatus
release a=now
1 http://deb.debian.orgdebian experimentalmain amd64 Packages
release o=Debian,a=experimental,n=experimental,l=Debian,c=main,b=amd64
origin deb.debian.org
500 http://ftp.debian.orgdebian unstablenon-free amd64 Packages
release o=Debian,a=unstable,n=sid,l=Debian,c=non-free,b=amd64
origin ftp.debian.org
500 http://ftp.debian.orgdebian unstablecontrib amd64 Packages
release o=Debian,a=unstable,n=sid,l=Debian,c=contrib,b=amd64
origin ftp.debian.org
500 http://ftp.debian.orgdebian unstablemain amd64 Packages
release o=Debian,a=unstable,n=sid,l=Debian,c=main,b=amd64
origin ftp.debian.org
100 http://http.kali.orgkali kali-bleeding-edgemain amd64 Packages
release o=Kali,n=kali-bleeding-edge,c=main,b=amd64
origin http.kali.org
990 http://http.kali.orgkali kali-rollingcontrib amd64 Packages
release o=Kali,a=kali-rolling,n=kali-rolling,c=contrib,b=amd64
origin http.kali.org
990 http://http.kali.orgkali kali-rollingnon-free amd64 Packages
release o=Kali,a=kali-rolling,n=kali-rolling,c=non-free,b=amd64
origin http.kali.org
990 http://http.kali.orgkali kali-rollingmain amd64 Packages
release o=Kali,a=kali-rolling,n=kali-rolling,c=main,b=amd64
origin http.kali.org
Pinned packages:
root@kali:~# apt-cache policy sqlmap
sqlmap:
Installed: 1.1.9-1
Candidate: 1.1.9-1
Version table:
1.1.9+~git1505273832.7de63a-1 100
100 http://http.kali.orgkali kali-bleeding-edgemain amd64 Packages
*** 1.1.9-1 990
990 http://http.kali.orgkali kali-rollingmain amd64 Packages
500 http://ftp.debian.orgdebian unstablemain amd64 Packages
100 varlibdpkgstatus
Even though the version of sqlmap in kali-bleeding-edge is newer, it will not be installed because it only has a priority of 100, versus the installed version, which has a priority of 990. It is for this reason that when you want to install a package from a different package repository, it needs to be requested explicitly.
root@kali:~# apt install sqlmapkali-bleeding-edge
Reading package lists… Done
Building dependency tree
Reading state information… Done
Selected version ‘1.1.9+0~git1505273832.7de63a-1’ (http.kali.org all) for ‘sqlmap’
The following packages will be upgraded:
sqlmap1 upgraded, newly installed, to remove and not upgraded.
Need to get 6,789 kB of archives.
After this operation, 2,048 B of additional disk space will be used.
Get:1 http://kali.mirror.globo.techkali kali-bleeding-edgemain amd64 sqlmap all 1.1.9+~git1505273832.7de63a-1 6,789 kB
Fetched 6,789 kB in 5s (1,192 kBs)
Reading changelogs… Done(Reading database … 287587 files and directories currently installed.)
Preparing to unpack …sqlmap_1.1.9+~git1505273832.7de63a-1_all.deb …
Unpacking sqlmap (1.1.9+~git1505273832.7de63a-1) over (1.1.9-1) …
Setting up sqlmap (1.1.9+~git1505273832.7de63a-1) …
Processing triggers for man-db (2.7.6.1-2) …
New Shell (Is Coming)
Most people who use Kali Linux, (we hope), are very experienced Linux users. As a result, they feel very comfortable around the command line. We understand that “shells” are a very personal and precious thing to everyone (local or remote!), as that is how most people interact with Kali Linux. To the point where lots of experienced users only use a “GUI” to spin up multiple terminals. By default, Kali Linux has always used “bash” (aka “Bourne-Again SHell”) as the default shell, when you open up a terminal or console. Any seasoned Kali user would know the prompt (or for the older users!) very well!
Today, we are announcing the plan to switch over to ZSH shell. This is currently scheduled to be the default shell in 2020.4 (for this 2020.3 release, bash will still be the default).
If you have a fresh default install of Kali Linux 2020.3, you should have ZSH already installed (if not, do ), ready for a try. However if you installed an earlier version of Kali Linux and have upgraded to 2020.3, your user will be lacking the default ZSH configuration that we cooked with lots of love. So for upgrade users only, make sure to copy the configuration file:
kali@kali:~$ cp /etc/skel/.zshrc ~/
kali@kali:~$
Then all you need to do is switch to ZSH:
kali@kali:~$ zsh
┌──(kali㉿kali)-
└─$
If you like what you see, you can set ZSH as your default (replacing bash) by doing . Which is what we will be doing in 2020.4.
We wanted to give the community a notice before this switch happens. This is a very large change (some may argue larger than the Gnome to Xfce switch last year). We are also looking for feedback. We hope we have the right balance of design and functionality, but we know these typically don’t get done perfect the first time. And, we don’t want to overload the default shell with too many features, as lower powered devices will then struggle or it may be hard to on the eyes to read. ZSH has been something we have wanted to do for a long time (even before the switch over to Xfce!).
We will be doing extensive testing during this next cycle so we reserve the right to delay the default change, or change direction all together. Again, we encourage you to provide feedback on this process. There is no way we can cover every use case on our own, so your help is important.
Q.) Why did you make the switch? What’s wrong with bash? A.) You can do a lot of advanced things with bash, and customize it to do even more, but ZSH allows you to do even more. This was one really large selling point.
Q.) Why did you pick ZSH and not fish? A.) In the discussion of switching shells, one of the options that came up is Fish (Friendly Interactive SHell). Fish is a nice shell (probably nicer than ZSH), but realistically it was not a real consideration due to the fact that it is not POSIX compatible. This would cause a lot of issues, as common one-liners just won’t work.
Q.) Are you going to use any ZSH frameworks (e.g. Oh-My-ZSH or Prezto)? A.) At this point in time, by default, no. The weight of these would not be workable for lower powered devices. You can still install them yourself afterwards (as many of our team do).
Download Kali Linux 2020.3
Fresh Images So what are you waiting for? Start downloading already!
Seasoned Kali Linux users are already aware of this, but for the ones who are not, we do also produce weekly builds that you can use as well. If you can’t wait for our next release and you want the latest packages when you download the image, you can just use the weekly image instead. This way you’ll have fewer updates to do. Just know these are automated builds that we don’t QA like we do our standard release images. But we gladly take bug reports about those images because we want any issues to be fixed before our next release.
Existing Upgrades If you already have an existing Kali Linux installation, remember you can always do a quick update:
kali@kali:~$ echo «deb http://http.kali.org/kali kali-rolling main non-free contrib» | sudo tee /etc/apt/sources.list
kali@kali:~$
kali@kali:~$ sudo apt update && sudo apt -y full-upgrade
kali@kali:~$
kali@kali:~$ [ -f /var/run/reboot-required ] && sudo reboot -f
kali@kali:~$
You should now be on Kali Linux 2020.3. We can do a quick check by doing:
kali@kali:~$ grep VERSION /etc/os-release
VERSION=»2020.3″
VERSION_ID=»2020.3″
VERSION_CODENAME=»kali-rolling»
kali@kali:~$
kali@kali:~$ uname -v
#1 SMP Debian 5.7.6-1kali2 (2020-07-01)
kali@kali:~$
kali@kali:~$ uname -r
5.7.0-kali1-amd64
kali@kali:~$
NOTE: The output of may be different depending on the system architecture.
As always, should you come across any bugs in Kali, please submit a report on our bug tracker. We’ll never be able to fix what we don’t know is broken! And is not a Bug Tracker!
Official Kali Linux Sites
The Kali Linux project uses several different subdomains of kali.org, each with a specific purpose. This article lists the official Kali sites and the purpose each one of them serves. Note that these sites are the only official Kali Linux sites and are the only authoritative sources of information available for the distribution.
The sites listed below are the ONLY official outlets for the Kali Linux Distribution.
Public Websites
www.kali.org
The main Kali Linux website is our primary means of communicating news about the Kali Linux project, general introductory information, and general updates about the project and its ongoing development.
Blog posts about new tools, features, Kali Linux tips, tricks, and tutorials can be found here. This should be your one and only source to download the official Kali Linux distribution.
kali.org/docs/
Where you are right now. The Kali Linux documentation site contains a basic set of Kali Linux-related documentation and tutorials, which we continually work to update and improve.
For Backtrack users, the changes introduced in Kali are substantial and we have tried to address a broad range of common issues.
forums.kali.org
If you run into an issue or situation that isn’t directly covered in the official Kali Linux documentation, there is a good chance that a member of the Kali Linux Forums will know the answer. The Kali forum has members from all over the world, covering the entire range of skill levels, and are open and willing to help newcomers who are willing to learn.
More information on the Kali Linux Forums can be found in this article.
bugs.kali.org
Despite our best efforts at making Kali Linux perfect, bugs and errors are inevitable. We are always open to improvement and can only effectively do so when issues or tools suggestions are reported to us. You are encouraged to submit bug reports at bugs.kali.org to help us make Kali Linux even better.
More information on submitting bug reports to the Kali Linux project can be found in this article.
gitlab.com/kalilinux
This site is the Kali Linux project’s official git repository and is publicly accessible. Most users will never need to interact with it directly, but users who wish to more closely monitor the development of Kali Linux, or people who want to know when they should run ‘apt full-upgrade’, can peruse or clone the repository.
tools.kali.org
The core of Kali Linux is the comprehensive toolset, drawn from many difference sources in the security and forensics software community. The tools site provides both an up-to-date listing of the tools which are available in Kali Linux, as well as provinding a quick reference to each of them. From here, the versions of the tools can be tracked against their upstream sources.
pkg.kali.org
Social Media
We’re on social media — follow us on Twitter, “like” our official Facebook page to keep up with important announcements and news.
We don’t tweet a lot but when we do, it’s important. Information on releases and blog posts will be pushed to our twitter account, @KaliLinux.
As with our Twitter account, we won’t overwhelm you with information on our Kali Facebook page but when we do post, it will be worth it.
Contribute to Kali
Edit this page
Submitting Bugs for Kali Linux
Automating HiDPI
HiDPI displays are getting more and more common. Unfortunately, Linux support, out of the box, hasn’t been great (older Linux users may remember a time where this was very common for a lot of hardware changes.). Which means after doing a fresh install, there is a bit of tweaking required to get it working, otherwise the font/text/display may be very small to read. We have had a guide out explaining the process required to get it working, but the process before was a little “fiddly”. We wanted to do better.
So we made kali-hidpi-mode. Now, either typing in or selecting it from the menu (as shown below), should automate switching between HiDPI modes.
APT Configuration
Setting the Default Distribution
Now that you have some extra repositories added to your system, you will want to begin exploring and installing new packages, but before you do, it’s a good idea to tell APT what your default distribution is, which for Kali Linux users, is “kali-rolling”. This way your system won’t upgrade to some other distribution without your consent. Configure your default distribution by adding “APT::Default-Release “kali-rolling”;” to /etc/apt/apt.conf.d/local.
root@kali:~# cat etcaptapt.conf.dlocal
APT::Default-Release «kali-rolling»;
With your default distribution configured, any time you run ‘apt full-upgrade’, it will apply the upgrade to kali-rolling, helping keep your system stable.
Reducing Upgrade Prompts
If you use any Debian derivative for a significant amount of time, you will come across a prompt while running ‘apt upgrade’ asking you about a configuration file and whether you want to keep the local version, use the new version, or compare them. More often than not, you will find yourself accepting the default, making these interruptions wasteful.
You can avoid these prompts by updating your /etc/apt/apt.conf.d/local file with ‘DPkg::options { “–force-confdef”; “–force-confold”; }’ as shown below. This line tells APT to try to choose by itself if the files have not changed (–force-confdef) and if the files are different, keep the existing version (–force-confold).
root@kali:~# cat etcaptapt.conf.dlocal
DPkg::options { «—force-confdef»; «—force-confold»; }
APT::Default-Release «kali-rolling»;
Pinning Package Versions
Occasionally, you will find some application that needs a specific version of a particular package and will not work with any other. Other times, an update to one package might adversely affect other tools. This happened to us recently with an update to the devscripts package, which was preventing us from building Kali packages.
Fortunately, APT allows you to pin a package to a particular version by setting its priority to 1001 in /etc/apt/preferences. For example, to tell APT to hold the devscripts package at version 2.16.x, you would add the following.
Package: devscripts
Pin: version 2.16.*
Pin-Priority: 1001
Win-KeX
Having Kali Linux on “Windows Subsystem for Linux” (WSL) is something we have been taking advantage of since it came out. With the release of WSLv2, the overall functionality and user experience improved dramatically.
Today, the experience is improving once more with the introduction of Win-KeX (Windows + Kali Desktop EXperience). After installing it, typing in , or clicking on the button, Win-KeX will give you a persistent-session GUI.
After getting WSL installed (there’s countless guides online, or you can follow ours), you can install by doing the following:
sudo apt update && sudo apt install -y kali-win-kex
Afterwards, if you want to make a shortcut, follow our guide, or you can just type in !
On the subject of WSL (and this is true for Docker and AWS EC2) something we have seen a bit is after getting a desktop environment, people have noticed the tools are not “there”. This is because they are not included by default, to keep the image as small as possible. You either need to manually install them one by one, or grab the default metapackage to get all the tools from out-of-the-box:
Please note, Win-KeX does require WSL v2 on x64 as it’s not compatible with WSL v1, or arm64.
For more information, please see our documentation page
Adding Package Sources to Kali Linux
If you want to make your future self happy, you should not directly edit /etc/apt/sources.list directly. For each new package repository you add to your system, create a new file with a descriptive name (like debian-unstable.list) under /etc/apt/sources.list.d/. By leaving the original sources.list file untouched, if Kali needs to update it, it won’t interrupt you during the update, asking you which version of the file to keep.
The kali-bleeding-edge Repository
The kali-bleeding-edge repository contains a number of tools that are very popular and change very frequently (even daily). It would be impractical and time-consuming to manually create and test updated packages so the packages in this repository are generated automatically whenever the upstream source changes. On the positive side, it means you are never more than 24 hours behind the upstream project but on the downside, these packages are not tested so you need to be aware that the packages in this repository may break from time to time.
You can add the repo and update the list of available packages as follows.
echo «deb http://http.kali.org/kali kali-bleeding-edge main contrib non-free» > etcaptsources.list.dbleeding-edge.list
apt update
To install a package from kali-bleeding-edge, you need to append the repository name to the package name:
apt install dnsreconkali-bleeding-edge
Fortunately, APT makes it an easy to downgrade back to the kali-rolling version of a particular package at any time, so there is no need to fear the packages in the kali-bleeding-edge repository. If you find that a package is broken in kali-bleeding-edge, you can revert back to the kali-rolling version in the same manner:
apt install dnsreconkali-rolling
The Debian Unstable and Experimental Repositories
Debian Experimental is yet another repository that contains packages that are under development. The packages in this repository are very current but can also be very buggy, more so than kali-bleeding-edge or Debian Unstable. APT will only install packages from this repository if you explicitly request them and you can always downgrade if things don’t work out.
echo «deb http://ftp.debian.org/debian unstable main contrib non-free» > etcaptsources.list.ddebian.listecho «deb http://deb.debian.org/debian experimental main» >> etcaptsources.list.ddebian.list
apt update
As with the kali-bleeding-edge packages, if you want to install packages from unstable or experimental, append the repository name to the end of the package name as shown below.
root@kali:~# apt install socatexperimental netperfunstable
Reading package lists… Done
Building dependency tree
Reading state information… Done
Selected version ‘2.0.0~beta9-1’ (Debian:experimental amd64) for ‘socat’
Selected version ‘2.6.0-2.1’ (kali-rolling, Debian:unstable amd64) for ‘netperf’
The following NEW packages will be installed:
netperf
The following packages will be upgraded:
socat1 upgraded, 1 newly installed, to remove and not upgraded.
Need to get 909 kB of archives.
After this operation, 1,127 kB of additional disk space will be used.
Get:1 http://kali.mirror.globo.techkali kali-rollingnon-free amd64 netperf amd64 2.6.0-2.1 544 kB
Get:2 http://deb.debian.orgdebian experimentalmain amd64 socat amd64 2.0.0~beta9-1 365 kB
Fetched 909 kB in 1s (555 kBs)
Reading changelogs… Done
apt-listchanges: Mailing root: apt-listchanges: news for kali
Selecting previously unselected package netperf.(Reading database … 287650 files and directories currently installed.)
Preparing to unpack …netperf_2.6.0-2.1_amd64.deb …
Unpacking netperf (2.6.0-2.1) …
Preparing to unpack …socat_2.0.0~beta9-1_amd64.deb …
Unpacking socat (2.0.0~beta9-1) over (1.7.3.2-1) …
Setting up socat (2.0.0~beta9-1) …
Processing triggers for systemd (234-3) …
Processing triggers for man-db (2.7.6.1-2) …
Setting up netperf (2.6.0-2.1) …
update-rc.d: We have no instructions for the netperf init script.
update-rc.d: It looks like a network service, we disable it.
Processing triggers for systemd (234-3) …