In depth defense
The security of an application should, as far as possible, avoid having a single point of failure. And yet, in the course of our testing we come across a large number of applications that rely on a single function to protect themselves. We've seen this in web applications which rely solely on ValidateRequest to prevent XSS. While it is secure today, any vulnerability found later, will also render one's application is vulnerable. An application should always try and be self-reliant in protecting itself. In the case of XSS, this means that it should validate all the input itself rather than relying on Microsoft’s filter. It should also encode all the output, just before display so any data that has made it through the crevices still does not lead to a security breach.
We've seen a similar pattern in software protection schemes. A complex algorithm with a challenge and response is used and called in a single function which returns a single true or false value at the start. This can easily be reverse engineered and the call commented out which renders the entire algorithm extraneous.
The point is that the security of an application should be considered at many different levels so that a single break does not render the security scheme worthless. It is much more effective when built into the product life cycle from the start, rather than being added as an afterthought.
We've seen a similar pattern in software protection schemes. A complex algorithm with a challenge and response is used and called in a single function which returns a single true or false value at the start. This can easily be reverse engineered and the call commented out which renders the entire algorithm extraneous.
The point is that the security of an application should be considered at many different levels so that a single break does not render the security scheme worthless. It is much more effective when built into the product life cycle from the start, rather than being added as an afterthought.