SlideShare a Scribd company logo
Lecture #14: Buffer Overflow Attack
Program and OS Security -Part III
Dr.Ramchandra Mangrulkar
September 3, 2020
Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 1 / 12
Contents
Non-Malicious programming errors:
Buffer overflow
Incomplete Mediation
Race Condition
Covert Channel
Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 2 / 12
Buffer
A buffer contains data that is stored for a short amount of time,
typically in the computer’s memory (RAM)
Hold data right before it is used
Download an audio or video file from the Internet, it may load
the first 20% of it into a buffer and then begin to play.
clip plays back, the computer continually downloads the rest of
the clip and stores it in the buffer
Whats Advantage?
Audio or Video will stall or skip when there is network
congestion.
Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 3 / 12
Buffer Overflow
Buffer overflow errors are characterized by the overwriting of
memory fragments of the process, which should have never been
modified intentionally or unintentionally.
Overwriting values of the IP (Instruction Pointer), BP (Base
Pointer) and other registers causes exceptions, segmentation
faults, and other errors to occur.
These errors end execution of the application in an unexpected
way
Buffer overflow errors occur when we operate on buffers of char
type.
Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 4 / 12
Types of Buffer Overflow Attacks
Stack-based buffer overflows are more common, and leverage
stack memory that only exists during the execution time of a
function.
Heap-based attacks are harder to carry out and involve flooding
the memory space allocated for a program beyond memory used
for current runtime operations.
Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 5 / 12
Example of Buffer Overflow
Source1
Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 6 / 12
Example of Buffer Overflow
Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 7 / 12
Buffer Overflow Analysis
The program calls a function, which operates on the char type
buffer and does no checks against overflowing the size assigned
to this buffer. As a result, it is possible to intentionally or
unintentionally store more data in the buffer, which will cause an
error. The following question arises: The buffer stores only eight
characters, so why did function printf() display twelve?.
The answer comes from the process memory organisation. Four
characters which overflowed the buffer also overwrite the value
stored in one of the registers, which was necessary for the
correct function return. Memory continuity resulted in printing
out the data stored in this memory area.
Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 8 / 12
How are buffer overflow errors are made?
gets()   > fgets() - read characters
strcpy()   > strncpy() - copy content of the buffer
strcat()   > strncat() - buffer concatenation
sprintf()   > snprintf() - fill buffer with data of different types
(f)scanf() - read from STDIN
getwd() - return working directory
realpath() - return absolute (full) path
Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 9 / 12
What Programming Languages are More
Vulnerable
C and C++ are two languages that are highly susceptible to
buffer overflow attacks, as they don’t have built-in safeguards
against overwriting or accessing data in their memory.
Mac OSX, Windows, and Linux all use code written in C and
C++.
Languages such as PERL, Java, JavaScript, and C use built-in
safety mechanisms that minimize the likelihood of buffer
overflow.
Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 10 / 12
How to Prevent Buffer Overflows
Address space randomization (ASLR)—randomly moves around
the address space locations of data regions. Typically, buffer
overflow attacks need to know the locality of executable code,
and randomizing address spaces makes this virtually impossible.
Data execution prevention—flags certain areas of memory as
non-executable or executable, which stops an attack from
running code in a non-executable region.
Structured exception handler overwrite protection
(SEHOP)—helps stop malicious code from attacking Structured
Exception Handling (SEH), a built-in system for managing
hardware and software exceptions. It thus prevents an attacker
from being able to make use of the SEH overwrite exploitation
technique.
Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 11 / 12
Linerization Attack Example
Cracking Password based on
Password Verification time
(Password = ”S123N456”)
For Efficiency, Check made
one char at a time
Can attacker take advantage
of it
Correct Password;
Verification Time Maximum
Incorrect password;
Verification Time Minimum
Attacker tries all 1 char
String and finds ”S” takes
longer time
Attacker tries all 2 char
String ”S*” and finds ”S1”Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 12 / 12
Ad

More Related Content

What's hot (20)

Network monitoring white paper
Network monitoring white paperNetwork monitoring white paper
Network monitoring white paper
Imaging Network Technology, LLC
 
A035401010
A035401010A035401010
A035401010
inventionjournals
 
Vulnerability Assessment and Penetration Testing Report
Vulnerability Assessment and Penetration Testing Report Vulnerability Assessment and Penetration Testing Report
Vulnerability Assessment and Penetration Testing Report
Rishabh Upadhyay
 
