Installing Kali Linux 2.0 on Amazon AWS

  • Log in to your AWS account and launch a new EC2 instance. Find Kali Linux minimal image AMI (Amazon Machine Image) by Offensive Security in AWS Marketplace. This AMI is free. Use m3.medium or bigger instance type or you won’t have enough RAM for running Metasploit.
  • Ensure inbound SSH is enabled for the new machine so you can access it.
  • Connect to the created instance, use admin as the username:
ssh -i <path to your SSH key> admin@<public IP of the instance>
  • The AMI is a minimal install of Kali Linux version 1. Now we need to update Kali to version 2, install additional components:
sudo su -
cat << EOF > /etc/apt/sources.list
deb http://http.kali.org/kali sana main non-free contrib
deb http://security.kali.org/kali-security/ sana/updates main contrib non-free
EOF
apt-key adv — keyserver hkp://keys.gnupg.net — recv-keys 7D8D0BF6
apt-get update
apt-get dist-upgrade
  • Here’s some explanations: firstly (sudo su -) we elevate to root; then (cat << … EOF) update package repository list; then (apt-key …) add an updated package signing key to the apt keyring (otherwise apt will reject the newer packages due to untrusted signatures); last two commands update package list and upgrade the Kali distro to version 2. You’ll be asked some questions during the upgrade process. Defaults are fine for all of them.
  • Now upgrade to full Kali Linux 2.0 installation using kali-linux-full metapackage and restart the machine (assuming you are still in the root session).
apt-get install kali-linux-full
shutdown -r now
  • Again, defaults are fine for most of the questions. One of the questions is to configure password for root account for MySQL, I would strongly suggest you do it.
  • This step will take some time due to the number of packages to be installed. Once the machine is restarted, you have a full install of the latest Kali Linux 2.0
  • Once the machine is restarted, you are ready to initialize a Metasploit database and start Metasploit console. Connect back using admin account and run:
sudo /etc/init.d/postgresql start
sudo msfdb init
sudo msfconsole

--

--

--

Random rumblings about #InfoSec. The opinions expressed here are my own and not necessarily those of my employer.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Airman

Airman

Random rumblings about #InfoSec. The opinions expressed here are my own and not necessarily those of my employer.

More from Medium

Linux Fundamental Part 1 | TryHackMe

Ethical Hacking (part 11.0/20): Introduction to steganography with examples and tools

Know Kali Linux — What is Kali Linux [Part 1]

Linux Fundamentals Part-1