All Collections
Penetration testing
How do I deploy a Kali virtual machine in Azure?
How do I deploy a Kali virtual machine in Azure?

Deploying a Kali penetration testing system for 7MinSec to use in your Azure tenancy

Brian Johnson avatar
Written by Brian Johnson
Updated over a week ago

For some penetration testing engagements, it might make sense for you to deploy a penetration testing system in your Azure tenancy, rather than have 7 Minute Security ship you a physical device. Below are the steps to create the Kali virtual machine:

  1. Log into your Azure portal at https://azure.microsoft.com.

  2. From the main portal menu, click Virtual Machines:

  3. Click Create > Azure Virtual Machine:


  4. Select and/or fill out the Subscription, Resource Group and Virtual Machine Name. In our example, we selected our default subscription, made a new resource group called 7MS-KALI_group and named the machine 7MS-KALI:

  5. Under Image, click the drop-down box and choose See all images:

  6. Within the marketplace, type in the search Kali, and then from the results, underneath the Kali Linux image, click the drop-down and choose Kali 2023.4 -x64 Gen 2:


  7. Back at the Create a virtual machine screen, select the Size dropdown and choose Standard_DS1_v2 - 1 vcpu, 3.5 GiB memory:

  8. Under the Administrator Account section, choose Password, create a user called sevminsec and then a long/strong/unique password such as one generated with 1Password (7 Minute Security will arrange a secure email thread to send this password through):

  9. Near the bottom of this screen, ensure that under Public inbound ports that Allow selected ports is selected, that SSH is highlighted in the drop-down, and then click Next: Disks >:


  10. Under OS disk, click the drop-down next to OS disk size and choose 64 GiB (P6), then click Next: Networking >:


  11. Under Network interface, ensure the correct Subnet is selected. Then, under NIC network security group, choose Advanced, and under Configure network security group, click the 7MS-KALI-nsg. Then click Next: Management > to continue:

  12. Under the Management tab, leave all defaults and click Next:Monitoring >

  13. Under the Monitoring tab, leave all defaults and click Next: Advanced >

  14. Under the Advanced tab, leave all defaults and click Next: Tags >

  15. Under the Tags tab, leave all defaults and click Next: Review + create >

  16. Under the Review + create tab, double-check the configuration and click Create.

  17. Back at the main Azure portal, search for network and then select Network security groups:

  18. Under Network security groups, click the one assigned to the Kali VM:

  19. From the network security group rule list, locate and click on default-allow-ssh:

  20. Within the default-allow-ssh rule, ensure under Source that IP Addresses is selected, and then under Source IP addresses / CIDR ranges you copy/paste in the IPs/subnets provided by 7 Minute Security (IPs below are just for demonstration purposes), as well as any IPs you will want to connect to the VM from:

    When all the IPs/subnets are configured, click Save at the bottom of this rule:

  21. After a bit of time you should see a notification at the top right of your Azure portal letting you know the VM has been created:

  22. Click Virtual machines from the Azure menu again, and this time you should see your Kali VM listed:

    Please send the IP address (under Public IP address) to 7 Minute Security via the secure email portal provided.

  23. To verify that the Kali VM has outbound Internet connectivity (so that 7 Minute Security can load our testing environment), SSH into the system. Using Mac Terminal:

    ssh [email protected]

  24. One easy way to check oubound Internet connectivity is to issue the sudo apt-get update command:

  25. (Optional) you can finish updating the Kali box by following up with the sudo apt-get upgrade -y command to install all the latest/greatest packages and updates to the system:



Did this answer your question?