Hinweis: Sie sind auf den Seiten der Moodle 1.9 Dokumentation. Die Dokumentation der aktuellsten Moodle-Version finden Sie hier: Sicherheit.

Sicherheit: Unterschied zwischen den Versionen

Aus MoodleDocs
Wechseln zu:Navigation, Suche
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 10: Zeile 10:


==Einfache Sicherheitsmaßnahmen==
==Einfache Sicherheitsmaßnahmen==
*Die beste Sicherheitsstrategie ist ein gutes [[Sicherung der Moodle-Installation|Backup]]. '''Wichtig''': Ein Backup ist erst dann "gut", wenn Sie es wiederherstellen können. Testen Sie also, ob Sie die Sicherung Ihrer Moodle-Installation auch wiederherstellen können!
*Die beste Sicherheitsstrategie ist ein gutes [[Sicherung der Moodle-Installation|Backup]].  
:'''Wichtig''': Ein Backup ist erst dann "gut", wenn Sie es wiederherstellen können. Testen Sie also, ob Sie die Sicherung Ihrer Moodle-Installation auch wiederherstellen können!
*Installieren Sie nur Software, die Sie auch wirklich benötigen und nutzen.
*Installieren Sie nur Software, die Sie auch wirklich benötigen und nutzen.
*Führen Sie regelmäßig Updates durch
*Führen Sie regelmäßig Updates durch
Zeile 23: Zeile 24:
:Die Verwendung von "schwierigen" Passwörtern ist die beste Maßnahme gegen das Knacken von Nutzerkonten ("brute force" Attacken).
:Die Verwendung von "schwierigen" Passwörtern ist die beste Maßnahme gegen das Knacken von Nutzerkonten ("brute force" Attacken).
*Vergeben Sie die [[Trainer-Rolle]] nur an vertrauenswürdige Nutzer. Vermeiden Sie freie Trainer-Nutzerkonten auf produktiven Moodle-Servern.
*Vergeben Sie die [[Trainer-Rolle]] nur an vertrauenswürdige Nutzer. Vermeiden Sie freie Trainer-Nutzerkonten auf produktiven Moodle-Servern.
:Teacher accounts have much freer permissions and it is easier to create situations where data can be abused or stolen.
:Nutzer in der [[Trainer-Rolle]] haben weitreichende [[Rollen und Rechte|Rechte]], so dass hier viel schneller Situationen entstehen können, die zum Missbrauch von Daten führen.
*Separate your systems as much as possible
*Separieren Sie Ihr System so weit wie möglich von anderen Systemen und Anwendungen.
:Another basic security technique is to use different passwords on different systems, use different machines for different services and so on.  This will prevent damage being widespread even if one account or one server is compromised.
:Eine grundlegende Sicherheitsvorkehrung ist die Verwendung von verschiedenen Passwörtern auf verschiedenen Systemen und die Nutzung von verschiedenen Rechnern für verschiedene Anwendungen und Dienste. Dadurch verhindern Sie die Ausbreitung des Schadens im Fall, dass ein System oder Nutzerkonto kompromittiert wurde.


==Run regular updates==
==Regelmäßige Aktualisierungen durchführen==
*Use auto update systems
*Verwenden Sie automatische Update-Systeme.
*Windows Update  
*Windows Update  
*Linux: up2date, yum, apt-get
*Linux: up2date, yum, apt-get
:Consider automating updates with a script scheduled via cron
:Eine Möglichkeit ist die Durchführung automatischer Aktualisierungen per Skript und Cron-Job.
*Mac OSX update system
*Mac OSX Update-System
*Stay current with php, apache, and moodle
*Verwenden Sie aktuelle Versionen von [[PHP]], [[Apache]], [[MySQL]] und Moodle.


==Use mailing lists to stay updated==
==Mailinglisten verwenden==
Nutzen Sie Mailinglisten, um auf aktuellem Stand zu bleiben:
*CERT - http://www.us-cert.gov/cas/signup.html
*CERT - http://www.us-cert.gov/cas/signup.html
*PHP - http://www.php.net/mailing-lists.php - sign up for Announcements list
*PHP - http://www.php.net/mailing-lists.php - abonnieren Sie die PHP Announcements  
*MySQL - http://lists.mysql.com - sign up for MySQL Announcements
*MySQL - http://lists.mysql.com - abonnieren Sie die MySQL Announcements


==Firewalls==
==Firewall==
*Security experts recommend a dual firewall
*Sicherheitsexperten empfehlen eine duale Firewall.
:Differing hardware/software combinations
:Unterschiedliche Hardware- und Software-Kombinationen
*Disabling unused services is often as effective as a firewall
*Das Deaktivieren von Diensten, die nicht benötigt werden, ist häufig genau so effektiv wie eine Firewall.
:Use netstat -a to review open network ports
:Verwenden Sie den Befehl<code>netstat -a</code>, um offene Ports zu prüfen.
*Not a guarantee of protection
*Eine Firewall allein bietet keine Garantie auf Schutz!
*Allow ports
*Erlaubte Ports
:80, 443(ssl), and 9111 (for chat),  
:80, 443(ssl) und 9111 (für Chat),  
:Remote admin: ssh 22, or rdp 3389
:Remote admin: ssh 22 oder rdp 3389


==Password policy==
==Passwort-Policy==


{{Moodle 1.9}}In Moodle 1.9 onwards, a password policy may be set up via ''Administration > Security > [[Site policies]]''.
{{Moodle 1.9}}Ab Moodle 1.9 können Sie unter ''Website-Administration > Sicherheit > [[Website-Rechte]]'' Kennwortregeln festlegen.  


There is a check box to determine if password complexity should be enforced or not, the option to set the minimum length of the password, the minimum number of digits, the minimum number of lowercase characters, the minimum number of uppercase characters and the minimum number of non alphanumeric characters.
There is a check box to determine if password complexity should be enforced or not, the option to set the minimum length of the password, the minimum number of digits, the minimum number of lowercase characters, the minimum number of uppercase characters and the minimum number of non alphanumeric characters.

Version vom 11. Mai 2009, 19:08 Uhr

Baustelle.png Diese Seite ist noch nicht vollständig übersetzt.

Siehe en:Security

Jede Webapplikationssoftware ist hochkomplex, und jede Software kann Sicherheitslücken aufweisen. Das Entwickler-Team von Moodle nimmt Sicherheitsfragen sehr ernst und bemüht sich, Sicherheitslücken schnellstmöglich zu schließen.

Einleitung

  • Dieser Artikel enthält wichtige Sicherheitshinweise für Ihre Moodle-Installation.
  • Sicherheitsprobleme sollten Sie im Moodle tracker melden und als "Security issue" kennzeichnen, damit die Entwickler es schnell beheben können und registrierte Moodle-Administratoren entsprechend informieren können.
  • Sie sollten keine Exploits in Foren auf moodle.org oder sonstwo im Web posten, um Moodle-Administratoren bzw. deren Installationen zu schützen, die nicht rechtzeitig aktualisiert haben bzw. wurden.

Einfache Sicherheitsmaßnahmen

  • Die beste Sicherheitsstrategie ist ein gutes Backup.
Wichtig: Ein Backup ist erst dann "gut", wenn Sie es wiederherstellen können. Testen Sie also, ob Sie die Sicherung Ihrer Moodle-Installation auch wiederherstellen können!
  • Installieren Sie nur Software, die Sie auch wirklich benötigen und nutzen.
  • Führen Sie regelmäßig Updates durch
  • Kümmern Sie sich um die Sicherheit auf verschiedenen Ebenen (Betriebssystem/Server, Webserver, Datenbankserver, Moodle).

Grundlegende Empfehlungen

  • Aktualisieren Sie Ihre Moodle-Installation regelmäßig und verwenden Sie möglichst immer die aktuellste Version.
Veröffentlichte Sicherheitslücken ziehen die Aufmerksamkeit von Hackern auf sich! Je älter Ihre Moodle-Version ist, um so mehr Schwachstellen kann sie enthalten.
Das hilft, XSS-Probleme durch Skripte von Dritten zu vermeiden.
  • Verwenden Sie starke Passwörter!
Die Verwendung von "schwierigen" Passwörtern ist die beste Maßnahme gegen das Knacken von Nutzerkonten ("brute force" Attacken).
  • Vergeben Sie die Trainer-Rolle nur an vertrauenswürdige Nutzer. Vermeiden Sie freie Trainer-Nutzerkonten auf produktiven Moodle-Servern.
Nutzer in der Trainer-Rolle haben weitreichende Rechte, so dass hier viel schneller Situationen entstehen können, die zum Missbrauch von Daten führen.
  • Separieren Sie Ihr System so weit wie möglich von anderen Systemen und Anwendungen.
Eine grundlegende Sicherheitsvorkehrung ist die Verwendung von verschiedenen Passwörtern auf verschiedenen Systemen und die Nutzung von verschiedenen Rechnern für verschiedene Anwendungen und Dienste. Dadurch verhindern Sie die Ausbreitung des Schadens im Fall, dass ein System oder Nutzerkonto kompromittiert wurde.

Regelmäßige Aktualisierungen durchführen

  • Verwenden Sie automatische Update-Systeme.
  • Windows Update
  • Linux: up2date, yum, apt-get
Eine Möglichkeit ist die Durchführung automatischer Aktualisierungen per Skript und Cron-Job.
  • Mac OSX Update-System
  • Verwenden Sie aktuelle Versionen von PHP, Apache, MySQL und Moodle.

Mailinglisten verwenden

Nutzen Sie Mailinglisten, um auf aktuellem Stand zu bleiben:

Firewall

  • Sicherheitsexperten empfehlen eine duale Firewall.
Unterschiedliche Hardware- und Software-Kombinationen
  • Das Deaktivieren von Diensten, die nicht benötigt werden, ist häufig genau so effektiv wie eine Firewall.
Verwenden Sie den Befehlnetstat -a, um offene Ports zu prüfen.
  • Eine Firewall allein bietet keine Garantie auf Schutz!
  • Erlaubte Ports