IRJET- Data Security using Honeypot System
IRJET- Data Security using Honeypot SystemIRJET- Data Security using Honeypot System
IRJET- Data Security using Honeypot System
IRJET Journal
 
Malware analysis on android using supervised machine learning techniques
Malware analysis on android using supervised machine learning techniquesMalware analysis on android using supervised machine learning techniques
Malware analysis on android using supervised machine learning techniques
Md. Shohel Rana
 
Ns
NsNs
Ns
Deepenti123
 
Malware Bytes – Advanced Fault Analysis
Malware Bytes – Advanced Fault AnalysisMalware Bytes – Advanced Fault Analysis
Malware Bytes – Advanced Fault Analysis
IRJET Journal
 
Basic survey on malware analysis, tools and techniques
Basic survey on malware analysis, tools and techniquesBasic survey on malware analysis, tools and techniques
Basic survey on malware analysis, tools and techniques
ijcsa
 
Contending Malware Threat using Hybrid Security Model
Contending Malware Threat using Hybrid Security ModelContending Malware Threat using Hybrid Security Model
Contending Malware Threat using Hybrid Security Model
IRJET Journal
 
46 102-112
46 102-11246 102-112
46 102-112
idescitation
 
Exploring the Social Engineering Toolkit (Set) Using Backtrack 5R3
Exploring the Social Engineering Toolkit (Set) Using Backtrack 5R3Exploring the Social Engineering Toolkit (Set) Using Backtrack 5R3
Exploring the Social Engineering Toolkit (Set) Using Backtrack 5R3
IJERA Editor
 
Security Compliance Web Application Risk Management
Security Compliance Web Application Risk ManagementSecurity Compliance Web Application Risk Management
Security Compliance Web Application Risk Management
Marco Morana
 
PACE-IT: Common Threats (part 1)
PACE-IT: Common Threats (part 1)PACE-IT: Common Threats (part 1)
PACE-IT: Common Threats (part 1)
Pace IT at Edmonds Community College
 
Invesitigation of Malware and Forensic Tools on Internet
Invesitigation of Malware and Forensic Tools on Internet Invesitigation of Malware and Forensic Tools on Internet
Invesitigation of Malware and Forensic Tools on Internet
IJECEIAES
 
System and Enterprise Security Project - Penetration Testing
System and Enterprise Security Project - Penetration TestingSystem and Enterprise Security Project - Penetration Testing
System and Enterprise Security Project - Penetration Testing
Biagio Botticelli
 
Cognitive Computing in Security with AI
Cognitive Computing in Security with AI Cognitive Computing in Security with AI
Cognitive Computing in Security with AI
JoAnna Cheshire
 
External Attacks Against Privileged Accounts - How Federal Agencies Can Build...
External Attacks Against Privileged Accounts - How Federal Agencies Can Build...External Attacks Against Privileged Accounts - How Federal Agencies Can Build...
External Attacks Against Privileged Accounts - How Federal Agencies Can Build...
BeyondTrust
 
External Attacks Against Pivileged Accounts
External Attacks Against Pivileged AccountsExternal Attacks Against Pivileged Accounts
External Attacks Against Pivileged Accounts
Lindsay Marsh
 
eForensics_17_2013_KMOKER
eForensics_17_2013_KMOKEReForensics_17_2013_KMOKER
eForensics_17_2013_KMOKER
Kevin M. Moker, CFE, CISSP, ISSMP, CISM
 
PACE-IT: Common Threats (part 2)
PACE-IT: Common Threats (part 2)PACE-IT: Common Threats (part 2)
PACE-IT: Common Threats (part 2)
Pace IT at Edmonds Community College
 
Vulnerability Assessment and Penetration Testing Report
Vulnerability Assessment and Penetration Testing Report Vulnerability Assessment and Penetration Testing Report
Vulnerability Assessment and Penetration Testing Report
Rishabh Upadhyay
 
IRJET- Data Security using Honeypot System
IRJET- Data Security using Honeypot SystemIRJET- Data Security using Honeypot System
IRJET- Data Security using Honeypot System
IRJET Journal
 
Malware analysis on android using supervised machine learning techniques
Malware analysis on android using supervised machine learning techniquesMalware analysis on android using supervised machine learning techniques
Malware analysis on android using supervised machine learning techniques
Md. Shohel Rana
 
