SlideShare a Scribd company logo
Buffer Overflows : An Introduction
On the Agenda
 Definition
 Vulnerability Detection
 Skeleton Exploit
 Controlling EIP
 Relative jump


 Shell-code
 (Importing from Metasploit ) (! Development)
 An Owned territory!
Buffer Overflow
Vulnerability Detection

 Code Review
Applied in open –source application analysis where the entire code is
 checked for unchecked buffer at the language definition level.
 Reverse Engineering
Applied in both open and closed source applications .. Where an exe
  is analyzed on the basis of memory interaction and the source code
  is presented at machine level interaction
 Fuzz-ing the application
The applications’ communication standards are analyzed using
  protocol reader and test data confirming standards are prepared and
  send to the application – the crash is analysed.
Protocol Analysis
A simple protocol Fuzzer
Usage :
fuz <ipadress> <portnumber> <username> <password> <command> <number of bytes to start
    with>


 while((sizeof(super_buffer)- buff_size)>25)
{ char *rec_buf_1;
  rec_buf_1 = (char*)malloc(buff_size);
  memcpy(buff,super_buffer,buff_size);
  sprintf(buff1,"%s %srn",command,buff);
  printf("Sending buffer of %d length n",buff_size);
  send(shesh_in, buff1,strlen(buff1),0);
  recv(shesh_in,rec_buf_1,buff_size,0);
  buff_size = buff_size +300; sleep(1);}      free(buff);
          //close(shesh_in);
* Bang >> Crrrrrrrrrash !!!
Crash Analysis
Creating Smart Buffer
Calculating Size of Payload
jmp esp >The Golden Jump
        Location
jmp> esp in user32.dll
Where not to jump ;)




bt ftp # grep badchar*
Automated shellcode development
 Lets do it live :
     http://www.metasploit.com/shellcode/




                      Why encoder ??
Doing nothing is so so important
                
 Use of nop-sledge to increase reliability
Elementary ,My dear Watson!!!
Buffer Overflows Shesh Jun 3 09

More Related Content

PDF
Presentation buffer overflow attacks and theircountermeasures
PPTX
Buffer overflow attacks
PPT
Buffer Overflows
PPT
Cell processor lab
PPTX
Buffer Overflow Demo by Saurabh Sharma
PDF
Buffer overflow null
PPTX
Control hijacking
PPT
Buffer Overflow Attacks
Presentation buffer overflow attacks and theircountermeasures
Buffer overflow attacks
Buffer Overflows
Cell processor lab
Buffer Overflow Demo by Saurabh Sharma
Buffer overflow null
Control hijacking
Buffer Overflow Attacks

What's hot (20)

PDF
smash the stack , Menna Essa
PDF
Cppcheck
PDF
Reverse engineering - Shellcodes techniques
PPTX
08 - Return Oriented Programming, the chosen one
PDF
The Popper Experimentation Protocol and CLI tool
PPTX
Anatomy of a Buffer Overflow Attack
PDF
2.Format Strings
PDF
Let's write a Debugger!
PDF
How to Perform Memory Leak Test Using Valgrind
PDF
SEH based buffer overflow vulnerability exploitation
PPTX
Breakpoints
PDF
Dive into exploit development
PDF
OTP application (with gen server child) - simple example
PDF
TestR: generating unit tests for R internals
PDF
Valgrind tutorial
PDF
Proces
PPTX
Gambit for Geiser
PDF
Program errors occurring while porting C++ code from 32-bit platforms on 64-b...
PPT
Exploiting stack overflow 101
PPTX
Shell Script Tutorial
smash the stack , Menna Essa
Cppcheck
Reverse engineering - Shellcodes techniques
08 - Return Oriented Programming, the chosen one
The Popper Experimentation Protocol and CLI tool
Anatomy of a Buffer Overflow Attack
2.Format Strings
Let's write a Debugger!
How to Perform Memory Leak Test Using Valgrind
SEH based buffer overflow vulnerability exploitation
Breakpoints
Dive into exploit development
OTP application (with gen server child) - simple example
TestR: generating unit tests for R internals
Valgrind tutorial
Proces
Gambit for Geiser
Program errors occurring while porting C++ code from 32-bit platforms on 64-b...
Exploiting stack overflow 101
Shell Script Tutorial
Ad

Viewers also liked (8)

PPS
Back injury prevention
PPTX
Lockout tagout standard
PPS
Asbestos awareness
PPT
Preventing slips and trips
PDF
Lockout/Tagout Training (OEM Version)
PPT
8 steps-to-ensure-proper-lockout-tagout
PPT
Lockout tagout
PDF
Lockout/Tagout Training (Contractor Version)
Back injury prevention
Lockout tagout standard
Asbestos awareness
Preventing slips and trips
Lockout/Tagout Training (OEM Version)
8 steps-to-ensure-proper-lockout-tagout
Lockout tagout
Lockout/Tagout Training (Contractor Version)
Ad

Similar to Buffer Overflows Shesh Jun 3 09 (20)

PPTX
Buffer overflow attacks
PDF
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...
PDF
Ceh v5 module 20 buffer overflow
PDF
stackconf 2021 | Fuzzing: Finding Your Own Bugs and 0days!
PDF
Mitigating overflows using defense in-depth. What can your compiler do for you?
PDF
PPTX
Buffer overflow
PPT
Assembly language programming_fundamentals 8086
PDF
Buffer overflow tutorial
ODP
null Pune meet - Application Security: Code injection
PPT
Static Analysis: The Art of Fighting without Fighting
PDF
Fuzzing: Finding Your Own Bugs and 0days! 1.0
PDF
Openframworks x Mobile
PDF
Buffer Overflow - Smashing the Stack
PPT
FORECAST: Fast Generation of Accurate Context-Aware Signatures of Control-Hij...
PPTX
Driver Debugging Basics
PPTX
Buffer overflow
DOCX
OverviewIn this assignment you will write your own shell i.docx
PPTX
Metasploit - Basic and Android Demo
PDF
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)
Buffer overflow attacks
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...
Ceh v5 module 20 buffer overflow
stackconf 2021 | Fuzzing: Finding Your Own Bugs and 0days!
Mitigating overflows using defense in-depth. What can your compiler do for you?
Buffer overflow
Assembly language programming_fundamentals 8086
Buffer overflow tutorial
null Pune meet - Application Security: Code injection
Static Analysis: The Art of Fighting without Fighting
Fuzzing: Finding Your Own Bugs and 0days! 1.0
Openframworks x Mobile
Buffer Overflow - Smashing the Stack
FORECAST: Fast Generation of Accurate Context-Aware Signatures of Control-Hij...
Driver Debugging Basics
Buffer overflow
OverviewIn this assignment you will write your own shell i.docx
Metasploit - Basic and Android Demo
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPT
Teaching material agriculture food technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
KodekX | Application Modernization Development
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Spectroscopy.pptx food analysis technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
cuic standard and advanced reporting.pdf
PPTX
Cloud computing and distributed systems.
DOCX
The AUB Centre for AI in Media Proposal.docx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Empathic Computing: Creating Shared Understanding
Understanding_Digital_Forensics_Presentation.pptx
Encapsulation_ Review paper, used for researhc scholars
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Review of recent advances in non-invasive hemoglobin estimation
MYSQL Presentation for SQL database connectivity
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Teaching material agriculture food technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Chapter 3 Spatial Domain Image Processing.pdf
KodekX | Application Modernization Development
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectroscopy.pptx food analysis technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
cuic standard and advanced reporting.pdf
Cloud computing and distributed systems.
The AUB Centre for AI in Media Proposal.docx

Buffer Overflows Shesh Jun 3 09

  • 1. Buffer Overflows : An Introduction
  • 2. On the Agenda  Definition  Vulnerability Detection  Skeleton Exploit  Controlling EIP  Relative jump  Shell-code (Importing from Metasploit ) (! Development)  An Owned territory!
  • 4. Vulnerability Detection  Code Review Applied in open –source application analysis where the entire code is checked for unchecked buffer at the language definition level.  Reverse Engineering Applied in both open and closed source applications .. Where an exe is analyzed on the basis of memory interaction and the source code is presented at machine level interaction  Fuzz-ing the application The applications’ communication standards are analyzed using protocol reader and test data confirming standards are prepared and send to the application – the crash is analysed.
  • 6. A simple protocol Fuzzer Usage : fuz <ipadress> <portnumber> <username> <password> <command> <number of bytes to start with>  while((sizeof(super_buffer)- buff_size)>25) { char *rec_buf_1; rec_buf_1 = (char*)malloc(buff_size); memcpy(buff,super_buffer,buff_size); sprintf(buff1,"%s %srn",command,buff); printf("Sending buffer of %d length n",buff_size); send(shesh_in, buff1,strlen(buff1),0); recv(shesh_in,rec_buf_1,buff_size,0); buff_size = buff_size +300; sleep(1);} free(buff); //close(shesh_in);
  • 7. * Bang >> Crrrrrrrrrash !!!
  • 11. jmp esp >The Golden Jump Location
  • 12. jmp> esp in user32.dll
  • 13. Where not to jump ;) bt ftp # grep badchar*
  • 14. Automated shellcode development  Lets do it live : http://www.metasploit.com/shellcode/ Why encoder ??
  • 15. Doing nothing is so so important   Use of nop-sledge to increase reliability
  • 16. Elementary ,My dear Watson!!!