Bonjour à tous,
voilà, j'ai un site internet qui exitse depuis bientôt 5 ans et ces duex derniers, j'ai subi deux attaques de hackers qui ont eu pour conséquences de vider certaines
tables de base de données.
Je suppose que cela à été fait par des injections mysql mais je n'en suis pas sûr ?
Comment le savoir ?
Comment savoir à quel niveau de mon site se trouve les failles mysql.
Les mot de passe de mes utilisateur ne sont pas cryptés. Mais je pense que même si je les crypte, les hackers parviendront à vider à nouveau mes tables par des injections mysql.
Une chose est bizarre tout de même. il y a juste certaine tables qui ont été vidées.
Ca signifie que le hacker n'est pas parvenu à vider toutes les tables. Quelque donc l'en a empêché. mais je ne sais pas quoi.
Je me suis servi de l'extention "Injection Mysql" de firefox mais je ne comprends rien résultats, et j'ai lu qu ce n'est pas si fiable que cela.
Merci d'avance pour votre aide.
Code php : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 if (isset($_POST['valide'])) // si clique sur le bouton ok { if (empty($_SESSION["mail"])) // si l'utilisateur n'est pas connecté { if (isset($_POST["mail"])) { $mail = $_POST['mail']; } else { $mail = ""; } if (isset($_POST["mdp"])) { $mdp = $_POST['mdp']; } else { $mdp = ""; } } if (empty($erreur[0])) { include('connect.php'); /* on va d abord chercher si le client n'existe pas en effectuant un test sur la boîte mail */ $sql = sprintf("select * from flatforswap_adherent where mail=%s and mdp=%s and valide !=%s", quote_smart($mail), quote_smart($mdp), quote_smart('0')); $req = mysql_query($sql) or die('Erreur SQL : <br />'.$sql); if (mysql_num_rows($req) == 1) { $data = mysql_fetch_assoc($req); $valide = $data['valide']; if ($valide == 2) { $verifexist = true; } elseif($valide == 1) { $verifexist = false; $erreurc[] = '<center><font color="#FF0000">'.$idem_txt0032.'</font></center>'; } } else { $verifexist = false; $erreurc[] = '<center><font color="#FF0000">'.$idem_txt0033.'</font></center>'; } mysql_close(); if ($verifexist == 'true') { $_SESSION['mail'] = $data['mail']; /* l'adhérent est maintenant connecté */ include('connect.php'); // $sqld = sprintf("SELECT id_adh FROM flatforswap_adherent WHERE mail=%s", quote_smart($_SESSION["mail"])); $sqld = sprintf("SELECT id_adh FROM flatforswap_adherent WHERE mail=%s and valide =%s", quote_smart($_SESSION["mail"]), quote_smart('2')); $reqd = mysql_query($sqld) or die('Erreur SQL : <br />'.$sqld); $datad = mysql_fetch_assoc($reqd); $id_adh = $datad['id_adh']; $_SESSION['id_adh'] = $id_adh; /* on met id_adh en session afin d'éviter des requête inutiles */ } } // message d'erreur //if(isset($erreurc[0])) {for($i=0;$i<sizeof($erreurc);$i++) { echo $erreurc[$i];}} } // TRAITEMENT DU FORMULAIRE DE CONNEXION : FIN // TRAITEMENT DU FORMULAIRE D'INSCRIPTION
une autre chose bizarre aussi :
Dans le fichier de mon site, je vois souvent ces lignes (avec une adresse ip quasiment identique) :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 188.165.15.19 - - [21/Jan/2015:09:21:57 +0100] "GET /liste.php?continent=-1&ad_pays=-1&ville=-1&type=-1&pers=-1&date1=&date2=&valide_form=Envoyer+ces+informations&p=9&p=61&p=60&p=62&p=63&p=65&p=64&p=66&p=67&p=68&p=69&p=70&p=71&p=72&p=74&p=73&p=75&p=2&p=5&p=6&p=7&p=4&p=77&p=76&p=81 HTTP/1.1" 200 4004 "-" "Mozilla/5.0 (compatible; AhrefsBot/5.0; +http://ahrefs.com/robot/)" 188.165.15.19 - - [21/Jan/2015:09:22:01 +0100] "GET /liste.php?continent=-1&ad_pays=-1&ville=-1&type=-1&pers=-1&date1=&date2=&valide_form=Envoyer+ces+informations&p=9&p=61&p=60&p=62&p=63&p=65&p=64&p=66&p=67&p=68&p=69&p=70&p=72&p=74&p=73&p=75&p=2&p=76&p=1&p=78&p=77&p=79 HTTP/1.1" 200 4701 "-" "Mozilla/5.0 (compatible; AhrefsBot/5.0; +http://ahrefs.com/robot/)" 188.165.15.121 - - [21/Jan/2015:09:22:01 +0100] "GET /liste.php?continent=-1&ad_pays=-1&ville=-1&type=-1&pers=-1&date1=&date2=&valide_form=Envoyer+ces+informations&p=9&p=61&p=60&p=62&p=63&p=65&p=64&p=66&p=68&p=69&p=70&p=67&p=71&p=72&p=74&p=75&p=2&p=3&p=4&p=6&p=5&p=7&p=8&p=11&p=10&p=76&p=77&p=78&p=81 HTTP/1.1" 200 4018 "-" "Mozilla/5.0 (compatible; AhrefsBot/5.0; +http://ahrefs.com/robot/)" 188.165.15.121 - - [21/Jan/2015:09:22:03 +0100] "GET /liste.php?continent=-1&ad_pays=-1&ville=-1&type=-1&pers=-1&date1=&date2=&valide_form=Envoyer+ces+informations&p=9&p=61&p=60&p=62&p=63&p=65&p=64&p=66&p=67&p=59&p=57&p=68&p=69&p=70&p=72&p=74&p=75&p=71&p=2&p=4&p=6&p=5&p=3&p=7&p=77&p=73&p=78&p=79&p=81&p=80&p=76 HTTP/1.1" 200 4924 "-" "Mozilla/5.0 (compatible; AhrefsBot/5.0; +http://ahrefs.com/robot/)" 188.165.15.36 - - [21/Jan/2015:09:22:08 +0100] "GET /liste.php?continent=-1&ad_pays=-1&ville=-1&type=-1&pers=-1&date1=&date2=&valide_form=Envoyer+ces+informations&p=9&p=61&p=60&p=62&p=63&p=65&p=64&p=66&p=67&p=68&p=69&p=70&p=72&p=74&p=73&p=75&p=2&p=12&p=7&p=5&p=8&p=10&p=76&p=77&p=71&p=80 HTTP/1.1" 200 5180 "-" "Mozilla/5.0 (compatible; AhrefsBot/5.0; +http://ahrefs.com/robot/)" 188.165.15.121 - - [21/Jan/2015:09:22:11 +0100] "GET /liste.php?continent=-1&ad_pays=-1&ville=-1&type=-1&pers=-1&date1=&date2=&valide_form=Envoyer+ces+informations&p=9&p=61&p=60&p=62&p=63&p=65&p=64&p=66&p=67&p=68&p=71&p=73&p=74&p=69&p=70&p=75&p=2&p=76&p=77&p=72&p=78&p=81 HTTP/1.1" 200 3973 "-" "Mozilla/5.0 (compatible; AhrefsBot/5.0; +http://ahrefs.com/robot/)" 188.165.15.121 - - [21/Jan/2015:09:22:20 +0100] "GET /liste.php?continent=-1&ad_pays=-1&ville=-1&type=-1&pers=-1&date1=&date2=&valide_form=Envoyer+ces+informations&p=9&p=61&p=60&p=62&p=63&p=65&p=64&p=66&p=67&p=68&p=69&p=70&p=72&p=74&p=73&p=75&p=2&p=76&p=8&p=78&p=77&p=71&p=79&p=80 HTTP/1.1" 200 5161 "-" "Mozilla/5.0 (compatible; AhrefsBot/5.0; +http://ahrefs.com/robot/)" 188.165.15.121 - - [21/Jan/2015:09:22:36 +0100] "GET /liste.php?continent=-1&ad_pays=-1&ville=-1&type=-1&pers=-1&date1=&date2=&valide_form=Envoyer+ces+informations&p=9&p=61&p=60&p=62&p=63&p=65&p=64&p=66&p=67&p=68&p=70&p=69&p=72&p=74&p=75&p=2&p=5&p=3&p=76&p=77&p=73&p=71&p=79&p=81 HTTP/1.1" 200 3994 "-" "Mozilla/5.0 (compatible; AhrefsBot/5.0; +http://ahrefs.com/robot/)" 188.165.15.121 - - [21/Jan/2015:09:22:36 +0100] "GET /TeVOQ/liste.php?continent=-1&ad_pays=-1&ville=-1&type=-1&pers=-1&date1=&date2=&valide_form=Envoyer+ces+informations&p=9&p=61&p=60&p=62&p=63&p=65&p=64&p=66&p=67&p=68&p=69&p=70&p=71&p=72&p=73&p=74&p=75&p=2&p=4&p=8&p=6&p=7&p=77&p=78 HTTP/1.1" 404 1148 "-" "Mozilla/5.0 (compatible; AhrefsBot/5.0; +http://ahrefs.com/robot/)"
Partager