Wpscan: Cannot scan WordPress running on docker

Created on 23 May 2019  Â·  4Comments  Â·  Source: wpscanteam/wpscan

Cannot scan site running on local docker

I'm running a wp instance on local machine via docker, and I'm connecting to it via http://localhost:8010 port. The WP instance is working fine in the browser.

When I try to scan it using

docker run -it --rm wpscanteam/wpscan --url http://localhost:8010

I'm getting

_______________________________________________________________
        __          _______   _____
        \ \        / /  __ \ / ____|
         \ \  /\  / /| |__) | (___   ___  __ _ _ __ ®
          \ \/  \/ / |  ___/ \___ \ / __|/ _` | '_ \
           \  /\  /  | |     ____) | (__| (_| | | | |
            \/  \/   |_|    |_____/ \___|\__,_|_| |_|

        WordPress Security Scanner by the WPScan Team
                       Version 3.5.3
          Sponsored by Sucuri - https://sucuri.net
      @_WPScan_, @ethicalhack3r, @erwan_lr, @_FireFart_
_______________________________________________________________


Scan Aborted: The url supplied 'http://localhost:8010/' seems to be down (Couldn't connect to server)

When I scan the wp instance running on VVV (with some .test local address) it works fine.

Your environment

  • Version of WPScan: 3.5.3
  • Version of Ruby: Running via docker, so not 100% sure, on my mac I have ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
  • Operating System (OS): MacOS 10.14.5

Steps to reproduce

Set up local wp using docker-compose. Pull the wpscan image using docker. Scan the localhost instance.

Expected behavior

Scan should go through the site and produce result.

Actual behavior

Error is thrown (described above).

What have you already tried

Tell us what you have already tried to do to fix the issue you are having.

Things you have tried (where relevant):

  • Update WPScan to the latest version [ ✅ ]
  • Update Ruby to the latest version [ ]
  • Ensure you can reach the target site using cURL [ ]
  • Proxied WPScan through a HTTP proxy to view the raw traffic [ ]
  • Ensure you are using a supported Operating System (Linux and macOS) [ ✅ ]

Most helpful comment

I would highly recommend you to learn about basic networking especially with VM/Docker stuff as you don't seem to know what you are doing.

Thanks for explanation, but you don't have to be a dick about it 🙄

All 4 comments

You need to provide the LAN URL of the instance running the WordPress, here you are trying to scan the docker containing wpscan.

Can you explain what do you mean by LAN URL of the instance? My docker where wp is located is mapped (nginx) to 8010 port

docker ps --alloutput

fb1bab813cb3        nginx                        "nginx -g 'daemon of…"   2 hours ago         Up 2 hours          0.0.0.0:8010->80/tcp                             wp-docker-nginx
e7f19bbfcc8f        wordpress:5.2.0-php7.2-fpm   "docker-entrypoint.s…"   2 hours ago         Up 2 hours          80/tcp, 9000/tcp                                 wp-docker-app
77a10de96bbe        mysql:5.7                    "docker-entrypoint.s…"   2 hours ago         Up 2 hours          33060/tcp, 0.0.0.0:33066->3306/tcp               wp-docker-db
ec24eed44dce        phpmyadmin/phpmyadmin        "/run.sh supervisord…"   18 hours ago        Up 2 hours          9000/tcp, 0.0.0.0:8181->80/tcp                   wp-docker-phpmyadmin
d41b83215d45        redis                        "docker-entrypoint.s…"   18 hours ago        Up 2 hours          6379/tcp                                         wp-docker-redis

I've tried passing 0.0.0.0:8010 and 127.0.0.1:8010.

So in your case the LAN URL of the instance would be http://<PRIVATE/LAN-IP-ADDRESS-OF-THE-HOST>:8010/, with PRIVATE/LAN-IP-ADDRESS-OF-THE-HOST being the private IP address of your Mac on the network (e.g 192.168.1.23 etc) which you can get via the ifconfig command in a terminal (displayed as inet field and usually on the en0 interface on Mac)

I would highly recommend you to learn about basic networking especially with VM/Docker stuff as you don't seem to know what you are doing.

I would highly recommend you to learn about basic networking especially with VM/Docker stuff as you don't seem to know what you are doing.

Thanks for explanation, but you don't have to be a dick about it 🙄

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cgsmith picture cgsmith  Â·  7Comments

erwanlr picture erwanlr  Â·  6Comments

brammittendorff picture brammittendorff  Â·  8Comments

FireFart picture FireFart  Â·  8Comments

jamezlee picture jamezlee  Â·  11Comments