Wiki » Historique » Version 10
David Mercereau, 04/07/2026 11:07
| 1 | 1 | David Mercereau | # Wiki |
|---|---|---|---|
| 2 | |||
| 3 | * [[Audit]] Serveur existant |
||
| 4 | 2 | David Mercereau | |
| 5 | ## Nouveau serveur |
||
| 6 | |||
| 7 | 3 | David Mercereau | Résumé des accès |
| 8 | 2 | David Mercereau | |
| 9 | 5 | David Mercereau | ### SSH |
| 10 | |||
| 11 | * Port : 4422 |
||
| 12 | * IP ! 51.210.149.44 |
||
| 13 | |||
| 14 | 2 | David Mercereau | ### ISPconfig |
| 15 | |||
| 16 | 6 | David Mercereau | Panel : https://vps-aabafbfe.vps.ovh.net:8080/ |
| 17 | 1 | David Mercereau | Utilisateur : admin (full privilège) |
| 18 | 3 | David Mercereau | Mot de passe : https://pastebin.retzo.net/?29aa769fb838214c#J9bxW7ZGDJgaNompRpoT4io1znQ4wQRQUgQmsiTZnk9J (expiration dans 1 an) |
| 19 | |||
| 20 | 6 | David Mercereau | ### Munin (monitoring) |
| 21 | |||
| 22 | Accès : https://https://vps-aabafbfe.vps.ovh.net:8080/munin/ |
||
| 23 | 7 | David Mercereau | * Utilisateur : guillaume |
| 24 | * Mot de passe : https://pastebin.retzo.net/?5357a30134f2d65c#Gcyxt7ao7CTn7dHZMDrTJTjrNSH6aKeXcvxydcq7iAG9 |
||
| 25 | 1 | David Mercereau | |
| 26 | 7 | David Mercereau | #### Gestion authentification |
| 27 | |||
| 28 | Ajouter un autre utilisateur : |
||
| 29 | 1 | David Mercereau | |
| 30 | ```bash |
||
| 31 | htpasswd /etc/admin-htpassword autre_utilisateur |
||
| 32 | ``` |
||
| 33 | |||
| 34 | Supprimer un utilisateur : |
||
| 35 | |||
| 36 | ```bash |
||
| 37 | htpasswd -D /etc/admin-htpassword autre_utilisateur |
||
| 38 | ``` |
||
| 39 | 8 | David Mercereau | |
| 40 | ### PhpMyAdmin |
||
| 41 | |||
| 42 | Note : même couche d'authentification que munin, même identifiants... voir plus haut. (phpmyadmin est très attaqué...) |
||
| 43 | |||
| 44 | Accès : https://vps-aabafbfe.vps.ovh.net:8080/phpmyadmin/ |
||
| 45 | Utilisateur : root (full priviège) |
||
| 46 | Mot de passe : https://pastebin.retzo.net/?4a5dbd6c6c7ade9a#2LCQ9xbTSzZacBePgbbveVVgUtqoLTcRXzSzc2VzH9hE (expiration dans 1 an) |
||
| 47 | |||
| 48 | Gestion des autres accès via ISPconfig |
||
| 49 | |||
| 50 | Accès mysql extérieur fermé firewall (géré via ispconfig dans système) |
||
| 51 | 9 | David Mercereau | |
| 52 | ## Sécurité |
||
| 53 | |||
| 54 | Firewall utilisé via ISPconfig (Système, Pare-Feu) |
||
| 55 | |||
| 56 | Pot de miel afin d'éviter le scan (blacklist des IP qui tente de se connecter à ces ports : |
||
| 57 | ``` |
||
| 58 | TCP : 22,23,81,111,135,139,445,1080,1433,1521,3307,3389,5900,8082,8443,31337 |
||
| 59 | UDP : 19,69,111,135,137,161,162,500,1434,1900,5060,11211,31337 |
||
| 60 | ``` |
||
| 61 | 10 | David Mercereau | Attention le port 22 est dans la liste.... |
| 62 | 9 | David Mercereau | |
| 63 | 1 | David Mercereau | ### Crowdsec |
| 64 | 10 | David Mercereau | |
| 65 | Blacklist des IP selon leur comportement (analyse de log) |
||
| 66 | |||
| 67 | Une liste blanche est ajoutée ici : /etc/crowdsec/parsers/s02-enrich/local-admin-whitelist.yaml (après ajout faire un systemctl restart crowdsec) |
||
| 68 | |||
| 69 | Scénario en œuvre |
||
| 70 | - `crowdsecurity/apache2` |
||
| 71 | - `crowdsecurity/base-http-scenarios` |
||
| 72 | - `crowdsecurity/http-cve` |
||
| 73 | - `crowdsecurity/linux` |
||
| 74 | - `crowdsecurity/sshd` |
||
| 75 | - `fulljackz/pureftpd` |
||
| 76 | - `crowdsecurity/whitelist-good-actors` |
||
| 77 | - `crowdsecurity/dovecot` |
||
| 78 | - `crowdsecurity/postfix` |
||
| 79 | - `crowdsecurity/mariadb` |
||
| 80 | - `crowdsecurity/mysql` |
||
| 81 | |||
| 82 | Voir l'etat : |
||
| 83 | |||
| 84 | ```bash |
||
| 85 | cscli metrics |
||
| 86 | cscli alerts list |
||
| 87 | cscli decisions list |
||
| 88 | ``` |
||
| 89 | |||
| 90 | Bannir ou debannir manuellement : |
||
| 91 | |||
| 92 | ```bash |
||
| 93 | cscli decisions add --ip X.X.X.X --duration 4h --reason "manual test" |
||
| 94 | cscli decisions delete --ip X.X.X.X |
||
| 95 | ``` |