1 # Docker file and server to scan the web
3 ### Command to build docker container
5 $ sudo podman build --cap-add ALL .
8 ### Command to start server to start and enumerate containers
15 You will need to set up a `Template spec` with the following...
16 You will need to change `--YOUR SSH KEY--` to your PCs ssh key.
20 "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
21 "contentVersion": "1.0.0.0",
24 "defaultValue": "[resourceGroup().location]",
27 "description": "Location for all resources."
32 "virtualNetworkName": "[concat(parameters('location'),'-vnet-vmaccess')]",
33 "networkSecurityGroupsName": "[concat(parameters('location'),'-vnet-vsg')]",
34 "nicName": "[concat(parameters('location'),'vmka5')]",
35 "nicNameStr": "[concat(parameters('location'),'strka5')]",
36 "nicNameNet": "[concat(parameters('location'),'netka5')]",
37 "publicIPAddressName": "[concat(parameters('location'),'-ipka5')]",
38 "vnetAddressPrefix": "10.0.0.0/16",
39 "subnetName": "VMAccess",
40 "subnetPrefix": "10.0.0.0/24",
41 "subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]"
45 "type": "Microsoft.Network/networkSecurityGroups",
46 "apiVersion": "2020-11-01",
47 "name": "[variables('networkSecurityGroupsName')]",
48 "location": "[parameters('location')]",
55 "sourcePortRange": "*",
56 "destinationPortRange": "22",
57 "sourceAddressPrefix": "*",
58 "destinationAddressPrefix": "*",
61 "direction": "Inbound",
62 "sourcePortRanges": [],
63 "destinationPortRanges": [],
64 "sourceAddressPrefixes": [],
65 "destinationAddressPrefixes": []
72 "type": "Microsoft.Storage/storageAccounts",
73 "apiVersion": "2021-01-01",
74 "name": "[variables('nicNameStr')]",
75 "location": "[parameters('location')]",
77 "name": "Standard_LRS"
81 "type": "Microsoft.Network/publicIPAddresses",
82 "apiVersion": "2020-06-01",
83 "name": "[variables('publicIPAddressName')]",
84 "location": "[parameters('location')]",
86 "publicIPAllocationMethod": "Dynamic",
88 "domainNameLabel": "[variables('publicIPAddressName')]"
93 "type": "Microsoft.Network/virtualNetworks",
94 "apiVersion": "2020-06-01",
95 "name": "[variables('virtualNetworkName')]",
96 "location": "[parameters('location')]",
100 "[variables('vnetAddressPrefix')]"
105 "name": "[variables('subnetName')]",
107 "addressPrefix": "[variables('subnetPrefix')]"
114 "type": "Microsoft.Network/networkInterfaces",
115 "apiVersion": "2020-06-01",
116 "name": "[variables('nicNameNet')]",
117 "location": "[parameters('location')]",
119 "[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
120 "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
121 "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupsName'))]"
124 "ipConfigurations": [
128 "privateIPAllocationMethod": "Dynamic",
130 "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
133 "id": "[variables('subnetRef')]"
138 "networkSecurityGroup": {
139 "id": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('networkSecurityGroupsName'))]"
144 "type": "Microsoft.Compute/virtualMachines",
145 "apiVersion": "2020-06-01",
146 "name": "[variables('nicName')]",
147 "location": "[parameters('location')]",
149 "[resourceId('Microsoft.Storage/storageAccounts/', variables('nicNameStr'))]",
150 "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicNameNet'))]"
154 "vmSize": "Standard_B1ls"
157 "computerName": "[variables('nicName')]",
158 "adminUsername": "userland",
159 "linuxConfiguration": {
160 "disablePasswordAuthentication": true,
164 "path": "/home/userland/.ssh/authorized_keys",
165 "keyData": "--YOUR SSH KEY--"
173 "publisher": "debian",
174 "offer": "debian-11",
179 "createOption": "FromImage"
183 "networkInterfaces": [
185 "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicNameNet'))]",
187 "deleteOption": "Delete"
192 "diagnosticsProfile": {
195 "storageUri": "[reference(variables('nicNameStr'),'2015-06-15').primaryEndpoints['blob']]"
200 "type": "systemAssigned"
208 Replace REGION=... with your sorted available regions list
209 NOTE: You will have to change `index.js:const clients` to the number of regions you have
211 ID=$(az ts show --name --MY TEMPLATE NAME-- --resource-group --MY RESOURCE GROUP-- --version "--MY VERSION--" --query "id")
212 REGION="eastus eastus2 westus2 westus3"
213 for i in $REGION; do az deployment group create --resource-group --MY RESOURCE GROUP-- --template-spec $ID --parameters "{ \"location\": {\"value\": \"$i\"}}" ; done
217 You will need to create a storage account and create a share and copy the ssh-rsa key and username to .
220 echo '#!/bin/bash' > install.sh
221 echo 'echo "username=--STORE ACC NAME--" >> /etc/smb.cred' >> install.sh
222 echo 'echo "password=--STORE SSH-RSA KEY--" >> /etc/smb.cred' >> install.sh
223 curl https://raw.githubusercontent.com/Mr-Bossman/dist-masscan/master/install.sh >> install.sh
224 VMS=$(az vm list -d -g temp --query "[].name" -o tsv)
225 for i in $VMS; do az vm run-command invoke -g temp -n $i --command-id RunShellScript --scripts @install.sh; done
228 ##### To list VMs IPs
230 az vm list -d -g temp --query "[].publicIps" -o tsv