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

An RCE Security vulnerability #736

Open
glzjin opened this issue Aug 28, 2019 · 1 comment
Open

An RCE Security vulnerability #736

glzjin opened this issue Aug 28, 2019 · 1 comment

Comments

@glzjin
Copy link

glzjin commented Aug 28, 2019

In this file https://github.com/liftoff/GateOne/blob/master/gateone/applications/terminal/plugins/ssh/ssh.py#L586

There is a command execution and the argument comes from user input.

image

Poc:

  1. Deploy a GateOne instance.

#703

image

image

  1. Open the dev tool in your browser, open the GateOne page.

image

  1. Try to create an ssh connection. And watch the WebSocket traffic, wait for the 'terminal:ssh_get_host_fingerprint' command executes.

image

  1. Now we can switch the dev tool to console, and input this JavaScript script to let GateOne WebSocket send Our evil command. We can see that we get the command execution result from the error message.
GateOne.ws.send('{"terminal:ssh_get_host_fingerprint":{"host":"node1.buuoj.cn","port":"28030;cat /etc/passwd;"}}')

image

@glzjin glzjin changed the title A RCE Security vulnerability An RCE Security vulnerability Aug 29, 2019
@neingeist
Copy link

shouldn't this be addressed?

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

2 participants