February 20, 2004

MSDN Webcast Review: Writing Secure Code - Threat Defense

Where Joel's presentation on Wednesdays was based around people and practices, today's presentation was about technology. And just like Wednesday, he did an excellent job.

He covered a great amount of information which basically breaks down to:

  • Defending against memory issues (buffer overflows etc)
  • Defending against arithmetic errors (integer over/underflows etc)
  • Defending against cross-site scripting
  • Depending against SQL injection
  • Defending against canonicalization issues
  • Defending against cryptography weaknesses
  • Defending against unicode issues
  • Defending against denial of service
I was REALLY impressed with the demos. As an example, when I was first learning about buffer overflows years ago I wish I could have watched this presentation to learn how to trample the stack. In 3 minutes he did a better job than most online tutorials do. I was also happy to see him impliment safe string functions in <strsafe.h> for his examples. I use the same type in my kernel code using <ntstrsafe.h>, and appreciate that he is teaching developers to use it as part of their normal daily programming. Course he later then didn't follow his own advice and I saw a few strcpy, but I will chalk that up to demo purposes code only.

I had to chuckle when he whipped out Windows calculator to show how integer overflows happen by typing in 65533 and then adding 10, switching to binary view and looking at the 17bit output. Neat prop to easily show how a simple math calc could cause a 16 bit integer overflow. I will need to use that trick when teaching others about this common coding problem.

Overall, this was the best presentation of the whole week. Enjoyable, educational and well worth the time. You should consider watching the on-demand presentation which will be online in a few days here. In the meantime, I kept a copy of the power point slides of the presentation, which you can get here.

Posted by SilverStr at February 20, 2004 12:28 PM | TrackBack