SlideShare a Scribd company logo
Buffer Overflow for
Beginners
Ajin Abraham
www.keralacyberforce.in
Buffer: it is a block of memory
What is Buffer Overflow?
Buffer overflow is caused when too
much data is inserted into a buffer
than it can handle. So this may lead to
the executing of arbitrary code if a
certain memory pointer is
overwritten.
Buffer Overflow for
Beginner
Command
Name
152903854
128 + 6 bytes
152903720
10 + 6 bytes
152903704
Buffer Overflow for
Beginner
Command {with system() function execute
the contents of the variable command}
system(command);
Name {Read to Name Variable and Print the contents
of name variable}
gets(name);
printf(“Hello %sn”,name);
Buffer Overflow for
Beginner
When you give an input,
say
www.keralacyberforce.in
What happens?
Buffer Overflow for
Beginner
commandorce.in
(10)namewww.kerala
(6)malloccyberf
152903832
128 + 6 bytes
10 + 6 bytes
152903704
It will be assigned to the memory like this.
Buffer Overflow for
Beginner
This buffer overflow is
caused because the
gets() function doesn't
limit’s the length of the
input
Buffer Overflow for
Beginner
To overrule this buffer
overflow you can use
fgets(name, 10, stdin);
where it will read a maximum
of 10 characters from the
input.

More Related Content

PPTX
Buffer overflow for Beginners
PPTX
Primeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SP
PDF
Scaling WordPress
PPT
4 exercises for part 1
ODP
WebSockets with PHP: Mission impossible
PPT
Azure ServiceBus Queues and Topics
PDF
Eventful Email in Ruby
PDF
Steve Corona: Scaling LAMP doesn't have to suck
Buffer overflow for Beginners
Primeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SP
Scaling WordPress
4 exercises for part 1
WebSockets with PHP: Mission impossible
Azure ServiceBus Queues and Topics
Eventful Email in Ruby
Steve Corona: Scaling LAMP doesn't have to suck

What's hot (20)

PDF
Installing Tomcat on Ubuntu Instance
PPTX
PPTX
Oracle Database Cloud Performance Doag 2016
PDF
LCA2014 - Introduction to Go
PPTX
Scheduling torque-maui-tutorial
PDF
maXbox Starter 42 Multiprocessing Programming
PDF
Dev ops on startup environment
PDF
톰캣 #09-쓰레드
PPTX
Cse 241
PDF
Ip firewall mangle
PDF
How to install a wordpress theme in local computer
PDF
WordPress Security - A Top Down Approach
ODP
sshuttle VPN (2011-04)
ODP
Caching web contents in the browser
PDF
Aeon mike guide transparent ssl filtering
PDF
Aeon mike guide transparent ssl filtering (1)
PDF
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
DOCX
Automation m ysql_and_customer_photo
PPTX
你不知道的前端
PPTX
Cloudera amazon-ec2
Installing Tomcat on Ubuntu Instance
Oracle Database Cloud Performance Doag 2016
LCA2014 - Introduction to Go
Scheduling torque-maui-tutorial
maXbox Starter 42 Multiprocessing Programming
Dev ops on startup environment
톰캣 #09-쓰레드
Cse 241
Ip firewall mangle
How to install a wordpress theme in local computer
WordPress Security - A Top Down Approach
sshuttle VPN (2011-04)
Caching web contents in the browser
Aeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filtering (1)
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
Automation m ysql_and_customer_photo
你不知道的前端
Cloudera amazon-ec2
Ad

Similar to Exploit Research and Development Megaprimer: Buffer overflow for beginners (20)

PDF
About Node.js
PDF
Ppl for students unit 4 and 5
PDF
Ppl for students unit 4 and 5
PPTX
C Sharp Tutorial : C Sharp Exception
PPT
Session Server - Maintaing State between several Servers
PPT
Download It
PDF
idea: talk about the Active Cache
ODP
Inter-Process/Task Communication With Message Queues
PPT
Web Bugs
PPT
Unusual Web Bugs
PDF
AMIMOTO: WordPress + Amazon Web Services Hands-on PARIS
PDF
BP107: Ten Lines Or Less: Interesting Things You Can Do In Java With Minimal ...
PDF
10 Lines or Less; Interesting Things You Can Do In Java With Minimal Code
PPTX
Operating System Engineering Quiz
PDF
Cacoo enterprise installation_manual
PDF
Buffer overflow tutorial
PPTX
Oop object oriented programing topics
PPTX
Node.js
PPT
Find bottleneck and tuning in Java Application
PPT
Analysis bottleneck in J2EE application
About Node.js
Ppl for students unit 4 and 5
Ppl for students unit 4 and 5
C Sharp Tutorial : C Sharp Exception
Session Server - Maintaing State between several Servers
Download It
idea: talk about the Active Cache
Inter-Process/Task Communication With Message Queues
Web Bugs
Unusual Web Bugs
AMIMOTO: WordPress + Amazon Web Services Hands-on PARIS
BP107: Ten Lines Or Less: Interesting Things You Can Do In Java With Minimal ...
10 Lines or Less; Interesting Things You Can Do In Java With Minimal Code
Operating System Engineering Quiz
Cacoo enterprise installation_manual
Buffer overflow tutorial
Oop object oriented programing topics
Node.js
Find bottleneck and tuning in Java Application
Analysis bottleneck in J2EE application
Ad

