What Is Buffer Overflow
What Is Buffer Overflow
The goals of these principles are to identify and to highlight the most
important objectives developers should keep in mind when designing and
building a secure system from Viega and McGraw’s perspective.
The idea behind the defense in depth is to manage risk with diverse
defensive strategies, so that if one layer of defense turns out to be
inadequate, another layer of defense hopefully prevents a full breach. The
difference between this principle and the one before is that this principle
here handles on taking defense as a whole, thinking of redundant security
measures. The idea is that having a sum of protection is far greater than
the protection offered by any single component.
3. Fail Securely.
This principle states that only the minimum access necessary to perform an
operation should be granted, and that access should be granted only for
the minimum amount of time necessary. When you give out access to parts
of a system, there is always some risk that the privileges associated with
that access will be abused. Sometimes more privileges than necessary are
requested during coding to make developing task easier, for example, one
might say: "Someday I might need to write this object, and it would suck to
have to go back and change this request". Insecure defaults may lead to a
violation here too. This problem is nowadays more common because many
legacy systems were intended to run in a restricted environment.
5. Compartimentalize.
7. Promote Privacy.
There is often no quicker way to lose customer respect than to abuse user
privacy. Therefore, developers should be as diligent as possible in
protecting any personal user information. One of the things privacy most
often trades off against is usability. For example, it is better that a webpage
forgets the credit card numbers as soon that they are used, than to risk
being compromised information. Leaving any sort of information around
can help potential attackers. The main advice here is to promote privacy for
your users, systems, and for your code.
This principle assumes that even the most secure systems are amenable to
inside attacks. Several studies show that the most common threat to
companies is the insider attack, therefore, the potential for serious misuse
and abuse is a very real risk.
9. Be reluctant to Trust.
There are hundreds of products from security vendors with gaping security
holes. Therefore, instead of making assumptions that need to hold true, the
developers should be reluctant to extend trust. Trust is for example, often
extended far to easily in the area of customer support, just because "it
makes their jobs easier".
There are many websites and sources of information for "known threats"
and vulnerabilities in software components and systems. It is far better to
trust security libraries that have been widely scrutinize and used. Still, there
are many examples of security bugs in widely used pieces of software that
have gone unnoticed for years. So not always it is the safest to use, but at
least it is possible to leverage the experience of others.