Kali linux package manager

Advanced Package Management in Kali Linux

The Advanced Package Tool (APT) is how programs, libraries, documentation, and even the kernel itself are installed and managed on Kali and other Debian-based derivatives. APT often works so well that many users don’t pay any particular attention to it other than to perhaps search for and install programs and (hopefully) update their system regularly.

For most standard users, making use of APT this way is perfectly normal but we like to think that people who use Kali Linux are not standard users (in a good way) and so we are devoting this post to telling how you to get better use of APT and how to take advantage of the wide ecosystem of packages that are available, while keeping your Kali system stable and happy.

Many people will tell you that you should not rely on a package manager at all and instead, you should compile everything from scratch because you will learn more that way. While it’s certainly true that you will learn a lot, especially as you start out, building everything by hand will quickly devolve into tedium when you could be spending your time hacking or learning something new, preferably both.

In this post, we’ll show you how you can safely add additional package repositories to your Kali installation, how to upgrade and downgrade them, and how to ensure all of these repositories live in harmony. APT is very powerful and will evaluate the available packages from all sources as a whole when it formulates its solutions.

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.

In this post, we are going to add the Kali Bleeding-Edge repository and the Debian Unstable and Experimental repositories.

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.

To install a package from kali-bleeding-edge, you need to append the repository name to the package name:

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:

The Debian Unstable and Experimental Repositories

Kali Linux is a derivative of Debian Testing, which has more up-to-date software than Debian Stable. For even more recent software, there is the Debian Unstable distribution, which is a rolling development version of Debian, containing the most recent packages. When you encounter a bug in a Debian package, there might be a fixed version in the Debian Unstable repository so it is a good idea to add it to your Kali system. As with kali-bleeding-edge, the packages in Unstable may break from time to time.

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.

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.

Читайте также:  Windows all versions repair

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 0 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.

You will note that kali-rolling, as the default distribution, has the highest priority at 990, meaning its packages take precedence over all others (which is what you want as a Kali user), followed by Debian unstable at 500, kali-bleeding-edge at 100, and lastly, experimental, with a lowly priority of 1. To see how these priorities apply to a given package, take a look at sqlmap.

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.

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.

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).

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.

Additional Resources

In this post, we have only been able to scratch the surface of how you can extend APT far beyond the default Kali or Debian ecosystem. The solver algorithms are very effective and running into issues is rare, so you need not fear exploring other repositories. To learn more about APT and how to bend it to your will, we encourage you to refer to Kali Linux Revealed and The Debian Administrator’s Handbook, both of which contain a wealth of information, tips, and tricks.

Источник

What are metapackages

Metapackages are used to install many packages at one time, created as a list of dependencies on other packages. Kali Linux uses these in a few ways. One way is allowing users to decide how many packages out of the total Kali list they would like to install. Need just enough to use Linux? Want enough to conduct Pentests? Perhaps nearly every package available in Kali?

To install a metapackage we first need to update and then install the desired package:

System

  • kali-linux-core : Base Kali Linux System – core items that are always included
  • kali-linux-headless : Default install that doesn’t require GUI
  • kali-linux-default : “Default” desktop (amd64/i386) images include these tools
  • kali-linux-arm : All tools suitable for ARM devices
  • kali-linux-nethunter : Tools used as part of Kali NetHunter

Desktop environments/Window managers

  • kali-desktop-core : Any key tools required for a GUI image
  • kali-desktop-e17 : Enlightenment (WM)
  • kali-desktop-gnome : GNOME (DE)
  • kali-desktop-i3 : i3 (WM)
  • kali-desktop-kde : KDE (DE)
  • kali-desktop-lxde : LXDE (WM)
  • kali-desktop-mate : MATE (DE)
  • kali-desktop-xfce : Xfce (WM)
Читайте также:  Посмотреть какие драйвера стоят linux

Tools

  • kali-tools-gpu : Tools which benefit from having access to GPU hardware
  • kali-tools-hardware : Hardware hacking tools
  • kali-tools-crypto-stego : Tools based around Cryptography & Steganography
  • kali-tools-fuzzing : For fuzzing protocols
  • kali-tools-802-11 : 802.11 (Commonly known as “Wi-Fi”)
  • kali-tools-bluetooth : For targeting Bluetooth devices
  • kali-tools-rfid : Radio-Frequency IDentification tools
  • kali-tools-sdr : Software-Defined Radio tools
  • kali-tools-voip : Voice over IP tools
  • kali-tools-windows-resources : Any resources which can be executed on a Windows hosts
  • kali-tools-information-gathering : Used for Open Source Intelligence (OSINT) & information gathering
  • kali-tools-vulnerability : Vulnerability assessments tools
  • kali-tools-web : Designed doing web applications attacks
  • kali-tools-database : Based around any database attacks
  • kali-tools-passwords : Helpful for password cracking attacks – Online & offline
  • kali-tools-wireless : All tools based around Wireless protocols – 802.11, Bluetooth, RFID & SDR
  • kali-tools-reverse-engineering : For reverse engineering binaries
  • kali-tools-exploitation : Commonly used for doing exploitation
  • kali-tools-social-engineering : Aimed for doing social engineering techniques
  • kali-tools-sniffing-spoofing : Any tools meant for sniffing & spoofing
  • kali-tools-post-exploitation : Techniques for post exploitation stage
  • kali-tools-forensics : Forensic tools – Live & Offline
  • kali-tools-reporting : Reporting tools

