We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30912
    • 463 Posts
    Looking for a bit of help, a couple of sites have been injected with malware with the followig script:

    <script type="text/javascript" src="http://ads. jigsaw3org .us
    /ads.php">


    Ive made it a non url for obvious reasons.

    however were having some trouble finding the source of the injections in our MODx insalls, so although we cannot find the code in the source, as far as we are aware its now clean, but Google says otherwise.

    any ideas?

      • 22840
      • 1,572 Posts
      If your not running the latest version I would recommend upgrading, if you are running the latest version re download it from the modx site and upload all the files to overwrite the ones on the server ( I'm presuming you haven't edited the core code ;o) ) and dont forget to update all your passwords for FTP, manager and database
        • 30912
        • 463 Posts
        Doing that at the minute, ran virus scans and cleaned a few files but still being reported but its not present in any of the code i can see
          • 3749
          • 24,544 Posts
          Be sure to delete all files in the core/cache directory. The bad code may be in a cache file.

          You could also search for that string in PhpMyAdmin through cPanel. That will search the entire database for it.

          You'll also have to look for any extra files in your install in case the miscreant has left a back-door somewhere.
            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
            • 30912
            • 463 Posts
            Thanks Bob, removed and recreated the cache now.

            THe problem is i cannot find how the code is being injected as far as i can tell is its clear, no code in tempaltes, reinstalled all the extras and the like
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Here's one way it could be inserted http://www.technicalinfo.net/papers/SEOCodeInjection.html

              I can't say that I fully understand how this might be a problem with MODx, but I suppose extras like search could open such a hole.
                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
                • 30912
                • 463 Posts
                Thanks for the advice all.