[SHSD] Self Hosting Security Dashboard

Hi,

We just packaged a first alpha version of Self Hosting Security Dashboard (SHSD). SHSD aims to provide a synthetic overview of the security status of accounts and devices in a self-hosting context. It is tailored to users who can deploy self-hosting solutions (such as Yunohost or Sandstorm) or who have an account (mail address) on such hosting, without requiring expert security knowledge.

Currently, SHSD offers a map of connections to local accounts to help detecting account compromission. Progressively, it will present a couple of very simple indicators on account usage and local devices (listing, IDS, etc.).

You can find more info on SHSD here : https://github.com/dynamid/shsd/

You can try it on Yunohost :
yunohost app install GitHub - dynamid/shsd_ynh: Yunohost package of SHSD

It is still in its very early stages but it should install and uninstall correctly.

We’d be glad to have some comments from the community !

Francois

2 Likes

That looks very nice, thank you for your work ! :heart:

Don’t hesitate to propose it to be added to the community list (even marked as ‘in progress’ is fine). C.f. the instructions here : https://github.com/YunoHost/apps#how-to-add-your-app-to-the-community-list :stuck_out_tongue_winking_eye:

Merci pour cet empaquetage, il a l’air bien intĂ©ressant ce logiciel :slightly_smiling_face:

J’ai un problùme à l’installation:

Le paquet « geoip-database-contrib » n’a pas de version susceptible d’ĂȘtre installĂ©e

Hello Lapineige !

Merci pour ta tentative ;-). Ce paquet nous pose pas mal de soucis. Grosso-modo :

  • geoip-database (+geoip-database-extra) ont une bonne licence et sont dans l’archive principale de debian. Par contre, la prĂ©cision gĂ©ographique parait vraiment mauvaise
  • geoip-database-contrib a une moins bonne licence, est dans la partie “contrib” de l’archive mais a une bien meilleure prĂ©cision.

On utilise actuellement geoip-database-contrib dans l’installation, car de nos premiers tests les dĂ©pĂŽts contrib paraissaient actifs dans un yunohost de base.

Donc pour tester, peux-tu me dire par quoi finissent tes lignes dans /etc/apt/sources.list ? Il faudrait qu’elles terminent par “main contrib” (ou “main contrib non-free”), probable que tu aies juste “main” à la fin.

SI c’est bien ça, tu peux ajouter contrib en fin de ligne, apt-get update et ça devrait marcher.

C’est ça :slightly_smiling_face:, l’installation a fonctionnĂ©.

Super ! TIens-moi au courant de ce qui marche/ne marche pas :wink:

Bonjour;

j’ai tentĂ© l’installation de SHSD sur mon domaine principal et sur un yunohost fraichement installĂ©
j’obtiens une erreur

j’ai recherchĂ© l’erreur UnicodeDecodeError et bon apparenment j’ai des caractĂšres spĂ©ciaux :stuck_out_tongue_winking_eye:
mais j’ai pas trop compris comment contournĂ© le problĂšme

2019-06-14 13:06:45,897: WARNING - Traceback (most recent call last):
2019-06-14 13:06:45,898: DEBUG - + local exit_code=1
2019-06-14 13:06:45,898: WARNING - File “/var/www/shsd/workers/loggers/ssh-sshd.py”, line 87, in
2019-06-14 13:06:45,898: DEBUG - + ‘[’ 1 -eq 0 ‘]’
2019-06-14 13:06:45,898: WARNING - accounts = parselog(maillog)
2019-06-14 13:06:45,898: DEBUG - + trap ‘’ EXIT
2019-06-14 13:06:45,899: WARNING - File “/var/www/shsd/workers/loggers/ssh-sshd.py”, line 29, in parselog
2019-06-14 13:06:45,899: DEBUG - + set +eu
2019-06-14 13:06:45,899: WARNING - for line in maillog:
2019-06-14 13:06:45,899: DEBUG - + echo -e ‘!!\n shsd’'‘s script has encountered an error. Its execution was cancelled.\n!!’
2019-06-14 13:06:45,899: WARNING - File “/usr/lib/python3.5/encodings/ascii.py”, line 26, in decode
2019-06-14 13:06:45,899: DEBUG - + type -t ynh_clean_setup
2019-06-14 13:06:45,899: WARNING - return codecs.ascii_decode(input, self.errors)[0]
2019-06-14 13:06:45,900: DEBUG - + ynh_die
2019-06-14 13:06:45,900: WARNING - UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe2 in position 5516: ordinal not in range(128)
2019-06-14 13:06:45,900: DEBUG - + local legacy_args=mc
2019-06-14 13:06:45,900: WARNING - !!
2019-06-14 13:06:45,900: DEBUG - + args_array=([m]=message= [c]=ret_code=)
2019-06-14 13:06:45,900: WARNING - shsd’s script has encountered an error. Its execution was cancelled.
2019-06-14 13:06:45,900: DEBUG - + declare -Ar args_array
2019-06-14 13:06:45,900: WARNING - !!

Bonjour,

Tu as des utilisateurs ou un domaine avec des caractÚres spéciaux ?

L’ouverture du fichier l’ouvre avec un encodage qui est, normalement, l’encodage par dĂ©faut du systĂšme. On pourrait forcer Ă  utf-8 (ou, mieux, en rĂ©cupĂ©rant l’exception), mais a priori j’ai l’impression que la locale de ton systĂšme n’est pas rĂ©glĂ©e de maniĂšre adaptĂ©e Ă  pouvoir lire ton domaine/utilisateurs.

Peux-tu me donner le retour de la commande suivante :
python -c “import locale;print (locale.getpreferredencoding())”

Et, aussi, essayer de visualiser le fichier /var/log/auth.log et voir si les caractÚres spéciaux apparaissent bien ?

Hey there,

tested your app but it didn’t install correctly

Here’s the log:
https://pastebin.com/MRtvPBBP

Hi,
Can you try to ‘apt install python3-requests’ before installing SHSD ? Looks like a missing dependency (which is, in fact, not enforced in SHSD install script).

Cheers
Francois