{"id":26522477,"url":"https://github.com/gill-singh-a/portainer-agent-remote-root-shell-exploit","last_synced_at":"2026-04-16T00:31:38.829Z","repository":{"id":283615776,"uuid":"949982094","full_name":"Gill-Singh-A/Portainer-Agent-Remote-Root-Shell-Exploit","owner":"Gill-Singh-A","description":"A Simple Python Program that uses Requests Module to add Portainer Agent Environment to Portainer Interface and gets a Remote Root Shell on the Target Device","archived":false,"fork":false,"pushed_at":"2025-03-21T06:26:18.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T07:26:52.537Z","etag":null,"topics":["multiprocessing","portainer","portainer-agent","python3","requests","ssh"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gill-Singh-A.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-17T12:53:45.000Z","updated_at":"2025-03-21T06:26:21.000Z","dependencies_parsed_at":"2025-03-21T07:37:05.722Z","dependency_job_id":null,"html_url":"https://github.com/Gill-Singh-A/Portainer-Agent-Remote-Root-Shell-Exploit","commit_stats":null,"previous_names":["gill-singh-a/portainer-agent-remote-root-shell-exploit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Gill-Singh-A/Portainer-Agent-Remote-Root-Shell-Exploit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gill-Singh-A%2FPortainer-Agent-Remote-Root-Shell-Exploit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gill-Singh-A%2FPortainer-Agent-Remote-Root-Shell-Exploit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gill-Singh-A%2FPortainer-Agent-Remote-Root-Shell-Exploit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gill-Singh-A%2FPortainer-Agent-Remote-Root-Shell-Exploit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gill-Singh-A","download_url":"https://codeload.github.com/Gill-Singh-A/Portainer-Agent-Remote-Root-Shell-Exploit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gill-Singh-A%2FPortainer-Agent-Remote-Root-Shell-Exploit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281386589,"owners_count":26492014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["multiprocessing","portainer","portainer-agent","python3","requests","ssh"],"created_at":"2025-03-21T13:27:09.492Z","updated_at":"2025-10-28T05:03:44.240Z","avatar_url":"https://github.com/Gill-Singh-A.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Portainer Agent Remote Root Shell Exploit\nA Simple Python Program that uses Requests Module to add Portainer Agent Environment to Portainer Interface and gets a Remote Root Shell on the Target Device\n## Requirements\nLanguage Used = Python3\u003cbr /\u003e\nModules/Packages used:\n* sys\n* warnings\n* socket\n* os\n* requests\n* json\n* paramiko\n* pathlib\n* base64\n* optparse\n* getpass\n* datetime\n* optparse\n* colorama\n* multiprocessing\n* time\n\u003c!-- --\u003e\nInstall the dependencies:\n```bash\npip install -r requirements.txt\n```\n## Setup\nClone the repository with all git modules\n```bash\ngit clone --recursive https://github.com/Gill-Singh-A/Portainer-Agent-Remote-Root-Shell-Exploit.git\n```\nAfter installing Docker on your local device, run the following commands\n```bash\ndocker pull ubuntu:20.04\ndocker save ubuntu:20.04 -o ubuntu_image.tar\nchmod 666 ubuntu_image.tar\n```\nInstall Portainer on your Device\n```bash\ndocker volume create portainer_data\ndocker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:lts\n```\nMake a Configuration file **portainer_config.json** containing details of your Portainer Instance with these details\n```json\n{\n    \"scheme\": \"https\",\n    \"host\": \"127.0.0.1\",\n    \"port\": \"9443\",\n    \"username\": \"admin\",\n    \"password\": \"password\"\n}\n```\nOpen up your Portainer Web UI, setup the password for *admin* account on first login and then remove the ***Local Docker Environment***\n## Result\nAfter Successful Exploitation, we can directly ssh to the target device as root user.\n### Note\nBefore every run, make sure that there are no environments in your Portainer Instance","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgill-singh-a%2Fportainer-agent-remote-root-shell-exploit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgill-singh-a%2Fportainer-agent-remote-root-shell-exploit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgill-singh-a%2Fportainer-agent-remote-root-shell-exploit/lists"}