votd buffer overflow
play

VOTD: Buffer Overflow Engineering Secure Software Last Revised: - PowerPoint PPT Presentation

VOTD: Buffer Overflow Engineering Secure Software Last Revised: August 17, 2020 SWEN-331: Engineering Secure Software Benjamin S Meyers 1 What is Buffer Overflow? Writing data outside of the intended buffer (memory space) SWEN-331:


  1. VOTD: Buffer Overflow Engineering Secure Software Last Revised: August 17, 2020 SWEN-331: Engineering Secure Software Benjamin S Meyers 1

  2. What is Buffer Overflow? Writing data outside of the intended buffer (memory space) ● SWEN-331: Engineering Secure Software Benjamin S Meyers 2

  3. How Do You Do It? String buffers in C ● char secret [15] = “sesquipedalian”; printf(“\nSecret is: ”, secret); /* “sesquipedalian” */ char str [4]; printf(“\nPlease enter up to 3 characters: ”); scanf(“%s”, str); /* User enters “12XGotcha!” */ printf(“\nSecret is now: ”, secret); /* “otcha!” */ SWEN-331: Engineering Secure Software Benjamin S Meyers 3

  4. Mitigations Keep track of your array sizes ● Check the size of your buffer as it is inputted ● In the case of C, use functions like strncpy() instead of ● strcpy() Avoid functions like gets that don't check the input size ● SWEN-331: Engineering Secure Software Benjamin S Meyers 4

  5. Notes Buffer overflows have been very common for a long time ● If you are clever enough, you can override the return pointer ● on the stack frame so that your own code is then executed Languages that enforce array lengths are not susceptible to ● this classic form (e.g. Java) Merely turning on the stack protector is not enough -- we ● could easily craft an exploit that stays within the stack frame SWEN-331: Engineering Secure Software Benjamin S Meyers 5

  6. Source: https://xkcd.com/1354/ SWEN-331: Engineering Secure Software Benjamin S Meyers 6

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend