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-proxy doesn’t work out of the box #498

Open niemand-sec opened 2 years ago

niemand-sec commented 2 years ago

Hi there guys, I have been using axiom quite a while and today decided to try axiom-proxy, however, I'm seeing that docker is not installed on the axiom main instance.

Before proceeding and installing it, I wanted to ask you about this to make sure I don't brake anything:

axiom@localhost:~$ axiom-proxy 'fleet' --single
Proxies connected and saved in ./proxychains.conf
Building haproxy configuration...
[sudo] password for axiom:
sudo: docker: command not found
[*] Started SOCKS5 Listener on '0.0.0.0:1337'... CTRL+C TO EXIT...
sudo: docker: command not found

Any particular version that I should stick with:

Command 'docker' not found, but can be installed with:

sudo snap install docker     # version 20.10.8, or
sudo apt  install docker.io  # version 20.10.7-0ubuntu5~20.04.2
0xtavian commented 2 years ago

@niemand-sec This is how I typically install Docker. Best to use the latest version. However, axiom-proxy might need some attention. I plan on re-factoring it and making it a wrapper for PD’s Proxify (Their newest version supports multiple alternating upstream proxies). Might not get to it before the end of the year tho.

curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh && rm get-docker.sh && sudo usermod -aG docker $USER

niemand-sec commented 2 years ago

Thank you so much @0xtavi for the answer and the recommendation to install docker. Now I'm able to successfully deploy the proxy environment, however, I'm getting the following error when trying to connect to the proxy, any ideas?

curl -v -x socks5://127.0.0.1:1337 https://google.com
*   Trying 127.0.0.1:1337...
* TCP_NODELAY set
* SOCKS5 communication to google.com:443
* Unable to receive initial SOCKS5 response.
* Closing connection 0
curl: (7) Unable to receive initial SOCKS5 response.

Output of axiom-proxy:

axiom-proxy 'fleet' --single
Proxies connected and saved in ./proxychains.conf
Building haproxy configuration...
[sudo] password for axiom:
[+] Building 1.2s (7/7) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                        0.3s
 => => transferring dockerfile: 127B                                                                                                                                                        0.1s
 => [internal] load .dockerignore                                                                                                                                                           0.1s
 => => transferring context: 2B                                                                                                                                                             0.0s
 => [internal] load metadata for docker.io/library/haproxy:alpine                                                                                                                           0.6s
 => [internal] load build context                                                                                                                                                           0.0s
 => => transferring context: 308B                                                                                                                                                           0.0s
 => [1/2] FROM docker.io/library/haproxy:alpine@sha256:66f9f9120ff131e1758d805b48ac27251e2085f6884a59720c00245410dcb346                                                                     0.0s
 => CACHED [2/2] COPY --chmod=644 haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg                                                                                                            0.0s
 => exporting to image                                                                                                                                                                      0.0s
 => => exporting layers                                                                                                                                                                     0.0s
 => => writing image sha256:61ab3c755918136fd29a4257fdd0e36e4de4061a697bd2515fa9b7dc7ee81b88                                                                                                0.0s
 => => naming to docker.io/pry0cc/haproxy                                                                                                                                                   0.0s
[*] Started SOCKS5 Listener on '0.0.0.0:1337'... CTRL+C TO EXIT...
[NOTICE]   (1) : New worker (8) forked
[NOTICE]   (1) : Loading success.
0xtavian commented 2 years ago

@niemand-sec

I haven’t tried axiom-proxy in a minute but will try tonight. In the meantime can you try the following and lmk if it works? Please and thank you.

curl -v -x socks5h://127.0.0.1:1337 https://google.com

If that doesn’t work, try:

curl -v —socks5-hostname 127.0.0.1:1337 https://google.com

niemand-sec commented 2 years ago

Thanks again @0xtavi , I tried all the different curl variants as well as other tools, however they all return the same error:

curl: (7) Unable to receive initial SOCKS5 response.