SlideShare a Scribd company logo
1 of 51
Download to read offline
Encryption -> the left, right and what's left
By
Nitin Ramesh
What is Encryption?
Process of encoding particular information so that authorized
parties with the correct key can decode and view that information.
Symmetric Encryption
Asymmetric Encryption
Ex: DES, 3DES, AES, and RC4
Ex: RSA
Shared Key Encryption
Public & Private Key Encryption
What is a Socket?
IP Address + Port Number
What is a SSL/TLS?
Standard security protocol for establishing encrypted links between a web server
and a browser in an online communication
TCP Handshake
TLS Handshake
Request encrypted session + supported ciphers
Agreed Ciphers Suite type + Certificate (with public key)
Verify certificate + create symmetric key & encrypt with public key
Acknowledges successful activation of symmetric key
Secured Connection established
+
+ =
ACK+
Cipher Suites
What is a Cipher?
A cipher is a technique/method of encrypting text.
Involves an algorithm that ciphers data and a key which defines the method of ciphering.
Block Cipher
Ex: DES, AES etc.
Ex: RC4, WAKE, Phelix etc.
Considers a whole block
Considers one bit at a timeStream Cipher
Applied to a block of data (for example, 64 contiguous bits) at once as a group
rather than to one bit at a time
Block Cipher
Consists of 2 pairs of algorithms: E -> Encryption & D -> Decryption
Input Output
• Block of ‘n’ bits size
• Key - > K
• Cipher Block of ‘n’
bits size
#Big Thing Alert 1
K -> Key used in the encryption process.
k -> Length of the key used in the encryption process.
P -> Info String (Block to be ciphered).
n -> Length of the block.
C -> Cipher block of ‘n’ bits.
= C
E = T(D)
Encryption
Decryption
= P
Applied to one bit of data at a single go, as a group rather than consider a
block at a time.
Stream Cipher
(a.k.a State Cipher)
Faster and less hardware intensive. 2 types ->Synchronous stream
ciphers & Self synchronous stream ciphers
Input Output
• ‘n’ bits of information
• Key - > K
• Cipher Block of ‘n’
bits size
What is a Cipher Suite?
A cipher suite is a set of algorithms that help secure a network connection
that uses Transport Layer Security (TLS) or Secure Socket Layer (SSL).
Cipher Suite
Key Exchange
Algorithm
Bulk Encryption Algorithm Message Authentication
Algorithm
1. Key Exchange Algorithm:
Method by which cryptographic keys are exchanged between 2 parties to use a
crypt algorithm.
2. Bulk Encryption Algorithm:
Algorithms that encrypts & decrypt all the traffic at the either ends of the
communication lines.
3. Message Authentication Algorithm:
Short piece of information used to authenticate a message. (Verification Hashes)
Cipher Suite Breakdown
Cipher Suite Block
Same Algorithms But different Ciphers Suites?
TLS v1.0 -> TLS v1_1
1. Added protection against cipher-
block chaining (CBC) attacks.
2. The implicit initialization vector
(IV) was replaced with an explicit
IV.
3. Change in handling of padding
errors.
4. Support for IANA registration of
parameters.
TLS v1_3 Cipher Suite
1. New cipher-suites only available in 1_3.
2. Removing support for MD5 and SHA-224 cryptographic hash
functions
3. Requiring digital signatures even when a previous
configuration is used
4. Prohibiting SSL or RC4 negotiation for backwards compatibility
Anonymous Ciphers
• Generally provides for confidentiality
without the need for a certificate
authority.
• That means, doesn’t need a
certificate.
• Provides encryption without
authentication.
• Highly vulnerable to MIM attacks.
112 bit ciphers
Vulnerable Algorithms
Vulnerable Algorithm I - RC4
• Stream Cipher
• Used in popular security mechanisms like WEP/WPA (Wired
Equivalent Privacy).
• Used in ARC4Random number generator.
• SSL (Secure Socket Layer)/TLS (Transport Layer Security)
• Microsoft’s RDP (Remote Desktop Protocol)
• BitTorrent
RC4 - Attacks
RC4
IV weakness
Bar Mitzvah Attack
Vulnerable Algorithm II - DES
• NSA Approved Block Ciphers
• Superseded by the Advanced
Encryption Standard (AES)
• DES uses a 56-bit key =
72,057,594,037,927,936
combinations
• Average of 23 hours to crack.
Vulnerable Algorithm III – 3DES
• Triple DES uses -> three DES keys, K1, K2 and K3, each of 56 bits
ciphertext = EK3(DK2(EK1(plaintext)))
• DES encrypt -> K1, DES decrypt -> K2, then DES encrypt -> K3.
• Decryption:
plaintext = DK1(EK2(DK3(ciphertext)))
• DES decrypt -> K3, encrypt -> K2, then decrypt -> K1
Sweet 32 Attack
1. The DES ciphers (and triple-DES) only have a 64-bit block size.
2. Need to run JS on browser -> capture 32 GB of data from single session.
3. Payload to generate a large amounts of traffic during the same TLS
connection, creating a collision.
4. With this collision, the attacker is able to retrieve information such as a
session cookie.
Vulnerable Algorithm – III - Remaining
• DES, 3DES, MD5, Sha1, AES, Blowfish, Diffie Hellman
Attacks on Algorithms
Heartbleed Attack
• Heart Beat is when one computer checks if the other computer listening is still “awake”.
• No sensitive info so usually not encrypted. Usually around 1 kb of data, upto 64kb.
• Send 1kb of data and tell its 64kb instead. Do it multiple times in a single instant.
Empty
BEAST Attack
• BEAST -> Leverages weakness in CBC -> Exploits the SSL.
• Targets the use of repeated IV(s) -> Initialization vectors.
• More of a proof of concept.
• Requires JavaScript interception to increase request capture.
POODLE Attack
• Force the backend, by supporting only SSLv3 and rejecting the TLS connections
• Need to make 256 SSL 3.0 requests to reveal one byte of encrypted messages
Message MAC PADDING
• Uses CBC mode -> The encrypted block process is incorporated in to the next block.
• Mitigation: Upgrade from SSLV3 and set the TLS_FALLBACK_SCSV to prevent fallback to
SSLv3.
• Essentially, TLS_FALLBACK_SCSV allows clients to send a hidden version number in the
downgraded connection attempt in a way that doesn't trigger the server bugs.
Renegotiation
What is a Renegotiation?
Starting a new handshake negotiation inside of an existing secure session
is called renegotiation.
Client Initiated Renegotiation
• The client side is allowed client to renegotiate new encryption parameters
for an SSL/TLS connection within a single TCP connection.
• Handshakes usually involve a high degree of computational overhead.
• Done via a single thread is not very effective.
• But done over a distributed platform over a elongated period leads to DOS attacks.
• Use Rate limiters or don’t support this method.
Insecure Renegotiation
• A flaw in the design of the handshake process of SSL/TLS allows an attacker to inject arbitrary data into the
beginning of a client's communication with a server during a man-in-the-middle attack.
Client Handshake request intercepted
Initiates TLS connection + Payload injected
Payload
Initiates Renegotiation
Send intercepted Client handshake request
Forwards all the requests to and from
Handshake successful + Encrypted connection start
1st Sensitive Operation data sent to the Server Sensitive Operation
+ Payload
Payload successful and response sent back
TLS - Certificates
What is a certificate?
Identification passed during a handshake to verify the website the
browser is trying to connect to .
Certificate Validation Procedure
1. Step 1: Check public key and parameters.
2. Step 2: Check current date/time against validation period.
3. Step 3: Check revocation status in the CRL.
• On-hold : Private key compromised
• Revoked : Error/ misuse
4. Step 4: Checks the name constraints in the certificate.
5. Step 5: The path length is checked to ensure that it does not exceed any maximum path length
6. Step 6: The key usage extension is checked to ensure that is allowed to sign certificates
X.509 Certificates
• Standardized way of generating and validating certificates.
• Certificates confirm the identity of a service.
• Self-Signed Certificate is an identity certificate that is signed
by the same entity whose identity it certifies.
Certificates related vulnerabilities
X.509 Certificate About to Expire (SSL/TLS)
 Its about to be invalidated, so renew it
X.509 Certificate Expired (SSL/TLS)
 Its gone, pay the company again for a new one.
X.509 Certificate Not Yet Valid (SSL/TLS)
 Will work some day.
X.509 Certificate with Wrong Hostname (SSL/TLS)
 Who programmed this? Its made for a site with a different host name.
X.509 Certificate Chain Contains RSA Keys Less Than 2048 Bits (SSL/TLS)
 According to industry standards, certificates issued after January 1, 2014 must be at least 2048 bits.
Literally everything required to make a proper certificate:
 https://www.cabforum.org/wp-content/uploads/Baseline_Requirements_V1.pdf
TLS - Enforced/Enabled
Helpful to click this link in the
configuration.
1 2
3
Thank you

More Related Content

Similar to TLS/SSL - Study of Secured Communications

SSL Secure socket layer
SSL Secure socket layerSSL Secure socket layer
SSL Secure socket layerAhmed Elnaggar
 
[Wroclaw #8] TLS all the things!
[Wroclaw #8] TLS all the things![Wroclaw #8] TLS all the things!
[Wroclaw #8] TLS all the things!OWASP
 
All you need to know about transport layer security
All you need to know about transport layer securityAll you need to know about transport layer security
All you need to know about transport layer securityMaarten Smeets
 
Ssl (Secure Sockets Layer)
Ssl (Secure Sockets Layer)Ssl (Secure Sockets Layer)
Ssl (Secure Sockets Layer)Asad Ali
 
TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006Nate Lawson
 
ssl-tls-ipsec-vpn.pptx
ssl-tls-ipsec-vpn.pptxssl-tls-ipsec-vpn.pptx
ssl-tls-ipsec-vpn.pptxjithu26327
 
15 intro to ssl certificate & pki concept
15 intro to ssl certificate & pki concept15 intro to ssl certificate & pki concept
15 intro to ssl certificate & pki conceptMostafa El Lathy
 
Alfresco DevCon 2019: Encryption at-rest and in-transit
Alfresco DevCon 2019: Encryption at-rest and in-transitAlfresco DevCon 2019: Encryption at-rest and in-transit
Alfresco DevCon 2019: Encryption at-rest and in-transitToni de la Fuente
 
Network Security_Module_2_Dr Shivashankar
Network Security_Module_2_Dr ShivashankarNetwork Security_Module_2_Dr Shivashankar
Network Security_Module_2_Dr ShivashankarDr. Shivashankar
 
An Introduction to DANE - Securing TLS using DNSSEC
An Introduction to DANE - Securing TLS using DNSSECAn Introduction to DANE - Securing TLS using DNSSEC
An Introduction to DANE - Securing TLS using DNSSECCarlos Martinez Cagnazzo
 
#MoreCrypto : Introduction to TLS
#MoreCrypto : Introduction to TLS#MoreCrypto : Introduction to TLS
#MoreCrypto : Introduction to TLSOlle E Johansson
 
ch1 eriht eriotery erogyteip ergy7.ppt
ch1 eriht  eriotery  erogyteip  ergy7.pptch1 eriht  eriotery  erogyteip  ergy7.ppt
ch1 eriht eriotery erogyteip ergy7.pptSonukumarRawat
 

Similar to TLS/SSL - Study of Secured Communications (20)

ch17.ppt
ch17.pptch17.ppt
ch17.ppt
 
SSL Secure socket layer
SSL Secure socket layerSSL Secure socket layer
SSL Secure socket layer
 
[Wroclaw #8] TLS all the things!
[Wroclaw #8] TLS all the things![Wroclaw #8] TLS all the things!
[Wroclaw #8] TLS all the things!
 
SSL-image
SSL-imageSSL-image
SSL-image
 
All you need to know about transport layer security
All you need to know about transport layer securityAll you need to know about transport layer security
All you need to know about transport layer security
 
fengmei.ppt
fengmei.pptfengmei.ppt
fengmei.ppt
 
Ssl (Secure Sockets Layer)
Ssl (Secure Sockets Layer)Ssl (Secure Sockets Layer)
Ssl (Secure Sockets Layer)
 
fengmei.ppt
fengmei.pptfengmei.ppt
fengmei.ppt
 
TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006
 
ssl-tls-ipsec-vpn.pptx
ssl-tls-ipsec-vpn.pptxssl-tls-ipsec-vpn.pptx
ssl-tls-ipsec-vpn.pptx
 
15 intro to ssl certificate & pki concept
15 intro to ssl certificate & pki concept15 intro to ssl certificate & pki concept
15 intro to ssl certificate & pki concept
 
Unit -- 5.ppt
Unit -- 5.pptUnit -- 5.ppt
Unit -- 5.ppt
 
Alfresco DevCon 2019: Encryption at-rest and in-transit
Alfresco DevCon 2019: Encryption at-rest and in-transitAlfresco DevCon 2019: Encryption at-rest and in-transit
Alfresco DevCon 2019: Encryption at-rest and in-transit
 
ssl
sslssl
ssl
 
Network Security_Module_2_Dr Shivashankar
Network Security_Module_2_Dr ShivashankarNetwork Security_Module_2_Dr Shivashankar
Network Security_Module_2_Dr Shivashankar
 
An Introduction to DANE - Securing TLS using DNSSEC
An Introduction to DANE - Securing TLS using DNSSECAn Introduction to DANE - Securing TLS using DNSSEC
An Introduction to DANE - Securing TLS using DNSSEC
 
#MoreCrypto : Introduction to TLS
#MoreCrypto : Introduction to TLS#MoreCrypto : Introduction to TLS
#MoreCrypto : Introduction to TLS
 
ch1 eriht eriotery erogyteip ergy7.ppt
ch1 eriht  eriotery  erogyteip  ergy7.pptch1 eriht  eriotery  erogyteip  ergy7.ppt
ch1 eriht eriotery erogyteip ergy7.ppt
 
Sequere socket Layer
Sequere socket LayerSequere socket Layer
Sequere socket Layer
 
03-SSL (1).ppt
03-SSL (1).ppt03-SSL (1).ppt
03-SSL (1).ppt
 

Recently uploaded

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Recently uploaded (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

TLS/SSL - Study of Secured Communications

  • 1. Encryption -> the left, right and what's left By Nitin Ramesh
  • 2. What is Encryption? Process of encoding particular information so that authorized parties with the correct key can decode and view that information.
  • 3. Symmetric Encryption Asymmetric Encryption Ex: DES, 3DES, AES, and RC4 Ex: RSA Shared Key Encryption Public & Private Key Encryption
  • 4. What is a Socket? IP Address + Port Number
  • 5. What is a SSL/TLS? Standard security protocol for establishing encrypted links between a web server and a browser in an online communication
  • 8. Request encrypted session + supported ciphers Agreed Ciphers Suite type + Certificate (with public key) Verify certificate + create symmetric key & encrypt with public key Acknowledges successful activation of symmetric key Secured Connection established + + = ACK+
  • 10. What is a Cipher? A cipher is a technique/method of encrypting text. Involves an algorithm that ciphers data and a key which defines the method of ciphering.
  • 11. Block Cipher Ex: DES, AES etc. Ex: RC4, WAKE, Phelix etc. Considers a whole block Considers one bit at a timeStream Cipher
  • 12. Applied to a block of data (for example, 64 contiguous bits) at once as a group rather than to one bit at a time Block Cipher Consists of 2 pairs of algorithms: E -> Encryption & D -> Decryption Input Output • Block of ‘n’ bits size • Key - > K • Cipher Block of ‘n’ bits size
  • 14. K -> Key used in the encryption process. k -> Length of the key used in the encryption process. P -> Info String (Block to be ciphered). n -> Length of the block. C -> Cipher block of ‘n’ bits. = C E = T(D) Encryption Decryption = P
  • 15. Applied to one bit of data at a single go, as a group rather than consider a block at a time. Stream Cipher (a.k.a State Cipher) Faster and less hardware intensive. 2 types ->Synchronous stream ciphers & Self synchronous stream ciphers Input Output • ‘n’ bits of information • Key - > K • Cipher Block of ‘n’ bits size
  • 16. What is a Cipher Suite? A cipher suite is a set of algorithms that help secure a network connection that uses Transport Layer Security (TLS) or Secure Socket Layer (SSL).
  • 17. Cipher Suite Key Exchange Algorithm Bulk Encryption Algorithm Message Authentication Algorithm 1. Key Exchange Algorithm: Method by which cryptographic keys are exchanged between 2 parties to use a crypt algorithm. 2. Bulk Encryption Algorithm: Algorithms that encrypts & decrypt all the traffic at the either ends of the communication lines. 3. Message Authentication Algorithm: Short piece of information used to authenticate a message. (Verification Hashes)
  • 20.
  • 21. Same Algorithms But different Ciphers Suites? TLS v1.0 -> TLS v1_1 1. Added protection against cipher- block chaining (CBC) attacks. 2. The implicit initialization vector (IV) was replaced with an explicit IV. 3. Change in handling of padding errors. 4. Support for IANA registration of parameters.
  • 22. TLS v1_3 Cipher Suite 1. New cipher-suites only available in 1_3. 2. Removing support for MD5 and SHA-224 cryptographic hash functions 3. Requiring digital signatures even when a previous configuration is used 4. Prohibiting SSL or RC4 negotiation for backwards compatibility
  • 23. Anonymous Ciphers • Generally provides for confidentiality without the need for a certificate authority. • That means, doesn’t need a certificate. • Provides encryption without authentication. • Highly vulnerable to MIM attacks.
  • 26. Vulnerable Algorithm I - RC4 • Stream Cipher • Used in popular security mechanisms like WEP/WPA (Wired Equivalent Privacy). • Used in ARC4Random number generator. • SSL (Secure Socket Layer)/TLS (Transport Layer Security) • Microsoft’s RDP (Remote Desktop Protocol) • BitTorrent
  • 27. RC4 - Attacks RC4 IV weakness Bar Mitzvah Attack
  • 28. Vulnerable Algorithm II - DES • NSA Approved Block Ciphers • Superseded by the Advanced Encryption Standard (AES) • DES uses a 56-bit key = 72,057,594,037,927,936 combinations • Average of 23 hours to crack.
  • 29. Vulnerable Algorithm III – 3DES • Triple DES uses -> three DES keys, K1, K2 and K3, each of 56 bits ciphertext = EK3(DK2(EK1(plaintext))) • DES encrypt -> K1, DES decrypt -> K2, then DES encrypt -> K3. • Decryption: plaintext = DK1(EK2(DK3(ciphertext))) • DES decrypt -> K3, encrypt -> K2, then decrypt -> K1
  • 30. Sweet 32 Attack 1. The DES ciphers (and triple-DES) only have a 64-bit block size. 2. Need to run JS on browser -> capture 32 GB of data from single session. 3. Payload to generate a large amounts of traffic during the same TLS connection, creating a collision. 4. With this collision, the attacker is able to retrieve information such as a session cookie.
  • 31. Vulnerable Algorithm – III - Remaining • DES, 3DES, MD5, Sha1, AES, Blowfish, Diffie Hellman
  • 32.
  • 34. Heartbleed Attack • Heart Beat is when one computer checks if the other computer listening is still “awake”. • No sensitive info so usually not encrypted. Usually around 1 kb of data, upto 64kb. • Send 1kb of data and tell its 64kb instead. Do it multiple times in a single instant. Empty
  • 35. BEAST Attack • BEAST -> Leverages weakness in CBC -> Exploits the SSL. • Targets the use of repeated IV(s) -> Initialization vectors. • More of a proof of concept. • Requires JavaScript interception to increase request capture.
  • 36.
  • 37. POODLE Attack • Force the backend, by supporting only SSLv3 and rejecting the TLS connections • Need to make 256 SSL 3.0 requests to reveal one byte of encrypted messages Message MAC PADDING • Uses CBC mode -> The encrypted block process is incorporated in to the next block. • Mitigation: Upgrade from SSLV3 and set the TLS_FALLBACK_SCSV to prevent fallback to SSLv3. • Essentially, TLS_FALLBACK_SCSV allows clients to send a hidden version number in the downgraded connection attempt in a way that doesn't trigger the server bugs.
  • 39. What is a Renegotiation? Starting a new handshake negotiation inside of an existing secure session is called renegotiation.
  • 40. Client Initiated Renegotiation • The client side is allowed client to renegotiate new encryption parameters for an SSL/TLS connection within a single TCP connection. • Handshakes usually involve a high degree of computational overhead. • Done via a single thread is not very effective. • But done over a distributed platform over a elongated period leads to DOS attacks. • Use Rate limiters or don’t support this method.
  • 41. Insecure Renegotiation • A flaw in the design of the handshake process of SSL/TLS allows an attacker to inject arbitrary data into the beginning of a client's communication with a server during a man-in-the-middle attack.
  • 42. Client Handshake request intercepted Initiates TLS connection + Payload injected Payload Initiates Renegotiation Send intercepted Client handshake request Forwards all the requests to and from Handshake successful + Encrypted connection start 1st Sensitive Operation data sent to the Server Sensitive Operation + Payload Payload successful and response sent back
  • 44. What is a certificate? Identification passed during a handshake to verify the website the browser is trying to connect to .
  • 45. Certificate Validation Procedure 1. Step 1: Check public key and parameters. 2. Step 2: Check current date/time against validation period. 3. Step 3: Check revocation status in the CRL. • On-hold : Private key compromised • Revoked : Error/ misuse 4. Step 4: Checks the name constraints in the certificate. 5. Step 5: The path length is checked to ensure that it does not exceed any maximum path length 6. Step 6: The key usage extension is checked to ensure that is allowed to sign certificates
  • 46. X.509 Certificates • Standardized way of generating and validating certificates. • Certificates confirm the identity of a service. • Self-Signed Certificate is an identity certificate that is signed by the same entity whose identity it certifies.
  • 47. Certificates related vulnerabilities X.509 Certificate About to Expire (SSL/TLS)  Its about to be invalidated, so renew it X.509 Certificate Expired (SSL/TLS)  Its gone, pay the company again for a new one. X.509 Certificate Not Yet Valid (SSL/TLS)  Will work some day. X.509 Certificate with Wrong Hostname (SSL/TLS)  Who programmed this? Its made for a site with a different host name. X.509 Certificate Chain Contains RSA Keys Less Than 2048 Bits (SSL/TLS)  According to industry standards, certificates issued after January 1, 2014 must be at least 2048 bits. Literally everything required to make a proper certificate:  https://www.cabforum.org/wp-content/uploads/Baseline_Requirements_V1.pdf
  • 49. Helpful to click this link in the configuration.
  • 50. 1 2 3

Editor's Notes

  1. Links to read: TLS standard document https://www.ietf.org/rfc/rfc5246.txt
  2. http://www.thesprawl.org/research/tls-and-ssl-cipher-suites/
  3. In a synchronous stream cipher a stream of pseudo-random digits is generated independently of the plaintext and ciphertext messages, and then combined with the plaintext (to encrypt) or the ciphertext (to decrypt). Another approach uses several of the previous N ciphertext digits to compute the keystream. Such schemes are known as self-synchronizing stream ciphers, asynchronous stream ciphers or ciphertext autokey (CTAK).
  4. Key exchange is done either in-band or out-of-band. In in-band key exchange, keys are exchanged through the same communication channel that will be encrypted. In out-of-band key, keys are exchanged through a channel else than the one that will be encrypted.[1]
  5. GCM and CBC modes internally work quite differently; they both involve a block cipher and an exclusive-or, but they use them in different ways. In CBC mode, you encrypt a block of data by taking the current plaintext block and exclusive-oring that wth the previous ciphertext block (or IV), and then sending the result of that through the block cipher; the output of the block cipher is the ciphertext block. GCM mode provides both privacy (encryption) and integrity. To provide encryption, GCM maintains a counter; for each block of data, it sends the current value of the counter through the block cipher. Then, it takes the output of the block cipher, and exclusive or's that with the plaintext to form the ciphertext. https://crypto.stackexchange.com/questions/2310/what-is-the-difference-between-cbc-and-gcm-mode
  6. The difference between the different version is that , the algorithms are just encrypting functions that work on a particular block of data. But the technique of how it works has been changed, such as amount of data in a block, the IV, the handshake mechanism, error handling mechanisms etc. An initialization vector (IV) or starting variable (SV) is a block of bits that is used by several modes to randomize the encryption and hence to produce distinct ciphertexts even if the same plaintext is encrypted multiple times, without the need for a slower re-keying process. https://en.wikipedia.org/wiki/Transport_Layer_Security https://www.ibm.com/developerworks/community/blogs/f8c3fa11-2d6e-46c3-b4ab-d3899aa84ac7/entry/what_are_the_major_security_updates_in_tls_v1_2_versus_previous_tls_protocol_versions9?lang=en
  7. https://www.openssl.org/blog/blog/2017/05/04/tlsv1.3/
  8. https://security.stackexchange.com/questions/180012/are-ciphers-with-a-strength-of-112-bits-considered-weak
  9. https://www.youtube.com/watch?v=5IchxMA4caQ https://www.youtube.com/watch?v=-6wFSA5calk
  10. https://www.rc4nomore.com/vanhoef-usenix2015.pdf Exploit: https://youtu.be/d8MtmKrXlKQ RC4 contains several known weaknesses. In particular, an attacker that can gather a large number of ciphertexts that contain the same plaintext encrypted using different keys may be able to recover the plaintext (the typical target of this attack would be a cookie that is sent in multiple SSL/TLS sessions).
  11. https://www.imperva.com/docs/HII_Attacking_SSL_when_using_RC4.pdf https://www.blackhat.com/docs/asia-15/materials/asia-15-Mantin-Bar-Mitzvah-Attack-Breaking-SSL-With-13-Year-Old-RC4-Weakness-wp.pdf
  12. Although now considered insecure, it was highly influential in the advancement of modern cryptography.
  13. Collision attack : Find two different messages m1 and m2 such that hash(m1) = hash(m2).
  14. 1kb is responded with 1kb & 64kb with 64 kb. Update to 1.0.1g  -DOPENSSL_NO_HEARTBEATS option.
  15. https://www.youtube.com/watch?v=-_8-2pDFvmg&t=215s
  16. The IV is reused in the next block. Also the previous last cipher block is used as plain text for the next block. We are not interested in this , but we can detect the patterns and we know the IV(s). Google inserted a plain empty message btw the cipher block , so that the cipher block is not reused. Finally mitigated by use of TLS 1.1/1.2
  17. TLS fallback when we force the backend TLS connections to fail so that it will fall back to SSLv3 After decryption, the recipient looks at the last block which is the padding & knows how much padding to remove. Knows after the padding is the MAC value, if MAC = OK, then data is good to take. Else the message is dropped. Change the message for some sensitive info, the recipient will knows its wrong as its checking the wrong bytes for the MAC and drop it. But some times, he gets lucky and the padding will match, he knows this, because the recipient didn’t drop it and send a message saying this is wrong data. Now that he knows the encrypted block with was sent and the padding he can derive the last byte of the message due to its structural weakness in the algorithm. https://www.youtube.com/watch?v=krAG2YtutnQ
  18. Usually CIR is done when client has to give his certificate to access selected resources?
  19. https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet
  20. https://www.entrust.com/wp-content/uploads/2013/05/pathvalidation_wp.pdf
  21. https://www.globalsign.com/en/blog/what-is-common-name-mismatch-error/ Self signed cert: This term has nothing to do with the identity of the person or organization that actually performed the signing procedure. In technical terms a self-signed certificate is one signed with its own private key.
  22. https://www.globalsign.com/en/blog/what-is-common-name-mismatch-error/ Self signed cert: This term has nothing to do with the identity of the person or organization that actually performed the signing procedure. In technical terms a self-signed certificate is one signed with its own private key.
  23. https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet