Navigate to the EC2 page in the AWS Services Console.
KALI-mr-rbt
Search Kali in the dashboard.
Click the AWS Marketplace AMIs tab.
The first result at top should be Ver Kali Linux 2023.4.
Click on it, and click the Subscribe Now button on the following page.
Back on the EC2 instance launch page, the minimum requirement for this Kali AMI is a:
Instance Type: t2.medium
Each EC2 instance using the instance type incurs a charge of:
$0.046/Hr
This instance type is not eligible for our AWS free tier, but that’s the way the cookie crumbles.
After choosing the minumum Instance type, scroll down to Key pair (login).
Key pair name: KALI-mr-rbt-KEY-PAIR
Key pair type: RSA
Private key file format: .pem
Click Create key pair button.
This will create and download your key pair, which you’ll find in the Downloads folder by default if using Chrome browser.
VPC: SOC-VPC
Subnet: attack-subnet
Auto-assign public IP: Enable
Kali Linux-Kali Linux 2023.4-AutogenByAWSMP--2
Type: ssh
Protocol: TCP
Port range: 22
Source type: Anywhere
The AWS free tier allows up to 30 GB of General Purpose SSD or Magnetic storage. The default is 12 GB gp2, so you can take advantage and manually change the size and throughput quality of volume!
But for now you might not need it. Provisioning extra hard disk space will use the allotted Free Tier storage, so let's stick to the default of 8GB.
1x: 8 GiB gp3
Check the box for the KALI instance you’ve just created, and click on the Connect tab.
Click on the copy to clipboard icon next to the chmod command on number 3. This command will secure the key-pair file you downloaded earlier.
Open your host machine’s terminal window.
Navigate to the Downloads folder.
Paste the command:
$ chmod 400 "KALI-mr-rbt-KEY-PAIR.pem"
This command has secured the key-pair file you downloaded earlier to only provide read permissions to root user, and restricts any other user of any permissions.
Go back to the Connect to instance page, and copy the ssh command in the provided Example at bottom of page.
Paste it into your host machine’s terminal.
$ ssh -i "KALI-mr-rbt-KEY-PAIR.pem" root@203.0.113.5
When prompted with:
Are you sure you want to continue connecting (yes/no/[fingerprint])?
...type yes:
$ yes
You should see the message:
Warning: Permanently added '203.0.113.5' (ED25519) to the list of known hosts.
You’ve just added the public key to your system’s list of known hosts. Whenever you connect to this EC2 instance, the server will present it’s SSH key, and your host system will check in the known_hosts file for a matching key. If it matches, it is safe and you can connect.
You should now be connected to the Kali instance!
Run:
$ sudo apt update
$ sudo apt upgrade
...to update the debian dependencies.