- Kali linux raspberry wifi
- Kali on Raspberry Pi — User Instructions
- Kali on the Raspberry Pi — Tips
- Kali on Raspberry Pi — Image Customization
- Kali linux raspberry wifi
- Kali on Raspberry Pi 4 — User Instructions
- Kali on Raspberry Pi 4 — Tips and Tricks
- Kali on the Raspberry Pi — Examples
- Kali on Raspberry Pi 4 — Image Customization
- Kali linux raspberry wifi
- Kali on Raspberry Pi 3 — User Instructions
- Kali on Raspberry Pi 3 — Tips and Tricks
- Kali on Raspberry Pi 3 — Image Customization
- DIY WiFi Router using Kali Linux on a Raspberry Pi 3 Model B[+]
Kali linux raspberry wifi
The early revisions of Raspberry Pi 1 (Original) boards have a full-size SD card slot, however later board revisions moved to a microSD card slot. We document using the full-size SD card, but the process is the same for microSD card.
The Raspberry Pi 1 (Original) is a low-cost, credit-card-sized ARM computer. Despite being a being less powerful than a “standard” laptop or desktop PC, its affordability makes it an excellent option for a tiny Linux system. The Raspberry Pi provides a full-size SD card slot for mass storage and will attempt to boot off that device when the board is powered on.
By default, the Kali Linux Raspberry Pi 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 — 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, the general process goes as follows:
- Get a fast full-size SD card with at least 16GB capacity. Class 10 cards are highly recommended.
- Download and validate the Kali Linux Raspberry Pi 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 full-size SD 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 full-size SD 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 full-size SD card’s speed, and the size of the Kali Linux image.
Once the dd operation is complete, boot up the Raspberry Pi with the full-size SD card plugged in.
You should be able to log in to Kali.
Kali on the Raspberry Pi — Tips
There is no wireless on the Raspberry Pi, so you will need to use an external device for wireless.
Kali on Raspberry Pi — Image Customization
If you want to customize the Kali Raspberry Pi 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 rpi.sh .
Updated on: 2021-Sep-27
Author: steev
Источник
Kali linux raspberry wifi
The Raspberry Pi 4 has a quad core 1.5GHz processor, with 2GB, 4GB or 8GB of RAM, depending on model. Kali Linux runs on a microSD card.
By default, the Kali Linux Raspberry Pi 4 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 4 has a 64-bit processor and can run 64-bit images. Because it can run 64-bit images, you can choose either Kali Linux RaspberryPi 2, 3, 4 and 400 (img.xz) or Kali Linux RaspberryPi 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 4 — 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 4, 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 4 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.
or
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 4 with the microSD plugged in.
You should be able to log in to Kali.
Kali on Raspberry Pi 4 — Tips and Tricks
The bluetooth service on the Raspberry Pi 4 needs a uart helper service before it works. To enable and start the bluetooth service run the following commands:
By default, audio is routed via HDMI, so you won’t hear audio via the 3.5mm audio jack. You can run the following command in order to redirect the output:
Kali on the Raspberry Pi — Examples
We love seeing users come up with their own images and sharing them.
As an example, there’s a user-created project running Kali on a Raspberry Pi 3, a touch interface and mounted on a drone! We recommend checking out Sticky Fingers to learn more.
Kali on Raspberry Pi 4 — Image Customization
If you want to customize the Kali Raspberry Pi 4 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 rpi3-nexmon.sh (32-bit) or rpi3-64.sh (64-bit).
Updated on: 2021-Sep-27
Author: steev
Источник
Kali linux raspberry wifi
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 RaspberryPi 2, 3, 4 and 400 (img.xz) or Kali Linux RaspberryPi 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.
or
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.
You should be able to log in to Kali.
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:
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 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 rpi3-nexmon.sh (32-bit) or rpi3-64.sh (64-bit).
Updated on: 2021-Sep-27
Author: steev
Источник
DIY WiFi Router using Kali Linux on a Raspberry Pi 3 Model B[+]
I have been experimenting with Kali and WiFi for a while, but lately I have been struggling a bit with outdated tutorials when it comes to more niche features combining both of these technologies. So, I decided to build a small demonstration project in order to freshen-up the literature out-there.
If you are not too versed in security software, you might not know Kali Linux. It’s a Debian-based Linux distribution that comes with a ton of specialized tools regarding penetration testing, reconnaissance and hacking in general. By default, its only user is root , but by adding a “normal” user you can use it as your everyday computer as well (because using root as an everyday account is the greatest way to screw things up spectacularly, as a misplaced rm typo is so easily made…). Note that you can install pretty-much all the goodies that come with Kali on any other Linux distribution, but here those are all pre-configured for you (or ready to install using the official repositories).
1- Installing Kali Linux on your Raspberry Pi
Being a long-time user of Kali for my laptop, I decided to use it for my RaspberryPi experiments as well. While it might be possible for you to use the vanilla armhf image from Kali’s general download page, there is an ARM-specific download page which contains an image using the Re4son-Pi kernel for the RaspberryPi. This kernel comes with pre-built WiFi drivers supporting Monitor mode and Packet injection with popular Alfa WiFi cards (which can be quite difficult to enable on a “normal” distribution like Raspbian that might require you to compile and install the kernel modules yourself). So to start this project, download the RaspberryPi-specific Kali image and burn it to a Micro-SD card. The geekest readers will know that they can use dd to do that, but I recently discovered the free Etcher software, made by Resin.io, another great product for RaspberryPi lovers, but out of the scope of this story. To get started, fire-up Etcher and burn the image to your card.
2- Choose a capable WiFi card
Even though the RaspberryPi 3 Model B does come with a built-in Broadcom WiFi interface, my experiments show that it is not quite suitable in order to build a stable Access Point with Kali Linux, most likely because of the default brcmfmac driver (Raspbian Linux might be different, as the official documentation says, but I have not tested it…). As such, I would suggest to use a card using the rt2800usb driver as they work out-of-the-box with the Re4son-Pi kernel; Overall, I have tested five different adapters for this project:
- The built-inBroadcom BCM2837 : This card works very fine for being a WiFi client, but its driver does not seem suitable for being used as a stable access point: while it is possible to put it in Master mode, HostAPd pops some driver-related errors and my client (a MacOS) couldn’t establish a connection, with or without encryption. I do not recommend using it for an access point on Kali Linux (Raspbian might handle it better, I have not tested yet). It does not support Monitor mode either.
- CanaKit’s Ralink 5370 WiFi adapter : This adapter works like a charm with Master mode and Monitor mode. It is also cheap and convenient, as it is small and does not require a powered USB hub in order to work properly. It is only limited by the fact that has a limited range which is not extendable by replacing the antenna, as it doesn’t have an RP-SMA connector like the more versatile models.
- Alfa’s AWUS036NH andSimpleWifi’s N124–700 adapters: Both of these cards are based on the RaLink RT-3070 chipset, which has been very widely used by WiFi hacker community for years now. The Re4son-Pi kernel has everything you need in order get you started quickly but there is a caveat: You will most probably need an additional powered USB hub in order for those cards to run smoothly, as they might require more power than your Raspberry Pi can supply off it’s USB ports depending on how it is powered itself. As this might be a show-stopper for some use-cases, I prefer to give a little heads-up.
- The infamousAlfa AWUS1900 : This one is some serious WiFi tool, one of Alfa’s most potent consumer-grade WiFi adapters. Using it on a Raspberry Pi does not leverage its full capabilities as it would require USB3, and though it might be overkill for our simple router project, I wanted to make it work just for lulz. This card definitely does need a powered USB hub to run smoothly with the Pi. Also note that the official Kali repositories do not include a RaspberryPi-compatible version of the drivers you must clone AirCrack-ng’s version of the drivers and build them yourself specifying that you want the ARM RTL88 14 AU’s version (and not the default RTL88 12AU). After a little bit of work, the card works like a charm, supporting Master mode, Monitor mode and Packet injection. In theory, it should be as simple as:
So after trying all of those, I feel that if I had to choose just one, I would just go with the CanaKit’s adapter, which is cheap and reliable. It might not have the fame and community support of Alfa’s cards, but it just gets the job done, without the need of additional hardware like a powered USB hub.
3- Preparing the Pi’s internal network:
Important: Kali Linux on RaspberryPi has SSH enabled by default and a root password set as toor that you should change before you do anything else:
So, now that we have a fresh copy of Kali installed, chosen a WiFi card according to our needs and installed the required drivers, the next step is to prepare our Raspberry Pi’s network so it can accommodate other devices.
First, we want to configure static IP addresses for our WiFi adapter, which I will assume to be wlan1 for the rest of this story. Edit the file /etc/network/interfaces and it should look like that:
Finally, we want to install a DHCP server that will serve our WiFi clients with valid adresses:
Which will install udhcpd that we can configure by modifying the file /etc/udhcpd which in my case looks like this:
Finally, restart the DHCP service using service dhcpd restart .
4- Install and configure HostAPd
Next, we need to apt-get install hostapd , HostAPd being the software that enables the Pi to act as a Wireless Access Point. Modify its configuration file /etc/hostapd/hostapd.conf so that it looks like this:
Then tell the services manager where to find the configuration file by modifying /etc/default/hostapd and find this line:
Restart the service using service hostapd restart . You should now be able to connect to your RaspberryPi. Hourray!
5- Route traffic using IPTables
Now, we need to enable IP forwarding in the kernel so it can forward packets for our client devices to the Internet:
And change this line in /etc/sysctl.conf to make the changes permanent:
Finally, use your IPTables-magic to masquerade client connections to the Internet (which I assume is the wired interface eth0 ):
There is a nice package available in Kali that will make these changes to IPTables last: iptables-persistent. Just do this in order to make it happen:
The package will save your configuration and load /etc/iptables/rules.v4 every time your Raspberry Pi is rebooted.
6- Troubleshooting tips
Remember that for the whole thing to work, every moving part of this puzzle must work together. I would suggest you keep this little troubleshooting cheat sheet close-by 😉 Especially if you had to install some custom driver or play with the kernel, you will need to reboot sometimes.
7- Conclusion — Weaponization possibilities
Choosing Kali for my platform was not completely innocent: It offers multiple possibilities to weaponize our new WiFi platform. Here are a couple additions that could be made in order to spice things up:
- SSLStrip: SSLStrip is a Man-in-the-Middle reverse-proxy used to disable HTTPS on secure websites and sniff login credentials in clear-text. A server can protect itself by using HSTS, but it’s not perfect (it will not work if a browser has never connected to the website, for example). Additionally. while HSTS is getting more popular, lots of websites do not implement it.
- HostAPd-WPE: A malicious version of HostAPd that can be used to sniff EAP and MSCHAP credential hashes. It does support Karma-style attacks in order to deceive Clients which think they are connecting to known legitimate WPA2-Enterpise networks.
- Heartbleed exploitation: Heartbleed was a buffer overflow vulnerability that took the world by surprise in 2014. Since then, malicious WiFi access points can use Cupid in order to try to exploit this on vulnerable clients and servers.
- DHCPShellshock : A few years ago when ShellShock was still popular, I leveraged a small attack that could be used by sending a malicious string in the DHCP options. It did work, and there might still be some old linux laptops out-there. There is a metasploit module that does just that.
Now, remember: With great power comes great responsibility! These experiments should remain what they are: experiments, used for educational purposes and to raise awareness about what is possible when connecting to untrusted networks.
Источник