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

Fix HTTP/SMB mixin order to restore SSL option #11330

Merged
merged 1 commit into from
Jan 29, 2019

Conversation

wvu
Copy link
Contributor

@wvu wvu commented Jan 29, 2019

Mixin order matters. Mixins kinda suck (the way we use them).

Registering the SMB server share mixin after HttpClient deregisters the SSL and SSLCert options. They're still settable, but they vanish from the options lists.

  • Diff the normal and advanced options lists before and after this patch
  • Ensure nothing was lost, only gained

Reported by @terrorbyte.

Mixin order matters. Mixins kinda suck.
@jmartin-tech
Copy link
Contributor

jmartin-tech commented Jan 29, 2019

Options diff pre and post patch

$ diff -p 11330_pre.txt 11330_post.txt
*** 11330_pre.txt	2019-01-29 11:34:22.000000000 -0600
--- 11330_post.txt	2019-01-29 11:34:17.000000000 -0600
*************** Module options (exploit/multi/http/strut
*** 10,15 ****
--- 10,16 ----
     SMB_DELAY       10                                        yes       Time that the SMB Server will wait for the payload request
     SRVHOST         0.0.0.0                                   yes       The local host to listen on. This must be an address on the local machine or 0.0.0.0
     SRVPORT         445                                       yes       The local port to listen on.
+    SSL             false                                     no        Negotiate SSL/TLS for outgoing connections
     STRUTS_VERSION  2.x                                       yes       Apache Struts Framework version (Accepted: 1.x, 2.x)
     TARGETURI       /struts2-blank/example/HelloWorld.action  yes       The path to a struts application action
     VHOST                                                     no        HTTP server virtual host
*************** Module options (exploit/windows/http/gen
*** 77,82 ****
--- 78,84 ----
     SMB_DELAY    10                               yes       Time that the SMB Server will wait for the payload request
     SRVHOST      0.0.0.0                          yes       The local host to listen on. This must be an address on the local machine or 0.0.0.0
     SRVPORT      445                              yes       The local port to listen on.
+    SSL          false                            no        Negotiate SSL/TLS for outgoing connections
     TARGETURI    /cgi-bin/function.php?argument=  yes       Path to vulnerable URI (The shared location will be added at the end)
     VHOST                                         no        HTTP server virtual host

@jmartin-tech jmartin-tech merged commit b7bc52d into rapid7:master Jan 29, 2019
@wvu wvu deleted the bug/mixin branch January 29, 2019 17:42
include Msf::Exploit::Remote::SMB::Server::Share
include Msf::Exploit::Remote::HttpClient
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be worth a comment on why this has to come after (even just See #11330) to prevent this from happening in the future

@gdavidson-r7
Copy link
Contributor

Release Notes

This fixes the HTTP/SMB mixin order to restore the SSL option. Previously, registering the SMB server share mixin after HttpClient would deregister the SSL and SSLCert options.

@gdavidson-r7 gdavidson-r7 added the rn-fix release notes fix label Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants