Nowadays, operating systems are rarely attacked directly, because the current firewalls are too good, but through applications, the more (web) servers are attacked. Frequent gateways are e. g. badly maintained WordPress installations (if you don't have someone who checks daily if there are security relevant updates and installs them immediately, … or not updated PHP versions - please note that you are only allowed to connect systems that are maintained (by the manufacturer and you) to the network of the TU Graz and that we take badly maintained systems after warning and already hacked systems immediately offline.
Even though it is actually "security through obscurity", it is still recommended not to reveal e. g. the version of the web server etc., here illustrated by the example of Apache:
RequestHeader unset Proxy
RequestHeader unset Proxy_Host
RequestHeader unset Proxy_Port
RequestHeader unset Proxy_User
RequestHeader unset Proxy_Pass
RequestHeader unset Proxy_Password
ServerTokens ProductOnly
ServerSignature Off
TraceEnable Off
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
However, encryption alone is not enough, it has to be trusted state of the art encryption and for that several things are necessary, including an official certificate and some important settings on the web server:
geant.crt is only needed if it is
not contained in
NAME.crt.
With the following settings, however, you must check whether everything then still works (e. g. frames, SSI, external content, etc.) and otherwise comment out individual lines:
An alternative could also look like this, for example:
The "pinning" itself is actually quite simple.
Under Can
I Use… (→ Show all) you can check which clients you lock out
if you no longer support certain versions of SSL/TLS.
You can simplify this - if you have a lot of virtual servers - by creating
e. g. 2 files tls.conf and
hardening.conf and then simply include
them in each virtual server:
Due to a bug in OpenSSL it is currently
not possible to define different cipher suites in name based
virtual servers, the first cipher suite in the config file is always used!
STIGs
(DISA /
(DoD).
Header-Checks Security Headers, SSL Labs (Qualys),
ImmuniWeb.
In addition to the requirement that the web server should be set up
as securely as possible (a task that needs to be done on an ongoing basis,
vulnerabilities are discovered all the time and then need to be closed), it
is of course also important to make sure that the applications are implemented
securely.
Every new application should be checked against these vulnerabilities.
If you are not sure, then call www.ssllabs.com,
enter your web server there and then look what is written in the line
"Signature algorithm" - if SHA1 is written there, you must
request a new certificate! You can get the necessary CSR e. g. by the
command
All in all, you should try to achieve at least an "A" at the above SSL
Labs, an "A+" is desirable.
Further settings can be found e. g. on cipherli.st, but you should
check that your users are not locked out by this.
SSLEngine on
SSLProtocol -all +TLSv1.3 +TLSv1.2
SSLCipherSuite 'EECDH+AESGCM:EDH+AESGCM'
SSLHonorCipherOrder on
<VirtualHost *:80>
ServerName NAME.tugraz.at
Redirect permanent / https://NAME.tugraz.at/
</VirtualHost>
<VirtualHost NAME.tugraz.at:443>
ServerName NAME.tugraz.at
SSLCACertificateFile /pfad/zu/den/certs/geant.crt
SSLCertificateFile /pfad/zu/den/certs/NAME.crt
SSLCertificateKeyFile /pfad/zu/den/certs/NAME.key
…
</VirtualHost>
CSP
OCSP stapling
Outside the <VirtualHost></VirtualHost> blocks:
HPKP
You should think very carefully about which servers you use pinning for, since it actually only helps if someone manages to get a false certificate for our domain from another CA (currently Sectigo in our case) in order to carry out a man-in-the-middle attack against TU Graz. If the configuration is incorrect (or if the CA changes), this can lead to clients that support this no longer connecting to the server.
Refer(r)er-Policy
You can and should define when the "Referer header" is set - example:
Header always set Referrer-Policy same-origin
Feature Policy
With this new header you can define more much, e. g.
Header always set Feature-Policy "geolocation 'self'"
More Information
BetterCrypto.org,
Geek Flare,
Mozilla,
SSL-Config-Generator,
Sysinfo.io,
…
Hints
<VirtualHost NAME.tugraz.at:443>
ServerName NAME.tugraz.at
Include conf/tls.conf
SSLCACertificateFile /pfad/zu/den/certs/geant.crt
SSLCertificateFile /pfad/zu/den/certs/NAME.crt
SSLCertificateKeyFile /pfad/zu/den/certs/NAME.key
Include hardening.conf
…
</VirtualHost>
Further Information
CIS Benchmarks.
Apache Security Hardening Guide.
Secure Applications
The OWASP
maintains 2 lists for the most exploited vulnerabilities: