SlideShare uma empresa Scribd logo
1 de 19
Baixar para ler offline
TLS AND CERTIFICATES
IF YOU THINK THEY ARE EASY,
YOU ARE (PROBABLY) DOING THEM WRONG
Karri Huhtanen, Radiator Software Oy
Doing TLS is easy, right?
>>> import httplib
>>> conn = httplib.HTTPSConnection("www.python.org")
>>> conn.request("GET", "/")
>>> r1 = conn.getresponse()
>>> print r1.status, r1.reason
200 OK
NO
It is more complicated than that...
>>> import httplib
>>> conn = httplib.HTTPSConnection("www.python.org")
>>> conn.request("GET", "/")
>>> r1 = conn.getresponse()
>>> print r1.status, r1.reason
200 OK
Who is this www.python.org? What DNS are we
using? What is the IP of this www.python.org in
the DNS we are using? Do these match, do we
get exception if they don’t? Do we verify the
certificate? Who do we accept as certifiers for
the certificate? What is the allowed use of
certificate? What TLS/SSL version we are
using? What encryption? Do we have Perfect
Forward Secrecy? What are the other TLS
connection parameters? What wrapper,
TLS/SSL library we are using and what are their
defaults? ...
Making the connection...
class httplib.HTTPSConnection(host[, port[, key_file[, cert_file[, strict[, timeout[, source_address[, context]]]]]]])
A subclass of HTTPConnection that uses SSL for communication with secure servers. Default port is 443. If
context is specified, it must be a ssl.SSLContextinstance describing the various SSL options.
key_file and cert_file are deprecated, please use ssl.SSLContext.load_cert_chain() instead, or let
ssl.create_default_context() select the system’s trusted CA certificates for you.
Please read Security considerations for more information on best practices.
New in version 2.0.
Changed in version 2.6: timeout was added.
Changed in version 2.7: source_address was added.
Changed in version 2.7.9: context was added.
This class now performs all the necessary certificate and hostname checks by default. To revert to the previous,
unverified, behavior ssl._create_unverified_context() can be passed to the context parameter.
CVE-2014-9365 – HTTPS man-in-the-middle attack
against Python clients using default settings
Checking context...
ssl.create_default_context(purpose=Purpose.SERVER_AUTH, cafile=None, capath=None, cadata=None)
Return a new SSLContext object with default settings for the given purpose. The settings are chosen by the ssl module,
and usually represent a higher security level than when calling the SSLContext constructor directly.
cafile, capath, cadata represent optional CA certificates to trust for certificate verification, as in
SSLContext.load_verify_locations(). If all three are None, this function can choose to trust the system’s default CA
certificates instead.
The settings are: PROTOCOL_SSLv23, OP_NO_SSLv2, and OP_NO_SSLv3 with high encryption cipher suites without
RC4 and without unauthenticated cipher suites. Passing SERVER_AUTH as purpose sets verify_mode to
CERT_REQUIRED and either loads CA certificates (when at least one of cafile, capath or cadata is given) or uses
SSLContext.load_default_certs() to load default CA certificates.
Note The protocol, options, cipher and other settings may change to more restrictive values anytime without prior
deprecation. The values represent a fair balance between compatibility and security. If your application needs specific
settings, you should create a SSLContext and apply the settings yourself.
Who can be the certifier?
What TLS protocols are allowed?
To ensure consistent settings, DIY?
Purpose here is not the X.509 certificate
extended parameter purpose
This does not feel so difficult...
So I make my own context correctly, make the
connection, check the possible exceptions and
then it is no worries mate?
NO
So what is missing?
Certificate revocation check (against CRL)
SSLContext.verify_flags
The flags for certificate
verification operations. You
can set flags like
VERIFY_CRL_CHECK_LEAF
by ORing them together. By
default OpenSSL does
neither require nor verify
certificate revocation lists
(CRLs). Available only with
openssl version 0.9.8+.
#!/usr/bin/env python
import httplib
import ssl
context=ssl.create_default_context()
context.verify_flags=context.verify_flags|ssl.VERIFY_CRL_CHECK_CHAIN
conn = httplib.HTTPSConnection("www.python.org",context=context)
conn.request("GET", "/")
r1 = conn.getresponse()
print r1.status, r1.reason
The code works, I was able to see connection to crl servers, but soon the
CRL was cached by the OpenSSL and could not get a dump with contents
to see if anything was transferred.
Certificate revocation lists (CRL)
● Are retrieved and cached the first time a
request to check the certificate chain is made
● SSL library handles caching
● CRLs have LastUpdate and NextUpdate Fields
to control caching
● But what if first time CRL cannot be retrieved?
Case: Internet Explorer and Wi-Fi captive portals
● Internet Explorer users were complaining that getting to web
authentication page took too long. Other browser users were
fine.
● It was discovered that Internet Explorer wanted to check the
CRL of the captive portal WWW server and because it could
not get it, it waited until all of its tries timeouted.
● The solution was to define at least some of the CRL server
IPs as pass through addresses in the captive portal.
● When Internet Explorer was able to get and verify CRLs, the
delay vanished.
HTTPS is easy compared to other TLS services
● In most cases everybody just trusts all CA certificates in
browser or operating system certificate store.
● With HTTPS one usually has enough network connectivity to
retrieve CRLs or even use Online Certificate Status Protocol
(OCSP).
● DNS-IP Address-Certificate verification (and others even
better verifications) can be performed against used service.
● With other TLS services everything is not so straight forward.
Securing TLS services
● For VPN or network access accepting any CA signed
certificates is probably not a good idea.
● For email, instant messaging, software updates etc.
accepting any CA signed certificates will mean that at least
state actors can have access to your data and devices.
● The certifying CA, purpose of the certificate and checking
what it really verifies becomes increasingly important.
● Methods that help detecting service certificate changes
(certificate pinning) and verify certificates offline (OCSP
stapling) help to prevent MitM attacks.
Case: TLS VPN with certificate authentication
● PKI with Root CA and separate Intermediate CAs for People and
Servers
● VPN termination point misconfigured to trust Root CA verified
certificates, VPN clients misconfigured to trust Root CA
● Now Root, Servers and People CA signed client certificates can
authenticate successfully against VPN termination point, VPN
clients accept any certificates certified by previous CAs as VPN
termination point.
● This is made possible by not being careful in configuring CA
settings, hostname, certificate and certificate purpose checks.
Think about if we would in addition trust to any CA in system?
Case: WPA Enterprise Wi-Fi authentication
● Without IP connectivity terminal starts authentication process with
RADIUS server.
● Terminal is supposed to verify RADIUS server certificate and
certificate details (usually hostname) against certain CA certificate.
● Often these checks are bypassed, sometimes they are not even
configurable without creating and deploying separate device
management configuration profiles in devices.
● At least username and password hash are in danger to be
captured by anyone setting up Wi-Fi AP and RADIUS server with a
certificate and network name accepted by the client device.
● Once again certificate checks and configuration matter.
Securing WPA Enterprise Wi-Fi Authentication
● Certificate check and configuration, (forcing) device
profiles
● Switching from username-password to client
certificate, SIM or elliptic curves (EAP-PWD) based
authentication
● Using certificate pinning for RADIUS server certificate
● Using OCSP stapling [1]
[1] http://radiatorcookbook.open.com.au/2018/02/new-feature-ocsp-and-ocsp-stapling.html
Summary
● TLS and certificates are not easy. They require careful design,
implementation, testing, configuration and deployment.
● This presentation did not cover everything. It barely scratched PKI
and more advanced certificate verification.
● Hopefully this presentation raised more concern or interest in
ensuring that TLS and certificates are properly done in your
projects, services and systems.
● Doing everything properly needs understanding of the whole stack
(PKI, users, application/service, programming language, TLS
wrappers, TLS library, configurations and Internet/transport in
between service and terminal).
Thank you. Questions?
For more information:
Karri Huhtanen
Radiator Software Oy
https://radiatorsoftware.com/

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Implementing Cisco AAA
Implementing Cisco AAAImplementing Cisco AAA
Implementing Cisco AAA
 
AAA & RADIUS Protocols
AAA & RADIUS ProtocolsAAA & RADIUS Protocols
AAA & RADIUS Protocols
 
Kerberos part 1
Kerberos part 1Kerberos part 1
Kerberos part 1
 
Cisco acs configuration guide
Cisco acs configuration guideCisco acs configuration guide
Cisco acs configuration guide
 
RADIUS
RADIUSRADIUS
RADIUS
 
10215 A 14
10215 A 1410215 A 14
10215 A 14
 
The Future of PKI. Using automation tools and protocols to bootstrap trust in...
The Future of PKI. Using automation tools and protocols to bootstrap trust in...The Future of PKI. Using automation tools and protocols to bootstrap trust in...
The Future of PKI. Using automation tools and protocols to bootstrap trust in...
 
Kerberos presentation
Kerberos presentationKerberos presentation
Kerberos presentation
 
Kerberos case study
Kerberos case studyKerberos case study
Kerberos case study
 
SSO with kerberos
SSO with kerberosSSO with kerberos
SSO with kerberos
 
Deep Dive In To Kerberos
Deep Dive In To KerberosDeep Dive In To Kerberos
Deep Dive In To Kerberos
 
Authentication services
Authentication servicesAuthentication services
Authentication services
 
Kerberos protocol
Kerberos protocolKerberos protocol
Kerberos protocol
 
Kerberos
KerberosKerberos
Kerberos
 
An introduction to X.509 certificates
An introduction to X.509 certificatesAn introduction to X.509 certificates
An introduction to X.509 certificates
 
Kerberos explained
Kerberos explainedKerberos explained
Kerberos explained
 
Kerberos
KerberosKerberos
Kerberos
 
PIW ISE best practices
PIW ISE best practicesPIW ISE best practices
PIW ISE best practices
 
Kerberos
KerberosKerberos
Kerberos
 
Authentication Application in Network Security NS4
Authentication Application in Network Security NS4Authentication Application in Network Security NS4
Authentication Application in Network Security NS4
 

Semelhante a TLS and Certificates

Configuration of Self Signed SSL Certificate For CentOS 8
Configuration of Self Signed SSL Certificate For CentOS 8Configuration of Self Signed SSL Certificate For CentOS 8
Configuration of Self Signed SSL Certificate For CentOS 8Kaan Aslandağ
 
Training Slides: 302 - Securing Your Cluster With SSL
Training Slides: 302 - Securing Your Cluster With SSLTraining Slides: 302 - Securing Your Cluster With SSL
Training Slides: 302 - Securing Your Cluster With SSLContinuent
 
Demystfying secure certs
Demystfying secure certsDemystfying secure certs
Demystfying secure certsGary Williams
 
Hardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoiaHardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoiazznate
 
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).DataStax Academy
 
How to validate server certificate
How to validate server certificateHow to validate server certificate
How to validate server certificatecodeandyou forums
 
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoiaSeattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoiazznate
 
RIPE 84: Revocation
RIPE 84: RevocationRIPE 84: Revocation
RIPE 84: RevocationAPNIC
 
SSL self signed deployment on Ubuntu 16.04
SSL self signed deployment on Ubuntu 16.04SSL self signed deployment on Ubuntu 16.04
SSL self signed deployment on Ubuntu 16.04MH Qapandaran
 
Secure socket layer
Secure socket layerSecure socket layer
Secure socket layerBU
 
Improving password-based authentication
Improving password-based authenticationImproving password-based authentication
Improving password-based authenticationFrank Denis
 
Cisco iso based CA (certificate authority)
Cisco iso based CA (certificate authority)Cisco iso based CA (certificate authority)
Cisco iso based CA (certificate authority)Netwax Lab
 
Implementation of ssl injava
Implementation of ssl injavaImplementation of ssl injava
Implementation of ssl injavatanujagrawal
 
OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...
OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...
OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...Andrejs Vorobjovs
 
SSL Certificates and Operations
SSL Certificates and OperationsSSL Certificates and Operations
SSL Certificates and OperationsNisheed KM
 
In headers / Padlocks / Certificate authorities / site seals we trust
In headers / Padlocks / Certificate authorities / site seals we trustIn headers / Padlocks / Certificate authorities / site seals we trust
In headers / Padlocks / Certificate authorities / site seals we trustpipasnacave
 

