SlideShare a Scribd company logo
1 of 26
Heartbleed Attack
- Shreyas Kothari
(140302003)
M.Tech (CNIS)
Manipal University Jaipur
Introduction
• Heartbleed is a security bug disclosed in April 2014 in the OpenSSL
cryptography library, which is a widely used for the implementation of
the Transport Layer Security (TLS) protocol.
• Heartbleed may be exploited regardless of whether the party using a
vulnerable OpenSSL instance for TLS is a server or a client.
• It results from improper input validation (due to a missing bounds
check) in the implementation of the TLS heartbeat extension, thus
the bug's name derives from "heartbeat”.
• The vulnerability is classified as a buffer over-read, a situation where
more data can be read than should be allowed.
OpenSSL
• OpenSSL is an open-source implementation of the SSL and TLS
protocols. The core library, written in the C programming language,
implements basic cryptographic functions and provides various utility
functions.
• The OpenSSL project was founded in 1998 to invent a free set of
encryption tools for the code used on the Internet. As of 2014 two
thirds of all webservers use it.
Heartbeat Extension
• The Heartbeat Extension provides a new protocol for TLS/DTLS
allowing the usage of keep-alive functionality without performing a
renegotiation.
• TLS is based on reliable protocols, but there is no feature available to
keep the connection alive without continuous data transfer.
• The Heartbeat Extension overcomes these limitations.
• The user can use the new HeartbeatRequest message, which has to
be answered by the peer with a HeartbeartResponse immediately.
Heartbeat Hello Extension
• A peer cannot only indicate that its implementation supports
Heartbeats, it can also choose whether it is willing to receive
HeartbeatRequest messages and respond with HeartbeatResponse
messages or only willing to send HeartbeatRequest messages.
• The former is indicated by using peer_allowed_to_send as the
HeartbeatMode; the latter is indicated by using
peer_not_allowed_to_send as the Heartbeat mode.
• This decision can be changed with every renegotiation.
The Heartbeat Protocol
• The Heartbeat protocol is a new protocol running on top of the
Record Layer. The protocol itself consists of two message types:
HeartbeatRequest and HeartbeatResponse.
• A HeartbeatRequest message can arrive almost at any time during the
lifetime of a connection.
• There must not be more than one HeartbeatRequest message in flight
at a time. A HeartbeatRequest message is considered to be in flight
until the corresponding HeartbeatResponse message is received, or
until the retransmit timer expires.
Heartbeat Request / Response Message
• The Heartbeat protocol messages consist of their type and an
arbitrary payload and padding.
• struct {
HeartbeatMessageType type;
uint16 payload_length;
opaque payload[HeartbeatMessage.payload_length];
opaque padding[padding_length];
} HeartbeatMessage;
Heartbeat Request / Response Message
• The total length of a HeartbeatMessage must not exceed 2^14 Bytes.
• type : The message type; either heartbeat_request or
heartbeat_response.
• payload_length : The length of the payload.
• payload : The payload consists of arbitrary content.
• Padding : It can be any random content and the sender of this
message must use at least 16 Bytes of padding.
Working
• When a HeartbeatRequest message is received and sending a
HeartbeatResponse is not prohibited, the receiver must send a
corresponding HeartbeatResponse message carrying an exact copy of
the payload of the received HeartbeatRequest.
• If a received HeartbeatResponse message does not contain the
expected payload, the message must be discarded. If it does contain
the expected payload, the retransmission timer must be stopped.
The Heartbleed Attack
• We had discussed earlier in the introduction part that this attack was
made possible because of the improper input validation of the TLS
Heartbeat extension. The vulnerability lies in the payload variable.
• Ideally the code must check the payload data length with the actual
length of data sent in the Heartbeat request, but it isn’t checking it.
• So if the payload exceeds the standard length in the request, the
server may return more data in response than what it should ideally
return.
The Heartbleed Attack
• This is a case of Buffer Overflow (BoF). Look at the following
vulnerable code:
The Heartbleed Attack
• The rrec contains all the incoming request data. The code reads the
data. The first byte is to check if it’s a Heartbeat protocol and then
another 2 bytes determine the length of the Heartbeat payload.
• Ideally the length of the payload must be equal to the payload_length
sent in the Heartbeat request. But as discussed, the code is not
checking actual length sent in the Heartbeat request.
The Heartbleed Attack
• So the code copies the amount of data requested by incoming
requests to the outgoing server response and possibly more than
requested in some cases.
• This may leak valuable information to attackers, such as session IDs,
tokens, keys, etc.
The Heartbleed Attack
• Let us try to understand this with the help of one scenario.
The Heartbleed Attack
The Heartbleed Attack
The Heartbleed Attack
What can be leaked ?
• As said earlier, much sensitive information from the server’s memory
can be sent in through the response.
• Some of them are session-related information such as session ID,
different tokens, keys, and some other sensitive internal information
such as queries, internal data, etc.
• The next image shows a real example of what we can receive in the
responses.
What can be leaked ?
Solution
• This vulnerability lies in the OpenSSL version 1.0.1f and 1.0.2 – beta1.
• Affected users should upgrade to OpenSSL 1.0.1g.
• Users unable to immediately upgrade can alternatively recompile
OpenSSL with -DOPENSSL_NO_HEARTBEATS.
• OpenSSL version 1.0.2 will be fixed in 1.0.2 – beta2.
To check whether your
website is safe visit
1) https://lastpass.com/heartbleed/
2) https://filippo.io/Heartbleed/
jaipur.manipal.edu
ams.muj.edu.in
Question ??
References
1. RFC 6520 - https://tools.ietf.org/html/rfc6520
2. www.heartbleed.com
3. Infosec Institute - http://resources.infosecinstitute.com/exploiting-
heartbleed/
4. https://xkcd.com/1354/
5. https://www.openssl.org/news/secadv_20140407.txt
6. https://lastpass.com/heartbleed/
The Heartbleed Attack

More Related Content

What's hot

VULNERABILITY ( CYBER SECURITY )
VULNERABILITY ( CYBER SECURITY )VULNERABILITY ( CYBER SECURITY )
VULNERABILITY ( CYBER SECURITY )Kashyap Mandaliya
 
Overview of Vulnerability Scanning.pptx
Overview of Vulnerability Scanning.pptxOverview of Vulnerability Scanning.pptx
Overview of Vulnerability Scanning.pptxAjayKumar73315
 
Honeypots for Active Defense
Honeypots for Active DefenseHoneypots for Active Defense
Honeypots for Active DefenseGreg Foss
 
Modern Honey Network (MHN)
Modern Honey Network (MHN)Modern Honey Network (MHN)
Modern Honey Network (MHN)Jason Trost
 
Recon and Bug Bounties - What a great love story!
Recon and Bug Bounties - What a great love story!Recon and Bug Bounties - What a great love story!
Recon and Bug Bounties - What a great love story!Abhijeth D
 
Forensically Sound Incident Response in Office 365 - SANS DFIR Summit 2018
Forensically Sound Incident Response in Office 365 - SANS DFIR Summit 2018Forensically Sound Incident Response in Office 365 - SANS DFIR Summit 2018
Forensically Sound Incident Response in Office 365 - SANS DFIR Summit 2018Kroll
 
CSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open RedirectCSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open RedirectBlueinfy Solutions
 
Penetration Testing Basics
Penetration Testing BasicsPenetration Testing Basics
Penetration Testing BasicsRick Wanner
 
Introduction to penetration testing
Introduction to penetration testingIntroduction to penetration testing
Introduction to penetration testingAmine SAIGHI
 

What's hot (20)

Metasploit
MetasploitMetasploit
Metasploit
 
VULNERABILITY ( CYBER SECURITY )
VULNERABILITY ( CYBER SECURITY )VULNERABILITY ( CYBER SECURITY )
VULNERABILITY ( CYBER SECURITY )
 
05 tk3193-sniffing & dos
05 tk3193-sniffing & dos05 tk3193-sniffing & dos
05 tk3193-sniffing & dos
 
Overview of Vulnerability Scanning.pptx
Overview of Vulnerability Scanning.pptxOverview of Vulnerability Scanning.pptx
Overview of Vulnerability Scanning.pptx
 
SSL TLS Protocol
SSL TLS ProtocolSSL TLS Protocol
SSL TLS Protocol
 
Honeypots for Active Defense
Honeypots for Active DefenseHoneypots for Active Defense
Honeypots for Active Defense
 
Ransomware
RansomwareRansomware
Ransomware
 
Port Scanning
Port ScanningPort Scanning
Port Scanning
 
Port scanning
Port scanningPort scanning
Port scanning
 
Modern Honey Network (MHN)
Modern Honey Network (MHN)Modern Honey Network (MHN)
Modern Honey Network (MHN)
 
Recon and Bug Bounties - What a great love story!
Recon and Bug Bounties - What a great love story!Recon and Bug Bounties - What a great love story!
Recon and Bug Bounties - What a great love story!
 
Basic malware analysis
Basic malware analysisBasic malware analysis
Basic malware analysis
 
Aircrack
AircrackAircrack
Aircrack
 
Forensically Sound Incident Response in Office 365 - SANS DFIR Summit 2018
Forensically Sound Incident Response in Office 365 - SANS DFIR Summit 2018Forensically Sound Incident Response in Office 365 - SANS DFIR Summit 2018
Forensically Sound Incident Response in Office 365 - SANS DFIR Summit 2018
 
Metasploit framwork
Metasploit framworkMetasploit framwork
Metasploit framwork
 
CSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open RedirectCSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open Redirect
 
Secure Session Management
Secure Session ManagementSecure Session Management
Secure Session Management
 
Penetration Testing Basics
Penetration Testing BasicsPenetration Testing Basics
Penetration Testing Basics
 
OWASP Top Ten
OWASP Top TenOWASP Top Ten
OWASP Top Ten
 
Introduction to penetration testing
Introduction to penetration testingIntroduction to penetration testing
Introduction to penetration testing
 

Viewers also liked

Heartbleed Explained
Heartbleed ExplainedHeartbleed Explained
Heartbleed ExplainedMike Chapple
 
What is Heartbleed?
What is Heartbleed?What is Heartbleed?
What is Heartbleed?Blue Coat
 
Heartbleed Bug Vulnerability: Discovery, Impact and Solution
Heartbleed Bug Vulnerability: Discovery, Impact and SolutionHeartbleed Bug Vulnerability: Discovery, Impact and Solution
Heartbleed Bug Vulnerability: Discovery, Impact and SolutionCASCouncil
 
How to Protect Yourself From Heartbleed Security Flaw
How to Protect Yourself From Heartbleed Security FlawHow to Protect Yourself From Heartbleed Security Flaw
How to Protect Yourself From Heartbleed Security FlawConnectSafely
 
vlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentationvlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets PresentationVolodymyr Lavrynovych
 
Heartache and Heartbleed - 31c3
Heartache and Heartbleed - 31c3Heartache and Heartbleed - 31c3
Heartache and Heartbleed - 31c3Nick Sullivan
 
Reverse Engineering the TomTom Runner pt. 2
Reverse Engineering the TomTom Runner pt. 2Reverse Engineering the TomTom Runner pt. 2
Reverse Engineering the TomTom Runner pt. 2Luis Grangeia
 
Image secret sharing using Shamir's Algorithm
Image secret sharing using Shamir's AlgorithmImage secret sharing using Shamir's Algorithm
Image secret sharing using Shamir's AlgorithmNikita Kasar
 
Heartbleed && Wireless
Heartbleed && WirelessHeartbleed && Wireless
Heartbleed && WirelessLuis Grangeia
 
Image secret sharing using Shamir's scheme with Steganography
Image secret sharing using Shamir's scheme with SteganographyImage secret sharing using Shamir's scheme with Steganography
Image secret sharing using Shamir's scheme with Steganography2510stk
 

