Closed feint9 closed 3 years ago
@feint9 if you have any more details or insight as to why this might be happening lmk. I am also getting azure errors but not quite those. but they are still preventing me from accessing instances. Is there anything unusual about your set up? Can you paste full terminal output logs? thanks for bringing this to our attention
@feint9, I did some debugging on this last week. I had to make several changes to the azure-functions.sh file. I'll do a pull request later today and get those changes up there.
There is one caveat that I have not figured out how to work around... When you do axiom-fleet in Azure, there will be a Virtual Network created in the name of the first VM instance. It can not be deleted until no other other fleet instances are using it. That's the only artifact I have left over though.
Will get the changes/fixes submitted today.
that would be very much appreciated, thank you! @itsgudenuf
0xtavian a fresh run of axiom... Kali full updated...
┌──(root💀zzz)-[~] └─# bash <(curl -s https://raw.githubusercontent.com/pry0cc/axiom/master/interact/axiom-configure) 20:00:05 19.04.21
▄▄▄ ▒██ ██▒ ██▓ ▒█████ ███▄ ▄███▓ ▒████▄ ▒▒ █ █ ▒░▓██▒▒██▒ ██▒▓██▒▀█▀ ██▒ ▒██ ▀█▄ ░░ █ ░▒██▒▒██░ ██▒▓██ ▓██░ ░██▄▄▄▄██ ░ █ █ ▒ ░██░▒██ ██░▒██ ▒██ ▓█ ▓██▒▒██▒ ▒██▒░██░░ ████▓▒░▒██▒ ░██▒ ▒▒ ▓▒█░▒▒ ░ ░▓ ░░▓ ░ ▒░▒░▒░ ░ ▒░ ░ ░ ▒ ▒▒ ░░░ ░▒ ░ ▒ ░ ░ ▒ ▒░ ░ ░ ░ ░ ▒ ░ ░ ▒ ░░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
The Dynamic Infrastructure Framework - @pry0cc
Sponsored by SecurityTrails Sign up during bug bounty hunter month now!: https://securitytrails.com/bug-bounty-hunters-toolkit?referral_code=axiom
Hello! Welcome to Axiom configuration :) Press enter to install dependencies and begin installation!
INSTALLING AXIOM...
Installing deps! Please wait :)
Installing other repo deps...
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 https://download.sublimetext.com apt/stable/ InRelease
Get:2 http://kali.download/kali kali-rolling InRelease [30.5 kB]
Get:4 http://kali.download/kali kali-rolling/main amd64 Packages [17.7 MB]
Get:5 http://kali.download/kali kali-rolling/main amd64 Contents (deb) [39.7 MB]
Get:6 http://kali.download/kali kali-rolling/non-free amd64 Packages [199 kB]
Fetched 57.7 MB in 6s (9,210 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
bc is already the newest version (1.07.1-2+b2).
curl is already the newest version (7.74.0-1.2).
fzf is already the newest version (0.24.3-1+b3).
git is already the newest version (1:2.30.2-1).
net-tools is already the newest version (1.60+git20181103.0eebece-1).
python3-pip is already the newest version (20.3.4-1).
rsync is already the newest version (3.2.3-4).
ruby is already the newest version (1:2.7+2).
unzip is already the newest version (6.0-26).
uuid-runtime is already the newest version (2.36.1-7).
xsltproc is already the newest version (1.1.34-4).
0 upgraded, 0 newly installed, 0 to remove and 20 not upgraded.
Installing jq...
--2021-04-19 20:00:34-- https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-releases.githubusercontent.com/5101141/6387d980-de1f-11e8-8d3e-4455415aa408?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210419%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210419T185619Z&X-Amz-Expires=300&X-Amz-Signature=c3ad940f7e724ced01dee3d6945f127a41103f532e78a178254658f98244c78c&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=5101141&response-content-disposition=attachment%3B%20filename%3Djq-linux64&response-content-type=application%2Foctet-stream [following]
--2021-04-19 20:00:34-- https://github-releases.githubusercontent.com/5101141/6387d980-de1f-11e8-8d3e-4455415aa408?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210419%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210419T185619Z&X-Amz-Expires=300&X-Amz-Signature=c3ad940f7e724ced01dee3d6945f127a41103f532e78a178254658f98244c78c&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=5101141&response-content-disposition=attachment%3B%20filename%3Djq-linux64&response-content-type=application%2Foctet-stream
Resolving github-releases.githubusercontent.com (github-releases.githubusercontent.com)... 185.199.110.154, 185.199.111.154, 185.199.109.154, ...
Connecting to github-releases.githubusercontent.com (github-releases.githubusercontent.com)|185.199.110.154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3953824 (3.8M) [application/octet-stream]
Saving to: ‘/usr/bin/jq’
/usr/bin/jq 100%[==================================================================================================================>] 3.77M 22.3MB/s in 0.2s
2021-04-19 20:00:34 (22.3 MB/s) - ‘/usr/bin/jq’ saved [3953824/3953824]
Installing packer... --2021-04-19 20:00:34-- https://releases.hashicorp.com/packer/1.5.6/packer_1.5.6_linux_amd64.zip Resolving releases.hashicorp.com (releases.hashicorp.com)... 151.101.129.183, 151.101.193.183, 151.101.1.183, ... Connecting to releases.hashicorp.com (releases.hashicorp.com)|151.101.129.183|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 27591680 (26M) [application/zip] Saving to: ‘/tmp/packer.zip’
/tmp/packer.zip 100%[==================================================================================================================>] 26.31M 58.0MB/s in 0.5s
2021-04-19 20:00:35 (58.0 MB/s) - ‘/tmp/packer.zip’ saved [27591680/27591680]
Archive: packer.zip
inflating: packer
Installing Interlace...
fatal: destination path '/tmp/interlace' already exists and is not an empty directory.
running install
running bdist_egg
running egg_info
writing Interlace.egg-info/PKG-INFO
writing dependency_links to Interlace.egg-info/dependency_links.txt
writing entry points to Interlace.egg-info/entry_points.txt
writing requirements to Interlace.egg-info/requires.txt
writing top-level names to Interlace.egg-info/top_level.txt
reading manifest file 'Interlace.egg-info/SOURCES.txt'
writing manifest file 'Interlace.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/Interlace
copying build/lib/Interlace/interlace.py -> build/bdist.linux-x86_64/egg/Interlace
copying build/lib/Interlace/init.py -> build/bdist.linux-x86_64/egg/Interlace
creating build/bdist.linux-x86_64/egg/Interlace/lib
creating build/bdist.linux-x86_64/egg/Interlace/lib/core
copying build/lib/Interlace/lib/core/input.py -> build/bdist.linux-x86_64/egg/Interlace/lib/core
copying build/lib/Interlace/lib/core/init.py -> build/bdist.linux-x86_64/egg/Interlace/lib/core
copying build/lib/Interlace/lib/core/version.py -> build/bdist.linux-x86_64/egg/Interlace/lib/core
copying build/lib/Interlace/lib/core/output.py -> build/bdist.linux-x86_64/egg/Interlace/lib/core
copying build/lib/Interlace/lib/init.py -> build/bdist.linux-x86_64/egg/Interlace/lib
copying build/lib/Interlace/lib/threader.py -> build/bdist.linux-x86_64/egg/Interlace/lib
byte-compiling build/bdist.linux-x86_64/egg/Interlace/interlace.py to interlace.cpython-39.pyc
byte-compiling build/bdist.linux-x86_64/egg/Interlace/init.py to init.cpython-39.pyc
byte-compiling build/bdist.linux-x86_64/egg/Interlace/lib/core/input.py to input.cpython-39.pyc
byte-compiling build/bdist.linux-x86_64/egg/Interlace/lib/core/init.py to init.cpython-39.pyc
byte-compiling build/bdist.linux-x86_64/egg/Interlace/lib/core/version.py to version.cpython-39.pyc
byte-compiling build/bdist.linux-x86_64/egg/Interlace/lib/core/output.py to output.cpython-39.pyc
byte-compiling build/bdist.linux-x86_64/egg/Interlace/lib/init.py to init.cpython-39.pyc
byte-compiling build/bdist.linux-x86_64/egg/Interlace/lib/threader.py to threader.cpython-39.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying Interlace.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying Interlace.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying Interlace.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying Interlace.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying Interlace.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying Interlace.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/Interlace-1.9.3-py3.9.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing Interlace-1.9.3-py3.9.egg
Removing /usr/local/lib/python3.9/dist-packages/Interlace-1.9.3-py3.9.egg
Copying Interlace-1.9.3-py3.9.egg to /usr/local/lib/python3.9/dist-packages
Interlace 1.9.3 is already the active version in easy-install.pth
Installing interlace script to /usr/local/bin
Installed /usr/local/lib/python3.9/dist-packages/Interlace-1.9.3-py3.9.egg Processing dependencies for Interlace==1.9.3 Searching for tqdm==4.36.1 Best match: tqdm 4.36.1 Processing tqdm-4.36.1-py3.9.egg tqdm 4.36.1 is already the active version in easy-install.pth Installing tqdm script to /usr/local/bin
Using /usr/local/lib/python3.9/dist-packages/tqdm-4.36.1-py3.9.egg Searching for netaddr==0.7.20 Best match: netaddr 0.7.20 Processing netaddr-0.7.20-py3.9.egg netaddr 0.7.20 is already the active version in easy-install.pth Installing netaddr script to /usr/local/bin
Using /usr/local/lib/python3.9/dist-packages/netaddr-0.7.20-py3.9.egg Searching for colorclass==2.2.0 Best match: colorclass 2.2.0 Processing colorclass-2.2.0-py3.9.egg colorclass 2.2.0 is already the active version in easy-install.pth
Using /usr/local/lib/python3.9/dist-packages/colorclass-2.2.0-py3.9.egg Finished processing dependencies for Interlace==1.9.3 Installing doctl... --2021-04-19 20:00:40-- https://github.com/digitalocean/doctl/releases/download/v1.45.0/doctl-1.45.0-linux-amd64.tar.gz Resolving github.com (github.com)... 140.82.121.4 Connecting to github.com (github.com)|140.82.121.4|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://github-releases.githubusercontent.com/36529854/f18ddf80-a4ee-11ea-99da-cdce998b75ea?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210419%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210419T185625Z&X-Amz-Expires=300&X-Amz-Signature=90b79b81026ecd83df6a527105e983ac9cde131fec7edd7fb8a7491cdecbe166&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=36529854&response-content-disposition=attachment%3B%20filename%3Ddoctl-1.45.0-linux-amd64.tar.gz&response-content-type=application%2Foctet-stream [following] --2021-04-19 20:00:40-- https://github-releases.githubusercontent.com/36529854/f18ddf80-a4ee-11ea-99da-cdce998b75ea?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210419%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210419T185625Z&X-Amz-Expires=300&X-Amz-Signature=90b79b81026ecd83df6a527105e983ac9cde131fec7edd7fb8a7491cdecbe166&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=36529854&response-content-disposition=attachment%3B%20filename%3Ddoctl-1.45.0-linux-amd64.tar.gz&response-content-type=application%2Foctet-stream Resolving github-releases.githubusercontent.com (github-releases.githubusercontent.com)... 185.199.108.154, 185.199.109.154, 185.199.110.154, ... Connecting to github-releases.githubusercontent.com (github-releases.githubusercontent.com)|185.199.108.154|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 12450872 (12M) [application/octet-stream] Saving to: ‘/tmp/doctl.tar.gz’
/tmp/doctl.tar.gz 100%[==================================================================================================================>] 11.87M 32.9MB/s in 0.4s
2021-04-19 20:00:41 (32.9 MB/s) - ‘/tmp/doctl.tar.gz’ saved [12450872/12450872]
doctl Installing ibmcloud cli... Current platform is linux64. Downloading corresponding IBM Cloud CLI... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 111 0 111 0 0 209 0 --:--:-- --:--:-- --:--:-- 209 100 12.8M 100 12.8M 0 0 1787k 0 0:00:07 0:00:07 --:--:-- 2032k Download complete. Executing installer... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 40 100 40 0 0 56 0 --:--:-- --:--:-- --:--:-- 56 Bluemix_CLI/ Bluemix_CLI/bin/ Bluemix_CLI/bin/ibmcloud Bluemix_CLI/bin/ibmcloud.sig Bluemix_CLI/bin/NOTICE Bluemix_CLI/bin/LICENSE Bluemix_CLI/bin/CF_CLI_Notices.txt Bluemix_CLI/bin/CF_CLI_SLC_Notices.txt Bluemix_CLI/autocomplete/ Bluemix_CLI/autocomplete/bash_autocomplete Bluemix_CLI/autocomplete/zsh_autocomplete Bluemix_CLI/install Bluemix_CLI/uninstall Bluemix_CLI/install_bluemix_cli Install complete. Installing gowitness... --2021-04-19 20:00:51-- https://github.com/sensepost/gowitness/releases/download/2.2.0/gowitness-2.2.0-linux-amd64 Resolving github.com (github.com)... 140.82.121.4 Connecting to github.com (github.com)|140.82.121.4|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://github-releases.githubusercontent.com/108967484/15dd1c00-1c47-11eb-852a-48c376905571?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210419%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210419T185636Z&X-Amz-Expires=300&X-Amz-Signature=5d686a0cbc95db23d27f7170056df64ec56b1a5cb7ecf0ce1ee63a96245a18f0&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=108967484&response-content-disposition=attachment%3B%20filename%3Dgowitness-2.2.0-linux-amd64&response-content-type=application%2Foctet-stream [following] --2021-04-19 20:00:51-- https://github-releases.githubusercontent.com/108967484/15dd1c00-1c47-11eb-852a-48c376905571?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210419%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210419T185636Z&X-Amz-Expires=300&X-Amz-Signature=5d686a0cbc95db23d27f7170056df64ec56b1a5cb7ecf0ce1ee63a96245a18f0&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=108967484&response-content-disposition=attachment%3B%20filename%3Dgowitness-2.2.0-linux-amd64&response-content-type=application%2Foctet-stream Resolving github-releases.githubusercontent.com (github-releases.githubusercontent.com)... 185.199.111.154, 185.199.109.154, 185.199.110.154, ... Connecting to github-releases.githubusercontent.com (github-releases.githubusercontent.com)|185.199.111.154|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 16238328 (15M) [application/octet-stream] Saving to: ‘/usr/bin/gowitness’
/usr/bin/gowitness 100%[==================================================================================================================>] 15.49M 24.6MB/s in 0.6s
2021-04-19 20:00:52 (24.6 MB/s) - ‘/usr/bin/gowitness’ saved [16238328/16238328]
Increasing ulimit, a reboot is required to take effect ... Installing axiom scripts... Cloning into '/root/.axiom'... remote: Enumerating objects: 4925, done. remote: Counting objects: 100% (232/232), done. remote: Compressing objects: 100% (157/157), done. remote: Total 4925 (delta 112), reused 151 (delta 75), pack-reused 4693 Receiving objects: 100% (4925/4925), 92.63 MiB | 25.22 MiB/s, done. Resolving deltas: 100% (3146/3146), done. Would you like to generate a custom amass config? y/[n] (default n): Configuring your cloud account... Axiom Account Setup You can use this wizard to add new accounts, once made, use axiom-account to switch between profiles Please enter your provider (linode, gcp, azure, ibm, do):
azure
Please enter your default region: (Default 'eastus', press enter)Selected default option 'eastus' Please enter your default size: (Default 'Standard_B1s)', press enter)
Selected default option 'Standard_B1s' /root/.axiom/interact/account-helpers/azure.sh: line 39: az: command not found /root/.axiom/interact/account-helpers/azure.sh: line 40: az: command not found /root/.axiom/interact/account-helpers/azure.sh: line 42: az: command not found /root/.axiom/interact/account-helpers/azure.sh: line 46: az: command not found Please enter your GPG Recipient Email (for encryption of boxes): (optional, press enter)
Would you like to configure connection to an Axiom Pro Instance? Y/n (Must be deployed.) (optional, default 'n', press enter)
Profile settings below: { "client_id": "", "client_secret": "", "tenant_id": "", "subscription_id": "", "region": "eastus", "resource_group": "axiom", "provider": "azure", "default_size": "Standard_B1s", "appliance_name": "", "appliance_key": "", "appliance_url": "", "email": "", "use_azure_cli_auth": "true" } Press enter if you want to save these to a new profile, type 'r' if you wish to start again.
Please enter your profile name (e.g 'personal', must be all lowercase/no specials)
proftest
Saved profile 'proftest' successfully! ls: cannot access '/root/.axiom/axiom.json': No such file or directory Selecting proftest... rm: cannot remove '/root/.axiom/axiom.json': No such file or directory /root/.axiom/interact/axiom-provider: line 5: /root/.axiom/interact/includes/functions.sh: No such file or directory Setting axiom provider to 'azure' rm: cannot remove '/root/.axiom/interact/includes/functions.sh': No such file or directory Provider set successfully Selected proftest successfully Now your account is setup, we need to run a build A build will take about 25 minutes, spin up a temporary instance, and then snapshot it to use for our future boxes
Starting Build in 5 seconds... Ctrl+C to quit, remember, you can just type axiom-build at any time
You have no authorized keys file at /root/.axiom/configs/authorized_keys Please run 'cat ~/.ssh/id_rsa.pub >> /root/.axiom/configs/authorized_keys' and re-run axiom-build
You may need to generate a fresh SSH keypair...
No SSH public key detected, would you like to generate a fresh pair? y/n n Need to provide SSH public key. Exiting...After adding ssh key
┌──(root💀zzz)-[~] └─# /root/.axiom/interact/axiom-build 20:02:18 19.04.21 Keep this password for your records: JthG8P................ Building image full for provider azure... This can take up to 25 minutes so please be patient! Ocassionally this will fail, we don't know why, but it should auto-restart.
azure-arm: output will be in this color.
==> azure-arm: Running builder ... Build 'azure-arm' errored: error fetching subscriptionID from VM metadata service for Managed Identity authentication: Get "http://169.254.169.254/metadata/instance/compute?api-version=2017-08-01&format=json": dial tcp 169.254.169.254:80: i/o timeout
==> Some builds didn't complete successfully and had errors: --> azure-arm: error fetching subscriptionID from VM metadata service for Managed Identity authentication: Get "http://169.254.169.254/metadata/instance/compute?api-version=2017-08-01&format=json": dial tcp 169.254.169.254:80: i/o timeout
==> Builds finished but no artifacts were created. Your build failed :( Please take a look at the errors! This can happen sometimes, if you have a [404] error while using Linode, this is likely because you need to request support for a larger image size to 18GB! For support, take a screenshot of the last 20 lines and open a issue at https://github.com/pry0cc/axiom/issues Sometimes just running a build again can work, so please try at least once: 'axiom-build', thanks!
@feint9 thanks, i'll try to look into this tomorrow/wednesday. If @itsgudenuf gets the PR request submitted that would be even better :). thanks guys
@feint9 by mistake we dont install az. I need to do that. can you run curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
and try again? You can see from the errors some are about az not being installed
@0xtavian PR has been submitted.
@feint9 once the PR is merged, you should be able to update your axiom and make a successful build.
I will say Digital Ocean and Linode are much better platforms for this in my opinion.
@itsgudenuf awesome job man. Even with these odd errors im still able to provision fleets etc.
I'll see if I can polish up the delete function tomorrow sometime. axiom-backup for azure needs to be written too, hopefully its straightforward https://github.com/pry0cc/axiom/blob/master/interact/axiom-backup.
Going to merge this to master here in a sec. Thanks again!
https://github.com/pry0cc/axiom/pull/301 thanks again @itsgudenuf and @feint9
Hi,
fresh install of axiom from github...
error
└─# /root/.axiom/interact/axiom-build 17:41:30 16.04.21 Keep this password for your records: s1cR93qYWaiwQ......... Building image full for provider azure... This can take up to 25 minutes so please be patient! Ocassionally this will fail, we don't know why, but it should auto-restart.
azure-arm: output will be in this color.
==> azure-arm: Running builder ... Build 'azure-arm' errored: error fetching subscriptionID from VM metadata service for Managed Identity authentication: Get "http://169.254.169.254/metadata/instance/compute?api-version=2017-08-01&format=json": dial tcp 169.254.169.254:80: i/o timeout
==> Some builds didn't complete successfully and had errors: --> azure-arm: error fetching subscriptionID from VM metadata service for Managed Identity authentication: Get "http://169.254.169.254/metadata/instance/compute?api-version=2017-08-01&format=json": dial tcp 169.254.169.254:80: i/o timeout
==> Builds finished but no artifacts were created. Your build failed :( Please take a look at the errors! This can happen sometimes, if you have a [404] error while using Linode, this is likely because you need to request support for a larger image size to 18GB! For support, take a screenshot of the last 20 lines and open a issue at https://github.com/pry0cc/axiom/issues Sometimes just running a build again can work, so please try at least once: 'axiom-build', thanks!