Jump to content

Faille prestashop ? je me suis fais hacker


Recommended Posts

Bonjour à tous, 

Depuis le lancement du site, pratiquement toutes les semaines, on se fait hacker, et suite à une analyse 1and1 après une plus sérieuse attaque, la faille se situerait au niveau de smarty, je ne suis pas vraiment doué pour résoudre ce genre de problème, je suis donc en train de rechargé la totalité de mon site sur le FTP, mais le problème persistera toujours... Et un accès sera toujours possible pour les hackers visiblement.

Quelqu'un pourrait-il me dire comment éviter ces attaques, Ou comment Prestashop compte résoudre ce problème ?

Merci :)

Link to comment
Share on other sites

Houlà tout de suite les grands mots !
Si Prestashop était hackable aussi facilement, ca se saurait ^^
 
Quand à la réponse de 1&1 elle me laisse pantois (mais ne m'étonne pas de leur part). Ils faudraient qu'ils m'expliquent comment un compilateur (smarty) qui n'intervient que depuis le serveur et n'a aucun échange avec l'extérieur pourrait causer quelque dégat que ce soit.
Par contre, il existe une possibilité, liée au gestionnaire de la boutique: l'activation de la console de déboggage smarty.
1er point à vérifier dans Paramètres avancés > Performances > Smarty, vérifier que le bouton radio "Ne jamais ouvrir la console" est bien coché, autrement tout le monde à accès aux paramètres et variables utilisées...

2ème point: changez tous les mots de passe (ftp, gestionnaire hébergement, boutique, base de données) pour tous les comptes associés. Si quelqu'un a pu pénétrer votre ordinateur, il a pu récupérer ces données (filezilla stocke les mdp en clair^^)

3ème point, un peu plus dur à réaliser, transférez le contenu de votre ftp sur votre pc et classez les fichiers par date de modification. Regardez les fichiers dont la date correspond aux premiers jours du hack. ou des fichiers avec des noms inhabituels. Regardez le contenu des fichiers index.php.

4ème point: Utilisez un bon antivirus sur votre pc et lancez un scan profond.

5ème point: Consultez les logs d'accès du serveur aux heures des hacks pour voir quels fichiers sont accédés.

Dernière possibilité, le serveur de 1&1 a été hacké plus haut, et là c'est à eux d'intervenir.

 

Quel genre de hack avez-vous ?

Link to comment
Share on other sites

Merci pour la réactivité,

Ce matin je refais un transfert complet de mon site, en ayant changé les mots de passe bdd. Je vais voir ce qu'il se passe.

Le mec au téléphone hier me parlait de smarty, et dans les mails du coup j'ai pas l'impression que ça soit le même problème... je suis un peu perdu...

 

 

Voila le message que m'a envoyé 1and1,
 

Ayant analysé l'incident, notre équipe d'experts constate que votre compte 1&1 a été attaqué. Une faille de sécurité dans le logiciel suivant que vous avez installé a permis à des tiers d'envoyer une grande quantité de spam à travers votre espace web (complètement défectueux): 

 

./wp-content/themes/customizr-child/xml-rpcc.php  

./shop/modules/blockviewed/global.php 

 

Vous trouverez ci-dessous quelques informations supplémentaires:

****************************************************************************

Script Name                                       |Mails Sent|Permissions       

./wp-cron.php                                     |         1|777:705

./shop/admin7707/index.php                        |         4|705:604

./index.php                                       |        24|777:705

./shop/index.php                                  |        58|705:604

./shop/modules/paypal/express_checkout/payment.php|        71|705:644

./wp-content/themes/customizr-child/xml-rpcc.php  |       187|705:200

./shop/modules/blockviewed/global.php             |     27716|705:200

----------------------------------------------------------------------------

Geolocation for IP 104.131.32.52: US

./logs/mail.log.50.gz:2014-12-14 23:54:40 u79079452 49wvOo-1XteKR45Kl-017E3k |< REMOTE=104.131.32.52 SCRIPT=/shop/modules/blockviewed/global.php -- /usr/sbin/sendmail -t -i -[email protected]

...

Geolocation for IP 146.185.239.51: RU

./logs/mail.log.50.gz:2014-12-13 22:52:28 u79079452 49mn2p-1XjstG0ckY-00zGcm |< REMOTE=146.185.239.51 SCRIPT=/wp-content/themes/customizr-child/xml-rpcc.php -- /usr/sbin/sendmail -t -i

...

****************************************************************************

 

 

Et la les fichiers malveillants détectés :
 

./shop/general.php

./shop/cache/smarty/cache/623/.page88.php

./shop/cache/smarty/cache/648/2/.plugin.php

./shop/cache/smarty/cache/socialsharing/310/.dir.php

./shop/cache/smarty/cache/socialsharing/293/.session55.php

./shop/cache/smarty/cache/socialsharing/257/5/8/ca/javascript.php

./shop/cache/smarty/cache/socialsharing/322/3/8/ca/2c/.press95.php

./shop/cache/smarty/cache/socialsharing/246/5/config47.php

./shop/cache/smarty/cache/socialsharing/424/3/8/0f/8c/search1.php

./shop/cache/smarty/cache/socialsharing/561/4/8/ca/2c/ca/login.php

./shop/cache/smarty/cache/socialsharing/648/2/.xml1.php

./shop/cache/smarty/cache/socialsharing/659/2/8/ca/2c/.info.php

./shop/cache/smarty/cache/socialsharing/663/2/8/ca/2c/ca/.config.php

./shop/cache/smarty/cache/socialsharing_header/220/5/8/.dirs.php

./shop/cache/smarty/cache/socialsharing_header/321/3/8/6f/stats36.php

./shop/cache/smarty/cache/socialsharing_header/336/3/8/6f/alias72.php

./shop/cache/smarty/cache/socialsharing_header/287/5/8/6f/.user99.php

./shop/cache/smarty/cache/socialsharing_header/464/4/info5.php

./shop/cache/smarty/cache/socialsharing_header/538/4/8/6f/.model.php

./shop/cache/smarty/cache/socialsharing_header/594/2/.title29.php

./shop/cache/smarty/cache/socialsharing_header/709/2/8/functions35.php

./shop/cache/smarty/cache/socialsharing_header/363/3/8/6f/test.php

./shop/cache/smarty/cache/socialsharing_header/447/3/8/.plugin.php

./shop/cache/smarty/cache/338/3/8/article3.php

./shop/cache/smarty/cache/489/4/8/8e/.test.php

./shop/cache/smarty/cache/productcomments/2/8/611/8e/.themes.php

./shop/cache/smarty/cache/productcomments/2/8/582/8e/.object.php

./shop/cache/smarty/cache/productcomments/5/8/223/8e/.diff20.php

./shop/cache/smarty/cache/productcomments/3/8/370/8e/utf.php

./shop/cache/smarty/cache/productcomments/4/8/564/5d/f0/b8/login.php

./shop/cache/smarty/cache/340/3/8/8e/themes.php

./shop/cache/smarty/cache/495/ini38.php

./shop/cache/smarty/cache/601/2/8/8e/footer.php

./shop/cache/smarty/cache/blocktopmenu/2/8/product/50/d6/4f/c1/.lib.php

./shop/cache/smarty/cache/blocktopmenu/2/8/product/627/88/db/.inc.php

./shop/cache/smarty/cache/blocktopmenu/3/8/product/356/dump41.php

./shop/cache/smarty/cache/blocktopmenu/3/8/product/365/88/.code76.php

./shop/cache/smarty/cache/blocktopmenu/4/8/product/453/.proxy2.php

./shop/cache/smarty/cache/blocktopmenu/4/8/product/459/.ini90.php

./shop/cache/smarty/cache/blocktopmenu/5/8/product/280/88/db/bd/.options.php

./shop/cache/smarty/cache/blocktopmenu/0/product/3/1/1/0/0/0/0/362/d6/4f/c1/.login80.php

./shop/cache/smarty/cache/blocktopmenu/0/product/4/1/1/0/0/0/0/502/d6/4f/.object.php

./shop/cache/smarty/cache/blocktopmenu/0/product/4/1/1/0/0/0/0/453/.files5.php

./shop/cache/smarty/compile/9e/dd/.dirs.php

./shop/cache/smarty/compile/8e/86/56/.cache.php

./shop/cache/tcpdf/test.php

./shop/classes/County.php

./shop/classes/Feature.php

./shop/classes/FeatureValue.php

./shop/classes/Tab.php

./shop/classes/controller/FrontController.php

./shop/classes/tax/gallery.php

./shop/classes/webservice/WebserviceSpecificManagementImages.php

./shop/classes/order/OrderCarrier.php

./shop/classes/order/OrderDetail.php

./shop/classes/pdf/sql.php

./shop/config/alias.php

./shop/config/header.php

./shop/config/xml/search.php

./shop/controllers/front/MyAccountController.php

./shop/controllers/front/SearchController.php

./shop/img/p/2/ini.php

./shop/img/p/6/admin.php

./shop/img/p/6/6/options.php

./shop/img/st/alias.php

./shop/img/tmp/cms/db.php

./shop/img/tmp/cms/gallery.php

./shop/img/tmp/cms/system.php

./shop/js/jquery/utf.php

./shop/mails/proxy.php

./shop/modules/index.php

./shop/modules/trackingfront/list.php

./shop/modules/vatnumber/translations/options.php

./shop/modules/vatnumber/translations/themes.php

./shop/modules/blockcontact/img/css.php

./shop/modules/blockcontact/upgrade/list.php

./shop/modules/blocklanguages/translations/admin.php

./shop/modules/blocklink/img/file.php

./shop/modules/blocknewsletter/verification.php

./shop/modules/blockspecials/translations/dump.php

./shop/modules/blocksupplier/img/javascript.php

./shop/modules/blocktopmenu/views/inc.php

./shop/modules/blockviewed/global.php

./shop/modules/cheque/translations/menu.php

./shop/modules/dashactivity/translations/test.php

./shop/modules/dashproducts/index.php

./shop/modules/paypal/paypal_login/list.php

./shop/modules/productcomments/controllers/plugin.php

./shop/modules/socialsharing/views/session.php

./shop/modules/statsbestcustomers/statsbestcustomers.php

./shop/modules/statsbestmanufacturers/translations/diff.php

./shop/modules/statsbestsuppliers/translations/files.php

./shop/modules/themeconfigurator/css/alias.php

./shop/override/classes/log/config.php

./shop/themes/default-bootstrap/article.php

./shop/themes/default-bootstrap/lang/press.php

./shop/themes/glass_theme_child/sass/functions.php

./shop/themes/glass_theme_child/modules/blocksocial/translations/model.php

./shop/tools/json/json.php

./shop/tools/profiling/Controller.php

./shop/tools/smarty/index.php

./shop/translations/export/themes.php

./shop/upload/ajax.php

./wp-content/plugins/ml-slider/assets/sliders/nivoslider/themes/default/.javascript24.php

./wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_tagcloud/static/.test.php

./wp-content/plugins/visual-form-builder/includes/admin-form-creator.php

./wp-content/plugins/visual-form-builder/includes/footer.php

./wp-content/themes/customizr/functions.php

./wp-content/themes/customizr/inc/class-fire-widgets.php

./wp-content/themes/customizr/parts/class-content-post_navigation.php

./wp-content/themes/customizr-child/comments.php

./wp-content/themes/customizr-child/inc/img/ajax.php

./wp-content/themes/customizr-child/wpshop/title.php

./wp-content/themes/twentyfourteen/featured-content.php

./wp-content/themes/twentythirteen/content-status.php

./wp-content/themes/twentythirteen/functions.php

./wp-content/themes/twentythirteen/css/alias.php

./wp-content/themes/twentytwelve/author.php

./wp-content/themes/twentytwelve/comments.php

./wp-content/themes/twentytwelve/page.php

./wp-includes/class-wp-editor.php

./wp-includes/template-loader.php

./wp-includes/fonts/functions.php

./wp-includes/images/smilies/blog.php

./wp-includes/images/smilies/option.php

./wp-includes/js/tinymce/wp-mce-help.php

./wp-includes/js/tinymce/langs/header.php

./wp-includes/js/tinymce/plugins/tabfocus/session.php

./wp-includes/js/tinymce/plugins/wpeditimage/start.php

./wp-includes/pomo/plugin.php

./wp-includes/SimplePie/Cache.php

 

Vous trouverez ci-dessous quelques informations supplémentaires:

****************************************************************************

Commande "stat" (Access/ Modify/ Change: moyens téléchargé/ changé dans contenu/ verrouillé):

 File: `shop/config/alias.php'

 Size: 2641       Blocks: 8          IO Block: 4096   regular file

Device: 810h/2064d Inode: 3894573928  Links: 1

Access: (0200/--w-------)  Uid: (2275836/u79079452)   Gid: (  600/ftpusers)

Access: 2014-11-19 13:28:47.158938709 +0100

Modify: 2014-11-19 13:28:47.222940270 +0100

Change: 2014-12-18 01:43:05.584873337 +0100

 File: `shop/modules/statsbestsuppliers/translations/files.php'

 Size: 494        Blocks: 8          IO Block: 4096   regular file

Device: 810h/2064d Inode: 4191830073  Links: 1

Access: (0200/--w-------)  Uid: (2275836/u79079452)   Gid: (  600/ftpusers)

Access: 2014-11-19 13:36:50.890732543 +0100

Modify: 2014-11-19 13:36:50.922733322 +0100

Change: 2014-12-18 01:43:02.708806377 +0100

 File: `wp-content/themes/twentytwelve/page.php'

 Size: 1219       Blocks: 8          IO Block: 4096   regular file

Device: 810h/2064d Inode: 2483437600  Links: 1

Access: (0200/--w-------)  Uid: (2275836/u79079452)   Gid: (  600/ftpusers)

Access: 2014-11-19 14:29:06.815325301 +0100

Modify: 2014-11-19 14:29:06.843325985 +0100

Change: 2014-12-18 01:43:12.953044884 +0100

 File: `wp-includes/SimplePie/Cache.php'

 Size: 4678       Blocks: 16         IO Block: 4096   regular file

Device: 810h/2064d Inode: 2556248415  Links: 1

Access: (0200/--w-------)  Uid: (2275836/u79079452)   Gid: (  600/ftpusers)

Access: 2014-11-19 14:40:09.603497035 +0100

Modify: 2014-11-19 14:40:09.659498400 +0100

Change: 2014-12-18 01:43:13.209050845 +0100

----------------------------------------------------------------------------

- "zgrep '19/Nov/2014:14:29' ./logs/ftp.log* | grep 'STOR' | less",

- whois-Abfrage,

- "zgrep '85.68.177.140' ./logs/ftp.log* | grep 'STOR' | less":

./logs/ftp.log.47.gz:85.68.177.140 UNKNOWN u79079452 [18/Nov/2014:15:07:43 +0100] "STOR /shop/admin7707/themes/default/template/controllers/tax_rules_group/index.php" 226 1315

./logs/ftp.log.47.gz:85.68.177.140 UNKNOWN u79079452 [18/Nov/2014:15:07:43 +0100] "STOR /shop/admin7707/themes/default/template/controllers/themes/helpers/index.php" 226 1318

./logs/ftp.log.47.gz:85.68.177.140 UNKNOWN u79079452 [18/Nov/2014:15:07:44 +0100] "STOR /shop/admin7707/themes/default/template/controllers/themes/helpers/options/index.php" 226 1321

...

./logs/ftp.log.47.gz:85.68.177.140 UNKNOWN u79079452 [19/Nov/2014:14:40:46 +0100] "STOR playlist-audio.png" 226 440

./logs/ftp.log.47.gz:85.68.177.140 UNKNOWN u79079452 [19/Nov/2014:14:40:46 +0100] "STOR playlist-video.png" 226 290

./logs/ftp.log.47.gz:85.68.177.140 UNKNOWN u79079452 [19/Nov/2014:14:40:46 +0100] "STOR video.png" 226 363

...

role:           Numericable Administrative Role Account

address:        NUMERICABLE

address:        6 rue Albert Einstein

address:        77420 CHAMPS SUR MARNE

address:        FRANCE

...

****************************************************************************

 

Edited by the_one (see edit history)
Link to comment
Share on other sites

Ok, votre ftp a été hacké depuis un wordpress installé sur le même serveur donc.

 

Les fichiers ./shop/modules/blockviewed/global.php, ./shop/general.php,./shop/js/jquery/utf.php

./shop/mails/proxy.php ne  devraient pas exister

Tous les autres fichiers cités ci-dessus ont été modifiés.

Votre boutique est donc complètement vérolée.

1ère chose à faire : désactivez/nettoyez et sécuriser votre WP

2ème chose à faire: sauvegardez votre répertoire /img et config/settings.inc.php. Notez la liste des modules ajoutés depuis la 1ère install

3ème: sauvegardez votre base sql

4ème: Videz votre répertoire ftp

5ème: récupérez le zip d'install de votre version d'origine et réinstallez Prestashop

6ème: Videz votre base nouvellement créée et remplacez-la par votre sauvegarde

7ème: retransférez votre répertoire /img et le fichier settings

8ème: reinstallez vos modules

Link to comment
Share on other sites

Ok, votre ftp a été hacké depuis un wordpress installé sur le même serveur donc.

 

Les fichiers ./shop/modules/blockviewed/global.php, ./shop/general.php,./shop/js/jquery/utf.php

./shop/mails/proxy.php ne  devraient pas exister

Tous les autres fichiers cités ci-dessus ont été modifiés.

Votre boutique est donc complètement vérolée.

1ère chose à faire : désactivez/nettoyez et sécuriser votre WP

2ème chose à faire: sauvegardez votre répertoire /img et config/settings.inc.php. Notez la liste des modules ajoutés depuis la 1ère install

3ème: sauvegardez votre base sql

4ème: Videz votre répertoire ftp

5ème: récupérez le zip d'install de votre version d'origine et réinstallez Prestashop

6ème: Videz votre base nouvellement créée et remplacez-la par votre sauvegarde

7ème: retransférez votre répertoire /img et le fichier settings

8ème: reinstallez vos modules

T'as oublié bon courage !!!

  • Like 1
Link to comment
Share on other sites

  • 4 months later...
  • 8 months later...

Bonjour 

J'ai trouvé des adress ip 

[sat Jan 16 10:29:20 2016] [error] [client 198.71.81.155] [host rosieposy.fr] user Administrator not found: /catalog/admin/file_manager.php/login.php

[sat Jan 16 10:34:26 2016] [error] [client 198.71.81.155] [host rosieposy.fr] user Administrator not found: /catalog/admin/file_manager.php/login.php
[sat Jan 16 14:12:31 2016] [error] [client 92.63.136.58] [host rosieposy.fr] FastCGI: server "/homez.549/rosiepos/www/PrestaShop/index.php" stderr: Primary script unknown
[sat Jan 16 14:12:32 2016] [error] [client 92.63.136.58] [host rosieposy.fr] FastCGI: server "/homez.549/rosiepos/www/PrestaShop/index.php" stderr: Primary script unknown

 

Sur le site https://cleantalk.org/spambots-check?packet=665e45e1  les prochaine ip sont soit propre soit il sont marquer 'spambot'.  Est ce que je doit m'inqueter? Merci pour votre aide, bien a vous :-D Len

Records: 5 URL to results   CSV   JSON
# Record Country Attacked sites Status 1 66.249.64.120 us.png United States 1 CLEAN 2 207.46.13.57 us.png United States 40 SPAMBOT 3 66.249.64.120 us.png United States 1 CLEAN 4 92.63.136.58 gb.png United Kingdom 8 SPAMBOT 5 198.71.81.155 us.png United States 217 SPAMBOT
Link to comment
Share on other sites

Ce sont des tentatives de hack comme il y en a tout les jours, ils cherchent des chemins sans connaitre véritablement le cms utilisé. Dans votre cas le chemin /catalog/admin/file_manager.php/login.php n'a rien à voir avec un Prestashop. Vous avez d'autres sites sur votre hébergement ? (WordPress ou autre)

Link to comment
Share on other sites

Bonjour et merci d'avoir pris le temps pour repondre! J'apprécie. 

Oui j'ai une site www.rosieposy.fr/catalog de oscommerce mais après verrification maintenant j'ai ça

1142 - INSERT command denied to user 'rosieposmod1'@'10.0.1.214' for table 'whos_online'

insert into whos_online (customer_id, full_name, session_id, ip_address, time_entry, time_last_click, last_page_url) values ('0', 'Guest', '06d91127ea82fbab17e88557b10535bd', '86.235.217.37', '1453033144', '1453033144', '/catalog/')

[TEP STOP]


1142 - INSERT command denied to user 'rosieposmod1'@'10.0.1.214' for table 'sessions'

insert into sessions values ('06d91127ea82fbab17e88557b10535bd', '1453034584', 'sessiontoken|s:32:\"a70d67848b1fb4c43e9985ab5648f2b3\";cart|O:12:\"shoppingCart\":4:{s:8:\"contents\";a:0:{}s:5:\"total\";i:0;s:6:\"weight\";i:0;s:12:\"content_type\";b:0;}language|s:7:\"english\";languages_id|s:1:\"1\";currency|s:3:\"EUR\";navigation|O:17:\"navigationHistory\":2:{s:4:\"path\";a:1:{i:0;a:4:{s:4:\"page\";s:9:\"index.php\";s:4:\"mode\";s:6:\"NONSSL\";s:3:\"get\";a:0:{}s:4:\"post\";a:0:{[spam-filter]}s:8:\"snapshot\";a:0:{[spam-filter]')

[TEP STOP]

Link to comment
Share on other sites

Ok, ce n'est pas une bonne idée d'avoir un oscommerce avec un prestashop, mais bon...

 

Concernant la deuxième erreur, c'est un problème d'accès à la base de données. Avez vous des soucis sur votre site ?

 

Activez le mode debug en modifiant cette ligne au début du fichier config/defines.inc.php  sur votre serveur:
 
define('_PS_MODE_DEV_', false);
 
par
 
define('_PS_MODE_DEV_', true);
 
Et donnez-nous les erreurs qui s'affichent. (pensez à le remettre à false ensuite sinon tous vos visiteurs verront les messages d'erreur^^)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...