Websocket,socket.io,nodejs和安全性
我正在研究实时分析应用程序,并使用websockets(通过socket.io库)和nodejs。 不会有通过websockets发送的“敏感”数据(比如名字,地址等)。 它只会用于跟踪访问量并跟踪访问者总数(以及访问量排名前十位的访问者数量)。
我应该知道哪些安全问题? 我是否打开自己:
- DoS攻击?
- XSS攻击?
- 还有哪些安全漏洞可以用来访问networking服务器/networking服务器的局域网?
- 还有什么我没有在这里提到的?
谢谢!
1. DoS attacks?
你正打开自己的防DoS攻击,如果他们做得很好,几乎没有什么可以做这种攻击。
2. XSS attacks?
如果你不过滤你很容易受到XSS攻击。 我相信你可以用这样的东西来保护自己:
/** * Escape the given string of `html`. * * @param {String} html * @return {String} * @api private */ function escape(html){ return String(html) .replace(/&(?!\w+;)/g, '&') .replace(/</g, '<') .replace(/>/g, '>') .replace(/"/g, '"'); }
3. Additional security holes that could be used to gain access to the webserver/webserver's LAN?
你应该使用防火墙来保护自己免受局域网攻击?
4. Anything else I didn't mention here?
- 如果您发送敏感信息,则至less应通过SSL发送。 你也应该想出一些authenticationscheme
- 也许你会很容易受到会议固定?