Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于 Web 安全突然想到的 #32

Open
AngusFu opened this issue Sep 17, 2020 · 2 comments
Open

关于 Web 安全突然想到的 #32

AngusFu opened this issue Sep 17, 2020 · 2 comments

Comments

@AngusFu
Copy link
Owner

AngusFu commented Sep 17, 2020

之前为了方便面试(增加和候选人的谈资),自己出了一套前端面试题。

其中有一道题是考察 Web 安全的,请候选人列出 3 个和 Web 安全相关的名词。

为什么要考查 Web 安全知识呢?几点原因:

  1. 奇舞团是 360 的一个部门,360 啊……
  2. Web 安全本来就很重要,不是吗
  3. 窥一斑而知全豹,请让我看到知识的深度、广度

然鹅,过去一年多,做过这套题的同学大概也有 40 人了,多数同学的安全不外乎以下几点:

  • CSRF
  • XSS
  • HTTPS

我期待的一些与众不同的答案,似乎从未出现。

所以,这里列一些我脑子里粗略能够想到的点 ——

浏览器

  • CSP
  • HSTS
  • X-Frame-Options
  • SRI
  • Referrer Policy

Node

  • 本地文件操作相关:如路径拼接
  • SSRF
  • 正则表达式攻击(Re DOS): 可以使用 re2 替代
  • 一些旁路攻击,如时序攻击

其他

  • 服务端各种校验(ip、origin、referrer 等)
  • ……

另外,很多网站经常会设置一些 header,也建议了解下 ——

x-content-type-options: nosniff
x-download-options: noopen
x-frame-options: sameorigin
x-xss-protection: 1; mode=block
@AngusFu
Copy link
Owner Author

AngusFu commented Jan 5, 2022

@AngusFu
Copy link
Owner Author

AngusFu commented Jan 5, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant