We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36551
    • 416 Posts
    I have a site running Evo 1.0.15. I subscribe to SiteLock to monitor the site for malware. They sent me an alert about a possible SQL Injection.

    (I changed the page names below)

    Using the GET HTTP method, SiteLock found that :
    
    + The following resources may be vulnerable to blind SQL injection :
    
    + The 'username' parameter of the /manager/processors/login.processor.php CGI :
    
    /manager/processors/login.processor.php?password=&rememberme=1&username=
    )+or+(1=1
    
    -------- output --------
    HTTP/1.1 200 OK
    -------- vs --------
    HTTP/1.1 406 Not Acceptable
    ------------------------
    
    + The 'start' parameter of the /page-name.html CGI :
    
    /page-name.html?start=10)+or+(1=1
    
    -------- output --------
    HTTP/1.1 200 OK
    -------- vs --------
    HTTP/1.1 406 Not Acceptable
    ------------------------
    
    Clicking directly on these URLs should exhibit the issue :
    (you will probably need to read the HTML source)


    I'm not sure what to do with this?

    This question has been answered by clareoconsulting. See the first response.

      • 13226
      • 953 Posts
      Best bet - post on github, that way the Evo developer team will see it
        • 36551
        • 416 Posts
        Done.

        Can I assume there's nothing to be done in the mean time?
          • 3749
          • 24,544 Posts
          The message appears to be reporting a vulnerability, not an intrusion.

          Would it make sense to migrate to Revo?
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 36551
            • 416 Posts
            Maybe. I'll have to check with my client.

            Perhaps I'll get a chance to try out GoRevo!
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Such attempts would most likely return a 200 since the request is in fact successful in initiating index.php. The attempt would then be filtered internally with the MODX processing code. The attempt would simply fail. I'm not sure if it would fail silently, returning a white-page or some kind of error, or would simply return a failed login attempt.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
              • discuss.answer
                • 36816
                • 109 Posts
                Quote from: BobRay at Jan 23, 2016, 02:15 PM
                The message appears to be reporting a vulnerability, not an intrusion.
                Quote from: sottwell at Jan 23, 2016, 11:19 PM
                The attempt would then be filtered internally with the MODX processing code. The attempt would simply fail.

                I'm going to agree with Bob & Susan and amplify Susan's answer a bit...

                First off, it's not possible to review the code invoked by the second URL the OP provided, because (as mentioned in the original post), the URL was changed before posting. The first URL and parameter the scanner reported, however, can be checked.

                In the case of the first (login.processor.php), Susan is completely correct that MODX Evo "filters / escapes / sanitizes" the username parameter before it's used anywhere in the code, to avoid SQL injection. Here's the line that does that: https://github.com/modxcms/evolution/blob/v1.0.15/manager/processors/login.processor.php#L58 in the PHP referenced by the scanner.

                The HTTP 406 response the scanner expects for this test attack, in my observation, comes when a web server module such as mod_security is installed. The module would look for SQL injection (and other) attack patterns in each request before passing the request on to the underlying application code (MODX, in this case), and if it finds one, return the 406 "unacceptable" return without ever touching the application being tested. If such a module isn't installed on the OP's server, then the MODX code would get the request, but filter the parameter - silently, as Susan said.

                That's not to say that the application itself couldn't / shouldn't return a 406 on its own, but in at least the case of the first thing the scanner found, MODX is following one of the practices to avoid SQL injection. I suspect that there's not a real SQL injection risk there.