attack_range icon indicating copy to clipboard operation
attack_range copied to clipboard

Docker option in Azure - creation of VM fails

Open jxsmith786110 opened this issue 3 years ago • 3 comments

Hello,

Using the Docker option #1 to build lab in Azure. First issue was the Azure CLI command wasn't availabe and had to download for container separately in order to do "az login". Second issue is everything seems to build fine, but it runs in to issue building Kali machine. Only left with two virtual machines, the domain controller and splunk server. It doesn't get to building client machines or windows server. Here is the error.

Error: compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="ResourcePurchaseValidationFailed" Message="User failed validation to purchase resources. Error message: 'You have not accepted the legal terms on this subscription: '######################' for this plan. Before the subscription can be used, you need to accept the legal terms of the image. To read and accept legal terms, use the Azure CLI commands described at https://go.microsoft.com/fwlink/?linkid=2110637 or the PowerShell commands available at https://go.microsoft.com/fwlink/?linkid=862451. Alternatively, deploying via the Azure portal provides a UI experience for reading and accepting the legal terms. Offer details: publisher='kali-linux' offer = 'kali-linux', sku = 'kali', Correlation Id: 'bea88686-ff2f-8573-cd98-44062f247cf2'.'"

on ../modules/kali_machine/resources.tf line 25, in resource "azurerm_virtual_machine" "kali": 25: resource "azurerm_virtual_machine" "kali" {

jxsmith786110 avatar Dec 24 '21 22:12 jxsmith786110

I was able to run a one time "az vm image accept-terms" command against the kali image and that seems to have resolved the original issue. However, now seeing this timeout error:

module.windows-domain-controller.azurerm_virtual_machine.dc[0]: Still creating... [5m50s elapsed] module.kali_machine.azurerm_virtual_machine.kali[0]: Still creating... [5m50s elapsed] module.kali_machine.azurerm_virtual_machine.kali[0] (remote-exec): Connecting to remote host via SSH... module.kali_machine.azurerm_virtual_machine.kali[0] (remote-exec): Host: 52.190.255.166 module.kali_machine.azurerm_virtual_machine.kali[0] (remote-exec): User: kali module.kali_machine.azurerm_virtual_machine.kali[0] (remote-exec): Password: false module.kali_machine.azurerm_virtual_machine.kali[0] (remote-exec): Private key: true module.kali_machine.azurerm_virtual_machine.kali[0] (remote-exec): Certificate: false module.kali_machine.azurerm_virtual_machine.kali[0] (remote-exec): SSH Agent: false module.kali_machine.azurerm_virtual_machine.kali[0] (remote-exec): Checking Host Key: false module.windows-domain-controller.azurerm_virtual_machine.dc[0]: Still creating... [6m0s elapsed] module.kali_machine.azurerm_virtual_machine.kali[0]: Still creating... [6m0s elapsed]

module.kali_machine.azurerm_virtual_machine.kali[0]: Still creating... [6m10s elapsed]

Error: timeout - last error: unknown error Post "http://52.190.255.175:5985/wsman": dial tcp 52.190.255.175:5985: i/o timeout

Error: timeout - last error: dial tcp 52.190.255.162:22: i/o timeout

Error: timeout - last error: dial tcp 52.190.255.166:22: i/o timeout

jxsmith786110 avatar Dec 25 '21 04:12 jxsmith786110

Bump. I'm running into all the above issues.

rcegan avatar Apr 13 '22 03:04 rcegan

i think they remove the Kali image from the Azure marketplace. Unfortunately, there is no easy fix for that. I hope the image will be uploaded again. We will work on the first issue.

P4T12ICK avatar May 31 '22 09:05 P4T12ICK

This should work again

P4T12ICK avatar Sep 13 '22 06:09 P4T12ICK

Hey guys -

I am running into a similar issue described above. I am using the AWS docker option to build Attack Range, but am facing the below timeout error. All resources are being built successfully but because of the timeout error I cannot access Splunk Web using the IP addresses provided. Any suggestions on how to remediate this?

module.windows-server.aws_instance.windows_server[0]: Creation complete after 22m51s [id=i-03bf67503de38127c] module.windows-server.aws_eip.windows_ip[0]: Creating... module.windows-server.aws_eip.windows_ip[0]: Creation complete after 2s [id=eipalloc-07ba97f7da8351645] ╷ │ Error: remote-exec provisioner error │ │ with module.splunk-server.aws_instance.splunk-server[0], │ on modules/splunk-server/resources.tf line 109, in resource "aws_instance" "splunk-server": │ 109: provisioner "remote-exec" { │ │ timeout - last error: dial tcp 34.201.103.5:22: i/o timeout ╵ 2022-11-10 16:49:39,420 - INFO - attack_range - [action] > show

Status Virtual Machines

Name Status IP Address


ar-win-root-97501-ar-0 running 52.205.203.186 ar-splunk-root-97501-ar running 34.201.103.5

anshmax avatar Nov 10 '22 18:11 anshmax