mylamour / blog

Your internal mediocrity is the moment when you lost the faith of being excellent. Just do it.
https://fz.cool
61 stars 14 forks source link

OWASP Top 10 And Security Developer's Guide #17

Open mylamour opened 6 years ago

mylamour commented 6 years ago

image

这是一份OWASP TOP10变更对比,不过注入始终是NO.1,多出来个XXE,把错误配置,和授权绕过排名提高关注。 作为第一次阅读OWASP 的白皮书,除了系统化一下整个概念流程之后,个人觉得比较好的是最后的几个提问,比较值得思考(不要自己看着什么就是是是,要想一想):

image image

而我自己主要作为一个安全研发,和web渗透测试,比较关注前两个问题。

What’s Next for Developers

What’s Next for Security Testers

RISK计算

image image

Other

前期搞日站技术,和机器学习技术。后期搞SDL,安全架构,。 美亚,绿盟,启明星辰的股票都在涨啊...只能看看模拟盈亏ing.

mylamour commented 6 years ago

The Security Checklist

包含了设计原则,配置,从开发到部署,一系列的web端服务端客户端的安全检查列表

AUTHENTICATION SYSTEMS (Signup/Signin/2 Factor/Password reset)
  • [x] Use HTTPS everywhere. 但是有ssltrip和sslsplit
  • [ ] Store password hashes using Bcrypt (no salt necessary - Bcrypt does it for you). 目前看来是无解的吧?Bcrypt无解?
  • [ ] Destroy the session identifier after logout.
    确定一个用户Session对应唯一ID,设置过期时间
  • [ ] Destroy all active sessions on reset password (or offer to).
    登录注册重置确认邮件,总之确认唯一session,就是用户现在的有效session But MITM, And Phising OK?
  • [ ] Must have the state parameter in OAuth2. 框架虽然都完善了这些个功能,但是开发者不一定使用,还要记得callback的redirect_uti校验是否允许,否则会导致泄露
  • [ ] No open redirects after successful login or in any other intermediate redirects.
  • [ ] When parsing Signup/Login input, sanitize for javascript://, data://, CRLF characters. 有序列化就需要反序列化,不在序列化的过程中出现漏洞,就有可能在反序列化的过程中出现漏洞。那么多库,不可能没有问题。
  • [ ] Set secure, httpOnly cookies. Chrome Plugin get it
  • [ ] In Mobile OTP based mobile verification, do not send the OTP back in the response when generate OTP or Resend OTP API is called. 避免本地校验和硬编码,OTP(One Time Password)
USER DATA & AUTHORIZATION
ANDROID / IOS APP
SECURITY HEADERS & CONFIGURATIONS
SANITIZATION OF INPUT

有进就有出,有序列化就需要反序列化

  • [ ] Sanitize all user inputs or any input parameters exposed to user to prevent XSS.
  • [ ] Always use parameterized queries to prevent SQL Injection.
  • [ ] Sanitize user input if using it directly for functionalities like CSV import.
  • [ ] Sanitize user input for special cases like robots.txt as profile names in case you are using a url pattern like coolcorp.io/username.
  • [ ] Do not hand code or build JSON by string concatenation ever, no matter how small the object is. Use your language defined libraries or framework.
  • [ ] Sanitize inputs that take some sort of URLs to prevent SSRF.
  • [ ] Sanitize Outputs before displaying to users.
OPERATIONS
PEOPLE

权限分级,异常监控。

  • [ ] Set up an email (e.g. security@coolcorp.io) and a page for security researchers to report vulnerabilities.
  • [ ] Depending on what you are making, limit access to your user databases.
  • [ ] Be polite to bug reporters.
  • [ ] Have your code review done by a fellow developer from a secure coding perspective. (More eyes)
  • [ ] In case of a hack or data breach, check previous logs for data access, ask people to change passwords. You might require an audit by external agencies depending on where you are incorporated.
  • [ ] Set up Netflix's Scumblr to hear about talks about your organization on social platforms and Google search.