Semelhante a TLS and Certificates (20)

Configuration of Self Signed SSL Certificate For CentOS 8
Configuration of Self Signed SSL Certificate For CentOS 8Configuration of Self Signed SSL Certificate For CentOS 8
Configuration of Self Signed SSL Certificate For CentOS 8
 
Training Slides: 302 - Securing Your Cluster With SSL
Training Slides: 302 - Securing Your Cluster With SSLTraining Slides: 302 - Securing Your Cluster With SSL
Training Slides: 302 - Securing Your Cluster With SSL
 
Demystfying secure certs
Demystfying secure certsDemystfying secure certs
Demystfying secure certs
 
Hardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoiaHardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoia
 
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
 
How to validate server certificate
How to validate server certificateHow to validate server certificate
How to validate server certificate
 
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoiaSeattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
 
RIPE 84: Revocation
RIPE 84: RevocationRIPE 84: Revocation
RIPE 84: Revocation
 
SSL self signed deployment on Ubuntu 16.04
SSL self signed deployment on Ubuntu 16.04SSL self signed deployment on Ubuntu 16.04
SSL self signed deployment on Ubuntu 16.04
 
Rhel5
Rhel5Rhel5
Rhel5
 
Secure socket layer
Secure socket layerSecure socket layer
Secure socket layer
 
Improving password-based authentication
Improving password-based authenticationImproving password-based authentication
Improving password-based authentication
 
Cisco iso based CA (certificate authority)
Cisco iso based CA (certificate authority)Cisco iso based CA (certificate authority)
Cisco iso based CA (certificate authority)
 
Implementation of ssl injava
Implementation of ssl injavaImplementation of ssl injava
Implementation of ssl injava
 
OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...
OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...
OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...
 
SSL Certificates and Operations
SSL Certificates and OperationsSSL Certificates and Operations
SSL Certificates and Operations
 
TLS
TLSTLS
TLS
 
SSL-image
SSL-imageSSL-image
SSL-image
 
In headers / Padlocks / Certificate authorities / site seals we trust
In headers / Padlocks / Certificate authorities / site seals we trustIn headers / Padlocks / Certificate authorities / site seals we trust
In headers / Padlocks / Certificate authorities / site seals we trust
 
IoT Secure Bootsrapping : ideas
IoT Secure Bootsrapping : ideasIoT Secure Bootsrapping : ideas
IoT Secure Bootsrapping : ideas
 

Mais de Karri Huhtanen

Disobey 2024: Karri Huhtanen: Wi-Fi Roaming Security and Privacy
Disobey 2024: Karri Huhtanen: Wi-Fi Roaming Security and PrivacyDisobey 2024: Karri Huhtanen: Wi-Fi Roaming Security and Privacy
Disobey 2024: Karri Huhtanen: Wi-Fi Roaming Security and PrivacyKarri Huhtanen
 
Wi-Fi Roaming Security and Privacy
Wi-Fi Roaming Security and PrivacyWi-Fi Roaming Security and Privacy
Wi-Fi Roaming Security and PrivacyKarri Huhtanen
 
OpenRoaming and CapPort
OpenRoaming and CapPortOpenRoaming and CapPort
OpenRoaming and CapPortKarri Huhtanen
 
Suomen eduroam-juuripalvelun uudistukset
Suomen eduroam-juuripalvelun uudistuksetSuomen eduroam-juuripalvelun uudistukset
Suomen eduroam-juuripalvelun uudistuksetKarri Huhtanen
 
Adding OpenRoaming to existing IdP and roaming federation service
Adding OpenRoaming to existing IdP and roaming federation serviceAdding OpenRoaming to existing IdP and roaming federation service
Adding OpenRoaming to existing IdP and roaming federation serviceKarri Huhtanen
 
OpenRoaming -- Wi-Fi Roaming for All
OpenRoaming -- Wi-Fi Roaming for AllOpenRoaming -- Wi-Fi Roaming for All
OpenRoaming -- Wi-Fi Roaming for AllKarri Huhtanen
 
Beyond eduroam: Combining eduroam, (5G) SIM authentication and OpenRoaming
Beyond eduroam: Combining eduroam, (5G) SIM authentication and OpenRoamingBeyond eduroam: Combining eduroam, (5G) SIM authentication and OpenRoaming
Beyond eduroam: Combining eduroam, (5G) SIM authentication and OpenRoamingKarri Huhtanen
 
Cooperative labs, testbeds and networks
Cooperative labs, testbeds and networksCooperative labs, testbeds and networks
Cooperative labs, testbeds and networksKarri Huhtanen
 
Privacy and traceability in Wi-Fi networks
Privacy and traceability in Wi-Fi networksPrivacy and traceability in Wi-Fi networks
Privacy and traceability in Wi-Fi networksKarri Huhtanen
 
What is Network Function Virtualisation (NFV)?
What is Network Function Virtualisation (NFV)?What is Network Function Virtualisation (NFV)?
What is Network Function Virtualisation (NFV)?Karri Huhtanen
 
What is Network Function Virtualisation (NFV)?
What is Network Function Virtualisation (NFV)?What is Network Function Virtualisation (NFV)?
What is Network Function Virtualisation (NFV)?Karri Huhtanen
 
Building secure, privacy aware, quality Wi-Fi coverage via cooperation
Building secure, privacy aware, quality Wi-Fi coverage via cooperationBuilding secure, privacy aware, quality Wi-Fi coverage via cooperation
Building secure, privacy aware, quality Wi-Fi coverage via cooperationKarri Huhtanen
 
Connecting the Dots: Integrating RADIUS to Network Measurement and Monitoring
Connecting the Dots: Integrating RADIUS to Network Measurement and MonitoringConnecting the Dots: Integrating RADIUS to Network Measurement and Monitoring
Connecting the Dots: Integrating RADIUS to Network Measurement and MonitoringKarri Huhtanen
 
Building city and nationwide Wi-Fi coverage via cooperation
Building city and nationwide Wi-Fi coverage via cooperationBuilding city and nationwide Wi-Fi coverage via cooperation
Building city and nationwide Wi-Fi coverage via cooperationKarri Huhtanen
 
eduroam diagnostics in NTLR, IdPs and SPs
eduroam diagnostics in NTLR, IdPs and SPseduroam diagnostics in NTLR, IdPs and SPs
eduroam diagnostics in NTLR, IdPs and SPsKarri Huhtanen
 
Using NoSQL databases to store RADIUS and Syslog data
Using NoSQL databases to store RADIUS and Syslog dataUsing NoSQL databases to store RADIUS and Syslog data
Using NoSQL databases to store RADIUS and Syslog dataKarri Huhtanen
 
Open WiFi or Broken WiFi?
Open WiFi or Broken WiFi?Open WiFi or Broken WiFi?
Open WiFi or Broken WiFi?Karri Huhtanen
 
Cloud Based Identity Management
Cloud Based Identity ManagementCloud Based Identity Management
Cloud Based Identity ManagementKarri Huhtanen
 
eduroam ennen, nyt ja tulevaisuudessa
eduroam ennen, nyt ja tulevaisuudessaeduroam ennen, nyt ja tulevaisuudessa
eduroam ennen, nyt ja tulevaisuudessaKarri Huhtanen
 
Joukkoliikennedatan ongelmat ja ratkaisuja
Joukkoliikennedatan ongelmat ja ratkaisujaJoukkoliikennedatan ongelmat ja ratkaisuja
Joukkoliikennedatan ongelmat ja ratkaisujaKarri Huhtanen
 

Mais de Karri Huhtanen (20)

Disobey 2024: Karri Huhtanen: Wi-Fi Roaming Security and Privacy
Disobey 2024: Karri Huhtanen: Wi-Fi Roaming Security and PrivacyDisobey 2024: Karri Huhtanen: Wi-Fi Roaming Security and Privacy
Disobey 2024: Karri Huhtanen: Wi-Fi Roaming Security and Privacy
 
Wi-Fi Roaming Security and Privacy
Wi-Fi Roaming Security and PrivacyWi-Fi Roaming Security and Privacy
Wi-Fi Roaming Security and Privacy
 
OpenRoaming and CapPort
OpenRoaming and CapPortOpenRoaming and CapPort
OpenRoaming and CapPort
 
Suomen eduroam-juuripalvelun uudistukset
Suomen eduroam-juuripalvelun uudistuksetSuomen eduroam-juuripalvelun uudistukset
Suomen eduroam-juuripalvelun uudistukset
 
Adding OpenRoaming to existing IdP and roaming federation service
Adding OpenRoaming to existing IdP and roaming federation serviceAdding OpenRoaming to existing IdP and roaming federation service
Adding OpenRoaming to existing IdP and roaming federation service
 
OpenRoaming -- Wi-Fi Roaming for All
OpenRoaming -- Wi-Fi Roaming for AllOpenRoaming -- Wi-Fi Roaming for All
OpenRoaming -- Wi-Fi Roaming for All
 
Beyond eduroam: Combining eduroam, (5G) SIM authentication and OpenRoaming
Beyond eduroam: Combining eduroam, (5G) SIM authentication and OpenRoamingBeyond eduroam: Combining eduroam, (5G) SIM authentication and OpenRoaming
Beyond eduroam: Combining eduroam, (5G) SIM authentication and OpenRoaming
 
Cooperative labs, testbeds and networks
Cooperative labs, testbeds and networksCooperative labs, testbeds and networks
Cooperative labs, testbeds and networks
 
Privacy and traceability in Wi-Fi networks
Privacy and traceability in Wi-Fi networksPrivacy and traceability in Wi-Fi networks
Privacy and traceability in Wi-Fi networks
 
What is Network Function Virtualisation (NFV)?
What is Network Function Virtualisation (NFV)?What is Network Function Virtualisation (NFV)?
What is Network Function Virtualisation (NFV)?
 
What is Network Function Virtualisation (NFV)?
What is Network Function Virtualisation (NFV)?What is Network Function Virtualisation (NFV)?
What is Network Function Virtualisation (NFV)?
 
Building secure, privacy aware, quality Wi-Fi coverage via cooperation
Building secure, privacy aware, quality Wi-Fi coverage via cooperationBuilding secure, privacy aware, quality Wi-Fi coverage via cooperation
Building secure, privacy aware, quality Wi-Fi coverage via cooperation
 
Connecting the Dots: Integrating RADIUS to Network Measurement and Monitoring
Connecting the Dots: Integrating RADIUS to Network Measurement and MonitoringConnecting the Dots: Integrating RADIUS to Network Measurement and Monitoring
Connecting the Dots: Integrating RADIUS to Network Measurement and Monitoring
 
Building city and nationwide Wi-Fi coverage via cooperation
Building city and nationwide Wi-Fi coverage via cooperationBuilding city and nationwide Wi-Fi coverage via cooperation
Building city and nationwide Wi-Fi coverage via cooperation
 
eduroam diagnostics in NTLR, IdPs and SPs
eduroam diagnostics in NTLR, IdPs and SPseduroam diagnostics in NTLR, IdPs and SPs
eduroam diagnostics in NTLR, IdPs and SPs
 
Using NoSQL databases to store RADIUS and Syslog data
Using NoSQL databases to store RADIUS and Syslog dataUsing NoSQL databases to store RADIUS and Syslog data
Using NoSQL databases to store RADIUS and Syslog data
 
Open WiFi or Broken WiFi?
Open WiFi or Broken WiFi?Open WiFi or Broken WiFi?
Open WiFi or Broken WiFi?
 
Cloud Based Identity Management
Cloud Based Identity ManagementCloud Based Identity Management
Cloud Based Identity Management
 
eduroam ennen, nyt ja tulevaisuudessa
eduroam ennen, nyt ja tulevaisuudessaeduroam ennen, nyt ja tulevaisuudessa
eduroam ennen, nyt ja tulevaisuudessa
 
Joukkoliikennedatan ongelmat ja ratkaisuja
Joukkoliikennedatan ongelmat ja ratkaisujaJoukkoliikennedatan ongelmat ja ratkaisuja
Joukkoliikennedatan ongelmat ja ratkaisuja
 