Viewers also liked (13)

Heartbleed Explained
Heartbleed ExplainedHeartbleed Explained
Heartbleed Explained
 
What is Heartbleed?
What is Heartbleed?What is Heartbleed?
What is Heartbleed?
 
Heartbleed Bug Vulnerability: Discovery, Impact and Solution
Heartbleed Bug Vulnerability: Discovery, Impact and SolutionHeartbleed Bug Vulnerability: Discovery, Impact and Solution
Heartbleed Bug Vulnerability: Discovery, Impact and Solution
 
Poodles!!!
Poodles!!!Poodles!!!
Poodles!!!
 
How to Protect Yourself From Heartbleed Security Flaw
How to Protect Yourself From Heartbleed Security FlawHow to Protect Yourself From Heartbleed Security Flaw
How to Protect Yourself From Heartbleed Security Flaw
 
Heartbleed
HeartbleedHeartbleed
Heartbleed
 
vlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentationvlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentation
 
Heartache and Heartbleed - 31c3
Heartache and Heartbleed - 31c3Heartache and Heartbleed - 31c3
Heartache and Heartbleed - 31c3
 
Reverse Engineering the TomTom Runner pt. 2
Reverse Engineering the TomTom Runner pt. 2Reverse Engineering the TomTom Runner pt. 2
Reverse Engineering the TomTom Runner pt. 2
 
Image secret sharing using Shamir's Algorithm
Image secret sharing using Shamir's AlgorithmImage secret sharing using Shamir's Algorithm
Image secret sharing using Shamir's Algorithm
 
Heartbleed && Wireless
Heartbleed && WirelessHeartbleed && Wireless
Heartbleed && Wireless
 
Image secret sharing using Shamir's scheme with Steganography
Image secret sharing using Shamir's scheme with SteganographyImage secret sharing using Shamir's scheme with Steganography
Image secret sharing using Shamir's scheme with Steganography
 
Cybersecurity 2 cyber attacks
Cybersecurity 2 cyber attacksCybersecurity 2 cyber attacks
Cybersecurity 2 cyber attacks
 

Similar to The Heartbleed Attack

Report on Heartbleed
Report on HeartbleedReport on Heartbleed
Report on HeartbleedShiva Sagar
 
Transport Layer Security
Transport Layer SecurityTransport Layer Security
Transport Layer SecurityHuda Seyam
 
Session for InfoSecGirls - New age threat management vol 1
Session for InfoSecGirls - New age threat management vol 1Session for InfoSecGirls - New age threat management vol 1
Session for InfoSecGirls - New age threat management vol 1InfoSec Girls
 
BAIT1103 Chapter 4
BAIT1103 Chapter 4BAIT1103 Chapter 4
BAIT1103 Chapter 4limsh
 
Server Load Balancer Test Methodology
Server Load Balancer Test MethodologyServer Load Balancer Test Methodology
Server Load Balancer Test MethodologyIxia
 
Anatomy behind Fast Data Applications.pptx
Anatomy behind Fast Data Applications.pptxAnatomy behind Fast Data Applications.pptx
Anatomy behind Fast Data Applications.pptxdusavamsikrisna
 
Module 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdfModule 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdfShivakrishnan18
 
Web technology-guide
Web technology-guideWeb technology-guide
Web technology-guideSrihari
 
Arun prjct dox
Arun prjct doxArun prjct dox
Arun prjct doxBaig Mirza
 
network attacks
network attacks network attacks
network attacks MuskanSony
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocolsFabMinds
 
HTTP Request Smuggling
HTTP Request SmugglingHTTP Request Smuggling
HTTP Request SmugglingAkash Ashokan
 
HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)Gurjot Singh
 
Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02Nidhitransport
 
DDOS Mitigation Experience from IP ServerOne by CL Lee
DDOS Mitigation Experience from IP ServerOne by CL LeeDDOS Mitigation Experience from IP ServerOne by CL Lee
DDOS Mitigation Experience from IP ServerOne by CL LeeMyNOG
 

