Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--detection-mode not used when --plugins-detection is not set #1472

Closed
Techbrunch opened this issue Apr 1, 2020 · 7 comments
Closed

--detection-mode not used when --plugins-detection is not set #1472

Techbrunch opened this issue Apr 1, 2020 · 7 comments

Comments

@Techbrunch
Copy link

Subject of the issue

When specifying the --detection-mode, it is not taken into account when doing plugin enumeration.

Your environment

  • Version of WPScan: 3.7.11
  • Version of Ruby: ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin18]

Steps to reproduce

wpscan --url http://10.10.10.88/webservices/wp/ -e vp --api-token xxx -v --detection-mode aggressive

Expected behavior

--plugins-version-detection MODE          Use the supplied mode to check plugins versions instead of the --detection-mode or --plugins-detection modes.
                                          Default: mixed
                                          Available choices: mixed, passive, aggressive
[+] Enumerating Vulnerable Plugins (via Aggressive Methods)
 Checking Known Locations - Time: 00:00:22 <==========================================================================================================================> (2254 / 2254) 100.00% Time: 00:00:22
[+] Checking Plugin Versions (via Passive and Aggressive Methods)

[i] Plugin(s) Identified:

Actual behavior

Output:

[+] Enumerating Vulnerable Plugins (via Passive Methods)

Workaround

wpscan --url http://10.10.10.88/webservices/wp/ -e vp --api-token xxx -v --detection-mode aggressive --plugins-detection aggressive
@erwanlr
Copy link
Member

erwanlr commented Apr 1, 2020

That's the expected behaviour. The --detection-mode is only considered for the --plugins-detection option when the latter option is not set. But, as the --plugins-detection has a default of passive, you have to explicitly set it if you want a mixed or aggressive way.

So wpscan --url http://10.10.10.88/webservices/wp/ -e vp --api-token xxx -v --plugins-detection aggressive

If it's too annoying to change it via the CLI and you always want it aggressive unless overridden via the CLI (I would recommend to set it mixed though, which is passive + aggressive), you can create a ~/.wpscan/scan.yml file with the content below:

cli_options:
  plugins_detection: mixed

Other locations/file extensions are also supported, see https://github.com/wpscanteam/wpscan#load-cli-options-from-files

@erwanlr erwanlr closed this as completed Apr 1, 2020
@Techbrunch
Copy link
Author

@erwanlr Shouldn't the help text be updated then ?

Use the supplied mode to enumerate Plugins, instead of the global (--detection-mode) mode.

@erwanlr
Copy link
Member

erwanlr commented Apr 2, 2020

Which text would you suggest ?

@erwanlr erwanlr reopened this Apr 2, 2020
@Techbrunch
Copy link
Author

Techbrunch commented Apr 2, 2020

I have just reread your comment:

The --detection-mode is only considered for the --plugins-detection option when the latter option is not set.

The problem currently is that --detection-mode is not considered when --plugins-detectionis not set.

@erwanlr
Copy link
Member

erwanlr commented Apr 2, 2020

It is set, by the default value.

--plugins-detection MODE    Use the supplied mode to enumerate Plugins, instead of the global (--detection-mode) mode.
                            *Default: passive*
                            Available choices: mixed, passive, aggressive

@Techbrunch Techbrunch changed the title --detection-mode not used when enumerating plugins --detection-mode not used when enumerating plugins and --plugins-detection is not set Apr 2, 2020
@Techbrunch Techbrunch changed the title --detection-mode not used when enumerating plugins and --plugins-detection is not set --detection-mode not used when --plugins-detection is **not** set Apr 2, 2020
@Techbrunch Techbrunch changed the title --detection-mode not used when --plugins-detection is **not** set --detection-mode not used when --plugins-detection is not set Apr 2, 2020
@Techbrunch
Copy link
Author

Techbrunch commented Apr 2, 2020

Use the supplied mode to enumerate Plugins, instead of the global (--detection-mode) mode.

What does this mean then ?

If that is really the intended behavior (and I don't think it should) the text should read:

Use the supplied mode to enumerate Plugins, instead of the default (passive) mode.

@erwanlr
Copy link
Member

erwanlr commented Apr 2, 2020

This was a leftover from when the option did not have a default.

I've updated the messages and this will land in the next version released.

@erwanlr erwanlr closed this as completed Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants