We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10449
    • 956 Posts
    Perhaps we should set up a mailing list notification system instead?

    Thing is... the ppl who are in charge of updating a modx-driven site are often clueless about techy stuff. So... even if they see something in the modx manager, they won’t know what to do exactly.

    The actual developers should be notified via push-method, not just via rss-feed, blog- or website post (pull method).

    Maybe this could be automated right here inside the forum software (SMF): Every forum user automatically receives a notification email by default, and only deactivates it via profile-settings?

    For future installs, maybe one step of the install procedure would be "would you like to be notified via email about important updates and security alerts?" + link to a newsletter signup form... or something like that.
      • 33372
      • 1,611 Posts
      Quote from: smashingred at Dec 10, 2008, 10:00 AM

      I think as far as security update notices they should not be in the main security update feed but as a nag box within the manager interface.
      Definitely a good idea, as you never know when having the ability to display notices to all users directly in the Manager will come in handy.

      How do people feel about doing something a little more drastic when register_globals is left to ON? What if the Manager were actually disabled until this is resolved? It would be easy to code and much more difficult to ignore.

      The only issue that I can see cropping up from this would be complaints from people upgrading who don’t read the instructions and the remote possibility that someone’s host might change their configuration to register_globals=ON and disable a user’s Manager (but in both cases I think the solution is a clear and informative error message with a link to more info).

      An alternative would be hella annoying pop-overs whenever you load a page in the Manager.
        "Things are not what they appear to be; nor are they otherwise." - Buddha

        "Well, gee, Buddha - that wasn't very helpful..." - ZAP

        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
        • 33372
        • 1,611 Posts
        Quote from: ganeshXL at Dec 10, 2008, 10:15 AM

        Perhaps we should set up a mailing list notification system instead?
        Check out the links right above the download packages here:
        http://modxcms.com/downloads.html

        Although I think you have a good idea in terms of adding those to the installer as well.
          "Things are not what they appear to be; nor are they otherwise." - Buddha

          "Well, gee, Buddha - that wasn't very helpful..." - ZAP

          Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
          • 6726
          • 7,075 Posts
          Great discussion, I think we’re moving forward here !

          Just a thought... should we ship the htaccess with

          php_flag register_globals off


          We would comment the code like we do for other specific directives, since it can cause problems with host who don’t support it, but add the extra bit about register globals. I know that not everyone uses clean urls but it just came accross my mind I thought I’d share, since we’re talking about preventing security issues.
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l'outil id
            • 7231
            • 4,205 Posts
            Contrary to popular belief it is not always possible to turn globals off.

            Aside from Netware lots of (bad ?) shared host have register globals on because of too numerous request from clients using bad apps requiring register globals be on rolleyes

            I think that windows servers in general may have an issue with register_globals.

            And why doesn’t that surprise me (sorry, I couldn’t resist tongue) ?

            But you’re right this has to be adressed...

            I would recommend the opposite direction, a second less imposing warning that globals are on (and any other setting that may be a problem like safe-mode) simply to inform the user that globals are on (in 096 I would put a red/green system checklist bellow the ’icons’ in the welcome page). This way if the website admin, who knows nothing about php, sees the unobtrusive but informative notice they will acknowledge that globals are on (since they see the simple warning on a daily basis) and then when a security notice happens they will identify that they are a potential risk. A single more drastic approach will just be disabled when needed and inform the day-to-day user less rather than more.

            It makes sense Shane but I am afraid it’s optimistic that people will take into consideration (remember ?) that they have register globals on... of course the Netware or Windows environment example is not your typical case : those people / companies have to be (or have) server admins. Yes they will take it into account. They know what they do.

            The shared server scenario is a different one though... but as I said earlier no system can be totally foolproof.
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don't know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 33372
              • 1,611 Posts
              Quote from: davidm at Dec 10, 2008, 11:08 AM

              Just a thought... should we ship the htaccess with

              php_flag register_globals off


              We would comment the code like we do for other specific directives, since it can cause problems with host who don’t support it, but add the extra bit about register globals.

              This is what’s shipped in the main MODx .htaccess file now:

              # If your server is not already configured as such, the following directive
              # should be uncommented in order to set PHP's register_globals option to OFF.
              # This closes a major security hole that is abused by most XSS (cross-site
              # scripting) attacks. For more information: http://php.net/register_globals
              #
              # To verify that this option has been set to OFF, open the Manager and choose
              # Reports -> System Info and then click the phpinfo() link. Do a Find on Page
              # for "register_globals". The Local Value should be OFF. If the Master Value
              # is OFF then you do not need this directive here.
              #
              # IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS :
              #
              # Your server does not allow PHP directives to be set via .htaccess. In that
              # case you must make this change in your php.ini file instead. If you are
              # using a commercial web host, contact the administrators for assistance in
              # doing this. Not all servers allow local php.ini files, and they should
              # include all PHP configurations (not just this one), or you will effectively
              # reset everything to PHP defaults. Consult www.php.net for more detailed
              # information about setting PHP directives.
              
              #php_flag register_globals Off


              Because having this directive uncommented by default could completely disable your site (without providing any message explaining what was going on or how to resolve it), I think that leaving it commented out and showing a warning in the Manager is the best course of action.
                "Things are not what they appear to be; nor are they otherwise." - Buddha

                "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                • 6726
                • 7,075 Posts
                :-X

                How did I miss that shocked
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l'outil id
                  • 33372
                  • 1,611 Posts
                  Contrary to popular belief it is not always possible to turn globals off.
                  I’m still not convinced that this is the case. My understanding is that many hosts leave register_globals set to ON in order to support some old and insecure (but nevertheless popular) software, such as osCommerce. But that doesn’t mean that a particular user couldn’t change this setting for their account using their .htaccess or php.ini file, in which case it would show up as OFF in the local column of their phpInfo() report.

                  I also don’t know of any reason why this would be more of an issue with Windows servers, since this setting only affects how variables are processed within PHP scripts, and that’s platform-independent.

                  So far every excuse that I’ve heard from a host for not turning register_globals OFF has turned out to be just that (and it usually comes down to them preferring lack of security to making the effort to communicate the issue to their customers).
                    "Things are not what they appear to be; nor are they otherwise." - Buddha

                    "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                    Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                    • 33372
                    • 1,611 Posts
                    I’m curious if anyone has a theory as to how bots are finding MODx sites to attempt to exploit this vulnerability. I’ve seen hits to this file in my logs on several sites (every one I’ve looked at so far), despite the fact that none of these sites are obviously created in MODx. Do people think that they’re just employing a brute force dragnet, or is there something that would easily identify all MODx sites (e.g., the existence of the Manager login page, although I would think that if you were going to test for that you could just as easily check for the existence of the reflect snippet file)?
                      "Things are not what they appear to be; nor are they otherwise." - Buddha

                      "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                      Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                      • 10449
                      • 956 Posts
                      I think that’s easy. Apart from standard folder- / file-names everyone installs, you could simply check if this string is present in the html source:

                      <script type="text/javascript">var MODX_MEDIA_PATH = "media";</script>

                      Of course, you can remove this, but most ppl leave it in.

                      Sometimes you’ll see some strange search engine setups, i.e. ppl not using stop-words.
                      e.g.
                      http://www.greatrivermedical.org/dgssearch/search.php?q=modx&r=10
                      http://www.greatrivermedical.org/dgssearch/search.php?q=sql&r=10
                      http://www.greatrivermedical.org/dgssearch/search.php?q=mysql_query&r=10

                      or ppl not disabling directory listings: e.g. http://www.greatrivermedical.org/urology/assets/snippets/reflect/