The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant / FPA - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 53 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri May 04, 2012 3:15 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 03, 2011 2:14 pm
Posts: 78
Hi,
My website has been hacked.
As I result I had my homepage and my admin password changed.

I temporarily restored the website, only by changing the index.php with a backupped one. Site works. I reset the passwords in phpmyadmin.

I'd like to have an expertize on
1. what to do next. Should I replace the files with an old backup or it is not necessary?
2. How can I figure out how they hacked my site?
Someone told me it could be an unsafe component but I think it was because of a virus I had on a pc I used to mangae my joomla site but I'm not sure. Do anyone know how they usually do this kind of hacks?
3. Is there's a way to know for how long the website has been hacked?

Thank you very much


Top
 Profile  
 
PostPosted: Fri May 04, 2012 7:09 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Mon Mar 20, 2006 1:56 am
Posts: 11706
Location: The Girly Side of Joomla in Sussex
what you have done so far is a wast e of time
follow this checklist and concentrate on checklist 7 -safe route to recovery

[ ] Run the Forum Post Assistant / FPA Instructions available here and are also included in the download package.

[ ] Ensure you have the latest version of Joomla. Delete all files in your Joomla installation. Replace the deleted files with fresh copies of a current full version of Joomla, and fresh copies of extensions and templates used. Only by replacing all files in the installation (including extensions and templates) can you be sure to remove the backdoors inserted and hidden in files and directories

[ ] Review Vulnerable Extensions List

[ ] Review and action Security Checklist checklist 7 to make sure you've gone through all of the steps.

[ ] Scan all machines with FTP, Joomla super admin, and Joomla admin access for malware, virus, trojans, spyware, etc.

[ ] Change all passwords and if possible user names for the website host control panel and your Joomla site.

[ ] Use proper permissions on files and directories. They should never be 777, but ideal is 644 and 755

[ ] Check your htaccess for for any odd code (i.e. code which is not in the standard htaccess supplied as part of the Joomla installation).

[ ] Check the crontab or Task Scheduler for unexpected jobs/tasks.

[ ] Ensure you do not have anonymous ftp enabled

2. nope - you should be able to know what you have installed on your site
3. no (see item 2)

_________________
HU2HY- Poor questions = Poor answer
Un requested Help PM's will be added to the foe list and possibly just deleted
{Community.Connect Administrator }{ Showcase & Security Moderator}


Top
 Profile  
 
PostPosted: Fri May 04, 2012 11:09 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 03, 2011 2:14 pm
Posts: 78
Thank you Mandville: about point 1 ok It's pretty clear, I already read the same in an other of your post.

About point 2 and 3: my question was a little different; I trying to explain it better. I have my website on a shared hosting plan.
At first I thought that there were a problem on the server that affected mine website too.
The company that rents me the hosting plan told me that these kind of hacks could be frequently due to one of the following things:

- a joomla addon recently installed
- a weak password and username
- a virus on an infected pc

I can exclude number 1 because I didn't install anything dangerous (nothing included in the vulnerable extension list you showed me is installed on my site, and furthermore I didn't install anything new in the last month and website has been hacked yesterday). And number 2 because my password was pretty strong.

Number 3 could be possible; I don't know what kind of virus but I guessed it could be some kind of spyware that could have stolen my admin password while managing my website from an infected pc.
What's your opinion about this? Could a virus on an infected pc cause in some way a hack to my site?
What the hosting company is saying is possible?


Top
 Profile  
 
PostPosted: Fri May 04, 2012 11:37 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 03, 2011 2:14 pm
Posts: 78
Mandville: I ran the Forum Post Assistant / FPA, I'm sending you the code via pm hope you don't mind but I'am afraid it may contain personal datas
Thank you if you could give it a look


Top
 Profile  
 
PostPosted: Fri May 04, 2012 11:44 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Mon Mar 20, 2006 1:56 am
Posts: 11706
Location: The Girly Side of Joomla in Sussex
rosponius wrote:
via pm hope you don't mind

PM deleted without being read asper signature

_________________
HU2HY- Poor questions = Poor answer
Un requested Help PM's will be added to the foe list and possibly just deleted
{Community.Connect Administrator }{ Showcase & Security Moderator}


Top
 Profile  
 
PostPosted: Fri May 04, 2012 11:54 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 03, 2011 2:14 pm
Posts: 78
I further investigated and I found inside the logs folder named jcontroller.log.php
this code:
Code:
#<?php die('Forbidden.'); ?>
#Date: 2012-01-16 18:21:52 UTC
#Software: Joomla Platform 11.2.0 Stable+Modified [ A NAME ] 27-Jul-2011 00:00 GMT


The name between brackets is the same of the hacker is this just a coincidence?


Last edited by rosponius on Sat May 05, 2012 12:21 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat May 05, 2012 12:06 am 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 03, 2011 2:14 pm
Posts: 78
mandville wrote:
rosponius wrote:
via pm hope you don't mind

PM deleted without being read asper signature


All... right It was not a requested help pm it was just that I can't understand well the codes and I was afraid it could contain some personal data anyway it seems it doesn't so I'm adding the code here.
The code from FPA I mean:

Last PHP Error(s) Reported :: Forum Post Assistant (v1.2.1) : 4th May 2012 wrote:
[16-Mar-2012 13:24:44 UTC] PHP Fatal error: Call to a member function checkAnswer() on a non-object in /home/tariwine/public_html/libraries/cms/form/rule/captcha.php on line 47
Forum Post Assistant (v1.2.1) : 4th May 2012 wrote:
Basic Environment :: wrote:
Joomla! Instance :: Joomla! 2.5.4-Stable (Ember) 2-April-2012
Joomla! Platform :: Joomla Platform 11.4.0-Stable (Brian Kernighan) 03-Jan-2012
Joomla! Configured :: Yes | Read-Only (444) | Owner: "*******" (uid: 688/gid: 685) | Group: "********" (gid: 685) | Valid For: 2.5 and above
Configuration Options :: Offline: 0 | SEF: 1 | SEF Suffix: 0 | SEF ReWrite: 1 | .htaccess/web.config: Yes | GZip: 0 | Cache: 0 | FTP Layer: 0 | SSL: 0 | Error Reporting: default | Site Debug: 0 | Language Debug: 0 | Default Access: 1 | Unicode Slugs: 0 | Database Credentials Present: Yes

Host Configuration :: OS: Linux | OS Version: 2.6.18-238.19.1.el5 | Technology: x86_64 | Web Server: Apache | Encoding: gzip,deflate,sdch | Doc Root: /home/tariwine/public_html | System TMP Writable: Yes

PHP Configuration :: Version: 5.3.10 | PHP API: cgi-fcgi | Session Path Writable: Unknown | Display Errors: 1 | Error Reporting: 22519 | Log Errors To: error_log | Last Known Error: 16th March 2012 13:24:44. | Register Globals: 0 | Magic Quotes: 1 | Safe Mode: 0 | Open Base: | Uploads: 1 | Max. Upload Size: 20M | Max. POST Size: 20M | Max. Input Time: 60 | Max. Execution Time: 30 | Memory Limit: 128M

MySQL Configuration :: Version: 5.1.61-cll (Client:5.1.61) | Host: --protected-- (--protected--) | Collation: latin1_swedish_ci (Character Set: latin1) | Database Size: 3.04 MiB | #of _FPA_TABLE: 201
Detailed Environment :: wrote:
PHP Extensions :: Core (5.3.10) | date (5.3.10) | ereg () | libxml () | openssl () | pcre () | sqlite3 (0.7-dev) | zlib (1.1) | bcmath () | calendar () | ctype () | curl () | dom (20031129) | hash (1.0) | filter (0.11.0) | ftp () | gd () | gettext () | SPL (0.2) | iconv () | session () | json (1.2.1) | mbstring () | mcrypt () | mysql (1.0) | mysqli (0.1) | standard (5.3.10) | Phar (2.0.1) | posix () | pspell () | Reflection ($Revision: 321634 $) | imap () | SimpleXML (0.1) | soap () | sockets () | exif (1.4 $Id: exif.c 321634 2012-01-01 13:15:04Z felipe $) | tidy (2.0) | tokenizer (0.1) | xml () | xmlreader (0.1) | xmlrpc (0.51) | xmlwriter (0.1) | xsl (0.1) | zip (1.9.1) | cgi-fcgi () | timezonedb () | suhosin (0.9.33) | PDO (1.0.4dev) | pdo_sqlite (1.0.1) | SQLite (2.0-dev) | pdo_mysql (1.0.2) | ionCube Loader () | Zend Engine (2.3.0) |
Potential Missing Extensions ::

Switch User Environment (Experimental) :: PHP CGI: Yes | Server SU: Yes | PHP SU: Yes | Custom SU (LiteSpeed/Cloud/Grid): Yes
Potential Ownership Issues: No
Folder Permissions :: wrote:
Core Folders :: images/ (755) | components/ (755) | modules/ (755) | plugins/ (755) | language/ (755) | templates/ (755) | cache/ (755) | logs/ (755) | tmp/ (755) | administrator/components/ (755) | administrator/modules/ (755) | administrator/language/ (755) | administrator/templates/ (755) |

