我是一名IT专业的学生,我现在在大学三年级。到目前为止,我们已经学习了很多与计算机相关的学科(编程、算法、计算机体系结构、数学等)。

我很确定没有人能学会所有关于安全的知识,但肯定有一个“最低限度”的知识每个程序员或IT学生都应该知道,我的问题是这个最低限度的知识是什么?

你能建议一些电子书或课程或任何可以帮助我们开始这条路的东西吗?


当前回答

框架和api中安全默认值的重要性:

Lots of early web frameworks didn't escape html by default in templates and had XSS problems because of this Lots of early web frameworks made it easier to concatenate SQL than to create parameterized queries leading to lots of SQL injection bugs. Some versions of Erlang (R13B, maybe others) don't verify ssl peer certificates by default and there are probably lots of erlang code that is susceptible to SSL MITM attacks Java's XSLT transformer by default allows execution of arbitrary java code. There has been many serious security bugs created by this. Java's XML parsing APIs by default allow the parsed document to read arbitrary files on the filesystem. More fun :)

其他回答

框架和api中安全默认值的重要性:

Lots of early web frameworks didn't escape html by default in templates and had XSS problems because of this Lots of early web frameworks made it easier to concatenate SQL than to create parameterized queries leading to lots of SQL injection bugs. Some versions of Erlang (R13B, maybe others) don't verify ssl peer certificates by default and there are probably lots of erlang code that is susceptible to SSL MITM attacks Java's XSLT transformer by default allows execution of arbitrary java code. There has been many serious security bugs created by this. Java's XML parsing APIs by default allow the parsed document to read arbitrary files on the filesystem. More fun :)

你应该知道三个A。认证、授权、审计。典型的错误是验证用户身份,而不检查用户是否被授权执行某些操作,因此用户可能会查看其他用户的私人照片,Diaspora所犯的错误。很多人忘记了审计,在一个安全的系统中,你需要能够知道谁在什么时候做了什么。

一个好的入门课程可能是麻省理工学院的计算机网络与安全课程。我建议的一件事是不要忘记隐私。从某种意义上说,隐私确实是安全的基础,在有关安全的技术课程中并不经常涉及。你可能会在这门与互联网相关的道德与法律课程中找到一些关于隐私的材料。

如果你想要你的应用程序是安全的,请记住以下原则:

Never trust any input! Validate input from all untrusted sources - use whitelists not blacklists Plan for security from the start - it's not something you can bolt on at the end Keep it simple - complexity increases the likelihood of security holes Keep your attack surface to a minimum Make sure you fail securely Use defence in depth Adhere to the principle of least privilege Use threat modelling Compartmentalize - so your system is not all or nothing Hiding secrets is hard - and secrets hidden in code won't stay secret for long Don't write your own crypto Using crypto doesn't mean you're secure (attackers will look for a weaker link) Be aware of buffer overflows and how to protect against them

网上有一些关于提高应用程序安全性的优秀书籍和文章:

编写安全代码第二版——我认为每个程序员都应该读这篇文章 构建安全软件:如何以正确的方式避免安全问题 安全编程指南 利用软件 安全工程——一本极好的读物 Linux和Unix安全编程HOWTO

对开发人员进行应用程序安全最佳实践方面的培训

Codebashing(支付)

安全创新(支付)

安全罗盘(付费)

OWASP WebGoat(免费)

记住,你(程序员)必须确保所有部分的安全,但攻击者只需要成功地找到你盔甲中的一个漏洞。 安全就是“未知的未知”的一个例子。有时你不知道可能的安全漏洞是什么(直到事后)。 漏洞和安全漏洞之间的区别取决于攻击者的智力。