Certifications / Security

How to Install Kali Linux on Any Machine

How to Install Kali Linux on Any Machine picture: A
Follow us
Published on February 3, 2020

Anyone with the barest of passing interest in penetration testing has heard of Kali Linux. The venerable distribution, maintained by Offensive Security and based on Debian, is the Swiss Army knife of pentesting, preinstalled with over 600 tools. Everything you'll need is here from port scanners to password crackers to exploit frameworks — in one free download.

In addition to these tools, you'll also need some more-than-basic networking knowledge, which you can get from Network+ training at the very least or even better CCNA 200-301 training. It also can't hurt to run through some pentesting training that covers the most popular Kali Linux tools.

Ready to jump in? Great, but first you must decide how exactly you want to run Kali. It is an entirely separate operating system, you can't just install it as an app in Windows. Maybe wipe and load it on an old laptop? Set up a new virtual machine? Or maybe put it in the cloud?

Every option has its pros and cons, special considerations you need to consider to get rolling, and other pro tips about how to work best in Kali, let's check them out.

Installing on Bare Metal

Nothing inappropriate about going bare here. "Bare metal" simply refers to installing an operating system directly onto the computer hardware, as opposed to running an OS as a guest virtual machine. You'll need some kind of media with the Kali image to boot the computer from. Luckily OffSec provides a page with ISO downloads (ISOs are simply a single file that is an image of an entire CD or DVD). Overwhelmed with all the choices on that page? Go with the first one, Kali Linux 32-bit.

You'll then need to take that ISO file and either burn it to a DVD or create a bootable USB flash drive. The latter is probably more practical, with more and more computers shipping without DVD drives. But if you prefer the old skool shiney media then get to burnin'. This article walks through creating a bootable flash drive if you decide to go that route.

The pros of running Kali on bare metal? You can repurpose an older machine gathering dust. Maybe you don't have access to a computer powerful enough for virtualization. And, um… that's about it. This isn't really the best option. Kali's great and full-featured as an OS, but unless you are already very accustomed to Debian as a daily driver then this might be a rough way to make the switch. Running as a VM is a much better option, so speaking of….

Installing Kali as a Virtual Machine

Here's the deal, a VM is the way you want to go. It's super convenient running Kali as a guest, always having access with only one computer needed, while maintaining the comfort of your host operating system. Taking snapshots to roll back from potential breakage after major updates. There are no DVDs or flash drives to mess with. Much better, right?

But there are still decisions to be made. Every VM needs a hypervisor, or the software that runs the VMs. There are several choices depending on your host's operating system. One option that runs on Windows, MacOS, Linux, and even Solaris (for the ultra-hardcore) is VirtualBox. Maintained by Oracle, VirtualBox is open source (aka free!), has low overhead, and runs VMs of just about every OS you could ever need (and many you won't, we're looking at you OS/2 Warp!).

