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

Database exports not detected #1759

Closed
arall opened this issue Nov 4, 2022 · 2 comments
Closed

Database exports not detected #1759

arall opened this issue Nov 4, 2022 · 2 comments
Assignees
Labels
needs triage Reproduce it if it's a bug, set a priority.

Comments

@arall
Copy link

arall commented Nov 4, 2022

Subject of the issue

Database exports not detected.

Your environment

  • Version of WPScan: 3.8.22
  • Version of Ruby: 2.6.8p205
  • Operating System (OS): macOS

Steps to reproduce

I've created a test environment with some mocked vulnerabilities to test.
Two database export exists in the website, located in the following paths:

But when I run:

wpscan --url https://wordpress.vulnerable.arall.net --enumerate dbe

It only reports the last one:

[!] https://wordpress.vulnerable.arall.net/backups/wordpress.vulnerable.arall.zip
 | Found By: Direct Access (Aggressive Detection)

Expected behavior

WPScan should report both database exports.

Actual behavior

WPScan only reports one database export.

What have you already tried

I monitor the HTTP calls with a proxy, and both files are reached.

What I think the issue is that WPScan is sending a header with Range: bytes=0-3000, and expect a 200 response.
However, the server is responding with 206 Partial Content.

@erwanlr
Copy link
Member

erwanlr commented Nov 7, 2022

What I think the issue is that WPScan is sending a header with Range: bytes=0-3000, and expect a 200 response.
However, the server is responding with 206 Partial Content.

Yep, it appears to be because of this, thanks for the details!

Reminder for myself for the fix: override the valid_response_codes method to add the 206, then also change the check_full_response: 200 to check_full_response: [200 206] at https://github.com/wpscanteam/wpscan/blob/master/app/finders/db_exports/known_locations.rb#L20

0n1shi added a commit to 0n1shi/wpscan that referenced this issue Jun 18, 2023
@0n1shi 0n1shi mentioned this issue Jun 18, 2023
@alexsanford alexsanford added bug needs triage Reproduce it if it's a bug, set a priority. and removed bug labels Sep 12, 2023
@miguelxpn miguelxpn self-assigned this Sep 14, 2023
@miguelxpn
Copy link
Contributor

Reproduced the issue and verified that the fix works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Reproduce it if it's a bug, set a priority.
Projects
None yet
Development

No branches or pull requests

4 participants