pry0cc / axiom

The dynamic infrastructure framework for everybody! Distribute the workload of many different scanning tools with ease, including nmap, ffuf, masscan, nuclei, meg and many more!
MIT License
4k stars 622 forks source link

can't run axiom-exec id after fresh install #659

Closed Nishantbhagat57 closed 1 year ago

Nishantbhagat57 commented 1 year ago

azureuser@linuxbbp:~$ axiom-exec id Traceback (most recent call last): File "/usr/bin/interlace", line 33, in sys.exit(load_entry_point('Interlace==1.9.7', 'console_scripts', 'interlace')()) File "/usr/bin/interlace", line 22, in importlib_load_entry_point for entry_point in distribution(dist_name).entry_points File "/usr/lib/python3.8/importlib/metadata.py", line 503, in distribution return Distribution.from_name(distribution_name) File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name raise PackageNotFoundError(name) importlib.metadata.PackageNotFoundError: Interlace cat: /home/azureuser/.axiom/tmp/exec/axiom-exec+1672775376/hosts_preflight: No such file or directory cp: cannot stat '/home/azureuser/.axiom/tmp/exec/axiom-exec+1672775376/hosts_preflight': No such file or directory Traceback (most recent call last): File "/usr/bin/interlace", line 33, in sys.exit(load_entry_point('Interlace==1.9.7', 'console_scripts', 'interlace')()) File "/usr/bin/interlace", line 22, in importlib_load_entry_point for entry_point in distribution(dist_name).entry_points File "/usr/lib/python3.8/importlib/metadata.py", line 503, in distribution return Distribution.from_name(distribution_name) File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name raise PackageNotFoundError(name) importlib.metadata.PackageNotFoundError: Interlace tail: cannot open '/home/azureuser/.axiom/tmp/exec/axiom-exec+1672775376/logs/*' for reading: No such file or directory tail: no files remaining Traceback (most recent call last): File "/usr/bin/interlace", line 33, in sys.exit(load_entry_point('Interlace==1.9.7', 'console_scripts', 'interlace')()) File "/usr/bin/interlace", line 22, in importlib_load_entry_point for entry_point in distribution(dist_name).entry_points File "/usr/lib/python3.8/importlib/metadata.py", line 503, in distribution return Distribution.from_name(distribution_name) File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name raise PackageNotFoundError(name) importlib.metadata.PackageNotFoundError: Interlace Traceback (most recent call last): File "/usr/bin/interlace", line 33, in sys.exit(load_entry_point('Interlace==1.9.7', 'console_scripts', 'interlace')()) File "/usr/bin/interlace", line 22, in importlib_load_entry_point for entry_point in distribution(dist_name).entry_points File "/usr/lib/python3.8/importlib/metadata.py", line 503, in distribution return Distribution.from_name(distribution_name) File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name raise PackageNotFoundError(name) importlib.metadata.PackageNotFoundError: Interlace

Screenshot 2023-01-04 012244

pdelteil commented 1 year ago

Hello,

This happens with you don't have any instance in ~/.axiom/selected.conf

Make sure your created instance is on the file. If not just run axiom-select --auto.

I think this condition should be handled with an error/warning. What do you think @0xtavian?

0xtavian commented 1 year ago

@pdelteil yea i agree we should add a check for number of instances selected. Not sure if this is issue is related but it very well could be. IIRC the instance should automatically be selected after running axiom-init/axiom-fleet but I’ll double check that as well.

Also @Nishantbhagat57 I’m not sure how you got Azure to work. Last I checked I couldn’t get it working after updates to the azcli IIRC. Hopefully it works for you.

Nishantbhagat57 commented 1 year ago

axiom-select --auto