Others

  • kali-linux-large : Our previous default tools for amd64/i386 images
  • kali-linux-everything : Every metapackage and tool listed here
  • kali-tools-top10 : The most commonly used tools
  • kali-desktop-live : Used during a live session when booted from the image

Updated on: 2021-Sep-27
Authors: gamb1t , g0tmi1k

Источник

Kali linux package manager

to sources.list file (path: Computer -> File System -> etc -> apt -> sources.list ). Save the file and exit. To know more on Kali Linux repositories please check my post, Kali Linux Repositories.

Note: Before saving sources.list file, make sure that it shouldn’t have duplicate entries of repository/ ies or else you may get 404 error or unmet dependency error.

4 comments:

Nice blog, very interesting to read
I have bookmarked this article page as i received good information from this.

Thank you Much! I had to install Synaptic Package Manager on Kali Linux release 2020.2 When my installation completed my sound was not working even when attempting to install alsa utils packages from terminal kept saying unable to locate, however Synaptic Package allowed me to force the broken package installation

Fresh & valid spammed USA SSN+Dob Leads with DL available in bulk.

>>1$ each SSN+DOB
>>2$ each with SSN+DOB+DL
>>5$ each for premium (also included relative info)

Prices are negotiable in bulk order
Serious buyer contact me no time wasters please
Bulk order will be preferable

CONTACT
Telegram > @leadsupplier
ICQ > 752822040
Email > leads.sellers1212@gmail.com

OTHER STUFF YOU CAN GET

SSN+DOB Fullz
CC’s with CVV’s (vbv & non-vbv)
USA Photo ID’S (Front & back)

All type of tutorials available
(Carding, spamming, hacking, scam page, Cash outs, dumps cash outs)

SMTP Linux Root
DUMPS with pins track 1 and 2
Socks, rdp’s, vpn’s
Server I.P’s
HQ Emails with passwords

Looking for long term business
For trust full vendor, feel free to contact

CONTACT
Telegram > @leadsupplier
ICQ > 752822040
Email > leads.sellers1212@gmail.com

There are several dangers to buying links back from the Dark Web and Empire Market Linking Company is one of the most reliable sources for these types of services because they operate in a completely transparent and ethical business environment. Read more about my website: dark web sites

Источник

Статья Расширенный пакет управления в Кали Linux

Огромное спасибо пользователю persivald за своевременный перевод!

Расширенный пакет управления в Kali Linux

Advanced Package Tool (APT) — это когда программы, библиотеки, документация и даже ядро установлены и настроены для работы на Kali и других Debian-подобных дистрибутивах. АРТ работает настолько хорошо, что большинство пользователей часто не замечают его присутствия, за исключением поиска некоторых программ и (надеюсь) обноволений для их системы.

Для большинства стандартных пользователей использующих АРТ таким образом (имеется ввиду установил и забыл пр.переводчика) это вполне приемлемо, но нам хочется думать, что люди использующие Kali Linux не стандартные пользователи (в хорошем смысле) поэтому мы публикуем этот пост, что бы рассказать Вам о возможностях его использования и как получить приемущества всей экосистемы доступных пакетов, сохраняя при этом стабильность Вашей Kali.

Большинство людей скажут Вам, что Вы не должны надеяться на пекетный менеджер, а напротив, компилировать всё из источника, потому что таким образом Вы будете лучше понимать систему. Частично это так, Вы многое изучите и поймёте, особенно если начнёте настройку вручную, но это довольно быстро надоедает и отнимает на мало времени, которое Вы могли бы потратить на hacking или изучение чего-нибудь нового, желательно одновременно.

В этом посту мы покажем Вам, как Вы можете безопасно добавлять дополнительные репозитории пакетов в установку Kali, как апгрейдить и откатывать обновы, и как убедиться, что всё это работает корректно. APT очень эффективен и будет оценивать доступные пакеты из всех источников в целом, когда он формулирует свои решения.

Читайте также:  Windows как сделать символьную ссылку

Добавление источников пакетов в Kali Linux

Если вы хотите сделать свое будущее счастливым, вы не должны напрямую редактировать /etc/apt/sources.list . Для каждого нового репозитория пакетов, который вы добавляете в свою систему, создайте новый файл с описательным именем (например, debian-unstable.list) в /etc/apt/sources.list.d/. Если оставить исходный файл sources.list нетронутым, если Kali необходимо его обновить, он не будет прерывать вас во время обновления, спрашивая, какую версию файла сохранить.В этом посте мы добавим репозиторий Kali Bleeding-Edge и нестабильные и экспериментальные репозитории Debian.

