Raspi config kali linux

Kali Linux на Raspberry Pi: просто, быстро, понятно

Заинтересовался я тут на днях, можно ли знаменитый в кругах хакеров и пентестеров Kali Linux на Raspberry Pi запустить. Полных, рабочих и понятных инструкций не нашел, вот и решил написать об этом пост. Выполнено на примере Raspberry Pi 3B+

1) Что нам понадобится:

  • Собственно RPi (Подойдет любая, кроме Pi 1)
  • Micro SD карта объемом не менее 16 гБ, класс 10
  • Компьютер
  • Дисплей с разъемом HDMI (к нему будем подключать малинку)
  • Кабель питания (рекомендую брать с силой тока не менее 2А)
  • Клавиатура и мышь

2) Подготовка софта

Во-первых, нам понадобится образ Kali Linux для RPi. Взять его можно вот здесь. Скроллим до слов Raspberrypi Foundation и выбираем нужный образ. Я взял образ «Kali Linux RaspberryPi 2 (v1.2), 3 and 4 (64-Bit)», RPi 3B+ спокойно его тянет.

Когда образ скачается, открываем ему с помощью архиватора и экстрактим.

Также вот отсюда качаем Etcher, им будем записывать образ на SD карту для малинки.

Открываем Etcher, подключаем microSD, в пункте «Select Image» указываем путь до файла, потом выбираем нашу microSD как девайс для прошивки, жмём Flash. Завариваем чаёк, и ждем, пока прошьётся.

Берем RPi, подключаем к ней microSD, дисплей, клавиатуру и мышь и ТОЛЬКО ПОТОМ втыкаем кабель питания, иначе ничего не получится. Ждём, пока на экране не появится графический интерфейс. Вводим логин и пароль (kali и kali).

Далее подключаемся к Wi-Fi или к проводному интернету (при надобности подключаем Wi-Fi донгл), нажав иконку сети в правом верхнем углу (там при первой загрузке нарисован порт Ethernet), выбрав сеть и введя пароль. Далее открываем консоль и пишем:

Может вылететь ошибка (когда перед одной из ссылок написано Err), тогда пишем код:

Нам откроется файл, все содержимое которого нужно удалить и ввести новое:

Потом снова запускаем команду:

И все должно заработать. Затем начинаем обновление пакетов:

Когда у нас спросят подтверждение, жмем Y и enter. А теперь снова завариваем чаёк и ждем, пока обновление завершится (советую заварить литров 10, так как обновляется все это ну очень медленно, у меня заняло около 6 часов).

Источник

Raspi config kali linux

My geekiness, shared with you.

Thursday, September 03, 2015

raspi-config Missing On Kali Linux 2.0

A couple of months ago I purchased one of the shiny new RaspberryPi2’s (you know, the one with the 900 Mhz quad core chip and the 1Gb of on-board ram) and have been playing with it. Within the last couple of weeks, Kali Linux 2.0 was released. Seeing as how I have this sweet RaspberryPi laying around, I figured, why not get Kali 2.0 running on it.

So, for my birthday, my awesome wife got me a Class 10, 32Gb MicroSD card. So I promptly loaded it with the freshly downloaded Kali Linux 2.0 image and booted it. After logging in to the machine I did a ‘df -h’ and discovered that instead of the 32 Gb I expected to see (ok, so it would be 30Gb after reserve), I was only seeing around 7Gb of space. I hadn’t run into this quandry before as I had only had an 8gb card before.

So, I did some googling and found that you can finagle the partition table with fdisk (which isn’t installed by default, btw. You will need to install the ‘afflib-tools’ package in order to get fdisk installed) and then reboot and resize the root partition. Or, as a friend pointed out, you can simply run raspi-config and it will quickly (and quietly) do it for you.

So I searched around and what do you know. no raspi-config. Apparently they don’t see a need for this extremely useful utility on Kali, so you will need to install it yourself, which, after doing it, wasn’t that awful.

First, download the latest version of raspi-config from ‘ http://archive.raspberrypi.org/ debian /pool/main/r/raspi-config’. Just search in there and either click to download it, or, if you are like me, copy the link and wget it. Note: Remember to download the .deb file as this is a debian distribution.

Next, you need to install the two prerequisites for raspi-config:

# apt-get install triggerhappy lua5.1

After you have installed those two, you can simply change directories to wherever you downloaded raspi-config and issue the following command:

# dpkg -i

