Wie man TLS-Hipster wird
-
Upload
sba-research -
Category
Technology
-
view
792 -
download
0
Transcript of Wie man TLS-Hipster wird
WIE MAN TLS-HIPSTER WIRD
Oder: Wie Sie Ihre SSL/TLS-Landschaft endlich in den Griff bekommen
Agenda
Gratis-Zertifikate
Starke Ciphers inkl.Kompatibilität
HSTS / OCSP Stapling
Certificate Pinning
Bildquelle: https://www.wired.de/sites/default/files/hipster_hero.jpg
Für wen ist dieser Vortrag?
• CISOs• CTOs• Techniker
o Konfigurationsbeispiele für Linux / Apache
© 2016 – SBA Research gGmbH
GRATIS-ZERTIFIKATE
Der Zwirbelbart für den TLS-Hipster
© 2016 – SBA Research gGmbH
Let‘s Encrypt, Guys!
• Gratis-Zertifikate für alle• Domain Verification ist automatisiert (ACME)• Prozess muss automatisiert werden!
https://letsencrypt.org/
Domain Validation
• Gewöhnlicho Signing Request hochladeno E-Mail an [email protected] Admin muss E-Mail-Empfang bestätigen
© 2016 – SBA Research gGmbH
Domain Validation: Let‘s Encrypt (ACME)
1.)
2.)
© 2016 – SBA Research gGmbHBildquelle: https://letsencrypt.org
Der Let‘s-Encrypt-Standard-Agent
© 2016 – SBA Research gGmbHBildquelle: https://letsencrypt.org
Der Let‘s-Encrypt-Standard-Agent
© 2016 – SBA Research gGmbHBildquelle: https://letsencrypt.org
Alternative: acmetool
• Open Source• Schlanker• Einfachere Handhabung• Mehr Features
© 2016 – SBA Research gGmbH
acmetool vs. Let‘s-Encrypt-Agent
acmetool letsencrypt lego gethttpsforfreeAutomatic renewal Yes Not yet No NoSingle-file binary Yes No Yes YesQuickstart wizard Yes Yes No NoModifies webserver config No By default No NoSupports any web server Yes Webroot‡ — —Authorization via port 80 redirector Yes No No NoWindows integration support No No No —
© 2016 – SBA Research gGmbHQuelle: https://github.com/hlandau/acme
acmetool vs. Let‘s-Encrypt-Agent
acmetool letsencrypt lego gethttpsforfreeAutomatic renewal Yes Not yet No NoSingle-file binary Yes No Yes YesQuickstart wizard Yes Yes No NoModifies webserver config No By default No NoSupports any web server Yes Webroot‡ — —Authorization via port 80 redirector Yes No No NoWindows integration support No No No —
© 2016 – SBA Research gGmbHQuelle: https://github.com/hlandau/acme
acmetool vs. Let‘s-Encrypt-Agent
© 2016 – SBA Research gGmbHQuelle: https://github.com/hlandau/acme
Go!
© 2016 – SBA Research gGmbH
Bildquelle: http://i.telegraph.co.uk/multimedia/archive/03046/hipster-tash_3046941b.jpg
acmetool: Installation
$ sudo add-apt-repository ppa:hlandau/rhea$ sudo apt-get update$ sudo apt-get install acmetool
© 2016 – SBA Research gGmbH
acmetool: Proxy-Modus
• Schleift Requests auf /.well-known/acme-challenge/ zu ACME-Agent auf Webserver durch
• Wenn Schreibzugriff im Webroot nicht möglicho ASP.NET MVCo Python Djangoo PHP Symfony
• Proxy-Modus davon unabhängig!
© 2016 – SBA Research gGmbH
acmetool: Proxy-Modus
<IfModule mod_proxy.c> ProxyPass "/.well-known/acme-challenge/“ http://127.0.0.1:402/.well-known/acme-challenge/ retry=1 ProxyPassReverse "/.well-known/acme-challenge/“ "http://127.0.0.1:402/.well-known/acme-challenge/" [...]</IfModule>
© 2016 – SBA Research gGmbH
acmettol: Zertifikat holen
$ acmetool want example.com www.example.com
© 2016 – SBA Research gGmbH
acmetool: Zertifikat installieren
<VirtualHost *:443> ServerName meinedomain.com # [...]
SSLCertificateFile /var/lib/acme/live/example.com/cert SSLCertificateKeyFile /var/lib/acme/live/example.com/privkey SSLCertificateChainFile /var/lib/acme/live/example.com/chain</VirtualHost>
© 2016 – SBA Research gGmbH
acmetool: Automatische Erneuerung
root@server:/etc/cron.d# cat acmetool[...]42 12 * * * root /usr/bin/acmetool --batch reconcile
© 2016 – SBA Research gGmbH
Let‘s Encrypt im professionellen Umfeld?
• Nachteileo Kein kommerzieller Supporto Keine EV-, OV- und Wildcard-Zertifikateo Derzeit noch in Beta!o Funktioniert nicht bei TLS Offloading (FW-Support?)
• Wer kann es dennoch verwenden?o Organisationen für Nebenseiten, die noch kein TLS habeno Startupso Privatpersonen
© 2016 – SBA Research gGmbH
Agenda
Gratis-Zertifikate
Starke Ciphers inkl.Kompatibilität
HSTS / OCSP Stapling
Certificate Pinning
Bildquelle: https://www.wired.de/sites/default/files/hipster_hero.jpg
STARKE CIPHERS
Ohne Verlust der Kompatibilität
© 2016 – SBA Research gGmbH
Starke Ciphers
© 2016 – SBA Research gGmbH
• Pentest: Schwache Ciphers• Aussage: „Kompatibilitätsgründe“• Oft Ausrede!
Starke CiphersSSLProtocol all -SSLv2 -SSLv3SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHASSLHonorCipherOrder onSSLCompression off
© 2016 – SBA Research gGmbH
Starke Ciphers: Kompatibilität
• IE 7 / Vista +• Android 2.3.7 +• Firefox, Chrome, Opera, Safari• Java 7+
• IE 6 / XP (Cipher)• Nicht-Webbrowser (z.B. Java 6)
© 2016 – SBA Research gGmbH
Starke Ciphers: Sicherheit
© 2016 – SBA Research gGmbH
Agenda
Gratis-Zertifikate
Starke Ciphers inkl.Kompatibilität
HSTS / OCSP Stapling
Certificate Pinning
Bildquelle: https://www.wired.de/sites/default/files/hipster_hero.jpg
HSTS UND OCSP STAPLING
Das muss man einfach haben!
© 2016 – SBA Research gGmbH
HTTP Strict Transport Security
• Spricht da was dagegen?
Header always set Strict-Transport-Security "max-age=31536000;"
© 2016 – SBA Research gGmbH
OCSP Stapling
© 2016 – SBA Research gGmbH
Bildquelle: https://blog.pki.dfn.de/wp-content/uploads/2015/02/ocsp_stapling_angewandt.png
OCSP Stapling: Wie?
• In apache.conf: SSLStaplingCache shmcb:/tmp/stapling_cache(128000)
• In my-vhost.conf: SSLCACertificateFile /etc/ssl/ca-certs.pem SSLUseStapling on
• Das war‘s!
© 2016 – SBA Research gGmbH
Secure-Cookies, und zwar immer!
# Always ensure Cookies have "Secure" set (JAH 2012/1)Header edit Set-Cookie (?i)^(.*)(;\s*secure)??((\s*;)?(.*)) "$1; Secure$3$4"
© 2016 – SBA Research gGmbH
Agenda
Gratis-Zertifikate
Starke Ciphers inkl.Kompatibilität
HSTS / OCSP Stapling
Certificate Pinning
Bildquelle: https://www.wired.de/sites/default/files/hipster_hero.jpg
HTTP PUBLIC KEY PINNING
Und warum nicht jedem Hipster ein HPKP-Mascherl steht
© 2016 – SBA Research gGmbH
HTTP Public Key Pinning
• Ebenfalls HTTP-Header zum Schutz gegen MitM• Problem: Vertrauensbeziehungen bei SSL-Zertifikaten
o Jeder CA wird für jede Domäne vertrauto Hat Angreifer eine CA
unter Kontrolle, kanner gültige Zertifikate füralle Domänen ausstellen
o Hacker? Geheimdienste?CA selbst?
© 2016 – SBA Research gGmbH
HPKP-Konfiguration
Header always set Public-Key-Pins-Report-Only "max-age=31536000; pin-sha256=\"YLh1dUR9y6Kja30RrAn7JKnbQG/uEtLMkBgFF2Fuihg=\"; pin-sha256=\"h6801m+z8v3zbgkRHpq6L29Esgfzhj89C1SyUCOQmqU=\"; report-uri=\"https://report-uri.io/report/[ID]/reportOnly\""
© 2016 – SBA Research gGmbH
Intermediate CA von Let‘s Encrypt
Backup-CA (GeoTrust)
report-uri.io
© 2016 – SBA Research gGmbH
report-uri.io
2015- SBA Research gGmbH
Herausforderungen bei HPKP
• Leaf-Zertifikat pinnen schwierigo Kombination mit Let‘s Encrypt: Implementierung?o Zertifikatswechsel muss geplant werdeno Backup-Zertifikat
• CA pinnen ist einfachero Viel längere Gültigkeito Besser als nichts! (400:2)o Dennoch: Backup-CA!
• Report-Only geht immer!
2015- SBA Research gGmbH
Agenda
Gratis-Zertifikate
Starke Ciphers inkl.Kompatibilität
HSTS / OCSP Stapling
Certificate Pinning
Bildquelle: https://www.wired.de/sites/default/files/hipster_hero.jpg
UND WAS IST MIT WINDOWS?
Wie man IIS hipper macht
© 2016 – SBA Research gGmbH
IIS-TLS-Hipster?
• Let‘s Encrypto letsencrypt-win-simple, Certify (ACMESharp)
• Starke Cipherso Gleiche Regeln, IIS Crypto (GUI-Tool) [1]
© 2016 – SBA Research gGmbH
IIS-TLS-Hipster?
• HSTS / OCSP Staplingo Header setzen / Offizielle Anleitung von Microsoft [1]
• HPKPo Ist ebenfalls nur ein Header
© 2016 – SBA Research gGmbH
ZUSAMMENFASSUNG
Kann jeder TLS-Hipster werden?
© 2016 – SBA Research gGmbH
Zusammenfassung
Gratis-ZertifikateZertifikate müsse nicht kosten!
Bedenken im prof. Umfeld
Starke Ciphers inkl.Kompatibilität
Fast immer möglich!
HSTS / OCSP StaplingDas muss man haben!
Certificate PinningEs muss ja nicht das Leaf-Zert. seinRoot-CA: 400 versus 2Report-Only geht immer!
Bildquelle: https://www.wired.de/sites/default/files/hipster_hero.jpg
Danke!Thomas KonradSBA Research gGmbHFavoritenstraße 16, 1040 Wien+43 1 505 368 815 [email protected]