1
stoddard
Help website hacked!!!!!
  • 2005/9/12 0:43

  • stoddard

  • Just popping in

  • Posts: 14

  • Since: 2005/8/23


My site has been hacked and tons of malicious code and trojan downloaders have been aded to each of the pages.
Worse still when I try to go to the admin menu the page is blank.
Every single page has malicious code and downloaders on it.
what can I do?


any help welcomed

here is the sitehttp://www.roughhausen.tinderboxrecords.com

take a look and see but I suggest you have a good antivirus system if you do go to take a look.

I just noticed that the effected pages only show if I am logged in as an admin.
regular users and anonymous users are un-effected.

pages hit :
http://roughhausen.tinderboxrecords.com/user.php
http://roughhausen.tinderboxrecords.com/admin.php
actually any php page is infected

?
help

2
phppp
Re: Help website hacked!!!!!
  • 2005/9/12 1:09

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


First of first, empty /template_c/
And contact your hosting company.

Last time the same problem happened to my sites and it was finally found out that the server was hacked through another Forum programe.

3
JMorris
Re: Help website hacked!!!!!
  • 2005/9/12 1:19

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


The very first thing you need to do is close your site! Don't be a virus spreader.

Upload a traditional index.html page that says something like "We are upgrading our site. We'll be right back."

Change your Administrator password on your website, your database and on your hosting account. Most likely the hacker got in through the server.

Backup your database using phpMyAdmin, or something like it. Make sure you select "Drop Table if Exists" in the options. Other than that, just accept the phpMyAdmin defaults.

Unless you have custom HTML/PHP/etc. pages that you've wrapped in XOOPS, all your content is in your database. That's great news!

If you have a custom theme, download it and manually remove any malicious code in it.

Download your mainfile.php and remove any malicious code from it.

If you've made any special hacks that are not documented, you'd better record them somewhere.

Make a note of every theme and every module installed on your site.

If you have any files (like images) you've uploaded, download them to a safe place and scan them for viruses.

Now delete your current install of XOOPS. And I mean every last file! Going through everyfile for a mass infestation is too time consuming.

After you've deleted the XOOPS files, reupload the exact same version of XOOPS you were using as well as the exact same version of the modules you had installed.

Reupload your mainfile.php and set it's permissions to 444 (chmod) or Read Only (windows).

Reupload your cleaned files and custom theme, if applicable.

If you have SSH access to the server, chmod all directories to 755 and all files to 644. Then set mainfile.php to 444.

/**Side Note**/
Some may tell you to set the uploads/ cache/ and templates_c/ directories to 777. I currently have 10 sites running with the folder permission set to 755 on ALL directories and have yet to have a problem. This may or may not work for you, but it's worth a shot.
/**End Note**/

If you don't have SSH access, you'll need to change the permissions on your files and folders manually over FTP or through the cPanel File manager, whichever is applicable or prefered in your situation.

The above are the steps I performed when MyWebResource was hacked a while back. Turns out my new host didn't use as strict file system permissions as my old host and the site got compromised because I neglected to check the file system permissions. It just goes to show, you cannot get lazy.

Hope this helps.

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

4
stoddard
Re: Help website hacked!!!!!
  • 2005/9/12 2:36

  • stoddard

  • Just popping in

  • Posts: 14

  • Since: 2005/8/23


thanks brother great info

now the real works begins

5
menochi
Re: Help website hacked!!!!!
  • 2005/9/12 5:53

  • menochi

  • Friend of XOOPS

  • Posts: 259

  • Since: 2003/12/28


Thank you JMorris, you answer is really a good "how to do" .
I will pin it on my blackboard and send it to my friends.
in valid code we trust

6
carnuke
Re: Help website hacked!!!!!
  • 2005/9/12 7:05

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


Thanks James This will be FAQd!
http://houseofstrauss.co.uk Resource for alternative health and holistic lifestyle
search xoops

7
JMorris
Re: Help website hacked!!!!!
  • 2005/9/12 9:54

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


No problem.

I did forget to mention something. Before you re-upload your cleaned mainfile.php, you'll need to change the MySQL password to whatever the new password is.

Something else you may want to consider is moving your database details out of mainfile.php...

Tutorial:http://xoops-tips.com/news-article.storyid-1.htm

... and you may also want to consider installing the Protector module by GIJOE.

Link:http://www.peak.ne.jp/xoops/md/mydownloads/viewcat.php?cid=1

Best Regards,

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

8
stoddard
Re: Help website hacked!!!!!
  • 2005/9/12 22:29

  • stoddard

  • Just popping in

  • Posts: 14

  • Since: 2005/8/23


Hey james anybody tell you...you rock! today?

9
otr222
Re: Help website hacked!!!!!
  • 2005/9/12 23:48

  • otr222

  • Not too shy to talk

  • Posts: 124

  • Since: 2005/5/13


It's probalbly all that coffee.
Nice write up James.

10
JMorris
Re: Help website hacked!!!!!
  • 2005/9/13 3:21

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Quote:

stoddard wrote:
Hey james anybody tell you...you rock! today?


Nope, not lately, but thank you! It's nice to know I can be of some use from time to time.

And yes... It's the coffee.

Best Regards,

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

Login

Who's Online

173 user(s) are online (119 user(s) are browsing Support Forums)


Members: 0


Guests: 173


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits