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

axiom-scan ffuf - no such file or directory: #356

Closed Techbrunch closed 3 years ago

Techbrunch commented 3 years ago

I'm running into an error when trying to run ffuf using axiom-scan. For some reasons it looks like the directory is not correctly created on the instance:

axiom-scan test.txt -m ffuf -o test

              _
  ____ __  __(_)___  ____ ___        ______________ _____
 / __ `/ |/_/ / __ \/ __ `__ \______/ ___/ ___/ __ `/ __ \
/ /_/ />  </ / /_/ / / / / / /_____(__  ) /__/ /_/ / / / /
\__,_/_/|_/_/\____/_/ /_/ /_/     /____/\___/\__,_/_/ /_/

                                    @pry0cc

Module: [ ffuf  ] | Input: [ 1 targets ] | Instances: 1 [ noyce01 ]
Command: [ /home/op/go/bin/ffuf -t 150 -w /home/op/lists/seclists/Discovery/Web-Content/big.txt -u '_target_/FUZZ' -of csv -o _output_/_cleantarget_ -ac ] | Threads: [ 1 ] | Ext: [csv]
Building file structure...[ OK ]
Uploading input files...
[15:40:15] [THREAD] [/Users/xxx/.axiom/interact/axiom-scp /Users/xxx/.axiom/tmp/ffuf+1623073214/input/noyce01 noyce01:/home/op/scan/ffuf+1623073214/input --cache -F=/Users/xxx/.axiom/tmp/ffuf+1623073214/sshconfig >/dev/null 2>&1; touch /Users/xxx/.axiom/tmp/ffuf+1623073214/logs/noyce01] Added to Queue
[*] ENABLING ONESHOT MODE! STARTING 1 TOTAL THREADS. Using 1 threads per instance with 1 instances...
[15:40:19] [THREAD] [ssh -F /Users/xxx/.axiom/tmp/ffuf+1623073214/sshconfig -o StrictHostKeyChecking=no noyce01 'cd /home/op/scan/ffuf+1623073214; interlace --silent -threads 1 -tL input -cL command -o output' >> /Users/xxx/.axiom/tmp/ffuf+1623073214/logs/noyce01 2>&1] Added to Queue
zsh:cd:1: no such file or directory: /home/op/scan/ffuf+1623073214
usage: interlace [-h] [-t TARGET | -tL FILE] [-e EXCLUSIONS | -eL FILE]
                 [-threads THREADS] [-timeout TIMEOUT] [-pL FILE]
                 (-c COMMAND | -cL FILE) [-o OUTPUT] [-p PORT] [--proto PROTO]
                 [-rp REALPORT] [-random RANDOM] [--no-cidr] [--no-color]
                 [--no-bar] [--repeat REPEAT] [-v | --silent]
interlace: error: The path input does not exist!
[15:40:20] [THREAD] [axiom-scp noyce01:/home/op/scan/ffuf+1623073214/output/* /Users/xxx/.axiom/tmp/ffuf+1623073214/output/ --cache -F=/Users/xxx/.axiom/tmp/ffuf+1623073214/sshconfig >/dev/null 2>&1] Added to Queue
Mode set to CSV, merging...
Module [ ffuf  ] | Time: [ 00h:00m:08s ] | Input: [ 1 targets ]
Output saved to 'test'! Local logs saved to '/Users/xxx/.axiom/logs/ffuf+1623073214'! Remote logs saved to '/home/op/scan/ffuf+1623073214'!

It looks like this command is not ran: https://github.com/pry0cc/axiom/blob/569985e790f1cebd93221eafc44d383396955adb/interact/axiom-scan#L559

Techbrunch commented 3 years ago

I found the issue, I was using an older version of Interlace that did not support the --no-bar flag. Updating Interlace fixed the issue.

I would be nice to add a --debug mode to make this can of issue easier to debug.

Techbrunch commented 2 years ago

Looks like I ran into the same issue and I ended up creating a new issue in the Interlace repo this time: https://github.com/codingo/Interlace/issues/160

0xtavian commented 2 years ago

@Techbrunch keep in mind you will also get this error when there is no more free space left on the instance.

Techbrunch commented 2 years ago

Good to know, here this was clearly not the case, for some reasons interlace was not in my path. (and by here I mean today which was another problem than the original issue but since I ended up here anyway I linked my two issues for future me).

0xtavian commented 2 years ago

@Techbrunch also make sure you are on the latest version and there are no git conflicts. cd $HOME/.axiom && git status, make sure to fix any errors then run axiom-update. Aside from this, I believe there is a bug in MacOS where interlace isn’t added to path.