Presentation is loading. Please wait.

Presentation is loading. Please wait.

B UFFER O VERFLOW V ULNERABILITIES Prudhviraj Karumanchi Vijay Venugopalan Vijaya Raghavan CPSC 620 Presentation 12/3/2009.

Similar presentations


Presentation on theme: "B UFFER O VERFLOW V ULNERABILITIES Prudhviraj Karumanchi Vijay Venugopalan Vijaya Raghavan CPSC 620 Presentation 12/3/2009."— Presentation transcript:

1 B UFFER O VERFLOW V ULNERABILITIES Prudhviraj Karumanchi Vijay Venugopalan Vijaya Raghavan CPSC 620 Presentation 12/3/2009

2 CONTENTS Motivation Basic structure of process memory Buffer Overflow Canary Method Static Analysis ARCHER BOON SPLINT Polyspace C Verifier UNO o Conclusion

3 M OTIVATION Buffer Overflows constitute for about 50% of the vulnerabilities reported by CERT. According to National Vulnerability Database (NVD) CVE statistics, 563 buffer overruns were detected in 2008 and 431 buffer overruns out of 4,634 vulnerabilities were detected in 2009 till September. Educate “Future” software programmers.

4 B UFFER ? Buffer : A temporary space in memory used to hold data. Buffer Overflow : Happens when data written into the buffer is larger than the size of the buffer. In turn overwrites adjacent memory locations

5 S AMPLE B UFFER O VERFLOW F UNCTION GetInput() { char buffer[8]; gets(buffer); puts(buffer); } Dangerous Function !!!

6 V IRTUAL A DDRESS S PACE A L OOK AT THE STACK Local Variabl es

7 O VER W RITING THE “ RETURN A DDRESS ” #include notToExecute() { printf(“This is not to be run\n"); } GetInput() { char buffer[8]; gets(buffer); puts(buffer); } main() { GetInput(); return 0; }

8

9 C ANARY M ETHOD T O D ETECT B UFFER O VERFLOWS Stack canaries, are used to detect a stack buffer overflow before execution of malicious code can occur. This method works by placing a small integer, the value of which is randomly chosen at program start, in memory just before the stack return pointer. Most buffer overflows overwrite memory from lower to higher memory addresses, so in order to overwrite the return pointer (and thus take control of the process) the canary value must also be overwritten.

10 S TATIC A NALYSIS OF T OOLS Tools Analysis ARCHERSymbolic, interprocedural, flow-sensitive analysis BOONInteger ranges, interprocedural flow-insensitive analysis for string functions. Polyspace C VerifierAbstract interpretation, Interprocedural, flow-sensitive. SPLINTLightweight static analysis, Intraprocedural. UNOModel checking, interprocedural, flow-sensitive.

11 D ETECTION AND F ALSE ALARM RATES System Detection False Alarm PolySpace 0.87 0.5 SPLINT 0.57 0.43 BOON 0.05 ARCHER 0.01 0 UNO 0 0

12 C ONCLUSION No Software can be 100% bug free. Buffer overflows can be reduced by reduced by enforcing better programming practices from the very early stages of Software Engineering. Some of these are: Use of wrappers Training software programmers with ‘Good’ programming practices Use of memn*() functions instead of str*() functions calloc() instead of malloc() Proper free()ing of memory etc.,


Download ppt "B UFFER O VERFLOW V ULNERABILITIES Prudhviraj Karumanchi Vijay Venugopalan Vijaya Raghavan CPSC 620 Presentation 12/3/2009."

Similar presentations


Ads by Google