Skip to content
David Cumps
Securing websites (ASP.NET)

Securing websites (ASP.NET)

  • Hogeschool West-Vlaanderen, departement Simon Stevin
  • in Dutch

A session in Dutch on securing web applications, with live demos in ASP.NET. I first gave it in April 2004 at Hogeschool West-Vlaanderen, and later at a computer club and a business school. It opened with a 2004 WebCohort study that found 92% of web applications vulnerable, with cross-site scripting in 80% of them and SQL injection in 62%, and one rule ran through the whole session: never trust your users.

Input validation. Live demos of cross-site scripting and SQL injection, then the fixes: validate all input, encode what you send back to the browser, keep ASP.NET’s request validation on, always use parameterised queries, and never connect as the database administrator.

Storing passwords. Why a plain hash isn’t enough, since identical passwords share a hash and dictionary attacks stay easy, and how a salted hash fixes that, shown side by side. And never invent your own encryption.

Beyond the application. Security doesn’t stop at the code. A demo showed how much of the server an ASP.NET application could reach by default, and how to lock it into its own folder with .NET code access security and NTFS rights. The last part covered DSNs: they should hold where the database is, never a password in plain text.

The demos. The demo download has one ASP.NET page per topic: cross-site scripting, SQL injection, plain and salted password hashes, file system access, and an unsafe DSN.

More background in the post Writing Secure ASP.NET session.

Technologies: ASP.NET 1.1, C#, SQL Server, IIS, NTFS, .NET code access security, MD5 and SHA hashing.

Given at

  • April 2004: Hogeschool West-Vlaanderen, departement Simon Stevin
  • November 2004: Computerclub HCC West-Vlaanderen
  • March 2005: KTA-Handelsschool Aalst

Files

You May Also Like