The safer SecureZeroMemory()
A few months ago, we discussed how memory viewers could be used to see the residues of passwords in memory. In a recent issue of Palisade, Priyali explains how the enhanced SecureZeroMemory() function is useful to solve this problem in .Net applications.
The ZeroMemory() function was available in Visual C++ to fill blocks of memory with zeroes, say the password variable after authentication, or credit card details after authorization. That, however, wasn’t secure enough. The ZeroMemory function could easily get optimized out by the compiler, if the block of memory it filled was never used again. The compiler would observe that the memory being modified was never referenced again, and so silently ignore the call to ZeroMemory.
SecureZeroMemory fixes that problem. It ensures that the memory is filled with zeroes even if the memory is never used again.
Plynt provides penetration testing and code review services to clients worldwide. If you are interested, please contact us for a quote. We’ll get back to you within one working day.Add yours.closed for this post.
Monthly Archives
- September 2008
- August 2008
- July 2008
- May 2008
- April 2008
- March 2008
- January 2008
- December 2007
- November 2007
- April 2007
- March 2007
- February 2007
- January 2007
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
Syndication
You can read full entries of Palisade Blog using an RSS reader. Use this link —




When I try to use SecureZeroMemory in my assembly app, the compiler doesn't recognize it.
It works OK with RtlZeroMemory though.
Thanks.