6 Security by scrutiny
This chapter covers:
- Understanding security as a whole
- Leveraging threat models
- Avoiding common security pitfalls like SQL injection, CSRF, XSS, overflows
- Techniques to reduce attacker’s capabilities
- Storing secrets correctly
Security is a commonly misunderstood problem throughout history as early as that unfortunate incident at Troy, an ancient city in today’s western Turkey. Trojans thought their walls were impenetrable and they were secure, but like modern social platforms, they underestimated thesocial-engineering abilities of their adversaries. Greeks withdrew from battle and left a tall wooden horse figure as a gift. Trojans loved the gesture and let the horse inside their walls to cherish it. In the midnight, the Greek soldiers hidden in the hollow horse got out and opened the gates, letting the hidden Greek armies in, causing the downfall of the city. At least, that’s what we know from the post-mortem blog posts of Homeros, possibly the first instance of irresponsible disclosure in the history.