Репозиторий kali-bleeding-edge содержит ряд инструментов, которые очень популярны и меняются очень часто (даже ежедневно). Было бы непрактичным и трудоемким вручную создавать и тестировать обновленные пакеты, чтобы пакеты в этом репозитории генерировались автоматически всякий раз, когда изменяется исходный источник. С одной стороны, это означает, что обновления Ваших пакетов не старше 24х часов, но с другой стороны, эти пакеты не тестируются, поэтому вам нужно осознавать, что пакеты в этом репозитории могут время от времени ломаться.
Вы можете добавить репозиторий и обновить список доступных пакетов следующим образом.

Нестабильные и экспериментальные хранилища Debian

Kali Linux является производным от Debian Testing, у которого есть более современное программное обеспечение, чем в Debian Stable. Для еще более позднего программного обеспечения существует дистрибутив Debian Unstable, который является rolling версией Debian, содержащей самые последние пакеты. Когда вы сталкиваетесь с ошибкой в пакете Debian, в репозитории Debian Unstable уже может лежать исправленая версия, поэтому рекомендуется добавить ее в вашу систему Kali. Как и в случае с kali-bleeding-edge, пакеты в Unstable могут время от времени ломаться.

Debian Experimental — еще один репозиторий, содержащий пакеты, которые находятся в разработке. Пакеты в этом репозитории всегда обновляются, но при этом могут быть очень глючными, даже хуже, чем в kali-bleeding-edge или Debian Unstable. APT будет устанавливать пакеты только из этого репозитория, если вы явно запросите их, и вы всегда можете всегда откатиться, если что-то перестанет работать.

Определение приоритетов пакетов

Чтобы определить, какие пакеты будут установлены, APT умеет назначать приоритеты для всех источников пакетов, отдавая предпочтение наивысшему приоритету. Пакет с приоритетом 0 никогда не будет установлен, а пакет с приоритетом более 1000 будет всегда установлен, даже если это откат пакета на старую версию.

Это прекрасно для APT, но как пользователь сможет увидеть, какой приоритет назаначен конкретному пакету? Введите малоизвестную команду «apt-cache» и ее опцию «policy», которая покажет все ваши настроенные репозитории и их назначенные приоритеты.

Настройка распределения по умолчанию

Теперь, когда вы добавили допольнительные репозитории в вашу систему, вы захотите начать изучение и установку новых пакетов, но прежде чем вы это сделаете, неплохо сообщить APT, что ваш дистрибутив по умолчанию, который для пользователей Kali Linux — это «kali -rolling». Таким образом, ваша система не будет обновляться из какого-либо другого дистрибутива без вашего согласия. Настройте свой дистрибутив по умолчанию, добавив «APT :: Default-Release» kali-roll «;» в /etc/apt/apt.conf.d/local.

Если вы назначили свой дистрибутив по умолчанию, каждый раз, когда вы запускаете «apt full-upgrade», он будет применять обновление для kali-rolling, что поможет поддерживать стабильность вашей системы.

Запрос сокращения обновления

Если вы используетесь каким-либо Debian-подобным дистрибутивом достаточно давно, то при запуске «apt upgrade» вы сталкиваетесь с запросом о файле конфигурации и хотите ли вы сохранить локальную версию, использовать новую версию или сравнить ее. Чаще всего вы принимаете дефолт, лишь отвлекаясь на эти запросы.

Можно избежать этих запросов, обновив файл /etc/apt/apt.conf.d/local с помощью параметров «DPkg :: options» («-force-confdef»; «-force-confold»; >’ как показано ниже. Эта строка сообщает APT действовать самостоятельно: если файлы не изменились (-force-confdef), а если файлы разные, то можно сохранить существующую версию (-force-confold).

Закрепление версии пакетов

Иногда вы обнаруживаете одно из приложений, которое нуждается в определенной версии конкретного пакета и не будет работать с каким-либо другим. В некоторых случаях обновление одного пакета может негативно сказаться на других инструментах. Это произошло недавно с обновлением пакета devscripts, что мешало нам создавать пакеты Kali.

К счастью, APT позволяет привязать пакет к определенной версии, установив приоритет 1001 в / etc / apt / preferences. Например, чтобы сообщить APT, чтобы пакет devscripts содержал версию 2.16.x, вы должны добавить следующее:

В этой статье мы лишь поверхностно коснулись того, как вы можете расширить APT далеко за пределы стандартной экосистемы Kali или Debian. Алгоритмы АРТ очень эффективны, и проблемы в них встречаются редко, поэтому вам не нужно бояться пробовать другие репозитории. Чтобы узнать больше об APT и о том, как настроить его по своему желанию, мы рекомендуем обратиться к Kali Linux Revealed и The Debian Administrator’s Handbook, в которых содержится множество информации, советов и трюков.

Источник

Оцените статью