security.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <html lang="en">
  2. <head>
  3. <meta charset="utf-8" />
  4. <title>Chamilo Security Guide</title>
  5. <link rel="stylesheet" href="../web/assets/bootstrap/dist/css/bootstrap.css" type="text/css" media="screen,projection" />
  6. <link rel="stylesheet" href="default.css" type="text/css" media="screen,projection" />
  7. <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
  8. </head>
  9. <body>
  10. <div class="container">
  11. <h1>Chamilo LMS: Security Guide</h1>
  12. <a href="index.html">Documentation</a> &gt; Security Guide
  13. <p>We recommend you don't take security issues too lightly. Chamilo is security-audited at least once a year,
  14. but you're never too sure. This list is a work in progress. Feel free to recommend additional measures by
  15. sending us an e-mail at info@chamilo.org.</p>
  16. <h2><b>Contents</b></h2>
  17. <ol>
  18. <li><a href="#1.Disclosing-server-info">Disclosing server info</a></li>
  19. <li><a href="#2.Keeping-up-to-date">Keeping up to date</a></li>
  20. <li><a href="#3.Using-safe-browsers">Using safe browsers</a></li>
  21. <li><a href="#4.Moving-config-file">Moving your configuration file out of the web directory</a></li>
  22. <li><a href="#5.Files-permissions">Restricting files permissions</a></li>
  23. <li><a href="#6.HSTS">HTTP Headers Security</a></li>
  24. </ol>
  25. <h2><a name="1.Disclosing-server-info"></a>1. Disclosing server info</h2>
  26. <p>
  27. It is considered a safer behaviour not to disclose server information from your Chamilo page. In order to avoid
  28. both web server and PHP information disclosure, you might want to take the following actions:
  29. </p>
  30. <ul>
  31. <li>Locate the <i>ServerTokens</i> setting inside your Apache configuration and set it to "Prod"</li>
  32. <li>Locate the <i>ServerSignature</i> setting inside your Apache configuration and set it to "Off"</li>
  33. <li>Locate the <i>expose_php</i> setting inside your PHP configuration and set it to "Off"</li>
  34. <li>Reload Apache</li>
  35. </ul>
  36. <h2><a name="2.Keeping-up-to-date"></a>2. Keeping up to date</h2>
  37. <p>
  38. Make sure you check <a href="http://support.chamilo.org/projects/chamilo-18/wiki/Security_issues">our security
  39. issues page</a> from time to time.
  40. Subscribe to our free security alerts mailing-list:
  41. <a href="http://lists.chamilo.org/listinfo/security">http://lists.chamilo.org/listinfo/security</a> or that you
  42. follow our security Twitter feed: <a href="http://twitter.com/chamilosecurity">http://twitter.com/chamilosecurity</a>.
  43. </p>
  44. <h2><a name="3.Using-safe-browsers"></a>3. Using safe browsers</h2>
  45. <p> Additionally to lacking the implementation of features that really improve the quality of your browsing the
  46. Internet, older browsers tend to have many unresolved security flaws. Using an old browser, you put in danger the
  47. security of your computer and the data it contains, but you can also put others in danger by letting crackers take
  48. control of it and attacking others.</p>
  49. <p>To avoid being a risk to yourself and others, you should download and install a recent browser. We recommend
  50. <a href="http://www.getfirefox.com" target="_blank">the latest stable version of Firefox</a>.</p>
  51. <h2><a name="4.Moving-config-file"></a>4. Moving your configuration file out of the web directory</h2>
  52. <p>It is considered unsafe to leave the configuration file inside the app/config/ directory, as it will be directly
  53. accessible for all users, which could lead crackers to download it, uninterpreted, and read through your
  54. configuration, which could lead to illicit
  55. access to your database if that one isn't well protected and many other stuff we'd prefer to avoid. To secure it,
  56. move the configuration file out of your web directory. If your Chamilo installation is in /var/www/, move your
  57. configuration to /etc/chamilo/configuration.php, for example. Then create a new app/config/configuration.php
  58. file, open it, and write the following:</p>
  59. <pre>
  60. &lt;?php
  61. require '/etc/chamilo/configuration.php';
  62. </pre>
  63. <p>
  64. This will prevent direct access to your settings and make it seem totally the same to Chamilo.
  65. </p>
  66. <h2><a name="5.Files-permissions"></a>5. Restricting files permissions</h2>
  67. <p>Making all the Chamilo files world-writable will help you install quickly, and it solves many
  68. issues for people without much admin experience. However, it's more
  69. secure to make a distinct user owner of all the chamilo files and folders,
  70. and only give read access to the web server to all files, and write access
  71. only to the directories previously mentioned.</p>
  72. <p>This way, these files need
  73. only be readable and writable by the Apache process owner, not by the
  74. entire world. It would also be advisable to make all writable directory
  75. refuse the interpretation of PHP files (except for the root of the courses
  76. directories).</p>
  77. <p>Don't hesitate to hire an experienced administrator to do that,
  78. it might be a bit more expensive now, but you'll be happy not to have to loose
  79. all of your data to a hacker who attacked your site.</p>
  80. <hr />
  81. <h2><a name="6.HSTS">HTTP Headers Security</a></h2>
  82. <p>A relatively recent development in web security, HTTP headers can be modified either
  83. from the web server or from the application (like Chamilo) to increase the security
  84. of your visitors.</p>
  85. <p>These implies several aspects, from simple to complex, to deal with, from stuff like
  86. indicating which websites you say media or libraries can be loaded from, to adding
  87. extra info about your SSL certificate to make sure a hacked certification authority
  88. will not immediately make your certificate useless.</p>
  89. <p>In Chamilo 1.11.6, we have added several parameters, together with recommendations,
  90. to main/install/configuration.dist.php, that you are free to use or ignore,
  91. depending on the level of security you want to achieve.</p>>
  92. <p>To check your portal for possible improvements in terms of headers security,
  93. we highly recommend the <a href="https://securityheaders.io/">securityheaders.io</a>
  94. website. If you want to read more about CSP and all related headers
  95. security techniques, check <a href="https://scotthelme.co.uk/">Scott Helme's blog</a>.
  96. <h2>Authors</h2>
  97. <ul>
  98. <li>Yannick Warnier, Zend Certified PHP Engineer, BeezNest Belgium SPRL,
  99. <a href="mailto:yannick.warnier@beeznest.com">yannick.warnier@beeznest.com</a></li>
  100. </ul>
  101. </div>
  102. </body>
  103. </html>