- Kali linux for raspberry pi b
- Kali on Raspberry Pi 2 — User Instructions
- Kali on Raspberry Pi 2 — Tips
- Kali on Raspberry Pi 2 — Image Customization
- How to install Kali Linux on a Raspberry Pi 3 Model B
- Prerequsites
- Emergency mode
- Change SSH host keys
- Change root password
- Expand installation
- Update and upgrade
- Kali linux for raspberry pi b
- Kali on Raspberry Pi 3 — User Instructions
- Kali on Raspberry Pi 3 — Tips and Tricks
- Kali on Raspberry Pi 3 Headless — Tips and Tricks
- Kali on Raspberry Pi 3 — Image Customization
- Kali Linux на Raspberry Pi: просто, быстро, понятно
Kali linux for raspberry pi b
If your Raspberry Pi 2 has Raspberry Pi 2 Model B V1.2 printed on the PCB above the CPU, we suggest to follow the Raspberry Pi 2 v1.2 documentation. However if it says Raspberry Pi 2 Model B V1.1 , keep reading
By default, the Kali Linux Raspberry Pi 2 image contains the kali-linux-default metapackage similar to most other platforms. If you wish to install extra tools please refer to our metapackages page.
The Raspberry Pi images use Re4son’s kernel, which includes the drivers for external Wi-Fi cards, TFT displays, and the nexmon firmware for the built-in wireless card on the Raspberry Pi 3 and 4. You will not need to download it and install it, and doing so will likely be a downgrade over the current installed kernel.
Kali on Raspberry Pi 2 — User Instructions
If you’re unfamiliar with the details of downloading and validating a Kali Linux image, or for using that image to create a bootable device, it’s strongly recommended that you refer to the more detailed procedures described in the specific articles on those subjects.
To install a pre-built image of the standard build of Kali Linux on your Raspberry Pi 2, follow these instructions:
- Get a fast microSD card with at least 16GB capacity. Class 10 cards are highly recommended.
- Download and validate the Kali RaspberryPi 2, 3, 4 and 400 (img.xz) image from the downloads area. The process for validating an image is described in more detail on Downloading Kali Linux.
- Use the dd utility to image this file to your microSD card (same process as making a Kali USB.
In our example, we assume the storage device is located at /dev/sdb . Do not simply copy these value, change this to the correct drive path.
This process will wipe out your microSD card. If you choose the wrong storage device, you may wipe out your computers hard disk.
This process can take a while, depending on your PC, your microSD’s speed, and the size of the Kali Linux image.
Once the dd operation is complete, boot up the Raspberry Pi 2 with the microSD plugged in.
Kali on Raspberry Pi 2 — Tips
If you are on the 5.10 kernel, you can use mt76 chipset USB Wi-Fi devices, but they require creating a configuration file in /etc/modprobe.d with the following contents:
Kali on Raspberry Pi 2 — Image Customization
If you want to customize the Kali Raspberry Pi 2 image, including changes to the packages being installed, changing the desktop environment, increasing or decreasing the image file size or generally being adventurous, check out the Kali-ARM Build-Scripts repository on GitLab, and follow the README.md file’s instructions. The script to use is raspberry-pi.sh .
Updated on: 2023-May-30
Author: steev
How to install Kali Linux on a Raspberry Pi 3 Model B
Extract kali-linux-2019.3a-rpi3-nexmon.img.xz . Fire up balenaEtcher (macOS) and “Select Image”, “Select target” and press “Flash!”.
Insert your SD card into your Raspberry Pi and hook it up to a monitor + keyboard.
Prerequsites
Emergency mode
If you happen to enter emergency mode when booting, you should modify fstab , after you enter the default root password toor .
nano /etc/fstab #/dev/mmcblk0p2 / ext4 errors=remount-ro 0 1 /dev/mmcblk0p2 / ext4 ro 0 1
This should mount the rootfs as read-only on the next reboot.
Run fsck -fy , if the system hasn’t already
Remount the rootfs as read-write using:
mount -o remount,rw /dev/mmcblk0p2
(IMPORTANT) Change /etc/fstab back to normal, thus:
/dev/mmcblk0p2 / ext4 errors=remount-ro 0 1 #/dev/mmcblk0p2 / ext4 ro 0 1
If /etc/fstab doesn’t get changed back to normal, then the system will always mount the rootfs as read-only.
Change SSH host keys
root@kali:~ rm /etc/ssh/ssh_host_* root@kali:~ dpkg-reconfigure openssh-server root@kali:~ service ssh restart
Change root password
Expand installation
All the available space on your SD card is not in use- view the disk space by issuing df -h :
root@kali:~# df -h Filesystem Size Used Avail Use% Mounted on /dev/root 4.5G 3.9G 284M 94% / devtmpfs 459M 0 459M 0% /dev tmpfs 464M 0 464M 0% /dev/shm tmpfs 464M 660K 463M 1% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 464M 0 464M 0% /sys/fs/cgroup /dev/mmcblk0p1 122M 67M 55M 55% /boot tmpfs 93M 4.0K 93M 1% /run/user/113 tmpfs 93M 0 93M 0% /run/user/0 root@kali:~#
Show the usable space for your SD card:
root@kali:~# fdisk -l /dev/mmcblk0 Disk /dev/mmcblk0: 14.47 GiB, 15523119104 bytes, 30318592 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x08dd1e94 Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 1 250000 250000 122.1M c W95 FAT32 (LBA) /dev/mmcblk0p2 250001 30308863 30058863 14.3G 83 Linux root@kali:~#
Expand your installation to the size of the partition with resize2fs :
root@kali:~# resize2fs /dev/mmcblk0p2 root@kali:~# df -h Filesystem Size Used Avail Use% Mounted on /dev/root 15G 3.9G 9.6G 29% / devtmpfs 459M 0 459M 0% /dev tmpfs 464M 0 464M 0% /dev/shm tmpfs 464M 660K 463M 1% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 464M 0 464M 0% /sys/fs/cgroup /dev/mmcblk0p1 122M 67M 55M 55% /boot tmpfs 93M 4.0K 93M 1% /run/user/113 tmpfs 93M 0 93M 0% /run/user/0
Update and upgrade
Kali linux for raspberry pi b
The Raspberry Pi 3 has a quad core 1.2GHz processor, with 1GB of RAM. Kali Linux fits on an external microSD card.
By default, the Kali Linux Raspberry Pi 3 image contains the kali-linux-default metapackage similar to most other platforms. If you wish to install extra tools please refer to our metapackages page.
The Raspberry Pi 3 has a 64-bit processor and can run 64-bit images. Because it can run 64-bit images, you can choose either Kali Linux Raspberry Pi 2, 3, 4 and 400 (32-bit) (img.xz) or Kali Linux Raspberry Pi 2 (v1.2), 3, 4 and 400 (64-bit) (img.xz) as the image to run, the latter being 64-bit.
We recommend using the 32-bit image on Raspberry Pi devices as that gets far more testing, and a lot of documentation out there expects you to be running RaspberryPi OS which is 32-bit.
The Raspberry Pi images use Re4son’s kernel, which includes the drivers for external Wi-Fi cards, TFT displays, and the nexmon firmware for the built-in wireless card on the Raspberry Pi 3 and 4. You will not need to download it and install it, and doing so will likely be a downgrade over the current installed kernel.
Kali on Raspberry Pi 3 — User Instructions
If you’re unfamiliar with the details of downloading and validating a Kali Linux image, or for using that image to create a bootable device, it’s strongly recommended that you refer to the more detailed procedures described in the specific articles on those subjects.
To install a pre-built image of the standard build of Kali Linux on your Raspberry Pi 3, follow these instructions:
- Get a fast microSD card with at least 16GB capacity. Class 10 cards are highly recommended.
- Download and validate our preferred Kali Raspberry Pi 3 image from the downloads area. The process for validating an image is described in more detail on Downloading Kali Linux.
- Use the dd utility to image this file to your microSD card (same process as making a Kali USB.
In our example, we assume the storage device is located at /dev/sdb . Do not simply copy these value, change this to the correct drive path.
This process will wipe out your microSD card. If you choose the wrong storage device, you may wipe out your computers hard disk.
This process can take a while, depending on your PC, your microSD’s speed, and the size of the Kali Linux image.
Once the dd operation is complete, boot up the Raspberry Pi 3 with the microSD plugged in.
Kali on Raspberry Pi 3 — Tips and Tricks
The bluetooth service on the Raspberry Pi 3 needs a uart helper service before it works. To enable and start the bluetooth service run the following commands:
[email protected]:~$ sudo systemctl enable --now hciuart.service [email protected]:~$ sudo systemctl enable --now bluetooth.service
If you are on the 5.10 or higher kernel, you can use mt76 chipset USB Wi-Fi devices, but they require creating a configuration file in /etc/modprobe.d with the following contents:
Kali on Raspberry Pi 3 Headless — Tips and Tricks
You can add a wpa_supplicant.conf file to the first partition of the microSD card to connect to a wireless network.
You can create this file on another Linux system by running wpa_passphrase YOURNETWORK > wpa_supplicant.conf . It will prompt you for the wireless network’s password. You can add the password to the command as you run it, but keep in mind that if you do, your wifi network password will be in your user’s shell history.
Kali on Raspberry Pi 3 — Image Customization
If you want to customize the Kali Raspberry Pi 3 image, including changes to the packages being installed, changing the desktop environment, increasing or decreasing the image file size or generally being adventurous, check out the Kali-ARM Build-Scripts repository on GitLab, and follow the README.md file’s instructions. The script to use is raspberry-pi.sh (32-bit) or raspberry-pi-64-bit.sh (64-bit).
Updated on: 2023-May-30
Author: steev
Kali Linux на Raspberry Pi: просто, быстро, понятно
Заинтересовался я тут на днях, можно ли знаменитый в кругах хакеров и пентестеров Kali Linux на Raspberry Pi запустить. Полных, рабочих и понятных инструкций не нашел, вот и решил написать об этом пост. Выполнено на примере Raspberry Pi 3B+
- Собственно RPi (Подойдет любая, кроме Pi 1)
- Micro SD карта объемом не менее 16 гБ, класс 10
- Компьютер
- Дисплей с разъемом HDMI (к нему будем подключать малинку)
- Кабель питания (рекомендую брать с силой тока не менее 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), тогда пишем код:
sudo nano /etc/apt/sources.list
Нам откроется файл, все содержимое которого нужно удалить и ввести новое:
deb http://http.kali.org/kali kali-rolling main non-free contrib
Потом снова запускаем команду:
И все должно заработать. Затем начинаем обновление пакетов:
Когда у нас спросят подтверждение, жмем Y и enter. А теперь снова завариваем чаёк и ждем, пока обновление завершится (советую заварить литров 10, так как обновляется все это ну очень медленно, у меня заняло около 6 часов).
Теперь ваша RPi готова ко всему!
Перед тем, как выключить RPi из сети, нужно ОБЯЗАТЕЛЬНО прописать в консоли команду
sudo shutdown , и минуты через две RPi свернёт графический интерфейс, а затем выключится. Если эту команду не вбить, но выключить малинку из сети, то она становится «овощем», и нужно заново переустанавливать ОС.
P.S. Автор не несет ответственности за ущерб, нанесенный при использовании Kali Linux. Вся информация приведена исключительно в образовательных целях.