azureuser@linuxbbp:~$ axiom-select --auto Selected: [ moser18 pasa15 ] azureuser@linuxbbp:~$ axiom-exec whoami Traceback (most recent call last): File "/usr/bin/interlace", line 33, in sys.exit(load_entry_point('Interlace==1.9.7', 'console_scripts', 'interlace')()) File "/usr/bin/interlace", line 22, in importlib_load_entry_point for entry_point in distribution(dist_name).entry_points File "/usr/lib/python3.8/importlib/metadata.py", line 503, in distribution return Distribution.from_name(distribution_name) File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name raise PackageNotFoundError(name) importlib.metadata.PackageNotFoundError: Interlace cat: /home/azureuser/.axiom/tmp/exec/axiom-exec+1672835095/hosts_preflight: No such file or directory cp: cannot stat '/home/azureuser/.axiom/tmp/exec/axiom-exec+1672835095/hosts_preflight': No such file or directory Traceback (most recent call last): File "/usr/bin/interlace", line 33, in sys.exit(load_entry_point('Interlace==1.9.7', 'console_scripts', 'interlace')()) File "/usr/bin/interlace", line 22, in importlib_load_entry_point for entry_point in distribution(dist_name).entry_points File "/usr/lib/python3.8/importlib/metadata.py", line 503, in distribution return Distribution.from_name(distribution_name) File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name raise PackageNotFoundError(name) importlib.metadata.PackageNotFoundError: Interlace tail: cannot open '/home/azureuser/.axiom/tmp/exec/axiom-exec+1672835095/logs/*' for reading: No such file or directory tail: no files remaining Traceback (most recent call last): File "/usr/bin/interlace", line 33, in Traceback (most recent call last): File "/usr/bin/interlace", line 33, in sys.exit(load_entry_point('Interlace==1.9.7', 'console_scripts', 'interlace')()) File "/usr/bin/interlace", line 22, in importlib_load_entry_point for entry_point in distribution(dist_name).entry_points sys.exit(load_entry_point('Interlace==1.9.7', 'console_scripts', 'interlace')()) File "/usr/lib/python3.8/importlib/metadata.py", line 503, in distribution File "/usr/bin/interlace", line 22, in importlib_load_entry_point for entry_point in distribution(dist_name).entry_points File "/usr/lib/python3.8/importlib/metadata.py", line 503, in distribution return Distribution.from_name(distribution_name) File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name raise PackageNotFoundError(name) return Distribution.from_name(distribution_name) importlib.metadata.PackageNotFoundError: Interlace File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name raise PackageNotFoundError(name) importlib.metadata.PackageNotFoundError: Interlace azureuser@linuxbbp:~$

Screenshot 2023-01-04 175607

Nishantbhagat57 commented 1 year ago

First I created an Ubuntu VM in Azure and in the VM using firefox I logged into Azure Portal.

Then used these steps from the Installation Manual:

Clone the axiom repository git clone https://github.com/pry0cc/axiom ~/.axiom/

Run configure script $HOME/.axiom/interact/axiom-configure

Then it gives a link that I need to open in my browser...I copied in same firefox I am logged in with my azure acc. Sometimes it give error but after 2 3 tries it works. Then there was some Azure Key Vault error where I need to give device login code. But after 2 3 tries it got resolved. And finally axiom can access my Azure account. But now it's this error :|

0xtavian commented 1 year ago

@Nishantbhagat57 can you run axiom-exec whoami —debug, remove any sensitive info and upload to pastebin and share the link? Please and thank you.

pdelteil commented 1 year ago

I guess there's a problem with Interlace?

What is your output if you run pip show interlace ?

Nishantbhagat57 commented 1 year ago

I guess there's a problem with Interlace?

What is your output if you run pip show interlace ?

So it was interlace problem

Interlace was not installed. This is how I solved the problem:

  1. git clone https://github.com/codingo/Interlace.git
  2. cd Interlace
  3. pip3 install -r requirements.txt
  4. sudo su
  5. cp -r /usr/lib/python3.8/site-packages/* /usr/local/lib/python3.8/dist-packages/
  6. Interlace is installed. Now I can use interlace -h to check the installation.

axiom-exec id is working now:

Screenshot 2023-01-05 164529

0xtavian commented 1 year ago

Glad you got it working. I’m not sure how interlace didn’t get installed. It gets installed via axiom-configure btw. Going to close this issue. But feel free to comment if you have more issues.