Malware Bytes – Advanced Fault Analysis
Malware Bytes – Advanced Fault AnalysisMalware Bytes – Advanced Fault Analysis
Malware Bytes – Advanced Fault Analysis
IRJET Journal
 
Basic survey on malware analysis, tools and techniques
Basic survey on malware analysis, tools and techniquesBasic survey on malware analysis, tools and techniques
Basic survey on malware analysis, tools and techniques
ijcsa
 
Contending Malware Threat using Hybrid Security Model
Contending Malware Threat using Hybrid Security ModelContending Malware Threat using Hybrid Security Model
Contending Malware Threat using Hybrid Security Model
IRJET Journal
 
Exploring the Social Engineering Toolkit (Set) Using Backtrack 5R3
Exploring the Social Engineering Toolkit (Set) Using Backtrack 5R3Exploring the Social Engineering Toolkit (Set) Using Backtrack 5R3
Exploring the Social Engineering Toolkit (Set) Using Backtrack 5R3
IJERA Editor
 
Security Compliance Web Application Risk Management
Security Compliance Web Application Risk ManagementSecurity Compliance Web Application Risk Management
Security Compliance Web Application Risk Management
Marco Morana
 
Invesitigation of Malware and Forensic Tools on Internet
Invesitigation of Malware and Forensic Tools on Internet Invesitigation of Malware and Forensic Tools on Internet
Invesitigation of Malware and Forensic Tools on Internet
IJECEIAES
 
System and Enterprise Security Project - Penetration Testing
System and Enterprise Security Project - Penetration TestingSystem and Enterprise Security Project - Penetration Testing
System and Enterprise Security Project - Penetration Testing
Biagio Botticelli
 
Cognitive Computing in Security with AI
Cognitive Computing in Security with AI Cognitive Computing in Security with AI
Cognitive Computing in Security with AI
JoAnna Cheshire
 
External Attacks Against Privileged Accounts - How Federal Agencies Can Build...
External Attacks Against Privileged Accounts - How Federal Agencies Can Build...External Attacks Against Privileged Accounts - How Federal Agencies Can Build...
External Attacks Against Privileged Accounts - How Federal Agencies Can Build...
BeyondTrust
 
External Attacks Against Pivileged Accounts
External Attacks Against Pivileged AccountsExternal Attacks Against Pivileged Accounts
External Attacks Against Pivileged Accounts
Lindsay Marsh
 

Similar to Lecture #15: Buffer Overflow Attack (Non Malicious Attack) (20)

Buffer overflow
Buffer overflowBuffer overflow
Buffer overflow
Abu Juha Ahmed Muid
 
Chapter 2 program-security
Chapter 2 program-securityChapter 2 program-security
Chapter 2 program-security
Vamsee Krishna Kiran
 
Buffer OverFlow Exploit
Buffer OverFlow ExploitBuffer OverFlow Exploit
Buffer OverFlow Exploit
Suresh Krishna
 
Computer Science Terms Need To know AboutHave you ever spent.docx
Computer Science Terms Need To know AboutHave you ever spent.docxComputer Science Terms Need To know AboutHave you ever spent.docx
Computer Science Terms Need To know AboutHave you ever spent.docx
patricke8
 
Ids 008 buffer overflow
Ids 008 buffer overflowIds 008 buffer overflow
Ids 008 buffer overflow
jyoti_lakhani
 
What
WhatWhat
What
anity
 
Module 20 (buffer overflows)
Module 20 (buffer overflows)Module 20 (buffer overflows)
Module 20 (buffer overflows)
Wail Hassan
 
KYS SSD - SOMMERVILE CH13-SECURE PROGRAMMING.pptx
KYS SSD - SOMMERVILE CH13-SECURE PROGRAMMING.pptxKYS SSD - SOMMERVILE CH13-SECURE PROGRAMMING.pptx
KYS SSD - SOMMERVILE CH13-SECURE PROGRAMMING.pptx
AniSyafrina1
 
Manipulating Memory for Fun and Profit
Manipulating Memory for Fun and ProfitManipulating Memory for Fun and Profit
Manipulating Memory for Fun and Profit
Jovi Umawing
 
Manipulating Memory for Fun & Profit
Manipulating Memory for Fun & ProfitManipulating Memory for Fun & Profit
Manipulating Memory for Fun & Profit
High-Tech Bridge SA (HTBridge)
 
Manipulating memory for fun and profit
Manipulating memory for fun and profitManipulating memory for fun and profit
Manipulating memory for fun and profit
Yury Chemerkin
 
Manipulating memory for fun and profit
Manipulating memory for fun and profitManipulating memory for fun and profit
Manipulating memory for fun and profit
Yury Chemerkin
 
unit 2 -program security.pdf
unit 2 -program security.pdfunit 2 -program security.pdf
unit 2 -program security.pdf
KavithaK23
 
An automated approach to fix buffer overflows
An automated approach to fix buffer overflows An automated approach to fix buffer overflows
An automated approach to fix buffer overflows
IJECEIAES
 
How to find_vulnerability_in_software
How to find_vulnerability_in_softwareHow to find_vulnerability_in_software
How to find_vulnerability_in_software
sanghwan ahn
 
Computer Security Principles And Practice 2nd Edition Stallings Test Bank
Computer Security Principles And Practice 2nd Edition Stallings Test BankComputer Security Principles And Practice 2nd Edition Stallings Test Bank
Computer Security Principles And Practice 2nd Edition Stallings Test Bank
lakderscarfs
 
Major project report
Major project reportMajor project report
Major project report
SERTEL ELECTRONICS UK LIMITED
 
virtual memory.ppt
virtual memory.pptvirtual memory.ppt
virtual memory.ppt
suryansh85
 
Virtual memory presentation
Virtual memory presentationVirtual memory presentation
Virtual memory presentation
Ranjeet Kumar
 
Memory Management in Trading Platforms
Memory Management in Trading PlatformsMemory Management in Trading Platforms
Memory Management in Trading Platforms
IRJET Journal
 
Buffer OverFlow Exploit
Buffer OverFlow ExploitBuffer OverFlow Exploit
Buffer OverFlow Exploit
Suresh Krishna
 
Computer Science Terms Need To know AboutHave you ever spent.docx
Computer Science Terms Need To know AboutHave you ever spent.docxComputer Science Terms Need To know AboutHave you ever spent.docx
Computer Science Terms Need To know AboutHave you ever spent.docx
patricke8
 
Ids 008 buffer overflow
Ids 008 buffer overflowIds 008 buffer overflow
Ids 008 buffer overflow
jyoti_lakhani
 
What
WhatWhat
What
anity
 
Module 20 (buffer overflows)
Module 20 (buffer overflows)Module 20 (buffer overflows)
Module 20 (buffer overflows)
Wail Hassan
 
KYS SSD - SOMMERVILE CH13-SECURE PROGRAMMING.pptx
KYS SSD - SOMMERVILE CH13-SECURE PROGRAMMING.pptxKYS SSD - SOMMERVILE CH13-SECURE PROGRAMMING.pptx
KYS SSD - SOMMERVILE CH13-SECURE PROGRAMMING.pptx
AniSyafrina1
 
Manipulating Memory for Fun and Profit
Manipulating Memory for Fun and ProfitManipulating Memory for Fun and Profit
Manipulating Memory for Fun and Profit
Jovi Umawing
 
Manipulating memory for fun and profit
Manipulating memory for fun and profitManipulating memory for fun and profit
Manipulating memory for fun and profit
Yury Chemerkin
 
Manipulating memory for fun and profit
Manipulating memory for fun and profitManipulating memory for fun and profit
Manipulating memory for fun and profit
Yury Chemerkin
 
unit 2 -program security.pdf
unit 2 -program security.pdfunit 2 -program security.pdf
unit 2 -program security.pdf
KavithaK23
 
An automated approach to fix buffer overflows
An automated approach to fix buffer overflows An automated approach to fix buffer overflows
An automated approach to fix buffer overflows
IJECEIAES
 
How to find_vulnerability_in_software
How to find_vulnerability_in_softwareHow to find_vulnerability_in_software
How to find_vulnerability_in_software
sanghwan ahn
 
Computer Security Principles And Practice 2nd Edition Stallings Test Bank
Computer Security Principles And Practice 2nd Edition Stallings Test BankComputer Security Principles And Practice 2nd Edition Stallings Test Bank
Computer Security Principles And Practice 2nd Edition Stallings Test Bank
lakderscarfs
 