Kali also is available specifically in the VirtualBox format, preinstalled and ready to rock (this same page has downloads in Hyper-V and VMware formats, also, we'll get to those). Import that image, click boot, and you're at the desktop within 30 seconds.

VirtualBox is not perfect, however. UI and network glitches sometimes make it a pain when you just want to work. Copying and pasting between the guest and host works… usually… sometimes. But little things like this get annoying after a while. Give it a shot though, you can't beat free. But there are preferred alternatives.

Kali VM in Windows

If you are running Windows, specifically Windows 8 or better and the Professional or a better edition, you can actually install Hyper-V to run VMs! Yup, the desktop, non-server versions of Windows gained the ability to natively run Hyper-V a few years ago, to little fanfare unfortunately. Check this walkthrough to get it installed.

Hyper-V is of course very stable and free of many of the glitches plaguing VirtualBox. But maybe you're still rocking Windows 7 (no shame, but EOL is coming) or stuck on Windows 10 Home. No worries, check out VMware Workstation Player, a free ESX-based hypervisor for any edition of Windows.

If you work in either a Hyper-V or VMware environment already, given a choice between either for running Kali, you can easily stick with whatever you're most comfortable with. Or mix it up and try the one you've never used before or a two-birds-one-stone experimenting situation.

Kali VM in MacOS

Over in the Mac world there are fewer appealing options, unfortunately. VirtualBox is a starting point that you can still take or leave. Hyper-V? Um, no. VMware, in a quest for world dominance, only makes a paid hypervisor called Fusion for Mac. Thanks a lot, guys.

Maybe you love compiling software, resolving dependencies, and having things work with a moderate amount of kludge, there are some open source projects out in the wilds of GitHub.

Our preference? Parallels. It's rock solid, runs every guest OS, and has a friendly and simple UI. It's not free, but it's not a bad investment. And if you're a Mac user, you should be accustomed to opening your wallet a bit more than the rest of us anyway.

Kali VM in Linux

If you are brave and/or savvy enough to run Linux as a daily driver, we'll assume that you got this one. Or just install all the same Kali tools in your existing Ubuntu box. Easy peasey, moving on.

Virtual Machine Tips

Whatever hypervisor you use, they all have the ability to take snapshots. These save the contents of the disk, capturing a moment in time. Linux, for all its strengths, occasionally rebels after a major update, leaving you with an unbootable VM. So before hitting enter after a "sudo apt-get dist-upgrade," take a snapshot and you'll be ready to rollback in the event of a disaster.

Another tip is the terminal you'll use. Running a VM will allow you to see the Kali desktop, but for most of your work you'll want to use a terminal app on your host VM to SSH into Kali (using keys of course). MacOS has a native terminal app supporting SSH, and most Windows users will reach first for PuTTY.

Better alternatives, however, support things like split pane windows (letting you work in more than one shell at once, very handy in a neck-deep hacking session with multiple tools running), custom colors, infinite history search, and autocomplete. Check out iTerm for Mac and ConEmu for Windows. Or jump into the super-deep end with tmux.

Last tip. Learn about virtual networking. If you are in a public space or at work, you might not want Kali or any other VM to be visible on the same network with everyone else. Every hypervisor will let you create virtual networks to keep your VMs isolated from the network and only accessible by you, get started by Googling your hypervisor name plus "virtual networking."

Kali in the Cloud

All this local VM talk, why can't we go back to the good ol' days of sticking everything in the cloud? Well Kali is no exception and many cloud providers make it quick and easy to spin up an instance all ready to go.

AWS for starters has a listing for Kali in the AWS Marketplace. The Marketplace is basically a bunch of VMs preloaded with specific applications, making it dead simple to deploy those applications into your VPC as an EC2 instance with a few clicks. Licensed software will usually roll that licensing into your AWS bill via hourly usage costs, but Kali of course being open source will only require billing for your EC2 uptime and VM storage.

To get started, simply go to the Kali Marketplace listing, hit "Continue," choose your instance type (t2.micro will be plenty to start), and deploy. Pretty soon you'll have a Kali box in the cloud! Get your SSH key from the AWS console, fire up your SSH client, and connect.

One caveat with this setup (and Kali with any cloud provider) is that desktop access is a bit trickier. "Wait, I thought we were going to be working via SSH?!" Well, yes, a good bit of work will be in the terminal. However, if you are running tests against a web site, sometimes you'll want to actually interact with the site with a browser and other GUI tools in Kali, and for that you'll need the desktop.

This article should get you started using VNC over SSH, just make you are using security groups in AWS to allow access to port 5902 in this case and SET A STRONG VNC PASSWORD!

If AWS isn't your style, you can run Kali in other VM hosting providers like DigitalOcean, they'll just require a few extra steps. All the nitty-gritty is here, but DigitalOcean will require you to upload a Kali ISO, install and configure it as an image, then deploy your image to a droplet.

Vultr is another VM host that will follow a similar procedure. The big difference in these providers from AWS is that they allow you to deploy your own ISOs. That's a no-no with AWS, you only get the OSes and Marketplace images they offer you.

Any cons to running Kali in the cloud? You'll be paying by the hour, so don't forget to shut it down when you're done for the day. Fair warning, the GUI is a bit sluggish, more or less depending on your provider and bandwidth. This alone could be a deal-breaker, depending on how much you need to do in the browser.

Now Get Hacking!

Whether you're starting your OSCP prep or just wanting to see what the fuss is about, you hopefully have your first instance of Kali running. There's a lot to dig into, check out my article about how I passed the OSCP for some first steps toward getting into all the tools available in Kali. Happy Hacking!


Download

By submitting this form you agree to receive marketing emails from CBT Nuggets and that you have read, understood and are able to consent to our privacy policy.


Don't miss out!Get great content
delivered to your inbox.

By submitting this form you agree to receive marketing emails from CBT Nuggets and that you have read, understood and are able to consent to our privacy policy.

Recommended Articles

Get CBT Nuggets IT training news and resources

I have read and understood the privacy policy and am able to consent to it.

© 2024 CBT Nuggets. All rights reserved.Terms | Privacy Policy | Accessibility | Sitemap | 2850 Crescent Avenue, Eugene, OR 97408 | 541-284-5522