![]() |
![]() |
|
September 11, 2003Defeating the stack protection mechanism in Windows 2003 ServerDavid Litchfield has released an excellent paper on how to defeat Windows Server 2003 as it relates to their stack protection mechanisms. This is really against the .NET compiler which supports the /gs flag (which is now on by default btw) which is used to build in stack protection. He has some brilliant suggestions for Microsoft on how to solve these problems, and significantly reduce these threats. My favorite is the fact you can overwrite the cookies Microsoft uses to prevent the stack from getting overflowed. It is quite simple really. Microsoft injects a cookie into the stack (an unsigned int) that can be checked against a stored location in the .data section of the module. If they don't match, we have an overflow. Here is the problem. You can overwrite the information in .data, rendering the check useless. His recommendation? Use VirtualProtect on the memory page and make it read only. No duh! Why didn't I think of that. This is great as it solves a different problem I was having in my kernel-mode driver. I totally forgot about things like VirtualProtect (and MmSecureVirtualMemory in the kernel), which will allow me to lock a page of memory I need to prevent tampering in. Thanks for the insight David! Great paper. Posted by SilverStr at September 11, 2003 12:27 PMComments
bla bla bla Posted by: drego at June 2, 2004 07:09 AMcool forum ! Posted by: Mike at August 5, 2004 01:56 AM |
![]() ![]()
My 5 Favorite Books
Writing Secure Code
Secure Programming Cookbook Security Engineering Secure Coding Principles & Practice Inside the Security Mind ![]()
My 5 Favorite Papers
Smashing the Stack
Penetration Studies Covert Channel Analysis of Trusted Systems DoD Trusted Computer System Evaluation Criteria NSA Security Recommendation Guides ![]()
Archives
December 2005
November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 February 2005 January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 December 2003 November 2003 October 2003 September 2003 August 2003 July 2003 June 2003 May 2003 April 2003 March 2003 February 2003 January 2003 December 2002 November 2002 October 2002 September 2002 August 2002 July 2002 ![]() |
|