After that, you should be able to run raspi-config. The first option is to resize the partition to reclaim space on the card. That is what you want. It will tell you to reboot. Once you do, voila!, space reclaimed and your ‘df -h’ should show a ton more space (relatively that is).

Читайте также:  Services exe что это за процесс windows 10

Источник

Raspi config kali linux

Building a customized Kali Linux image is not as complex as you may be thinking. It is easy, fun, and rewarding! Kali Linux traditionally, has been a Live Image, but since Kali 2020.1 an Installer Image was introduced. Both these images have different functions, and are also built in different ways.

  • Live Image — allows you to try Kali, without altering the system (making it create for USB). It is created using live-build
  • Installer Image — allows for you to customize Kali by picking packaging during installation, such as picking the desktop environment as well as what metapackages get installed. This image is powered by simple-cdd(which uses debian-cd to make Debian-Installer ).

You can configure virtually any aspect of your Kali ISO build, such as adding packages from outside of Kali network repositories, unattended installations to changing the default wallpaper. Our build-scripts provides a framework that uses a configuration set to automate and customize all aspects of building the images. The Kali Linux development team use the same build-scripts to produce the official Kali ISO releases.

Where Should You Build Your ISO?

Ideally, you should build your custom Kali ISO from within a pre-existing Kali environment, as there is less chance of items going wrong. However, it is possible to generate the images on a Non-Kali but still a Debian-Based system.

Kali Environment

Getting Ready — Setting Up The build-script Kali System

We first need to prepare the Kali ISO build environment by installing and setting up the required packages with the following commands:

Building an Updated Live Image

Now you can simply build an updated Kali ISO (with our default configuration) by entering the live-build-config/ directory and running our build.sh wrapper script, as follows:

The build.sh script will take a while to complete, as it downloads all of the required packages needed to create your ISO. Good time for a drink.

Building an Updated Installer Image

By default, it will generate a Live Image. If you want an Installer Image, add —installer :

We are using the —verbose to output more on the screen rather than it being captured in just the build.log output. If you want even more output, you can use —debug instead, which will then give more information.

Non-Kali Debian-Based Environment

Setting Up The build-script Non-Kali Debian-Based System

You can build an Kali ISO on a Debian-based systems other than Kali Linux. The instructions below have been tested to work with both Debian and Ubuntu.

First, we prepare the system by ensuring it is fully updated, then proceed to download the Kali archive keyring and packages:

Note: You may need to check that kali-archive-keyring_20YY.X_all.deb & live-build_20YYMMDD_all.deb are the latest files.

With that completed, we install some additional dependencies and the previously downloaded files:

With the environment all prepared, we start the process by setting up the build-script profile and clone out the build config:

At this point, depending on the host OS and its version, we may need to edit build.sh to bypass a version check for debootstrap. We do this by commenting out the exit 1 below:

With the above change made, build.sh should look similar:

At this point, we can build our ISO as normal

Configuring The Kali ISO Build (Optional)

If you want to customize your Kali Linux ISO, this section will explain some of the details. Through the kali-config/ directory, there are a wide range of customization options, which are well-documented for live-build page. Simple-CD is a little more limited with options. For the impatient, here are some of the highlights.

Building Kali Live With Different Desktop Environments

Since Kali 2.0, we now support built in configurations for various desktop environments, including Xfce (default), Gnome, KDE, E17, I3WM, LXDE, MATE. To build any of these, you would use syntax similar to the following:

This is not required with the installer images, as it includes Xfce, Gnome and KDE by default. You can add others by including their packages as explained in the section below.

Controlling The Packages Included In Your Build

The list of packages included in your build will be present in the the respective kali-config/ directory. For example, if you’re wanting to edit:

  • The default Installer ISO, you would use the following package lists file — kali-config/installer-default/packages
  • The default Live ISO, you would use the following package lists file — kali-config/variant-default/package-lists/kali.list.chroot
  • A non-default Live ISO desktop environment, such as Gnome — kali-config/variant-gnome/package-lists/kali.list.chroot (You can replace Gnome with any supported desktop environments)

By default, these lists will includes the kali-linux-default metapackage, as well as some others. These can be commented out and replaced with a manual list of packages to include in the ISO for greater granularity.

Overlaying Files In Your Build

With Live images, you have the option to include additional files or scripts in your build by overlaying them on the existing file-system, inside the includes. directories, respectively.