Elevated Permissions (First 10) :: None
Extensions Discovered :: wrote:
Components :: SITE :: Kunena Forum - German (Germany (1.7.2) | Kunena Forum - English (1.7.2) | com_mailto (2.5.0) | com_wrapper (2.5.0) |
Components :: ADMIN :: com_plugins (2.5.0) | com_weblinks (2.5.0) | com_admin (2.5.0) | com_menus (2.5.0) | com_languages (2.5.0) | COM_FSF (1.9.1.1302) | com_xmap (2.2) | com_config (2.5.0) | com_joomlaupdate (2.5.0) | com_content (2.5.0) | com_cache (2.5.0) | com_checkin (2.5.0) | com_categories (2.5.0) | com_modules (2.5.0) | hwdVideoShare ([ Romm ]) | FAQ Book (1.5.2) | com_installer (2.5.0) | COM_DBREPLACER (2.0.1FREE) | com_redirect (2.5.0) | plg_system_kunena (-) | plg_system_kunena (-) | plg_system_kunena (1.7.2) | System - Kunena (1.7.2) | Kunena language pack (@kunenaversio) | com_kunena (1.7.2) | Kunena Forum - German (Germany (1.7.2) | Kunena Forum - English (1.7.2) | com_login (2.5.0) | com_users (2.5.0) | jshopping (3.5.0) | com_messages (2.5.0) | com_newsfeeds (2.5.0) | com_finder (2.5.0) | com_media (2.5.0) | com_banners (2.5.0) | com_search (2.5.0) | K2 (2.5.4) | com_templates (2.5.0) | com_cpanel (2.5.0) |

Modules :: SITE :: mod_articles_categories (2.5.0) | K2 Content (2.5.4) | Jshopping Cart (3.0.1) | mod_articles_latest (2.5.0) | mod_search (2.5.0) | IceCarousel Module (1.7.2) | Lof JoomShop SlidingCaption Mo (1.0) | mod_users_latest (2.5.0) | mod_loginregister (2.5) | mod_menu (2.5.0) | Jshopping Last Products (3.0.1) | mod_banners (2.5.0) | mod_wrapper (2.5.0) | Jshopping Search (3.1.2) | Social Login (1.3) | K2 User (2.5.4) | mod_whosonline (2.5.0) | mod_footer (2.5.0) | Freestyle FAQs: Category Listi (1.9.1.1302) | Social Share Buttons (1.1) | K2 Users (2.5.4) | mod_related_items (2.5.0) | BT Login (1.1) | Jshopping Login (3.0.4) | Jshopping Filters (3.3.0) | mod_weblinks (2.5.0) | mod_custom (2.5.0) | mod_random_image (2.5.0) | mod_stats (2.5.0) | K2 Comments (2.5.4) | mod_articles_category (2.5.0) | Jshopping Cart Ext. (3.0.2) | mod_breadcrumbs (2.5.0) | mod_feed (2.5.0) | K2 Tools (2.5.4) | mod_articles_news (2.5.0) | Google Site Search (1.7.0) | mod_syndicate (2.5.0) | Cassrina Slideshow Bar CSB3 (1.6.0) | Latest articles with thumbnail (1.5.0) | mod_articles_popular (2.5.0) | mod_articles_archive (2.5.0) | RokAjaxSearch (1.1) | Jshopping Categories (3.0.1) | mod_languages (2.5.0) | Cassrina Slideshow Flo Alpha T (1.5.4) | mod_finder (2.5.0) | PixSearchNG (0.1.6) | K2 Login (2.5.4) | mod_login (2.5.0) |
Modules :: ADMIN :: mod_version (2.5.0) | mod_multilangstatus (2.5.0) | K2 Stats (admin) (2.5.4) | mod_popular (2.5.0) | mod_menu (2.5.0) | mod_title (2.5.0) | K2 Quick Icons (admin) (2.5.4) | mod_custom (2.5.0) | mod_latest (2.5.0) | mod_status (2.5.0) | mod_feed (2.5.0) | mod_logged (2.5.0) | mod_toolbar (2.5.0) | mod_submenu (2.5.0) | mod_quickicon (2.5.0) | mod_login (2.5.0) |

Plugins :: SITE :: plg_captcha_recaptcha (2.5.0) | plg_authentication_ldap (2.5.0) | plg_authentication_gmail (2.5.0) | plg_authentication_joomla (2.5.0) | PLG_CONTENT_JOSTAG (2.0) | plg_content_loadmodule (2.5.0) | plg_content_pagebreak (2.5.0) | plg_content_vote (2.5.0) | plg_content_geshi (2.5.0) | plg_content_finder (2.5.0) | plg_content_pagenavigation (2.5.0) | Content - Migur AJAX Search (1.0.1) | plg_content_joomla (2.5.0) | plg_content_emailcloak (2.5.0) | English Language ([ Romm ]) | Xmap - Mosets Tree Plugin (2.0.2) | Xmap - SobiPro Plugin (2.0.1) | Xmap - Content Plugin (2.0.3) | Xmap - Joomshopping 3.x.x Plug (2.0.0) | Remote Video ([ Romm ]) | Google ([ Romm ]) | Youtube ([ Romm ]) | plg_user_profile (2.5.0) | plg_user_contactcreator (2.5.0) | User - K2 (2.5.4) | plg_user_joomla (2.5.0) | plg_editors_tinymce (3.4.9) | plg_editors_codemirror (1.0) | plg_system_debug (2.5.0) | plg_system_sef (2.5.0) | plg_system_cdscriptegrator (2.1.6) | plg_system_languagefilter (2.5.0) | plg_system_log (2.5.0) | plg_system_p3p (2.5.0) | plg_system_logout (2.5.0) | plg_system_kunena (1.7.2) | plg_system_languagecode (2.5.0) | plg_system_highlight (2.5.0) | plg_system_redirect (2.5.0) | System - Canonicalization (2.5.0) | Finch - Canonical URLs (1.0.0) | System - Title Manager (2.0) | PLG_SYSTEM_METAGENERATOR (2.0.3) | PLG_SYSTEM_NNFRAMEWORK (12.4.2) | System - K2 (2.5.4) | System - Percha Google Analyti (0.1) | plg_system_remember (2.5.0) | plg_system_cache (2.5.0) | System - SEOSimple (2.0) | plg_finder_newsfeeds (2.5.0) | plg_finder_content (2.5.0) | plg_finder_categories (2.5.0) | plg_finder_contacts (2.5.0) | plg_finder_weblinks (2.5.0) | JoomShopping Plugin Resize Pic (3.2.3) | JW FLV (Version 4) Player ([ Romm ]) | Flow Player ([ Romm ]) | plg_editors-xtd_readmore (2.5.0) | plg_editors-xtd_article (2.5.0) | plg_editors-xtd_pagebreak (2.5.0) | plg_editors-xtd_image (2.5.0) | Search - FW Gallery (1.1.0) | plg_search_newsfeeds (2.5.0) | plg_search_phocagallery (3.0.1) | plg_search_content (2.5.0) | plg_search_categories (2.5.0) | plg_search_contacts (2.5.0) | Search - K2 (2.5.4) | plg_search_weblinks (2.5.0) | Search - JoomShopping (3.0.0.1) | Search - Freestyle FAQs (1.9.1.1302) | Search - SobiPro (1.5.3) | plg_extension_joomla (2.5.0) | plg_quickicon_extensionupdate (2.5.0) | plg_quickicon_joomlaupdate (2.5.0) |
Templates Discovered :: wrote:
Templates :: SITE :: atomic (2.5.0) | beez_20 (2.5.0) | beez5 (2.5.0) | Untitled (1.0) | joomla green template no mod r (1.0) |
Templates :: ADMIN :: hathor (2.5.0) | bluestork (2.5.0) |



Thanks


Top
 Profile  
 
PostPosted: Sat May 05, 2012 1:22 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23363
Location: @Webdongle
rosponius wrote:
... I was afraid it could contain some personal data anyway it seems it doesn't so I'm adding the code here.
The code from FPA I mean:
...

What difference would it make if it contained personal data ? After all you followed the other instructions yes ? The instructions that included deleting all the files and changing the personal data.

And the server data will be known to the hacker anyway.

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Sat May 05, 2012 2:01 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 03, 2011 2:14 pm
Posts: 78
Webdongle wrote:
rosponius wrote:
...

What difference would it make if it contained personal data ?


I didn't explain myself well (I'm not english mothertongue). What I meant was simply that I didn't want to post by mistake any personal data. Actually in the FPA there was the name of my login and now I hid it with asterisks.

But anyway, did anyone found something odd on those datas I posted?
In the meantime I scanned my website with an antivirus and it said my website was clean but two websites hosted on my shared server are infected. Is this possible?
Then I forgot this and it's relevant: I have another joomla website on another server, I manage it from the same pcs and has not been touched by a hacker ever.


Quote:
The instructions that included deleting all the files and changing the personal data.


I have not done it yet, I was asking if it would be safe to use the backups on my pc or not. Would those be more or less safe than the one that can be restored by the server company?


Top
 Profile  
 
PostPosted: Sat May 05, 2012 2:21 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23363
Location: @Webdongle
rosponius wrote:
...

I didn't explain myself well (I'm not english mothertongue). What I meant was simply that I didn't want to post by mistake any personal data. Actually in the FPA there was the name of my login and now I hid it with asterisks.
... I manage it from the same pcs and has not been touched by a hacker ever.
...

