1 / 6

Understanding Stack Buffer Overflow in C: A Demonstration

This document discusses the concept of stack buffer overflow in C programming, specifically through a demonstration using a function that copies input strings without proper boundary checks. The sample code showcases a vulnerable function that may lead to buffer overflow if long strings are passed. This lab assignment is due next week on Thursday, April 11th, and aims to deepen understanding of security issues related to improper memory handling in C.

tejano
Télécharger la présentation

Understanding Stack Buffer Overflow in C: A Demonstration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Stack buffer overflow

  2. Stack frame layout

  3. #include <string.h> void foo (char *bar) { char c[12]; strcpy (c, bar); //no bound } int main (intargc, char **argv) { foo(argv[1]); }

  4. #include <string.h> void foo (char *bar) { char c[12]; strcpy (c, bar); //no bound } int main (intargc, char **argv) { foo(argv[1]); }

  5. #include <string.h> void foo (char *bar) { char c[12]; strcpy (c, bar); //no bound } int main (intargc, char **argv) { foo(argv[1]); }

  6. Lab 3 • Due next week Thursday, April 11th. • Stack buffer overflow problem, very similar to what we have described today. • Demo.

More Related