We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29774
    • 386 Posts
    @DNA

    it is ’fixed’. The problem was with a php file that was left within the Reflect directory *for reference only*. You can delete it or you can rename the extension to .txt.
    I got the security alert the day the problem was discovered, and fixed all my sites within about 5 minutes. I fail to see what else the modx devs could do.
      Snippets: GoogleMap | FileDetails | Related Plugin: SSL
      • 37550 ☆ A M B ☆
      • 711 Posts
      It may be worth while checking your other folders, because if your site has been hacked via reflect most likely the hackers would have uploaded other scripts as backdoors.

      For example a customer at another ISP has backdoor files in /assets/images & /assets/media

      Aaron
        http://www.onesmarthost.co.uk
        UK MODX Hosting with love.
        • 23072
        • 150 Posts
        It doesn’t look like any of mine were adversely affected, but two did have an error_log file in the reflex folder pertaining to that particular file that seemed to contain records indicating someone was trying to access that file in an odd way.

        The weird thing is, out of the 10 or so sites I have using MODx, the only two that had the error logs are the only two I’ve ever mentioned on these forums.

        Could just be a coincidence, but it would be easier for the attacker to gather URL’s off the MODx site itself than randomly striking all the sites on the internet one by one - far more efficient with the search narrowed down a bit. Not a lot can be done about that side of things anyway.
          Notanotherdotcom Ltd

          Web | Print | Marketing
          • 33372
          • 1,611 Posts
          Quote from: Pete at Dec 08, 2008, 12:40 PM

          Could just be a coincidence, but it would be easier for the attacker to gather URL’s off the MODx site itself than randomly striking all the sites on the internet one by one - far more efficient with the search narrowed down a bit. Not a lot can be done about that side of things anyway.
          I never put links to sites that I’ve done on any public forum for exactly this reason. I also never add a MODxCMS link to my sites for fear that a bot might scan those and hit my sites if there’s ever a zero-day attack of some sort. I also can’t wait for MODx Revolution when hopefully we’ll be able to rename the manager folder to anything that we want.
            "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
            • 7231
            • 4,205 Posts
            I don’t have any sites linked in the forums and my server logs are jammed full of these attempts. According to my mod_security logs there is a modx sniffing bot that is looking for the reflect snippet.

            I do think that the Reflect issue may need more prominent warning, the current warning is hidden in the forum and may not be so obvious for non-tech users (as well as non english speaking). I have actually received phone calls from frantic local users asking for help because their site was hacked (people who I do not know but they know me from the forum). In one case it was a church site that had been phished into a porn site. As more fall victim to this hack a wave of negative publicity about security concerns is bound to follow.
              [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]
              • 25663 MODX Staff
              • 12,272 Posts
              The current Reflect issue is noted in the Security thread as the top item (also going out via RSS and email feeds as encouraged before you ever download MODx). If users choose to ignore the security topic ... what can we do?
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 16183
                • 1,390 Posts
                Quote from: rthrash at Dec 09, 2008, 05:26 AM

                The current Reflect issue is noted in the Security thread as the top item (also going out via RSS and email feeds as encouraged before you ever download MODx). If users choose to ignore the security topic ... what can we do?

                A humble suggestion: I agree with Shane. is not a good idea to also post the message and link to the security issue concerning reflect on http://modxcms.com/ ? That’s the landing page when people visit the site and I suppose the security issue should be there prominently featured to further show how serious modx is about security issues.

                just my 2 cents..

                cheers/k

                ps: Hopefully important announcements, etc will in future also be posted on the new modx marketing site too?

                  • 33372
                  • 1,611 Posts
                  Quote from: rthrash at Dec 09, 2008, 05:26 AM

                  The current Reflect issue is noted in the Security thread as the top item (also going out via RSS and email feeds as encouraged before you ever download MODx). If users choose to ignore the security topic ... what can we do?
                  Not to mention that every time these folks log into the MODx Manager they’ve been ignoring a warning that they’ve left register_globals set to ON...
                    "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
                    • 27708 MODX Staff
                    • 2,502 Posts
                    The MODx team takes security very seriously. When a breach or vulnerability occur they react quickly and post a response in a few hours. Maybe we need to make some security announcements more visible. New versions of modx have security announcments load in the manager when installed.

                    The day the vulnerability was found and the solution the download on the modx site was patched and replaced.

                    Certainly the file should have been renamed or refactored so that it the vulnerability didn’t exist but it was poor security on the part of hosts that provided access.

                    This is akin to leaving your safe open at home and you or your landlord left all the doors to your apartment unlocked. Leaving the safe open was not a good idea but the burglers didn’t break in they walked in. $register_globals off is doors open for hackers and crackers.

                    I feel for your loss of work and loss time and frustration I’ve had scripts I’ve written get used for email etc. It sucks.

                    We will do whatever it takes to help users get the security information they need when they need it. Let us know how you’d like to get alerts so you’ll read em.

                    Cheers,

                    Jay
                      Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
                      • 17284
                      • 54 Posts
                      The solution to this type of problem is to not depend on end user server configurations for your security, but to get rid of junk like this:

                      require((substr($config, 0, 5) != "@FILE") ? $reflect_base."configs/$config.config.php" : $modx->config['base_path'].trim(substr($config, 5)));

                      which is unreadable, and hides from easy code scans the fact you are allowing, with NO tests, a possible file import execution.

                      There’s two problems with this code: first, you’re putting on one line what should be broken up into separate statements, and second, you’re not testing for the file’s existence, or for efforts to inject a url into this, and were assuming that a standalone file in your release wouldn’t be accessed by someone.

                      Avoid at all costs the bad habit of putting too much in one statement, construct the path, test the path, then once the path is tested, you can then, and only then, include it.

                      /*
                      Test the input data any time you're going to allow this type of get query set
                      path data. Do not blame end users for failing to do this properly.
                      */
                      $tests = array( 'http', 'ftp', '://', '.php', '.inc', '.html', '.htm', '.pl', '.hta', '../', './', '%c0%af', '%255c', '..' );
                      // then strip out any possible url / external file data, adjust above list to suite your taste and needs
                      $reflect_base = str_replace( $tests, '', $reflect_base );
                      
                      // then construct the full path, if it exists on server, fine, if not, die
                      $path = ( substr($config, 0, 5) != "@FILE") ? $reflect_base . "configs/$config.config.php" : $modx->config['base_path'] . trim( substr($config, 5) );
                      
                      // then check all possible hacks
                      if ( !file_exists( $path ) || !$modx->config['base_path'] || !$config )
                      {
                      	die ( 'The file does not appear to exist. Better luck next time. Have a nice day.' );
                      }
                      else
                      {
                      	require( $path );
                      }


                      Please don’t blame the user’s server configurations on your failing to test this properly in the first place. That’s not how you get a solid, secure system, lock it down so you aren’t depending on the end user’s configurations to have secure code.

                      Generally I like how you all do this cms, I like the programming APIs, but this response was in my opinion not how you get secure code, get a fix out for what you control first, make sure you aren’t using methods that can lead to repeats of this type of error, then let the end users worry about their server settings, but that should have nothing to do with the inherent security of the code you’re releasing.