More from Ajin Abraham (20)

PDF
AppSec PNW: Android and iOS Application Security with MobSF
PDF
Injecting Security into Web apps at Runtime Whitepaper
PDF
Injecting Security into vulnerable web apps at Runtime
PPTX
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
PDF
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
PPTX
Automated Security Analysis of Android & iOS Applications with Mobile Securit...
PPTX
G4H Webcast: Automated Security Analysis of Mobile Applications with Mobile S...
PPTX
Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015
PDF
Hacking Tizen: The OS of everything - Whitepaper
PPTX
Hacking Tizen : The OS of Everything - Nullcon Goa 2015
PPTX
Abusing Exploiting and Pwning with Firefox Addons
PPTX
Exploit Research and Development Megaprimer: DEP Bypassing with ROP Chains
PPTX
Abusing Google Apps and Data API: Google is My Command and Control Center
PPTX
Exploit Research and Development Megaprimer: Win32 Egghunter
PPTX
Exploit Research and Development Megaprimer: mona.py, Exploit Writer's Swiss ...
PPTX
Exploit Research and Development Megaprimer: Unicode Based Exploit Development
PDF
OWASP Xenotix XSS Exploit Framework v3 : Nullcon Goa 2013
PPTX
Pwning with XSS: from alert() to reverse shell: Defcon Banglore 2013
PDF
Abusing, Exploiting and Pwning with Firefox Add-ons: OWASP Appsec 2013 Presen...
PDF
Abusing, Exploiting and Pwning with Firefox Add-ons
AppSec PNW: Android and iOS Application Security with MobSF
Injecting Security into Web apps at Runtime Whitepaper
Injecting Security into vulnerable web apps at Runtime
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Automated Security Analysis of Android & iOS Applications with Mobile Securit...
G4H Webcast: Automated Security Analysis of Mobile Applications with Mobile S...
Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015
Hacking Tizen: The OS of everything - Whitepaper
Hacking Tizen : The OS of Everything - Nullcon Goa 2015
Abusing Exploiting and Pwning with Firefox Addons
Exploit Research and Development Megaprimer: DEP Bypassing with ROP Chains
Abusing Google Apps and Data API: Google is My Command and Control Center
Exploit Research and Development Megaprimer: Win32 Egghunter
Exploit Research and Development Megaprimer: mona.py, Exploit Writer's Swiss ...
Exploit Research and Development Megaprimer: Unicode Based Exploit Development
OWASP Xenotix XSS Exploit Framework v3 : Nullcon Goa 2013
Pwning with XSS: from alert() to reverse shell: Defcon Banglore 2013
Abusing, Exploiting and Pwning with Firefox Add-ons: OWASP Appsec 2013 Presen...
Abusing, Exploiting and Pwning with Firefox Add-ons

Recently uploaded (20)

PDF
01-Introduction-to-Information-Management.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
Trump Administration's workforce development strategy
PPTX
Final Presentation General Medicine 03-08-2024.pptx
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Computing-Curriculum for Schools in Ghana
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Classroom Observation Tools for Teachers
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
01-Introduction-to-Information-Management.pdf
Pharma ospi slides which help in ospi learning
Trump Administration's workforce development strategy
Final Presentation General Medicine 03-08-2024.pptx
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
202450812 BayCHI UCSC-SV 20250812 v17.pptx
GDM (1) (1).pptx small presentation for students
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Abdominal Access Techniques with Prof. Dr. R K Mishra
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Computing-Curriculum for Schools in Ghana
Weekly quiz Compilation Jan -July 25.pdf
Microbial disease of the cardiovascular and lymphatic systems
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Classroom Observation Tools for Teachers
Chinmaya Tiranga quiz Grand Finale.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf

Exploit Research and Development Megaprimer: Buffer overflow for beginners