For example, if we wanted to include our own custom script into the /root/ directory of the ISO (this would correspond to the chroot stage), then we would drop this script file in the kali-config/common/includes.chroot/ directory before building the ISO.

Читайте также:  Windows 10 корпоративная ltsc ключик активации 2020

For more information see the live-build documentation.

Build Hooks, Binary and Chroot

For live images, live-build supports hooks allows us to “hook scripts” in various stages of the Kali ISO live image. For more detailed information about hooks and how to use them, refer to the live-build manual.

As an example, we recommend you check out the existing hooks in kali-config/common/hooks/ .

Building a Kali Linux ISO for Different Architectures (Optional)

By default, the build-script will generate the Kali image based on the architectures of the current operating system. If you wish to alter this:

  • x64: ./build.sh —verbose —arch amd64
  • x86: ./build.sh —verbose —arch i386

Building a Kali Linux ISO for Older i386 Architectures

The Kali Linux i386 ISO has PAE enabled. If you require a default kernel for older hardware with PAE disabled, you will need to rebuild a Kali Linux ISO. The rebuilding process is much the same as described above, except that the 686-pae parameter needs to be changed to 686 in auto/config before building:

Using A Custom Network Mirror For Building (Optional)

If you build multiple images, you will find you are often waiting on build.sh to finish. There are a few ways to speed up the build process, such as:

  • Building Installer images as they often build quicker than Live images
  • Have less packages included (such as switching kali-linux-default to kali-linux-top10 )
  • Improve access to packages

You often find that you are waiting on packages to be pulled down. You can either setup a local proxy on the same machine (such as apt-cacher or apt-cacher-ng ). Alternatively, you can setup a local network mirror.

We can instruct the build-script to use a different mirror, by doing the following (assuming our network mirror is located at http://192.168.0.101/kali ):

Testing Built Image

After producing the issue, you can treat it like any Kali base image, so you can install it (either on bare metal or virtually), or copy to a CD/DVD/USB.

If you are wanting to quickly test the image before putting it “in production”, we can use qemu (and ovmf for UEFI). First we install the packages:

Next we produce a hard disk to use:

Afterwards, to boot from the image produced (we will be using the Live image on x64):

The above will be a “BIOS” boot. For a “UEFI” boot:

Note: We have set UEFI configuration file to be read only

Updated on: 2021-Sep-27
Author: g0tmi1k

Источник

Обзор Kali Linux 2021.2

В начале июня состоялся релиз дистрибутива для цифровой криминалистики и тестирования систем безопасности Kali Linux 2021.2. Эта операционная система является клоном Debian, используя репозиторий Testing с наиболее свежими пакетами. Новые iso образы становятся доступными для загрузки каждые три месяца, предыдущим релизом был 2021.1, а следующим будет 2021.3. Собственные наработки, созданные в рамках проекта, выложены на Гитлабе.

Kali Linux вобрал в себя солидный опыт разработки операционных систем для проверки возможностей несанкционированного доступа к ресурсам ИТ. Начало было положено в августе 2004-го с выходом WhiteHat Knoppix. Затем было несколько выпусков WHAX и BackTrack, под капотом SlackWare Live CD. С марта 2013 г․ под руководством Мати Ахарони и Девона Кернса из Offensive Security выходит Kali Linux v1.0, уже на базе Debian.

Установка

Kali Linux предоставляет множество вариантов для установки, начиная простой рабочей станцией и заканчивая мобильными и встроенными устройствами. Рабочим столом по-умолчанию является Xfce, однако можно выбрать и другие DE:

▍ Обычное железо и Live boot

Имеются iso образы и торренты для платформ:

  • AMD64 ;
  • Intel 386 ;
  • ARM64 iso образ для чипов Apple M1 .

Все образы доступны в трех вариантах:

  • weekly, самые свежие и в то же время нестабильные пакеты;
  • installer, стандартный оффлайновый набор ПО;
  • netinstaller, все пакеты скачиваются во время установки. Не доступен для установки с Live USB;

▍ Виртуальные машины

Можно скачать 64-битные образы и торренты для VMWare и Virtualbox . Для беглого ознакомления с возможностями Kali Linux это пожалуй самый оптимальный вариант. Образ для VMWare имеет размер в 2.6 GiB, для Virtualbox — чуть побольше, 3.8 GiB. Кроме того доступны образы VM для Vagrant.

На данный момент имеются образы для следующих устройств на чипах ARM:

  • 1 (Original);
  • 2, 3, 4 и 400 (32-бит);
  • 2 (v1.2), 3, 4 и 400 (64-бит);
  • Zero;
  • Zero W.

Pine64

▍ Мобильные средства

Проект Kali NetHunter — это первая платформа тестирование на проникновение с открытым исходным кодом для устройств под управлением ОС Android. В наборе имеется множество уникальных функций, недоступных на других аппаратных платформах. Специфика NetHunter состоит в том, что с его помощью можно осуществлять проверки безопасности и попытки проникновения на мобильных устройствах. Примеры использования могут включать в себя следующие сценарии:

  • Точка доступа Mana Evil в один клик.
  • BadUSB атака типа MITM через эмуляцию работы USB устройства. Подключив NetHunter к компьютеру жертвы, тот перенаправляет сетевой трафик через себя.
  • Взлом Bluetooth;

Рис. 1 Kali NetHunter.

Кали NetHunter может быть установлен на эти мобильные устройства:

Gemini PDA (Nougat 5.x)

Nexus, все модели начиная с 5-й модели и заканчивая 10-й (Lollipop)

  • OnePlus One (11);
  • OnePlus 2 (Nougat 5.x);
  • OnePlus 2 (Pie 9.0);
  • OnePlus (AnyKernel Pie 9.0);
  • OnePlus (AnyKernel 10);
  • OnePlus (OxygenOS 10);
  • OnePlus 7;
  • OnePlus 7 Pro (OxygenOS 10);
  • OnePlus Nord (11).
Читайте также:  Adding route vpn windows

Samsung

  • Galaxy Tab S4 (LTE)(Oreo 8.0);
  • Galaxy Tab S4 (WiFi)(Oreo 8.0).

Sony XPeria Z1

  • Davinci Miui (10);
  • Xiaomi Mi A3 (LineageOS 18.1).

ZTE

▍ Контейнеры

Есть сборки для Docker и LXC/LXD, установка производится штатными средствами контейнерного ПО.

Kali-docker образы доступны для платформ arm64 , armhf и amd64 .

▍ Облако

Образы Kali Cloud можно по-быстрому развернуть в инфраструктуре различных облачных провайдеров:

Особенности и характеристики Kali 2021.2

Главная особенность Kali Linux — наличие полноценной подборки специальных приложений для проверки взлома и проникновения. Их общее количество превышает 600 и они разнесены по следующим категориям:

  • Сбор информации: nmap и его разновидности, goofile, p0f и пр․;
  • Анализ уязвимости: cisco-torch, BED, DotDotPwn и пр․;
  • Атаки на беспроводное соединение: Aircrack-ng, Kismet, Pyrit и пр․;
  • Веб-приложения: Blind Elephant, hURL, Nikto, Paros, и пр․;
  • Инструментарий эксплуатации: commix, routersploit, Social-Engineer Toolkit и пр․;
  • Стресс-тесты: DHCPig, t50, Reaver и пр․;
  • Аналитический инструментарий: ddrescue, pdf-parser, iPhone-Backup-Analyzer и пр․;
  • Охота на пароль: Hashcat, THC-Hydra, John the Ripper, wordlists и пр․;
  • Прослушивание и подделка: _hexinject, mitmproxy, Wireshark и пр․;
  • Обратная разработка: apktool, javasnoop, Valgrind и пр․;
  • Поддержание доступа: dns2tcp, HTTPTunnel, pwnat и пр․;
  • Аппаратный взлом: Arduino, dex2jar, smali и пр․;
  • Средства для отчетности: cherrytree, dos2unix, Metagoofil и пр.

Одно из новых впечатлений, еще на этапе установки ОС, это замена супер-пользователя root с паролем tor на kali / kali. Объективности ради надо заметить, что изменение произошло в предыдущем релизе Kali. Это не так просто, как кажется, так как многие серверные приложения крепко привязаны к привилегиям root-а. Некоторые операционные системы давно уже отказались от root, в частности Ubuntu Linux обесточила супер пользователя с незапамятных времен.

▍Kaboxer

Представлен Kaboxer 1.0, (от Kali Application Boxeri), с помощью которого громоздкие приложения можно упаковать в контейнер и далее интегрировать с ОС и штатным менеджером пакетов. Вся прелесть в том, что для пользователя всё прозрачно, программа скомпонованная таким образом устанавливается точно так же из aptitude install package-name . На данный момент с помощью Kaboxer распространяются лишь эти приложения:

  • Covenant — клиент-серверная сетевая служба;
  • Firefox Developer Edition — тяжелое графическое приложение для веб-разработчиков;
  • Zenmap — приложение использует Python 2.

▍ Kali-Tweaks v1.0

Анонсирована утилита Kali-Tweaks в помощь пользователям дистрибутива для легкой и корректной настройки операционной системы под свои нужды. Это вполне согласуется с философией Kali Linux — полностью отдавать себе отчет в своих действиях. С помощью Kali-Tweaks можно задать конфигурацию для компонент:

Рис 2. Kali-Tweaks.

  • мета-пакеты;
  • сетевые репозитории, это позволяет добавить, или удалить установку новейших и экспериментальных пакетов из древа;
  • командная строка и консоль, например выбрать между Bash и Zsh;
  • виртуализация.

▍ Bleeding-Edge

Ветка репозитория Bleeding Edge существует с марта 2013 г. В дословном переводе это означает кровоточащий край, смысл термина в обозначении самого острого края (острие науки передовой край), отдаленной границы, там где опасно. Соответственно, пакеты из этой ветки никак нельзя назвать стабильными. В текущем выпуске Kali Linux полностью переработан бэкенд репозитория.

Рис. 3 В kali-tweaks можно подключить репозиторий bleeding-edge.

▍ Привилегированные порты

В Unix/Linux системах по умолчанию только root имеет доступ на открытие TCP/IP портов в интервале 1-1024, их еще называют привилегированными. Можно по-разному обходить это ограничение, например перенаправлять привилегированный порт на обычный.

Но этот способ плохо масштабируем и может привести к путанице. Благо, теперь не надо перебрасывать порты, так как обычный пользователь может запускать приложения, которые открывают сокет на привилегированных TCP/IP портах. Это стало возможным благодаря специальному патчу на ядро Linux, без него функционал не будет доступен.

▍ Kali NetHunter

В новой версии были такие обновления:

  • поддержка Android 11;
  • улучшение в работе Magisk root;
  • повышена совместимость благодаря динамическим партициям;
  • улучшения в модуле Bluetooth;
  • включены патчи rtl88xxau для более старых версий ядра.

▍ Новые приложения

Вот список новинок текущего релиза:

  • CloudBrute — Разузнать об инфраструктуре компании, найти файлы и приложения в облачной среде.
  • Dirsearch — Обнаружить файлы и директории на веб-серверах.
  • Feroxbuster — Простое, быстрое, рекурсивное обнаружение содержимого интернет ресурса.
  • Ghidra — Платформа обратной разработки.
  • Pacu — Платформа для эксплойтов AWS.
  • Peirates — Проникновение в среду Kubernetes.
  • Quark-Engine — Рейтинговая система оценки вредоносных программ для Android.
  • VSCode a.k.a. Visual Studio Code Open Source, редактор кода с открытыми исходниками.

▍ Графика и рабочий экран

В терминале появилось возможность быстрого переключения по горячей клавише Ctrl+p между однострочным и двустрочным приглашением PS1.

Рис 4. Переключение режимов PS1 терминала Xfce.

Переработана панель быстрого запуска Xfce, из нее убрали экранный рекордер kazam, добавив текстовый редактор и веб-браузер. Появились новые обои рабочего стола и экрана входа в DE. Для приложений терминала Xfce и файлового менеджера Thunar появилась опция запуска с правами root.

Рис 5. Root терминал Xfce.

▍ Raspberry Pi

  • kalipi-config — своего рода raspi-config на стероидах для облегчения начальной настройки Kali Linux на Raspberry Pi.
  • kalipi-tft-config — для облегчения начальной настройки TFT дисплеев на Rapberry Pi.
  • Заявлено повышение производительности на 1500%.
  • Ядро Linux обновилось до версии 5.4.83.
  • На Raspberry Pi 4 и Raspberry Pi 400 полноценно заработал Bluetooth.
  • Время первой загрузки сократилось с 20 до 15 с.

▍ Разное

Помимо этого были и другие изменения и исправления в разных местах. Устранены дефекты в приложении терминала и pkexec. Помимо этого:

  • Wireshark теперь могут запускать и непривилегированные пользователи;
  • новый Win-Kex v2.10 теперь поддерживает многоэкранный режим;
  • пакет Parallels Tools вышел из Technical Preview для устройств на чипах Apple M1.

Источник

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