Último

Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...SUHANI PANDEY
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfJOHNBEBONYAP1
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...nirzagarg
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdfMatthew Sinclair
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...Neha Pandey
 
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...SUHANI PANDEY
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋nirzagarg
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC
 
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...SUHANI PANDEY
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...tanu pandey
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...tanu pandey
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...SUHANI PANDEY
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrHenryBriggs2
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftAanSulistiyo
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLimonikaupta
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC
 
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋nirzagarg
 

Último (20)

Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 

TLS and Certificates

  • 1. TLS AND CERTIFICATES IF YOU THINK THEY ARE EASY, YOU ARE (PROBABLY) DOING THEM WRONG Karri Huhtanen, Radiator Software Oy
  • 2. Doing TLS is easy, right? >>> import httplib >>> conn = httplib.HTTPSConnection("www.python.org") >>> conn.request("GET", "/") >>> r1 = conn.getresponse() >>> print r1.status, r1.reason 200 OK
  • 3. NO
  • 4. It is more complicated than that... >>> import httplib >>> conn = httplib.HTTPSConnection("www.python.org") >>> conn.request("GET", "/") >>> r1 = conn.getresponse() >>> print r1.status, r1.reason 200 OK Who is this www.python.org? What DNS are we using? What is the IP of this www.python.org in the DNS we are using? Do these match, do we get exception if they don’t? Do we verify the certificate? Who do we accept as certifiers for the certificate? What is the allowed use of certificate? What TLS/SSL version we are using? What encryption? Do we have Perfect Forward Secrecy? What are the other TLS connection parameters? What wrapper, TLS/SSL library we are using and what are their defaults? ...
  • 5. Making the connection... class httplib.HTTPSConnection(host[, port[, key_file[, cert_file[, strict[, timeout[, source_address[, context]]]]]]]) A subclass of HTTPConnection that uses SSL for communication with secure servers. Default port is 443. If context is specified, it must be a ssl.SSLContextinstance describing the various SSL options. key_file and cert_file are deprecated, please use ssl.SSLContext.load_cert_chain() instead, or let ssl.create_default_context() select the system’s trusted CA certificates for you. Please read Security considerations for more information on best practices. New in version 2.0. Changed in version 2.6: timeout was added. Changed in version 2.7: source_address was added. Changed in version 2.7.9: context was added. This class now performs all the necessary certificate and hostname checks by default. To revert to the previous, unverified, behavior ssl._create_unverified_context() can be passed to the context parameter. CVE-2014-9365 – HTTPS man-in-the-middle attack against Python clients using default settings
  • 6. Checking context... ssl.create_default_context(purpose=Purpose.SERVER_AUTH, cafile=None, capath=None, cadata=None) Return a new SSLContext object with default settings for the given purpose. The settings are chosen by the ssl module, and usually represent a higher security level than when calling the SSLContext constructor directly. cafile, capath, cadata represent optional CA certificates to trust for certificate verification, as in SSLContext.load_verify_locations(). If all three are None, this function can choose to trust the system’s default CA certificates instead. The settings are: PROTOCOL_SSLv23, OP_NO_SSLv2, and OP_NO_SSLv3 with high encryption cipher suites without RC4 and without unauthenticated cipher suites. Passing SERVER_AUTH as purpose sets verify_mode to CERT_REQUIRED and either loads CA certificates (when at least one of cafile, capath or cadata is given) or uses SSLContext.load_default_certs() to load default CA certificates. Note The protocol, options, cipher and other settings may change to more restrictive values anytime without prior deprecation. The values represent a fair balance between compatibility and security. If your application needs specific settings, you should create a SSLContext and apply the settings yourself. Who can be the certifier? What TLS protocols are allowed? To ensure consistent settings, DIY? Purpose here is not the X.509 certificate extended parameter purpose
  • 7. This does not feel so difficult... So I make my own context correctly, make the connection, check the possible exceptions and then it is no worries mate?
  • 8. NO
  • 9. So what is missing?
  • 10. Certificate revocation check (against CRL) SSLContext.verify_flags The flags for certificate verification operations. You can set flags like VERIFY_CRL_CHECK_LEAF by ORing them together. By default OpenSSL does neither require nor verify certificate revocation lists (CRLs). Available only with openssl version 0.9.8+. #!/usr/bin/env python import httplib import ssl context=ssl.create_default_context() context.verify_flags=context.verify_flags|ssl.VERIFY_CRL_CHECK_CHAIN conn = httplib.HTTPSConnection("www.python.org",context=context) conn.request("GET", "/") r1 = conn.getresponse() print r1.status, r1.reason The code works, I was able to see connection to crl servers, but soon the CRL was cached by the OpenSSL and could not get a dump with contents to see if anything was transferred.
  • 11. Certificate revocation lists (CRL) ● Are retrieved and cached the first time a request to check the certificate chain is made ● SSL library handles caching ● CRLs have LastUpdate and NextUpdate Fields to control caching ● But what if first time CRL cannot be retrieved?
  • 12. Case: Internet Explorer and Wi-Fi captive portals ● Internet Explorer users were complaining that getting to web authentication page took too long. Other browser users were fine. ● It was discovered that Internet Explorer wanted to check the CRL of the captive portal WWW server and because it could not get it, it waited until all of its tries timeouted. ● The solution was to define at least some of the CRL server IPs as pass through addresses in the captive portal. ● When Internet Explorer was able to get and verify CRLs, the delay vanished.
  • 13. HTTPS is easy compared to other TLS services ● In most cases everybody just trusts all CA certificates in browser or operating system certificate store. ● With HTTPS one usually has enough network connectivity to retrieve CRLs or even use Online Certificate Status Protocol (OCSP). ● DNS-IP Address-Certificate verification (and others even better verifications) can be performed against used service. ● With other TLS services everything is not so straight forward.
  • 14. Securing TLS services ● For VPN or network access accepting any CA signed certificates is probably not a good idea. ● For email, instant messaging, software updates etc. accepting any CA signed certificates will mean that at least state actors can have access to your data and devices. ● The certifying CA, purpose of the certificate and checking what it really verifies becomes increasingly important. ● Methods that help detecting service certificate changes (certificate pinning) and verify certificates offline (OCSP stapling) help to prevent MitM attacks.
  • 15. Case: TLS VPN with certificate authentication ● PKI with Root CA and separate Intermediate CAs for People and Servers ● VPN termination point misconfigured to trust Root CA verified certificates, VPN clients misconfigured to trust Root CA ● Now Root, Servers and People CA signed client certificates can authenticate successfully against VPN termination point, VPN clients accept any certificates certified by previous CAs as VPN termination point. ● This is made possible by not being careful in configuring CA settings, hostname, certificate and certificate purpose checks. Think about if we would in addition trust to any CA in system?
  • 16. Case: WPA Enterprise Wi-Fi authentication ● Without IP connectivity terminal starts authentication process with RADIUS server. ● Terminal is supposed to verify RADIUS server certificate and certificate details (usually hostname) against certain CA certificate. ● Often these checks are bypassed, sometimes they are not even configurable without creating and deploying separate device management configuration profiles in devices. ● At least username and password hash are in danger to be captured by anyone setting up Wi-Fi AP and RADIUS server with a certificate and network name accepted by the client device. ● Once again certificate checks and configuration matter.
  • 17. Securing WPA Enterprise Wi-Fi Authentication ● Certificate check and configuration, (forcing) device profiles ● Switching from username-password to client certificate, SIM or elliptic curves (EAP-PWD) based authentication ● Using certificate pinning for RADIUS server certificate ● Using OCSP stapling [1] [1] http://radiatorcookbook.open.com.au/2018/02/new-feature-ocsp-and-ocsp-stapling.html
  • 18. Summary ● TLS and certificates are not easy. They require careful design, implementation, testing, configuration and deployment. ● This presentation did not cover everything. It barely scratched PKI and more advanced certificate verification. ● Hopefully this presentation raised more concern or interest in ensuring that TLS and certificates are properly done in your projects, services and systems. ● Doing everything properly needs understanding of the whole stack (PKI, users, application/service, programming language, TLS wrappers, TLS library, configurations and Internet/transport in between service and terminal).
  • 19. Thank you. Questions? For more information: Karri Huhtanen Radiator Software Oy https://radiatorsoftware.com/