virtual memory.ppt
virtual memory.pptvirtual memory.ppt
virtual memory.ppt
suryansh85
 
Virtual memory presentation
Virtual memory presentationVirtual memory presentation
Virtual memory presentation
Ranjeet Kumar
 
Memory Management in Trading Platforms
Memory Management in Trading PlatformsMemory Management in Trading Platforms
Memory Management in Trading Platforms
IRJET Journal
 
Ad

More from Dr. Ramchandra Mangrulkar (20)

Gibbs sampling is a Markov Chain Monte Carlo (MCMC)
Gibbs sampling is a Markov Chain Monte Carlo (MCMC)Gibbs sampling is a Markov Chain Monte Carlo (MCMC)
Gibbs sampling is a Markov Chain Monte Carlo (MCMC)
Dr. Ramchandra Mangrulkar
 
Introduction to Research and Publications Tools.pdf
Introduction to Research and Publications Tools.pdfIntroduction to Research and Publications Tools.pdf
Introduction to Research and Publications Tools.pdf
Dr. Ramchandra Mangrulkar
 
Blockchain#2.pdf
Blockchain#2.pdfBlockchain#2.pdf
Blockchain#2.pdf
Dr. Ramchandra Mangrulkar
 
Blockchain#1.pdf
Blockchain#1.pdfBlockchain#1.pdf
Blockchain#1.pdf
Dr. Ramchandra Mangrulkar
 
Blockchain#3.pdf
Blockchain#3.pdfBlockchain#3.pdf
Blockchain#3.pdf
Dr. Ramchandra Mangrulkar
 
Manuscript Preparation using Latex: A Cloud Based Approach(Overleaf)
Manuscript Preparation using Latex: A Cloud Based Approach(Overleaf)Manuscript Preparation using Latex: A Cloud Based Approach(Overleaf)
Manuscript Preparation using Latex: A Cloud Based Approach(Overleaf)
Dr. Ramchandra Mangrulkar
 
Lecture #32: Digital Forensics : Evidence Handling, Validation and Reporting
Lecture #32: Digital Forensics : Evidence Handling, Validation and ReportingLecture #32: Digital Forensics : Evidence Handling, Validation and Reporting
Lecture #32: Digital Forensics : Evidence Handling, Validation and Reporting
Dr. Ramchandra Mangrulkar
 
LEcture #28-#30
LEcture #28-#30LEcture #28-#30
LEcture #28-#30
Dr. Ramchandra Mangrulkar
 
Lecture #25 : Oauth 2.0
Lecture #25 : Oauth 2.0Lecture #25 : Oauth 2.0
Lecture #25 : Oauth 2.0
Dr. Ramchandra Mangrulkar
 
Lecture #24 : Cross Site Request Forgery (CSRF)
Lecture #24 : Cross Site Request Forgery (CSRF)Lecture #24 : Cross Site Request Forgery (CSRF)
Lecture #24 : Cross Site Request Forgery (CSRF)
Dr. Ramchandra Mangrulkar
 
Lecture #22: Web Privacy & Security Breach
Lecture #22: Web Privacy & Security BreachLecture #22: Web Privacy & Security Breach
Lecture #22: Web Privacy & Security Breach
Dr. Ramchandra Mangrulkar
 
Lecture #22 : Web Privacy & Security Breach
Lecture #22 : Web Privacy & Security BreachLecture #22 : Web Privacy & Security Breach
Lecture #22 : Web Privacy & Security Breach
Dr. Ramchandra Mangrulkar
 
Lecture #21: HTTPS , SSL & TLS
Lecture #21: HTTPS , SSL & TLSLecture #21: HTTPS , SSL & TLS
Lecture #21: HTTPS , SSL & TLS
Dr. Ramchandra Mangrulkar
 
Lecture # 14: Salami and Linearization Attacks
Lecture # 14: Salami and Linearization Attacks Lecture # 14: Salami and Linearization Attacks
Lecture # 14: Salami and Linearization Attacks
Dr. Ramchandra Mangrulkar
 
Lecture #9 : Single Sign on and Federation Identity Management
Lecture #9 :  Single Sign on and Federation Identity ManagementLecture #9 :  Single Sign on and Federation Identity Management
Lecture #9 : Single Sign on and Federation Identity Management
Dr. Ramchandra Mangrulkar
 
Lecture #8: Clark-Wilson & Chinese Wall Model for Multilevel Security
Lecture #8: Clark-Wilson & Chinese Wall Model for Multilevel SecurityLecture #8: Clark-Wilson & Chinese Wall Model for Multilevel Security
Lecture #8: Clark-Wilson & Chinese Wall Model for Multilevel Security
Dr. Ramchandra Mangrulkar
 
Lecture #6: Multilevel Security Models
Lecture #6: Multilevel Security ModelsLecture #6: Multilevel Security Models
Lecture #6: Multilevel Security Models
Dr. Ramchandra Mangrulkar
 
Lecture #7: Bell Lapdula and Biba Model of Multilevel Security
Lecture #7: Bell Lapdula and Biba Model of Multilevel SecurityLecture #7: Bell Lapdula and Biba Model of Multilevel Security
Lecture #7: Bell Lapdula and Biba Model of Multilevel Security
Dr. Ramchandra Mangrulkar
 
Lecture #4: Access Control Policies
Lecture #4: Access Control PoliciesLecture #4: Access Control Policies
Lecture #4: Access Control Policies
Dr. Ramchandra Mangrulkar
 
Lecture #3: Defense Strategies and Techniques: Part II
 Lecture #3: Defense Strategies and Techniques: Part II Lecture #3: Defense Strategies and Techniques: Part II
Lecture #3: Defense Strategies and Techniques: Part II
Dr. Ramchandra Mangrulkar
 
Gibbs sampling is a Markov Chain Monte Carlo (MCMC)
Gibbs sampling is a Markov Chain Monte Carlo (MCMC)Gibbs sampling is a Markov Chain Monte Carlo (MCMC)
Gibbs sampling is a Markov Chain Monte Carlo (MCMC)
Dr. Ramchandra Mangrulkar
 
Introduction to Research and Publications Tools.pdf
Introduction to Research and Publications Tools.pdfIntroduction to Research and Publications Tools.pdf
Introduction to Research and Publications Tools.pdf
Dr. Ramchandra Mangrulkar
 
Manuscript Preparation using Latex: A Cloud Based Approach(Overleaf)
Manuscript Preparation using Latex: A Cloud Based Approach(Overleaf)Manuscript Preparation using Latex: A Cloud Based Approach(Overleaf)
Manuscript Preparation using Latex: A Cloud Based Approach(Overleaf)
Dr. Ramchandra Mangrulkar
 
Lecture #32: Digital Forensics : Evidence Handling, Validation and Reporting
Lecture #32: Digital Forensics : Evidence Handling, Validation and ReportingLecture #32: Digital Forensics : Evidence Handling, Validation and Reporting
Lecture #32: Digital Forensics : Evidence Handling, Validation and Reporting
Dr. Ramchandra Mangrulkar
 
Lecture #24 : Cross Site Request Forgery (CSRF)
Lecture #24 : Cross Site Request Forgery (CSRF)Lecture #24 : Cross Site Request Forgery (CSRF)
Lecture #24 : Cross Site Request Forgery (CSRF)
Dr. Ramchandra Mangrulkar
 
Lecture # 14: Salami and Linearization Attacks
Lecture # 14: Salami and Linearization Attacks Lecture # 14: Salami and Linearization Attacks
Lecture # 14: Salami and Linearization Attacks
Dr. Ramchandra Mangrulkar
 
Lecture #9 : Single Sign on and Federation Identity Management
Lecture #9 :  Single Sign on and Federation Identity ManagementLecture #9 :  Single Sign on and Federation Identity Management
Lecture #9 : Single Sign on and Federation Identity Management
Dr. Ramchandra Mangrulkar
 
Lecture #8: Clark-Wilson & Chinese Wall Model for Multilevel Security
Lecture #8: Clark-Wilson & Chinese Wall Model for Multilevel SecurityLecture #8: Clark-Wilson & Chinese Wall Model for Multilevel Security
Lecture #8: Clark-Wilson & Chinese Wall Model for Multilevel Security
Dr. Ramchandra Mangrulkar
 
Lecture #7: Bell Lapdula and Biba Model of Multilevel Security
Lecture #7: Bell Lapdula and Biba Model of Multilevel SecurityLecture #7: Bell Lapdula and Biba Model of Multilevel Security
Lecture #7: Bell Lapdula and Biba Model of Multilevel Security
Dr. Ramchandra Mangrulkar
 
Lecture #3: Defense Strategies and Techniques: Part II
 Lecture #3: Defense Strategies and Techniques: Part II Lecture #3: Defense Strategies and Techniques: Part II
Lecture #3: Defense Strategies and Techniques: Part II
Dr. Ramchandra Mangrulkar
 
Ad

Recently uploaded (20)

Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptxUnleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
SanjeetMishra29
 
VISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated detailsVISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated details
Vishal Kumar Singh
 
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning ModelsMode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Journal of Soft Computing in Civil Engineering
 
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
ssuserd9338b
 
IBAAS 2023 Series_Lecture 8- Dr. Nandi.pdf
IBAAS 2023 Series_Lecture 8- Dr. Nandi.pdfIBAAS 2023 Series_Lecture 8- Dr. Nandi.pdf
IBAAS 2023 Series_Lecture 8- Dr. Nandi.pdf
VigneshPalaniappanM
 
Zeiss-Ultra-Optimeter metrology subject.pdf
Zeiss-Ultra-Optimeter metrology subject.pdfZeiss-Ultra-Optimeter metrology subject.pdf
Zeiss-Ultra-Optimeter metrology subject.pdf
Saikumar174642
 
vtc2018fall_otfs_tutorial_presentation_1.pdf
vtc2018fall_otfs_tutorial_presentation_1.pdfvtc2018fall_otfs_tutorial_presentation_1.pdf
vtc2018fall_otfs_tutorial_presentation_1.pdf
RaghavaGD1
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
Pierre Celestin Eyock
 
Dahua Smart Cityyyyyyyyyyyyyyyyyy2025.pdf
Dahua Smart Cityyyyyyyyyyyyyyyyyy2025.pdfDahua Smart Cityyyyyyyyyyyyyyyyyy2025.pdf
Dahua Smart Cityyyyyyyyyyyyyyyyyy2025.pdf
PawachMetharattanara
 
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic AlgorithmDesign Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Journal of Soft Computing in Civil Engineering
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFTDeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
Kyohei Ito
 
22PCOAM16 Unit 3 Session 23 Different ways to Combine Classifiers.pptx
22PCOAM16 Unit 3 Session 23  Different ways to Combine Classifiers.pptx22PCOAM16 Unit 3 Session 23  Different ways to Combine Classifiers.pptx
22PCOAM16 Unit 3 Session 23 Different ways to Combine Classifiers.pptx
Guru Nanak Technical Institutions
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software ApplicationsJacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia
 
Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptxUnleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
SanjeetMishra29
 
VISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated detailsVISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated details
Vishal Kumar Singh
 
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
ssuserd9338b
 
IBAAS 2023 Series_Lecture 8- Dr. Nandi.pdf
IBAAS 2023 Series_Lecture 8- Dr. Nandi.pdfIBAAS 2023 Series_Lecture 8- Dr. Nandi.pdf
IBAAS 2023 Series_Lecture 8- Dr. Nandi.pdf
VigneshPalaniappanM
 
Zeiss-Ultra-Optimeter metrology subject.pdf
Zeiss-Ultra-Optimeter metrology subject.pdfZeiss-Ultra-Optimeter metrology subject.pdf
Zeiss-Ultra-Optimeter metrology subject.pdf
Saikumar174642
 
vtc2018fall_otfs_tutorial_presentation_1.pdf
vtc2018fall_otfs_tutorial_presentation_1.pdfvtc2018fall_otfs_tutorial_presentation_1.pdf
vtc2018fall_otfs_tutorial_presentation_1.pdf
RaghavaGD1
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
Pierre Celestin Eyock
 
Dahua Smart Cityyyyyyyyyyyyyyyyyy2025.pdf
Dahua Smart Cityyyyyyyyyyyyyyyyyy2025.pdfDahua Smart Cityyyyyyyyyyyyyyyyyy2025.pdf
Dahua Smart Cityyyyyyyyyyyyyyyyyy2025.pdf
PawachMetharattanara
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFTDeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
Kyohei Ito
 
22PCOAM16 Unit 3 Session 23 Different ways to Combine Classifiers.pptx
22PCOAM16 Unit 3 Session 23  Different ways to Combine Classifiers.pptx22PCOAM16 Unit 3 Session 23  Different ways to Combine Classifiers.pptx
22PCOAM16 Unit 3 Session 23 Different ways to Combine Classifiers.pptx
Guru Nanak Technical Institutions
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software ApplicationsJacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia
 

Lecture #15: Buffer Overflow Attack (Non Malicious Attack)

  • 1. Lecture #14: Buffer Overflow Attack Program and OS Security -Part III Dr.Ramchandra Mangrulkar September 3, 2020 Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 1 / 12
  • 2. Contents Non-Malicious programming errors: Buffer overflow Incomplete Mediation Race Condition Covert Channel Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 2 / 12
  • 3. Buffer A buffer contains data that is stored for a short amount of time, typically in the computer’s memory (RAM) Hold data right before it is used Download an audio or video file from the Internet, it may load the first 20% of it into a buffer and then begin to play. clip plays back, the computer continually downloads the rest of the clip and stores it in the buffer Whats Advantage? Audio or Video will stall or skip when there is network congestion. Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 3 / 12
  • 4. Buffer Overflow Buffer overflow errors are characterized by the overwriting of memory fragments of the process, which should have never been modified intentionally or unintentionally. Overwriting values of the IP (Instruction Pointer), BP (Base Pointer) and other registers causes exceptions, segmentation faults, and other errors to occur. These errors end execution of the application in an unexpected way Buffer overflow errors occur when we operate on buffers of char type. Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 4 / 12
  • 5. Types of Buffer Overflow Attacks Stack-based buffer overflows are more common, and leverage stack memory that only exists during the execution time of a function. Heap-based attacks are harder to carry out and involve flooding the memory space allocated for a program beyond memory used for current runtime operations. Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 5 / 12
  • 6. Example of Buffer Overflow Source1 Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 6 / 12
  • 7. Example of Buffer Overflow Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 7 / 12
  • 8. Buffer Overflow Analysis The program calls a function, which operates on the char type buffer and does no checks against overflowing the size assigned to this buffer. As a result, it is possible to intentionally or unintentionally store more data in the buffer, which will cause an error. The following question arises: The buffer stores only eight characters, so why did function printf() display twelve?. The answer comes from the process memory organisation. Four characters which overflowed the buffer also overwrite the value stored in one of the registers, which was necessary for the correct function return. Memory continuity resulted in printing out the data stored in this memory area. Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 8 / 12
  • 9. How are buffer overflow errors are made? gets()   > fgets() - read characters strcpy()   > strncpy() - copy content of the buffer strcat()   > strncat() - buffer concatenation sprintf()   > snprintf() - fill buffer with data of different types (f)scanf() - read from STDIN getwd() - return working directory realpath() - return absolute (full) path Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 9 / 12
  • 10. What Programming Languages are More Vulnerable C and C++ are two languages that are highly susceptible to buffer overflow attacks, as they don’t have built-in safeguards against overwriting or accessing data in their memory. Mac OSX, Windows, and Linux all use code written in C and C++. Languages such as PERL, Java, JavaScript, and C use built-in safety mechanisms that minimize the likelihood of buffer overflow. Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 10 / 12
  • 11. How to Prevent Buffer Overflows Address space randomization (ASLR)—randomly moves around the address space locations of data regions. Typically, buffer overflow attacks need to know the locality of executable code, and randomizing address spaces makes this virtually impossible. Data execution prevention—flags certain areas of memory as non-executable or executable, which stops an attack from running code in a non-executable region. Structured exception handler overwrite protection (SEHOP)—helps stop malicious code from attacking Structured Exception Handling (SEH), a built-in system for managing hardware and software exceptions. It thus prevents an attacker from being able to make use of the SEH overwrite exploitation technique. Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 11 / 12
  • 12. Linerization Attack Example Cracking Password based on Password Verification time (Password = ”S123N456”) For Efficiency, Check made one char at a time Can attacker take advantage of it Correct Password; Verification Time Maximum Incorrect password; Verification Time Minimum Attacker tries all 1 char String and finds ”S” takes longer time Attacker tries all 2 char String ”S*” and finds ”S1”Dr.Ramchandra Mangrulkar Lecture #14: Buffer Overflow Attack September 3, 2020 12 / 12
  翻译: