سلام
جناب Wei Meng Lee مواردی را برای جلوگیری از هک شدن سایتهای اینترنتی پیشنهاد کرده اند که در زیر آورده شده است.

1-Cross-site Scripting
2-SQL Injection
3-Validate your User Inputs
4-Use Hashing to Store your Passwords
5-Encrypt Sensitive Data
6-Store Secure Information in the Registry
7-Do Some Housekeeping before You Deploy Your Web Application
8-Use Sessions, but Not Cookie-less Sessions

متن کامل مقاله که تمام این موارد را توضیح داده است در این آدرس می توانید پیدا کنید
http://www.devx.com/security/Article/20898/1954?pf=true

موفق باشید