Site hacked ?

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Site hacked ?

Post by calguy1000 »

One hour ago I've juste delated every thing on my server to put a new single index.html with a maintening message. Guess what ? some minutes ago it was infected also. Isn't that the proof that the problem comes from my hosting platform ? or could it be some hidden files or whatever (I have very poor knowledge about hosting) ?
This is not proof that the problem comes from the hosting platform... it is however proof that the problem does not come from CMSMS. It could still be a compromised ftp password.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Marre
New Member
New Member
Posts: 6
Joined: Mon Feb 20, 2012 2:47 pm

Re: Site hacked ?

Post by Marre »

Yes, I had the same thought after my writting ;) I've asked them to have a look and give me a new FTP password. Hope it will fix my problem but I'd like also to understand what happend exactly to prevent, if possible, in the futur.
mcDavid
Power Poster
Power Poster
Posts: 377
Joined: Tue Mar 31, 2009 8:45 pm
Location: Delft, Netherlands

Re: Site hacked ?

Post by mcDavid »

Neow wrote:My websites were also hacked again and again. Same files : index.php and index, footer and home in the admin folder. It seems that changing ftp password resolved the problem... for now.
You should also run virus scanners on ALL computers accessing your FTP folders, or it'll be back sooner or later.

These "hacks" are 99% of the time just keyloggers that record the passwords people use in their FTP-client.
Neow
Forum Members
Forum Members
Posts: 33
Joined: Wed Nov 19, 2008 1:39 pm

Re: Site hacked ?

Post by Neow »

Another question : one the infected website has now another problem. I replaced infected files by originals one, and now the site doesn't load when accessing by Firefox or Internet Explorer, but works on Chrome. I tried to reupload many files, clear cache, etc. but nothing works. Any idea ?
I use the same process on the other sites and they have no problem...

The site is : http://www.ce-clemessy-strasbourg.com/
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1967
Joined: Mon Jan 29, 2007 4:47 pm

Re: Site hacked ?

Post by Jo Morg »

It also opens fine with Opera. It seems that a script is taking too long to execute. Can't pinpoint which or why. But try to look into server logs for errors. That may very well give you a clue.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Neow
Forum Members
Forum Members
Posts: 33
Joined: Wed Nov 19, 2008 1:39 pm

Re: Site hacked ?

Post by Neow »

It seems my problem comes from the root index.php file.
And after many tries with die() instruction, the problem seems to be here :

Code: Select all

		if( isset($config['process_whole_template']) && $config['process_whole_template'] === false )
		  {
			
		    $top  = $smarty->fetch('tpl_top:'.$contentobj->TemplateId());
		    $body = $smarty->fetch('tpl_body:'.$contentobj->TemplateId());
		    $head = $smarty->fetch('tpl_head:'.$contentobj->TemplateId());
		    $html = $top.$head.$body;

		  }
Somebody knows something about a problem with this code ?
User avatar
M@rtijn
Power Poster
Power Poster
Posts: 706
Joined: Sat Nov 14, 2009 4:54 pm
Location: the Netherlands

Re: Site hacked ?

Post by M@rtijn »

As long as 'they' can access FTP, and they can cause they know the password, they will.

Change ftp password, check pc for viruses (keyloggers!), revert to last safe backup and live happily
Make your community a better place!
Marre
New Member
New Member
Posts: 6
Joined: Mon Feb 20, 2012 2:47 pm

Re: Site hacked ?

Post by Marre »

Some news. I've received a new FTP password and my hosting support said they've found suspicius FTP login in the server's logs.

Everything seems OK now, hope it will be fine in the futur. Thank you all for your help and advices.
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Site hacked ?

Post by Wishbone »

Did they give you any details? I had a site on a host that was continuously being hacked (flat HTML site). They told me the same thing. I changed the FTP password from a clean computer (no virus/spyware), never used it, and it was still getting hacked. The hosting company was being hacked, and they didn't want to admit it. Changed hosting company, and the issue went away.
Marre
New Member
New Member
Posts: 6
Joined: Mon Feb 20, 2012 2:47 pm

Re: Site hacked ?

Post by Marre »

Well no, they didn't give me any details except that I have to keep my FTP password secure. What I did.

But, in my case I know that my computer had once a problem. I can't etablish wich one between my website or my computer was first infected as it arrived quite together. It's the very first time in my internet's life I had to face that kind of problem. First I thought my son may have done something wrong on my computer.

Now my computer is clean. I really hope that I was the problem at the begining as I have no opportunity to change the hosting for the contest ;)
sjukke
Forum Members
Forum Members
Posts: 41
Joined: Mon Nov 30, 2009 3:01 pm

Re: Site hacked ?

Post by sjukke »

Some of my sites also got infected. After the last </div> tag it places a javascript. I can't figure out where the code is, I replaced all files with clean CMSMS files and it's not in the template. Can somebody point me in the right direction?
sjukke
Forum Members
Forum Members
Posts: 41
Joined: Mon Nov 30, 2009 3:01 pm

Re: Site hacked ?

Post by sjukke »

I can also not find anything in the database of this code.. I can't figure out where the hell it is, very frustrating. Does someone got an idea where to find the code?
Neow
Forum Members
Forum Members
Posts: 33
Joined: Wed Nov 19, 2008 1:39 pm

Re: Site hacked ?

Post by Neow »

If it is the same problem I got, you will have to replace all index files (in each folder, you have a index file). Try also to search for files that are not from CMSMS ans files that have been modified since you were infected.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Site hacked ?

Post by Dr.CSS »

If you can't find it anywhere else look in the index.php in the [root]...
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Site hacked ?

Post by Wishbone »

If you have any PHP experience, you can do what I've done once before. The site wasn't hacked, but all language file strings were missing in the admin panel, and I had to do some extreme debugging to find the issue.

I start editing index.php and put in debug print statements. As the code descends into subroutines, I find that file and continue on until I find the culprit piece of code that is outputting (or in my case not outputting) the culprit string.

In this case, one PHP command was not acting as expected, and after looking it up I found that it was a PHP4 vs PHP5 issue. The user's host had upgraded her to a newer version of PHP, and her version of CMSMS didn't support it.
Post Reply

Return to “The Lounge”