Similar to The Heartbleed Attack (20)

Heartbleed
HeartbleedHeartbleed
Heartbleed
 
Report on Heartbleed
Report on HeartbleedReport on Heartbleed
Report on Heartbleed
 
Transport Layer Security
Transport Layer SecurityTransport Layer Security
Transport Layer Security
 
Session for InfoSecGirls - New age threat management vol 1
Session for InfoSecGirls - New age threat management vol 1Session for InfoSecGirls - New age threat management vol 1
Session for InfoSecGirls - New age threat management vol 1
 
BAIT1103 Chapter 4
BAIT1103 Chapter 4BAIT1103 Chapter 4
BAIT1103 Chapter 4
 
HTTP(Hyper Text Transfer Protocol)
HTTP(Hyper Text Transfer Protocol)HTTP(Hyper Text Transfer Protocol)
HTTP(Hyper Text Transfer Protocol)
 
Chat application
Chat applicationChat application
Chat application
 
Server Load Balancer Test Methodology
Server Load Balancer Test MethodologyServer Load Balancer Test Methodology
Server Load Balancer Test Methodology
 
Anatomy behind Fast Data Applications.pptx
Anatomy behind Fast Data Applications.pptxAnatomy behind Fast Data Applications.pptx
Anatomy behind Fast Data Applications.pptx
 
Module 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdfModule 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdf
 
Web technology-guide
Web technology-guideWeb technology-guide
Web technology-guide
 
Arun prjct dox
Arun prjct doxArun prjct dox
Arun prjct dox
 
network attacks
network attacks network attacks
network attacks
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
Addios!
Addios!Addios!
Addios!
 
Http smuggling 1 200523064027
Http smuggling 1 200523064027Http smuggling 1 200523064027
Http smuggling 1 200523064027
 
HTTP Request Smuggling
HTTP Request SmugglingHTTP Request Smuggling
HTTP Request Smuggling
 
HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)
 
Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02
 
DDOS Mitigation Experience from IP ServerOne by CL Lee
DDOS Mitigation Experience from IP ServerOne by CL LeeDDOS Mitigation Experience from IP ServerOne by CL Lee
DDOS Mitigation Experience from IP ServerOne by CL Lee
 

Recently uploaded

This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 

Recently uploaded (20)

This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 

The Heartbleed Attack

  • 1. Heartbleed Attack - Shreyas Kothari (140302003) M.Tech (CNIS) Manipal University Jaipur
  • 2. Introduction • Heartbleed is a security bug disclosed in April 2014 in the OpenSSL cryptography library, which is a widely used for the implementation of the Transport Layer Security (TLS) protocol. • Heartbleed may be exploited regardless of whether the party using a vulnerable OpenSSL instance for TLS is a server or a client. • It results from improper input validation (due to a missing bounds check) in the implementation of the TLS heartbeat extension, thus the bug's name derives from "heartbeat”. • The vulnerability is classified as a buffer over-read, a situation where more data can be read than should be allowed.
  • 3. OpenSSL • OpenSSL is an open-source implementation of the SSL and TLS protocols. The core library, written in the C programming language, implements basic cryptographic functions and provides various utility functions. • The OpenSSL project was founded in 1998 to invent a free set of encryption tools for the code used on the Internet. As of 2014 two thirds of all webservers use it.
  • 4. Heartbeat Extension • The Heartbeat Extension provides a new protocol for TLS/DTLS allowing the usage of keep-alive functionality without performing a renegotiation. • TLS is based on reliable protocols, but there is no feature available to keep the connection alive without continuous data transfer. • The Heartbeat Extension overcomes these limitations. • The user can use the new HeartbeatRequest message, which has to be answered by the peer with a HeartbeartResponse immediately.
  • 5. Heartbeat Hello Extension • A peer cannot only indicate that its implementation supports Heartbeats, it can also choose whether it is willing to receive HeartbeatRequest messages and respond with HeartbeatResponse messages or only willing to send HeartbeatRequest messages. • The former is indicated by using peer_allowed_to_send as the HeartbeatMode; the latter is indicated by using peer_not_allowed_to_send as the Heartbeat mode. • This decision can be changed with every renegotiation.
  • 6. The Heartbeat Protocol • The Heartbeat protocol is a new protocol running on top of the Record Layer. The protocol itself consists of two message types: HeartbeatRequest and HeartbeatResponse. • A HeartbeatRequest message can arrive almost at any time during the lifetime of a connection. • There must not be more than one HeartbeatRequest message in flight at a time. A HeartbeatRequest message is considered to be in flight until the corresponding HeartbeatResponse message is received, or until the retransmit timer expires.
  • 7. Heartbeat Request / Response Message • The Heartbeat protocol messages consist of their type and an arbitrary payload and padding. • struct { HeartbeatMessageType type; uint16 payload_length; opaque payload[HeartbeatMessage.payload_length]; opaque padding[padding_length]; } HeartbeatMessage;
  • 8. Heartbeat Request / Response Message • The total length of a HeartbeatMessage must not exceed 2^14 Bytes. • type : The message type; either heartbeat_request or heartbeat_response. • payload_length : The length of the payload. • payload : The payload consists of arbitrary content. • Padding : It can be any random content and the sender of this message must use at least 16 Bytes of padding.
  • 9. Working • When a HeartbeatRequest message is received and sending a HeartbeatResponse is not prohibited, the receiver must send a corresponding HeartbeatResponse message carrying an exact copy of the payload of the received HeartbeatRequest. • If a received HeartbeatResponse message does not contain the expected payload, the message must be discarded. If it does contain the expected payload, the retransmission timer must be stopped.
  • 10. The Heartbleed Attack • We had discussed earlier in the introduction part that this attack was made possible because of the improper input validation of the TLS Heartbeat extension. The vulnerability lies in the payload variable. • Ideally the code must check the payload data length with the actual length of data sent in the Heartbeat request, but it isn’t checking it. • So if the payload exceeds the standard length in the request, the server may return more data in response than what it should ideally return.
  • 11. The Heartbleed Attack • This is a case of Buffer Overflow (BoF). Look at the following vulnerable code:
  • 12. The Heartbleed Attack • The rrec contains all the incoming request data. The code reads the data. The first byte is to check if it’s a Heartbeat protocol and then another 2 bytes determine the length of the Heartbeat payload. • Ideally the length of the payload must be equal to the payload_length sent in the Heartbeat request. But as discussed, the code is not checking actual length sent in the Heartbeat request.
  • 13. The Heartbleed Attack • So the code copies the amount of data requested by incoming requests to the outgoing server response and possibly more than requested in some cases. • This may leak valuable information to attackers, such as session IDs, tokens, keys, etc.
  • 14. The Heartbleed Attack • Let us try to understand this with the help of one scenario.
  • 18. What can be leaked ? • As said earlier, much sensitive information from the server’s memory can be sent in through the response. • Some of them are session-related information such as session ID, different tokens, keys, and some other sensitive internal information such as queries, internal data, etc. • The next image shows a real example of what we can receive in the responses.
  • 19. What can be leaked ?
  • 20. Solution • This vulnerability lies in the OpenSSL version 1.0.1f and 1.0.2 – beta1. • Affected users should upgrade to OpenSSL 1.0.1g. • Users unable to immediately upgrade can alternatively recompile OpenSSL with -DOPENSSL_NO_HEARTBEATS. • OpenSSL version 1.0.2 will be fixed in 1.0.2 – beta2.
  • 21. To check whether your website is safe visit 1) https://lastpass.com/heartbleed/ 2) https://filippo.io/Heartbleed/
  • 25. References 1. RFC 6520 - https://tools.ietf.org/html/rfc6520 2. www.heartbleed.com 3. Infosec Institute - http://resources.infosecinstitute.com/exploiting- heartbleed/ 4. https://xkcd.com/1354/ 5. https://www.openssl.org/news/secadv_20140407.txt 6. https://lastpass.com/heartbleed/