Summary
In this chapter, we discussed a bit about vulnerabilities, why they exist, and some typical countermeasures. Since entire books have been written about this topic, this chapter serves only as a starting place for securing your site. I recommend you to read The art of Software Security Assessment: Identifying and Preventing Software Vulnerabilities by Mark Dowd, John McDonald and Justin Schuh to learn more about software security.
In closing, the moral of the story of the "Little Red Hen" is that when everyone including developers, administrators, and end users work together, they can make a stronger and safer Internet. Working against each other only serves the interest of the criminal elements on the Internet.