Your site has been hacked therefore the hacker knows that login.
Your site has been hacked therefore you will have changed your login
Your site has been hacked therefore you will have deleted everything

Therefore putting the information for all to see does not matter because
  1. That information is already known to the hacker
    and
  2. That information is no use to anyone because you have changed it. At least you should have done.

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Sat May 05, 2012 2:56 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 03, 2011 2:14 pm
Posts: 78
...[/quote]
Your site has been hacked therefore you will have deleted everything
[/quote]

Sorry do you mean:

I should delete everything
or
the hacker deleted everything
?
Site has been apparently only defaced.

I can delete everything but I need to restore the database and files.
Now I can reinstall a clean copy of joomla as suggested, but I need to reupload my files.
Do you think it's safe to use my saved backups for both database and files?
Should I reinstall all the extensions too or just restore them trough backup?
Thank you


Top
 Profile  
 
PostPosted: Sat May 05, 2012 3:12 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23363
Location: @Webdongle
rosponius wrote:
...
Sorry do you mean:

I should delete everything
or
the hacker deleted everything
?
Site has been apparently only defaced.
...

I mean that if you followed the instructions posted by mandville "Delete all files in your Joomla installation" .... then you will have deleted everything. That includes any files the hacker may have placed on the server. (from mandville's post) "Only by replacing all files in the installation (including extensions and templates) can you be sure to remove the backdoors inserted and hidden in files and directories"

You can save your configuration.php file but you need to check it.

You don't have a clean backup ? Then you have to replace the Joomla and extension folders/files manually. Then when you have done that you will have files that match your database and no extra hacking files.

Don't forget to check your computer and all the other things in the list.

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Sat May 05, 2012 3:27 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 03, 2011 2:14 pm
Posts: 78
Quote:
You don't have a clean backup ?
Don't forget to check your computer and all the other things in the list.


That's the point: I don't know If my backups are clean, I don't know if the attack came from an infected file on my pc. I checked with more than an antivirus and mnothing was found but how can I be sure?


Top
 Profile  
 
PostPosted: Sat May 05, 2012 6:34 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23363
Location: @Webdongle
rosponius wrote:
Quote:
... I don't know If my backups are clean, I don't know if the attack came from an infected file on my pc. I checked with more than an antivirus and mnothing was found but how can I be sure?

If you don't know if your backup is clean you can do one of 2 things.
Either delete all the folders/files from the server and restore a backup from a month or so back. If it was not clean and your site gets reinfected then delete all the folders/files again and replace manually.
or
Delete all the folders/files and replace manually first time.

You can never be 100% sure your PC is clean but if you scan it with every antivirus/anti malware you can ... then you can be as sure as you can be. If you find nothing on your PC then the chances are it got on your site through a vulnerable extension. If that is the case then deleting the folders/files, replacing them with clean ones ... and checking your extensions are up to date and not on the VEL ... that should sort things.

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Sat May 05, 2012 7:03 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 03, 2011 2:14 pm
Posts: 78
Webdongle wrote:
rosponius wrote:
Quote:
... I don't know If my backups are clean, I don't know if the attack came from an infected file on my pc. I checked with more than an antivirus and mnothing was found but how can I be sure?

If you don't know if your backup is clean you can do one of 2 things.
Either delete all the folders/files from the server and restore a backup from a month or so back. If it was not clean and your site gets reinfected then delete all the folders/files again and replace manually.
or
Delete all the folders/files and replace manually first time.

You can never be 100% sure your PC is clean but if you scan it with every antivirus/anti malware you can ... then you can be as sure as you can be. If you find nothing on your PC then the chances are it got on your site through a vulnerable extension. If that is the case then deleting the folders/files, replacing them with clean ones ... and checking your extensions are up to date and not on the VEL ... that should sort things.


Thank you Webdongle you have been clear;
I'll procede as you suggest, anyway I'm trying to investigate further.
I agree Not 100% sure but likely it was not a virus in the end.

I double checked also the VEL but I don't have any vulnerable extension installed in that website.

What else could be? Something in the template? A not listed vulnerable extension?

And I have a doubt (maybe a silly one):
I have useful backups dated 10 days ago on both the server and my pc (they are rar packed) do you think they could be infected some way although they have been saved before the attack and they have never been unpacked?


Top
 Profile  
 
PostPosted: Sat May 05, 2012 8:34 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23363
Location: @Webdongle
There are a lot of free Templates with malicious code and hacked images.
There are many ways a site can be infected. And the results don't show for several months. How long has your site been 2.5.4 ? was it upgraded from an earlier version ?

Do you allow people to upload images ? Does anyone else have ftp access ? if so what about their computer ?

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Sat May 05, 2012 9:16 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 03, 2011 2:14 pm
Posts: 78
My template was designed with artisteer by a friend. I then have modified from time to time the css and php when needed.
Originally the website was made with joomla 1.7; I upgraded to 2.5 almost as soon as it came out. Then updated again to 2.5.4. To do this updates I've always used the auto-installation feature inside the hoster cpanel.

I do NOT allow people to upload images.

I only have ftp access but a couple of times I had to use another pc (just one) and it seems not infected. Furthermore I have password saved in that pc's ftp software also for another joomla website that I manage and that site hasn't been affected by the hacker.
While on the pc I use for the hacked website, in the ftp software there was only the password for the hacked website not the other website, that's make me think about some malware stealing my password on this pc and then self-destroying. Possible?


Top
 Profile  
 
PostPosted: Sun May 06, 2012 12:57 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23363
Location: @Webdongle
If malware gets on a PC before the antivirus knows that malware is in the wild .... then the malware can prevent updates of the antivirus from seeing it. One reason to scan with more that one program.

Malware can also hide in 'system restore' so even if it's deleted it re install it's self. Turn system restore off and disconnect from the internet and hit the computer with everything you can ... is sometimes the only way to eradicate some malware.

But it sounds doubtful that your PC is infected. Is it shared Hosting ? Perhaps Goole the name of your Host with hacked ? There are many sites hacked from the server.

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Sun May 06, 2012 2:52 am 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 03, 2011 2:14 pm
Posts: 78
Webdongle wrote:
If malware gets on a PC before the antivirus knows that malware is in the wild .... then the malware can prevent updates of the antivirus from seeing it. One reason to scan with more that one program.

Malware can also hide in 'system restore' so even if it's deleted it re install it's self. Turn system restore off and disconnect from the internet and hit the computer with everything you can ... is sometimes the only way to eradicate some malware.

But it sounds doubtful that your PC is infected. Is it shared Hosting ? Perhaps Goole the name of your Host with hacked ? There are many sites hacked from the server.


Thank you very much for these tips.
I have checked with 2 different antivirus and with two antimalware
Now I'm going to format my pc and use ubuntu live for website managing so to be sure.
My worries are about a possible contamination of my backups.

About the server yes it's shared hosting.
I further investigated and found out that on my shared hosting there are two infected websites.
I have spent all the day emailing with the guys that work with my host provider.
Of course they say they don't have any fault.... and then although other website may be infected mine should be safe because they use Run SU_PHP on their servers and so one clients scripts can't effect another clients site or their scripts according to them.
Unfortunately I can't be sure about that and I can't be sure about my pc or my website vulnerability either.

Anyway I found out when the attack happened and from where. Then I re-read joomla security checklists. In checklist part 6 there is this tip:"List recently modified files: Before making any changes to your site, generate a list of recently modified files. Here's a php script that will list the files for you. Remove this script as soon as you have your list and don't publish a link to it!"

There is no link to the mentioned php script anymore. Do you or anyone else know a script that can do that job as suggested there?

Thanks again for your advices, very helpful


Top
 Profile  
 
PostPosted: Sun May 06, 2012 4:53 am 
User avatar
Joomla! Hero
Joomla! Hero

Joined: Sat Oct 21, 2006 10:20 pm
Posts: 2702
Location: Wisconsin USA
I'm going to step in a bit here and hopefully clear a few things up and make sure all readers understand certain points. The exchange I am referencing is quoted below.

Contrary to a recent statement that could be interpreted a number of ways, it does make a difference if the FPA were to disclose such personal information to the forum in the form of user names and passwords. That would be irresponsible on our part. We will as forum moderators also not publicly ask for such information to be disclosed. Never disclose this information to regular forum users who ask. We have no control over what information you disclose if you have agreed by other methods to allow a regular forum user to help clean and repair your site.

rosponius wrote:
... I was afraid it could contain some personal data anyway it seems it doesn't so I'm adding the code here.
The code from FPA I mean:

webdongle wrote:
What difference would it make if it contained personal data ?

The FPA does not display any personal information such as the database user name and password or provide them in the generated data that is to be posted in the forums. That information is not needed by us in the public forum areas to help diagnose the issues your having with your site.

The FPA script results does display some path information and some server information that could be considered sensitive with the default information privacy radio check box, but this information is helpful for certain diagnosis and is why it is included. The FPA user can always select the Strict radio check box before generating the post information and then the additional information that could be considered sensitive would not be included in the post.

The FPA script does have to look at certain information in the configuration.php file in order to gain access to certain data that is needed to help diagnose issues with your site. Because of this necessary access, the FPA script does have the potential to allow the possibility of a hacker accessing the script to gain information about your site such as the data the configuration.php file contains. The FPA script should not be left on your website after you have used it to make the forum posting.

This is why I have added the security notice and the link to automatically remove the script from your site to the latest version of the FPA script. You should also close the browser tab or window that the FPA results are displayed in after removal of the FPA script.


@rosponius

If you have a modified template and you do not have a known clean copy to replace it with when you do the cleaning, then I would suggest that you inspect each of the modified files (files like index.php, the css file(s), and any added logo or image files) closely for unauthorized modifications. Then you can replace the template with a freshly downloaded clean copy and replace the necessary files with your modified ones to get your template structure back.

Since the database and the information it contains does not get replaced when cleaning your site, be sure to check for any added names that may be super-admins or otherwise have access to the administrator in the
Joomla database. If any are found, or you are unsure of certain users then delete them.

Be sure to follow what mandville posted in her checklist and pay special attention to the checklist 7 where it says to use multiple malware scanners on any computer that accesses your website. No program will detect 100% of malware so it is best to use a good mainstream antivirus program and also periodically use something like malwarebytes anti-malware scanner.

Yes sites can be hacked across accounts on shared hosting. It depends on a number of factors but could be a cause. The host is not going to admit this to you or anyone else as it is not in their best interest financial wise to do so.

_________________
PhilD -- Unrequested PM's and/or emails may not get a response.
Security Moderator


Top
 Profile  
 
PostPosted: Sun May 06, 2012 6:52 am 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 03, 2011 2:14 pm
Posts: 78
Hi PhilD

thanks for the note.
Of course I was sure you didn't need or ask for password.
To further clarify can you please explain me what is the section where FPA write about owner and group?

Quote:
so it is best to use a good mainstream antivirus program and also periodically use something like malwarebytes


That's exactly what I did!

Quote:
I would suggest that you inspect each of the modified files (files like index.php, the css file(s), and any added logo or image files) closely for unauthorized modifications.

This maybe a silly question but: How do I know which are the modified files? And: any clue on the script that I talked about in the previous post and that was mentioned in Joomla security checklist #6?

Quote:
Yes sites can be hacked across accounts on shared hosting. It depends on a number of factors but could be a cause. The host is not going to admit this to you or anyone else as it is not in their best interest financial wise to do so.


I guess there's nothing I can do here nor find evidence if that happened in my case or is there a way?


Top
 Profile  
 
PostPosted: Sun May 06, 2012 5:01 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 03, 2011 2:14 pm
Posts: 78
The script I am looking for was suggested here: http://docs.joomla.org/Security_and_Per ... ow_what.3F

Point #3 "List recently modified files: Before making any changes to your site, generate a list of recently modified files. Here's a php script that will list the files for you. Remove this script as soon as you have your list and don't publish a link to it!"

But there's no link anymore, where can I find that or a similar script?


Top
 Profile  
 
PostPosted: Sun May 06, 2012 10:51 pm 
User avatar
Joomla! Hero
Joomla! Hero

Joined: Sat Oct 21, 2006 10:20 pm
Posts: 2702
Location: Wisconsin USA
To directly answer the question, I don't know what 'script' the doc was talking about.

While there is much good reading on the official Joomla wiki about security etc., not all of it is up to date or may be missing something such as what you found. You should be following the checklist mandville posted and I will explain why in a minute. I have posted essentially the same thing here at the bottom of this post for convenience.

First. Security is an always changing target. As such, the documentation has to change along with the times. Yes, there is much other documentation with pointers and suggestions to follow that can be found on the Joomla wiki as wel as elsewhere (much of which is essentially copied from the official Joomla wiki docs). The quality of this documentation as it relates to security is varied from up to date and maintained, to extremely out of date or wrong.

The security moderators and a select few other very knowledgeable people have created documentation specifically dealing with site hacks, how to efficiently recover from the hacks and how to prevent site hacks from reoccurring. The information is a collection of current best practices and procedures and is what we generally use day to day to clean, fix, and prevent hacked sites. The information provided is generally under the control of the security moderators and a select few other forum members and is kept up to date with the latest recommended security practices and security information. This documentation essentially consists of three main things:

1. the FPA script. This script is to provide both the script user and the helpful people on the security forum with detailed information about the site in question. The script can save hours of work and many times we can use the posted results to point to an area of the site to focus on first.

2. The security checklist 7. This wiki document contains the essential requirements to clean, repair, and help prevent the hacking from reoccurring. The document also contains some helpful one line scripts; one of which will detect if any file changes on a site for any reason, and by anyone.

3. The VEL or Vulnerable Extensions List is a listing of extensions and the version(s) for Joomla that were found to be insecure and could result in a hacker using them to enter and hack your site. Mandville does an excellent job of keeping the listing up to date and this list is always changing. Used together with the FPA you can quickly determine if an extension version your using is on the listing. Any extension version you are using that is found out of date or appears on the list should be updated using the latest release from the developer. If there is no later release, then the extension should be uninstalled from the site.

That covers the three main documents and sources of information. There is one more under control of the security moderators and that is the "Before You Post" forum sticky viewtopic.php?f=621&t=582854 is for the 2.5 forum. The security mods and others will many times point to this checklist or provide a copy within an answer. The "Before you post" sticky also contains some additional pointers that may be missed when reading the checklist 7. While what is sometimes posted varies somewhat (both between security mods and the forum sticky) the essential information to follow is always contained within what is posted. This is what I am posting below.

PhilD wrote:

It is suggested to do all of the following. Failure to follow the suggestions below may leave your site vulnerable to being hacked again in the future.

You must state what version of Joomla you were using when when the site became hacked. This can make a difference as to how we approach your individual situation.

[ ] Run the Forum Post Assistant / FPA Instructions available here and are also included in the download package.

[ ] Ensure you have the latest version of Joomla. Delete all files in your Joomla installation, saving a copy of the configuration.php file. Replace the deleted files with fresh copies of a current full version of Joomla (minus the installation directory), and fresh copies of extensions and templates used. Upload the copy of your configuration file. Only by replacing all files in the installation (including extensions and templates) can you be sure to remove the backdoors inserted and hidden in files and directories More detail can be found in the security Checklist 7 link below.

[ ] Review Vulnerable Extensions List

[ ] Review and action Security Checklist 7 to make sure you've gone through all of the steps.

[ ] Scan all machines with FTP, Joomla super admin, and Joomla admin access for malware, virus, trojans, spyware, etc.

[ ] Change all passwords and if possible user names for the website host control panel and your Joomla site.

[ ] Use proper permissions on files and directories. They should never be 777, ideal is 644 and 755 and 444 for the configuration.php file.

[ ] Check your htaccess for for any odd code (i.e. code which is not in the standard htaccess supplied as part of the Joomla installation).

[ ] Check the crontab or Task Scheduler for unexpected jobs/tasks.

[ ] Ensure you do not have anonymous ftp enabled

Note: The forum post tool will work with 1.0.x, J1.6.x, J1.7.x, 2.5.x versions of Joomla.

_________________
PhilD -- Unrequested PM's and/or emails may not get a response.
Security Moderator


Top
 Profile  
 
PostPosted: Sun May 06, 2012 11:10 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 03, 2011 2:14 pm
Posts: 78
I just found the infected file on my website NOT on my pc.
It is in an infected php file put someway in beez2.0 template (that I'm not using but it is installed)
It is infected with the backdoor php/WebShell.A.1.


Top
 Profile  
 
PostPosted: Sun May 06, 2012 11:27 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23363
Location: @Webdongle
rosponius wrote:
I just found the infected file on my website NOT on my pc....

Perhaps more accurate to say ... You found part of the pay load that was left by a hacker after they entered via a different exploit.

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Sun May 06, 2012 11:39 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 03, 2011 2:14 pm
Posts: 78
Webdongle wrote:
rosponius wrote:
I just found the infected file on my website NOT on my pc....

Perhaps more accurate to say ... You found part of the pay load that was left by a hacker after they entered via a different exploit.



meaning in not technical language? :)
Possible origin?
With "part" do you mean something else could still affect my site?


Top
 Profile  
 
PostPosted: Sun May 06, 2012 11:43 pm 
User avatar
Joomla! Hero
Joomla! Hero

Joined: Sat Oct 21, 2006 10:20 pm
Posts: 2702
Location: Wisconsin USA
"To further clarify can you please explain me what is the section where FPA write about owner and group? "

If the owner and group as listed within the FPA are different, then this can mean that there could be file and directory permission issues that will result in the site being hacked. Here is more information on file and directory permissions
http://www.joomlatutorials.com/joomla-t ... ation.html
and
http://www.joomlatutorials.com/joomla-t ... uexec.html

Both were excellently written by RussW and explain ownership and permissions very well.

"This maybe a silly question but: How do I know which are the modified files?"

I was referring to how could you keep your template modifications and still clean the site properly. "My template was designed with artisteer by a friend. I then have modified from time to time the css and php when needed."


"I guess there's nothing I can do here nor find evidence if that happened in my case or is there a way?" There are certain issues that shared servers can present. Any server can be hacked and some hosts are better at preventing hacks across customer accounts than others. Most issues result in the inability to fully control how multiple accounts are administered. Sometimes this results in server hacks. Also Cheap (as in hosting) does not necessarily mean bad and expensive does not necessarily mean good, though it has been my experience that you tend to get what you pay for. This http://www.webhostingtalk.com/ is a good site to do research on hosts on. Another way to tell a reasonably good host is to find out what large sites (such as Joomla) are hosted on. There must be some good reasons why they were selected.


Addendum:
The beez template is a favorite place to stick hack files because that directory is a core directory and is likely always there. Now the thing is you need to find the extension or other insecurity that is allowing the hack to occur and to follow the security checklist 7 delete all files and replace with fresh ones. I posted my "before you post" checklist above which will give advice and links to everything needed to fix the site.

_________________
PhilD -- Unrequested PM's and/or emails may not get a response.
Security Moderator


Top
 Profile  
 
PostPosted: Sun May 06, 2012 11:56 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 03, 2011 2:14 pm
Posts: 78
Thank you both Phil and Webdongle for the help and tips.

Quote:
This http://www.webhostingtalk.com/ is a good site to do research on hosts on.


That's what I did when I chose my hosting.

Quote:
Another way to tell a reasonably good host is to find out what large sites (such as Joomla) are hosted on. There must be some good reasons why they were selected.


The chosen hosting it's right among those (I can't post the name of the company but it's positively reviewed by joomla users. Furthermore it is recommended to be used with joomla).

Quote:
follow the security checklist 7 delete all files and replace with fresh ones


That's what I was going to do before to find the payload

Quote:
Now the thing is you need to find the extension or other insecurity that is allowing the hack to occur


Not easy job to figure out the reason of the hack.
Sorry to insist on this point, but with my latest information and with what I have reported above, most likely cause of the hacking?
Malware from my pc, other hosted website contaminating mine, weak extension, weak template?

Thank you for your time and patience


Top
 Profile  
 
PostPosted: Mon May 07, 2012 12:27 am 
User avatar
Joomla! Hero
Joomla! Hero

Joined: Sat Oct 21, 2006 10:20 pm
Posts: 2702
Location: Wisconsin USA
Can be from any one of those listed. Check all of the extensions used against the VEL, follow the checklist 7 I can't really be more specific without actually being on the site and even then, the actual root cause may not be known.

_________________
PhilD -- Unrequested PM's and/or emails may not get a response.
Security Moderator


Top
 Profile  
 
PostPosted: Mon May 07, 2012 12:59 am 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 03, 2011 2:14 pm
Posts: 78
PhilD wrote:
Can be from any one of those listed. Check all of the extensions used against the VEL, follow the checklist 7 I can't really be more specific without actually being on the site and even then, the actual root cause may not be known.


Thank you for all suggestions. One of the last quesions...than I stop bothering you people... :)
I read the security checklist 7 and I'm going to followe before to restore the website, now I'm just doing some more research and reading more about securityand I found out that there are some vulnerability scanner software to check for a website vulnerability. Are those software useful to have an idea of which part of my joomla site could be vulnerable or are useless?

Once I restored the site, the security extensions in the JED would be somehowhelpful in protecting the website?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 53 posts ]  Go to page 1, 2  Next



Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group