How to Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+ « Null Byte :: WonderHowTo

If you want to follow Null Byte tutorials and try outKali Linux, theRaspberry Piis a perfect way to start. In 2018, theRaspberry Pi 3 Model B+was released featuring a better CPU, Wi-Fi, Bluetooth, and Ethernet built in. Our recommended Kali Pi kit for beginners learning ethical hacking on a budget runs the "Re4son" Kali kernel and includes a compatible wireless network adapter and a USB Rubber Ducky.You should be using a system separate from your day-to-day computer for testing out hacking tools and downloading hacking software, and a Raspberry Pi brings the price of keeping your hacking endeavors siloed from your personal computer down to between $45 to $50. While the Pi is small, it's powerful, and can be used to follow the majority of the tutorials on Null Byte.Image by Kody/Null ByteWhy Use a Raspberry Pi to Learn HackingThe Raspberry Pi has a lot of fans, which means a lot of support for beginners. Aside from security professionals and hackers using it to run Kali Linux, many developers use the Pi for scientific and industrial applications. While the original Pi was made to introduce schoolchildren to programming, today's Raspberry Pi is capable of some truly amazing things with the right accessories and creativity. For building a prototype cyberweapon, the Raspberry Pi has been the foundation for proof of concept attacks ranging from drone takeovers to mass Wi-Fi jamming.The Pi's small size and ability to do some powerful things have also seen it featured in shows likeMr. Robot, where it's used toremotely hack into the climate control system of a data center. That being said, it's not a supercomputer, so it's important to set your expectations for this tiny, discreet computer. Things likebrute-force crackingwon't be practical on the Pi except for the most simple of lists, but most of this work can be outsourced to the cloud in a real-world attack.Image by Kody/Null ByteLearning on the Raspberry Pi means you're not just tied to the Kali Linux operating system. In fact, projects likeBerryBootenable you to have an SD card with many operating systems for the Pi stored on it, allowing you to mount whichever OS you want to work with. This means you can have a Pi act as both a hacking workstation and adeliberately vulnerable serverto attack just by rebooting the system and selecting a different disk image.Don't Miss:How to Create a Wireless Spy Camera Using a Raspberry PiThe Raspberry Pi also runs Raspbian, the official OS of the Raspberry Pi. This Debian-based OS can also be used tolearn basic Linuxand hacking tools, although it requires much more customization before it's suitable for this. If you're stuck learning aboutsoftware-defined radioor NFC in Kali Linux on the Pi, sometimes switching to Raspbian can get all the hardware to work together when all else fails.Using the Pi 3 Model B+ for HackingThanks to the Re4son kernel, the improved specs and updated networking performance can be used with the hacking tools Kali has to offer. The new Pi features a 10/100/1000 Gigabit LAN controller, as well as dramatically improved Wi-Fi speeds, making the Pi ideal for networking applications like running a static web server, NAS, or proxy server. It also makes it an ideal platform forWi-Fiand network hacking, making the Pi much more versatile in a pentesting kit.In addition to the networking improvements, the Pi 3 Model B+ enjoys a 16.7% processing speed increase from the previous model, running a 1.4 GHz 64-bit quad-core processor. While this performance increase isn't enough to bring the Pi into the realm of most desktop or laptop computers, the increase does make Kali feel more responsive.Image by Kody/Null ByteLike theprevious KaliPi builds, it's easy to get started using your Pi once you've booted Kali for the first time. You can plug your Pi into an available screen via HDMI, or you can connect to your Piwithout a screen via SSHover an Ethernet or Wi-Fi connection. Adding a battery pack can give you access to a Kali Linx system anywhere, allowing you to connect to your Pi from a laptop or smartphone over your home Wi-Fi network or cell phone's data hotspot.Why We're Using the Re4son KernelWhile the new Raspberry Pi comes with Bluetooth, Wi-Fi, and other options that can be used with Kali Linux, getting them working isn't always straightforward. We found many beginners had trouble setting up the Bluetooth on the Pi to work with tools in Kali. To fix this, we looked to the Re4son kernel, a special version of Kali Linux optimized for the Raspberry Pi. This version of Kali was working on the Raspberry Pi 3 Model B+ before an official release was availible from Offensive Security (it still is not as of this writing).Image by Kody/Null ByteAnother issue the Re4son kernel fixes is the ability to log in upon startup. In order to power up your Pi and log in while on the go, you'll need your Pi to be able to start Kali Linux and join a familliar Wi-Fi network. After doing so, you can log into the Pi via SSH from any device on the same network. This doesn't work, however, if the Pi gets stuck on the login screen that requests your username and password when Kali starts. Ourprevious solutionfor this was a little complicated and some readers had a hard time following the steps, so I'm pleased that in this version, our Pi image comes with a setup scrip that takes care of enabling this for us.Reccomended Hacking Kit for BeginnersTo get started with the Raspberry Pi as a hacking platform, you'll need a few key components to get the Pi up and running. Initially, you'll need access to another computer to burn your Kali image to an SD card.Aside fromthe Pi 3 B+ itself($36.97), a good power adapter is necessary to power the Pi. The Pi takes a microUSB power cord, and theCanaKit beginner kit version($52.99) of the Pi includes an appropriate adapter. In general, a dedicated 2.4-amp power supply is the best way to go.Next, you'll need an SD card to put the operating system on. There are a lot of available options, but you should opt for a faster SD card with 16 GB of space. In particular, we recommendSanDisk Extreme($17.91 for 64 GB) or theSanDisk Extreme Plus($22.99 for 32 GB). You can get away with 8 GB, but things will be tight.To interact with the Pi, you'll need a keyboard and mouse. It's easiest to use a wireless keyboard and mouse combination like theRii 2.4G Mini Wireless Keyboard with Mouse Touchpad Remote Control($16.99), since we recommend avoiding Bluetooth versions at all cost. They do not work well with Kali and take forever to configure.Image by Kody/Null ByteTo get started withWi-Fi hacking, you'll need a Kali-compatiblewireless network adapter. After testing many, we were pleased with the performance of Panda Wireless network adapters, in particular, because of their small size and 2.4/5 GHz capabilities. For discreet Wi-Fi hacking, we recommend thePAU05 for 2.4 GHz($13.99) or thePAU07 for 2.5 and 5 GHz($24.99). If you want to connect a directional or high-gain antenna to the adapter,the PAU06($14.99) is great for 2.4 GHz hacking, while thePAU09($34.99) is a powerful dual-band adapter with two swappable antennas.Finally, we recommend beginners include aHak5 USB Rubber Duckyrunning theTwin Duck firmware. The Twin Duck firmware allows us to mount the Rubber Ducky as USB mass storage, which means we can write and encode Ducky Script on our Pi with the Rubber Ducky plugged in. While the Rubber Ducky doesn't ship with the Twin Duck firmware, it caneasily be flashed.More Info:How to Modify the USB Rubber Ducky with Custom FirmwareImage by Kody/Null ByteStep 1: Download & Flash Kali Linux to the SD CardThe SD card is the brain of your Pi, so you'll need to download Kali Linux to load it on the card. Navigate toRe4son's website, where you'll find the Kali Linux download in a compressed file. Make sure to select the version for the Raspberry Pi 3 B+ model.The file we're looking for is the top link.If you use Windows, you can useWin32 Disk Imagerto put your image on the card. On a Mac, you can use a tool likeApplePiBakerorEtcherto load your Kali image onto your SD card. In our video guide above, we went with Etcher since it's the easiest method. If this causes errors for you, you can also write a bootable SD image is via a terminal using the below instructions.On a Mac, before plugging in your SD card, run the following in a terminal:df -hThis will display a list of all the disks attached to your system. Attach your SD card and run the command again, and note the filesystem name of your SD card (it's the one that wasn't there before). It should look like "/dev/disk2s1," and you should be very careful not to mix this up in the next steps since doing so could overwrite your hard drive.Now we'll use theddcommand to load the Kali image onto the card. First, let's unmount the partition so you can write to it with the following command, withXbeing the correct disk number:sudo diskutil unmount /dev/diskXNext, run the following command to load the image onto the SD card. If there is an "s" after the initial disk number (like rdisk2s1), do not include the "s" or following number. So, "rdisk2s1" should look like "rdisk2." Here's what it should look like all together:sudo dd bs=1m if=LocationOfKaliImage of=/dev/rdiskXPress enter to begin the process and note thatdddoes not provide any on-screen information unless there is an error or it finishes. To view the progress during the transfer, you can hitCtrl-T. Wait for the process to complete. You'll know the process is complete when you see a readout of bytes transferred over the time the process ran.Step 2: Load Up Kali Linux & UpdateOnce Kali Linux loads, you should see a login screen. The default credentials arerootfor login andtoorfor the password. When Kali loads, open a terminal window. First, we'll need to change the default password so we have some level of control over who accesses our device. To do so, typepasswd rootinto the terminal window and enter your new password twice to set it.Don't Miss:How to Turn Your Raspberry Pi into a Wireless HotspotNext, you'll need to update the system. Now is when you'll need to connect your Pi to the internet via an Ethernet cable or by clicking the Wi-Fi icon in the top-right corner and selecting a network with internet access. In a terminal window, type the followingapt-getcommands, allowing each command to complete before starting the next. This may take some time.apt-get updateapt-get upgradeapt-get dist-upgradeYou should see some output like below. After all this finishes updating, we'll be ready to start configuring our Raspberry Pi.Step 3: Enable BluetoothTo enable Bluetooth, we can use the handy Bluetoothctl built into our Re4son Kali. To use it, typebluetoothctlinto your terminal window. Next, to turn on the Bluetooth agent, typeagent on. When the agent is registered, typedefault agentto register the default agent and enable the Bluetooth controller.To start a scan for Bluetooth devices, typescan on, and you should see a list of devices begin to populate if there are any Bluetooth devices nearby. Finally, to pair with any devices you see, typepairand then the MAC address of the device you see on the list.Step 4: Change the SSH KeysUsing default SSH keys is bad, and can lead to being the victim of aman-in-the-middle attack. To defend against this, we'll need to change our default SSH keys and enable SSH to run at boot.In your terminal window,cdto the SSH keys and reconfigure the server.cd /etc/ssh/dpkg-reconfigure openssh-serverThis should create new SSH keys. Next, we'll run a few commands to enable runlevels for SSH and allow us to start the service at boot so we can log in remotely.update-rc.d -f ssh removeupdate-rc.d -f ssh defaultsnano /etc/ssh/sshd_configIn the nano window that opens, make sure that "PermitRootLogin" is un-tabbed, as seen in the image below.After this is done, you can hitCtrl-Xto exit the nano window after applying the changes. Next, typesudo service ssh restartto apply these changes. Finally, typeupdate-rc.d -f ssh enable 2 3 4 5to enable SSH at boot with the settings we've applied.Step 5: Enable AutologinIn our last Pi tutorial, enabling autologin to bypass the login prompt was by farthe most annoying step. This time, thankfully, the process couldn't be more simple. This step is critical to use the Pi without a keyboard or screen, as SSH or VNC will not start if the Pi gets stuck at the login screen.To enable autologin, type the following into your terminal window.cd /usr/local/src/re4son-kernel_4*./re4son-pi-tft-setup -a rootYou should see output like below. To apply the changes and boot into your newly configured Pi, typeYto confirm and reboot.Other Pi Projects on Null ByteIf you've got your Pi up and running, there's a lot you can do to get started! Check out some of our other guides on using the Raspberry Pi for hacking on Null Byte.Log into Your Raspberry Pi Using a USB-to-TTL Serial CableUse VNC to Remotely Access Your Raspberry Pi from Other DevicesSet Up a Practice Computer to Kill on a Raspberry Pi 3Build a Pumpkin Pi: The Rogue AP & MitM Framework That Fits in Your PocketWardrive with the Kali Raspberry Pi to Map Wi-Fi DevicesBoot Multiple Operating Systems on the Raspberry Pi with BerryBootAutomate Hacking on the Raspberry Pi with the USB Rubber DuckyImage by Kody/Null ByteI hope you enjoyed this guide to setting up a Raspberry Pi 3 Model B+ running Kali Linux! If you have any questions about this tutorial or the Pi as a hacking platform, feel free to leave a comment or reach me on Twitter@KodyKinzie.Follow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Kody/Null ByteRelatedHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterRaspberry Pi Alternatives:10 Single-Board Computers Worthy of Hacking Projects Big & SmallHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxBuyer's Guide:Top 20 Hacker Holiday Gifts for Christmas 2017How To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Build a Portable Pen-Testing Pi BoxOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiRaspberry Pi:Hacking PlatformHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & MoreHow To:Build an Off-Grid Wi-Fi Voice Communication System with Android & Raspberry PiRaspberry Pi:Physical Backdoor Part 1Buyer's Guide:Top 20 Hacker Holiday Gifts of 2018News:Smart Home Proof of Concept Uses a Raspberry Pi to Control Air Conditioner with HoloLensRasberry Pi:Introduction