80, 443(ssl) und 9111 (für Chat),
Remote admin: ssh 22 oder rdp 3389

Passwort-Policy

Moodle1.9 Ab Moodle 1.9 können Sie unter Website-Administration > Sicherheit > Website-Rechte Kennwortregeln festlegen.

There is a check box to determine if password complexity should be enforced or not, the option to set the minimum length of the password, the minimum number of digits, the minimum number of lowercase characters, the minimum number of uppercase characters and the minimum number of non alphanumeric characters.

If a user enters a password that does not meet those requirements, they are given an error message indicating the nature of the problem with the entered password.

Enforcing password complexity along with requiring users to change their initial password go a long way in helping ensure that users choose and are in fact using "good passwords".

Be prepared for the worst

Moodle security alerts

  • Register your site with Moodle.org
Registered users receive email alerts

Miscellaneous considerations

These are all things you might consider that impact your overall security:

  • Use the secure forms setting
  • Set the mysql root user password
  • Turn off mysql network access
  • Use SSL, httpslogins=yes
  • Use good passwords - set up a password policy in Administration > Security > Site policies (in Moodle 1.9 onwards)
  • Do not enable the opentogoogle setting (in Administration > Security > Site policies)
  • Disable guest access by hiding the guest login button (in Administration > Users > Authentication)
  • Place enrollment keys on all courses
  • Disable the enrolment key hint in the Internal enrolment settings (via Administration > Courses > Enrolments) (in Moodle 1.9.3 onwards) or remove it by editing the enrolmentkeyhint string in moodle.php (via Administration > Language > Language editing) and changing
That enrolment key was incorrect, please try again. (Here's a hint - it starts with '$a')
to
That enrolment key was incorrect, please try again. Contact your instructor if you need assistance.

Most secure/paranoid file permissions

Note: The following information applies to Linux/Unix based installations only, as MS Windows permission system is quite different.

Depending on your server setup there are two different scenarios:

  1. You are running Moodle on your own dedicated server.
  2. You are running Moodle on a shared hosting environment.

In the sections below, you are required to use the web service user account and group to set the permissions, so you need to know them. This can vary quite a bit from server to server but if this feature has not been disabled in your server, you can go to http://your.moodle.site/admin/phpinfo.php (logging in as admin), and then search for the line that reads 'User/Group', inside the 'apache' table. For example, I get 'www-data' for the user account and 'www-data' for the group too.

Running Moodle on a dedicated server

Assuming you are running Moodle on a sealed server (i.e. no user logins allowed on the machine) and that root takes care of the modifications to both moodle code and moodle config (config.php), then this are the most tight permissions I can think of:

1. moodledata directory and all of its contents (and subdirectories, includes sessions):

owner: apache user (apache, httpd, www-data, whatever; see above)
group: apache group (apache, httpd, www-data, whatever; see above)
permissions: 700 on directories, 600 on files

2. moodle directory and all of its contents and subdirectories (including config.php):

owner: root
group: root
permissions: 755 on directories, 644 on files.

If you allow local logins for regular users, then 2. should be:

owner: root
group: apache group (apache, httpd, www-data, whatever; see above)
permissions: 750 on directories, 640 on files.

Think of these permissions as the most paranoid ones. You can be secure enough with less tighter permissions, both in moodledata and moodle directories (and subdirectories).

Running Moodle on a shared hosting environment

If you are running Moodle on a shared hosting environment, then above permissions are probably wrong. If you set 700 as the permission for directories (and 600 for files), you are probably denying the web service user account access to your directories and files.

If you want to tighten your permissions as much as possible, you will need to know:

  1. the user account and the group the web service is running under (see above).
  2. the owner of the directories/files of both moodledata and the moodle directory (this should normally be your client user account), and the group of the directories/files. You can usually get this information from the file manager of your hosting control panel. Go to the moodle folder and pick any directory or file and try to view/change the permissions, owner and group of that file. That would normally show the current permissions, owner and group. Do the same for the moodledata directory.

Then, depending on the following scenarios you should use a different set of permissions (listed from more secure to less secure) for your moodledata directory:

  1. if the web service account and the owner of the directories/files is the same, you should use 700 for directories and 600 for files.
  2. if the web service group and the group of the directories/files is the same, you should use 770 for directories and 660 for the files.
  3. if none of the above, you will need to use 777 for directories and 666 for files, which is less secure but it is your only option. 707 and 606 would be more secure, but it might or might not work, depending on your particular setup.

In fact, you just need to set moodledata the permissions specified above, as all the directories and files inside are created by the web service itself, and will have the right permissions.

Regarding the moodle directory, as long as the web service user account can read the files plus read and execute the directories, that should be enough. There is no need to grant write permission to the web service account/group on any of the files or subdirectories. The only drawback is that you will need to create the config.php by hand during the installation process, as Moodle will not be able to create it. But that should not be a big problem.

Siehe auch

Diskussionsbeiträge im Kurs Using Moodle auf moodle.org: