Buffer Overflow

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2021 Nov 9 7:40
Editor
Edited
Edited
2024 Jun 12 13:21
Refs
Refs
넘 많이 요청이든 뭐든 들어와서 버퍼 메모리 넘어 다른 영역 메모리 덮어씌우려하는 문제
 
 
 

How to Buffer Overflow attack

  1. buffer size estimation
  1. estimate distance between buffer and ret address
  1. fill data (shell code + trash) from buffer to
    EBP
    right before ret address
  1. write address of shell code into ret address
 
 
 

Vulnerable C functions

  • strcpy
  • strcat
  • fscanf
  • scanf
  • sprint

Safe C functions

  • vfscanf
 

HeartBleed
OpenSSL

 
 
 

Recommendations