{"id":20855686,"url":"https://github.com/spensercai/drat","last_synced_at":"2025-04-04T08:06:11.072Z","repository":{"id":131663518,"uuid":"609861105","full_name":"SpenserCai/DRat","owner":"SpenserCai","description":"去中心化远程控制工具（Decentralized Remote Administration Tool），通过ENS实现了配置文件分发的去中心化，通过Telegram实现了服务端的去中心化","archived":false,"fork":false,"pushed_at":"2023-03-14T01:18:13.000Z","size":185,"stargazers_count":802,"open_issues_count":3,"forks_count":55,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-04T07:42:52.874Z","etag":null,"topics":["bot","c2","decentralized","ens","ethereum","go","golang","hacking","hacking-tool","rat","remote-control","security-tools","telegram"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpenserCai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-03-05T13:15:04.000Z","updated_at":"2025-03-25T06:46:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f12a192-b0e8-4b1a-af2c-d1b4b27e7a48","html_url":"https://github.com/SpenserCai/DRat","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpenserCai%2FDRat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpenserCai%2FDRat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpenserCai%2FDRat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpenserCai%2FDRat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpenserCai","download_url":"https://codeload.github.com/SpenserCai/DRat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142063,"owners_count":20890652,"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","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":["bot","c2","decentralized","ens","ethereum","go","golang","hacking","hacking-tool","rat","remote-control","security-tools","telegram"],"created_at":"2024-11-18T04:20:19.517Z","updated_at":"2025-04-04T08:06:11.050Z","avatar_url":"https://github.com/SpenserCai.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n * @Author: SpenserCai\n * @Date: 2023-03-06 09:42:26\n * @version: \n * @LastEditors: SpenserCai\n * @LastEditTime: 2023-03-14 09:17:41\n * @Description: file content\n--\u003e\n# DRat\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FSpenserCai%2FDRat.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FSpenserCai%2FDRat?ref=badge_shield)\n\n去中心化远程控制工具（Decentralized Remote Administration Tool）\n\n## 介绍\nDRat是一个去中心化远程控制工具，可以实现在没有服务端和配置文件服务器的情况下实现远程控制和配置下发。\n\n## 支持平台\n- Windows\n- Linux (其他系统测试通过的可以提交issue)\n  - Ubuntu 22.04 ✔\n\n## 特性\n### 无需服务端\n通过电报实现的远程控制，只需要在Group中发送指令，即可实现远程控制。\n\n### 自带代理\n由于电报(Telegram)的特性，需要使用代理才能访问，DRat内置了代理，可以直接使用。\n\n### ENS配置下发\n基于去中心化的ENS，可以实现配置文件的下发。\n\n## 功能列表\n\u003c!--一个表格来展示:命令 功能 状态--\u003e\n| 命令 | 功能 | 状态 |\n| :---: | :---: | :---: |\n| /help | 帮助 | ✔ |\n| /rce start | 开启rce会话 | ✔ |\n| /rce stop | 停止rce会话 | ✔ |\n| /rce \u003c命令\u003e | 执行命令,如果执行命令前没有开启rce会话则会自动开启 | ✔ |\n| /sysinfo | 获取系统信息 | ✔ |\n| /restart_drat | 重启drat | ✔ |\n| /shutdown_drat | 关闭drat | ✔ |\n| /dump_navicat | 导出navicat连接信息 | ✖ |\n| /dump_xshell | 导出xshell连接信息 | ✖ |\n| /dump_browser | 导出浏览器密码 | ✖ |\n| /download \u003c匿名网盘Token\u003e \u003c文件路径\u003e | 下载文件 | ✖ |\n| /upload \u003c文件路径\u003e | 上传文件 | ✖ |\n| /wechat info | 获取微信信息 | ✖ |\n| /wechat history | 聊天记录和通讯录 | ✖ |\n\n如果还有别的需求，可以提交issue\n\n## 使用\n### 获取\n```bash\ngit clone https://github.com/SpenserCai/DRat.git\n```\n### ENS域名注册\n1. 安装[MetaMask](https://metamask.io/)，并创建账户。\n2. 获取测试币，可以通过[Goerli Faucet](https://goerlifaucet.com/)获取。\n3. 将MetaMask的网络切换到Goerli 测试网络。\n4. 在[ENS](https://app.ens.domains/)中注册域名，请使用8位的域名\n\n### 配置文件\n配置文件的格式如下\n```json\n{\n    \"TELBOT_TOKEN\":\"\u003cTOKEN\u003e\",\n    \"TELBOT_CHAT_ID\":1234567890,// 电报群ID不要带‘-’\n    \"CLASH_CONN_STR\":\"代理类型:地址:端口:加密方式:密码:是否支持udp\",// 可以在clash里面找到\n    \"LOCAL_PROXY_PORT\":7890,\n    \"ENS_DOMAIN\":\"\"// 后期这里会支持更新ENS域名，现在不支持\n}\n```\n对于配置文件的上传有两种方案\n\n#### 1. 自动上传配置文件\n为了更加方便的完成配置文件的上传，我开发了[DRatConfig工具](https://github.com/SpenserCai/DRatConfig)，可以自行完成加密和上传，前提只需要注册好一个eth域名即可\n\n#### 2. 手动上传配置文件\n```bash\npython encode_config.py \u003c配置文件路径\u003e \u003cENS域名(不包含.eth)\u003e\n```\n生成后会得到一个AES加密好的字符串，将其复制粘贴到ENS域名的description中，可以访问：https://app.ens.domains/name/你的域名/details 编辑。\n\n![](docs/img/setup_1.png)\n\n点击保存，等待一段时间，即可完成配置文件的下发。\n\n\n### 编译\n```bash\n# cli 代表调试模式，spy代表后台运行\n# windows \npython build.py \u003cENS配置\u003e cli windows\n# linux\npython build.py \u003cENS配置\u003e cli linux\n```\n\n配置文件的格式如下\n```json\n{\n    \"TELBOT_TOKEN\":\"\",\n    \"TELBOT_CHAT_ID\":0,\n    \"CLASH_CONN_STR\":\"\",\n    \"LOCAL_PROXY_PORT\":7890,\n    \"ENS_DOMAIN\":\"\u003c完整的ENS域名\u003e\"\n}\n```\n\n### 测试\n运行程序，在对应的电报群组测试\n![](docs/img/setup_2.png)\n\n## 免责声明\n本项目仅供学习交流使用，严禁用于非法用途，否则，造成的一切后果由使用者自行承担。 \n\n\n\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FSpenserCai%2FDRat.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FSpenserCai%2FDRat?ref=badge_large)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspensercai%2Fdrat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspensercai%2Fdrat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspensercai%2Fdrat/lists"}