SORMAS-Foundation / SORMAS-Project

SORMAS (Surveillance, Outbreak Response Management and Analysis System) is an early warning and management system to fight the spread of infectious diseases.
https://sormas.org
GNU General Public License v3.0
293 stars 143 forks source link

Run OWASP Zed Attack Proxy #1022

Closed MartinWahnschaffe closed 5 years ago

MartinWahnschaffe commented 5 years ago

https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project

For apache config:

MartinWahnschaffe commented 5 years ago

Result from securityheaders.com (for sormas.symeda.de): A

Missing Headers:

For pentest.sormas.org some settings seem to be missing. This need to be added to the server setup documentation:

    Header always set X-Content-Type-Options "nosniff"
    Header always set X-Xss-Protection "1; mode=block"
    # Disable Caching
    Header always set Cache-Control "no-cache, no-store, must-revalidate, private"
    Header always set Pragma "no-cache"

    # The Content-Type header was either missing or empty.
    # Ensure each page is setting the specific and appropriate content-type value for the content being delivered.
    AddType application/vnd.ms-fontobject    .eot
    AddType application/x-font-opentype      .otf
    AddType image/svg+xml                    .svg
    AddType application/x-font-ttf           .ttf
    AddType application/font-woff            .woff

For the apache 2 security configuration we suggest the following settings (/etc/apache2/conf-available/security.conf)

  ServerTokens Prod
  ServerSignature Off
  TraceEnable Off

  Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
  Header unset X-Frame-Options
  Header always set X-Frame-Options SAMEORIGIN
  Header unset Referrer-Policy
  Header always set Referrer-Policy "same-origin"
  Header edit Set-Cookie "(?i)^((?:(?!;\s?HttpOnly).)+)$" "$1;HttpOnly"
  Header edit Set-Cookie "(?i)^((?:(?!;\s?Secure).)+)$" "$1;Secure"

  Header unset X-Powered-By
  Header unset Server
MartinWahnschaffe commented 5 years ago

Result from ssllabs.com: B

This server does not support Forward Secrecy with the reference browsers. Grade capped to B. https://blog.qualys.com/ssllabs/2018/02/02/forward-secrecy-authenticated-encryption-and-robot-grading-update?_ga=2.60741165.1050650309.1554125869-1803043229.1553519303

MartinWahnschaffe commented 5 years ago

Fix configuration on servers

MartinWahnschaffe commented 5 years ago

See also #1218