dynamic test genera on to find integer bugs in x86 binary
play

Dynamic Test Genera/on To Find Integer Bugs in x86 Binary Linux - PowerPoint PPT Presentation

Dynamic Test Genera/on To Find Integer Bugs in x86 Binary Linux Programs David Molnar Xue Cong Li David Wagner Security Bugs Common 6,515 vulnerabili/es reported in 2007 Major vendors : Adobe, Apple, MicrosoN Plus many more


  1. Dynamic Test Genera/on To Find Integer Bugs in x86 Binary Linux Programs David Molnar Xue Cong Li David Wagner

  2. Security Bugs Common • 6,515 vulnerabili/es reported in 2007 – Major vendors : Adobe, Apple, MicrosoN … – Plus many more – web.nvd.nist.gov/view/vuln/sta/s/cs • Each one means patch, QA’ing, releasing

  3. Find Bug Report Bug Write Bug Fix Bug The “Bug Cycle”

  4. Find Bug Report Bug Write Bug Fix Bug The “Bug Cycle”

  5. Technique : Fuzz Testing Miller, Fredriksen, and So, “An Empirical Study of the Reliability of UNIX Utilities” http://pages.cs.wisc.edu/~bart/fuzz/fuzz.html

  6. Integer Bugs • #2 cause of vendor advisories in 2006 • Underflow/Overflow • Value conversions • Signed/Unsigned conversion bugs • Poor fit with tradi/onal run/me, sta/c analysis – Sta/c analysis: false posi/ves – Run/me analysis: “benign” overflow problem

  7. Signed/Unsigned Conversion void bad(int x,char * src,char * dst) ‏ { if (x > 800) ‏ { return; } else { copy_bytes(x,src, dst); } }

  8. Signed/Unsigned Conversion void bad(int x,char * src,char * dst) ‏ { What if x == -1 ? if (x > 800) ‏ { return; } else { copy_bytes(x,src, dst); } }

  9. Signed/Unsigned Conversion void bad(int x,char * src,char * dst) ‏ { -1 > 800? No! if (x > 800) ‏ { return; } else { copy_bytes(x,src, dst); } }

  10. Signed/Unsigned Conversion void bad(int x,char * src,char * dst) ‏ { if (x > 800) ‏ { return; } else copy_bytes( unsigned int x,... { copy_bytes(x,src, dst); } }

  11. Signed/Unsigned Conversion void bad(int x,char * src,char * dst) ‏ { if (x > 800) ‏ { return; } else copy_bytes( unsigned int x,... { copy_bytes(x,src, dst); } Copy a few more than 800 bytes..! }

  12. Signed/Unsigned Conversion void bad(int x,char * src,char * dst) ‏ { if (x > 800) ‏ { return; } Bug pattern : treat value x as signed, else then as unsigned or vice versa { copy_bytes(x,src, dst); } }

  13. Unknown / Top Signed Unsigned Potential Bug /Bot

  14. Unknown / Top Signed Unsigned Potential Bug /Bot Idea: 1. Keep track of type for every tainted program value 2. Use solver to force values with type “Bot” to equal -1 New algorithm: infer types over long binary traces.

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