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

Failing to read CHANGELOG.txt (HTTP 405 - GET vs POST) #21

Closed
0xQwip opened this issue Apr 18, 2018 · 7 comments
Closed

Failing to read CHANGELOG.txt (HTTP 405 - GET vs POST) #21

0xQwip opened this issue Apr 18, 2018 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@0xQwip
Copy link

0xQwip commented Apr 18, 2018

Hi

After the recent update, the script is failing to identify the version of Drupal.

[!] MISSING: https://example.com/CHANGELOG.txt (405)

But when in fact the https://example.com/CHANGELOG.txt file is present and also gives HTTP 200.

@0xQwip 0xQwip closed this as completed Apr 18, 2018
@0xQwip 0xQwip reopened this Apr 18, 2018
@0xQwip
Copy link
Author

0xQwip commented Apr 18, 2018

Closing this issue because before me someone else created an issue for the same bug.

@0xQwip 0xQwip closed this as completed Apr 18, 2018
@0xQwip
Copy link
Author

0xQwip commented Apr 18, 2018

Reopening the issue because the other earlier issue for the same bug is now closed by the user.

@0xQwip 0xQwip reopened this Apr 18, 2018
@g0tmi1k
Copy link
Collaborator

g0tmi1k commented Apr 19, 2018

405 Method Not Allowed

Guessing there is a WAF or some type of protection on the target.

The PoC isn't designed to bypass them out of the box (nor will it ever be). You will need to enum and tweak it to match the environment.
There are places in the script todo so (can't say which as it depends on the target's setup!)

@g0tmi1k g0tmi1k closed this as completed Apr 19, 2018
@0xQwip
Copy link
Author

0xQwip commented Apr 19, 2018

Hi @g0tmi1k

I don't think there is some type of WAF blocking that because I have tried drupalgeddon2.rb on https://[REDACTED].com/ and it failed to to retrieve https://[REDACTED].com/CHANGELOG.txt but then I have tried to retrive the same file with Python Requests and it worked. Below is the output of it:

$ python
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import requests
r = requests.get("https://[REDACTED].com/CHANGELOG.txt")
print r
<Response [200]>
r.text
u'\nDrupal 7.31, 2014-08-06\ [......................................................................................................................

@g0tmi1k
Copy link
Collaborator

g0tmi1k commented Apr 19, 2018

@0xQwip If thats the case, the its def a WAF ;)

The only thing I will say on the matter, pipe the requests though a proxy and see what is different between the two. Because there is one key thing (cough user-agent* cough).

@0xQwip
Copy link
Author

0xQwip commented Apr 19, 2018

@g0tmi1k, 😂 I can confirm it is not a WAF.

I have piped the requests through Burp and the request to https://[REDACTED].com/CHANGELOG.txt and also to ~/core/CHANGELOG.txt ~/includes/bootstrap.inc /core/includes/bootstrap.inc are POST requests (https://imgur.com/rtUgk99) and that is the reason it is failing to retrieve the respective files. When I changed it to GET in Burp it worked fine without changing anything else (not even user-agent 😉 ). (https://imgur.com/vQv8d1Q)

@g0tmi1k
Copy link
Collaborator

g0tmi1k commented Apr 19, 2018

I stand corrected then!
Will fix this :)

@g0tmi1k g0tmi1k self-assigned this Apr 19, 2018
@g0tmi1k g0tmi1k reopened this Apr 19, 2018
@g0tmi1k g0tmi1k added the bug Something isn't working label Apr 19, 2018
@0xQwip 0xQwip closed this as completed Apr 19, 2018
@0xQwip 0xQwip reopened this Apr 19, 2018
Kushagra added a commit to Kushagra/Drupalgeddon2 that referenced this issue Apr 21, 2018
Created a new http_get() function to retrieve `url` successfully.
@0xQwip 0xQwip mentioned this issue Apr 21, 2018
@g0tmi1k g0tmi1k changed the title Failing to read CHANGELOG.txt Failing to read CHANGELOG.txt (HTTP 405 - GET vs POST) Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants