记录一下Security扫描的问题

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/hxg117/article/details/81236190
  1. Session Fixation
    SessionID 需要登陆后更新。
  2. Cookie Security: Cookie not Sent Over SSL
    Cookie 需要Secure标志。
  3. Cookie Security: Persistent Cookie
    Cookie 不能有expires,否则Cookie会被浏览器存储在磁盘上。
  4. Cache Management: Session Cookies
    添加cache-control:no-cache到HTTP响应头。否则代理会缓存cookie。
  5. Cookie Security: Overly Broad Session Cookie Domain
    去掉Cookie的domain设置,尤其不能设置成.xxx.com
  6. Cookie Security: HTTPOnly not Set
    Cookie 需要HTTPOnly标志。
  7. Web Server Misconfiguration: Server Error Message
    不能返回HTTP 404,500 等,均需要返回200,然后显示通用的错误页面
  8. Privacy Violation: Autocomplete
    尽管大多现代浏览器已经不支持Autocomplete,表单form最好还是需要添加autocomplete=false
  9. Cache Management: Insecure Policy
    添加cache-control:no-cache到HTTP响应头。
  10. Insecure Transport: HSTS not Set
    添加Strict-Transport-Security:max-age=31536000 到HTTP响应头。表示浏览器在1年之内所有HTTP请求均自动转换为HTTPS请求。
  11. 更新到最新的第三方库。
  12. CSRF,需要添加token
  13. 硬编码密码,使用管理员账号,没用的文件都需要删掉。
  14. Insecure Randomness. RSA 算法需要伪随机数生成器。暂时忽略这个。

猜你喜欢

转载自blog.csdn.net/hxg117/article/details/81236190