{"id":24692429,"url":"https://github.com/xeintdm/telegramrat","last_synced_at":"2026-05-04T22:32:42.997Z","repository":{"id":273544825,"uuid":"920074682","full_name":"XeinTDM/TelegramRAT","owner":"XeinTDM","description":"Telegram Remote Access Tool","archived":false,"fork":false,"pushed_at":"2025-01-21T14:33:11.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T02:13:28.699Z","etag":null,"topics":["administration","csharp","dotnet","rat","remote-access","remote-control","telegram","telegram-bot","telegram-rat","tg-rat","windows"],"latest_commit_sha":null,"homepage":"https://guns.lol/xein","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XeinTDM.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":"2025-01-21T14:20:14.000Z","updated_at":"2025-01-24T08:31:28.000Z","dependencies_parsed_at":"2025-01-21T15:38:31.448Z","dependency_job_id":null,"html_url":"https://github.com/XeinTDM/TelegramRAT","commit_stats":null,"previous_names":["xeintdm/telegramrat"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XeinTDM%2FTelegramRAT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XeinTDM%2FTelegramRAT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XeinTDM%2FTelegramRAT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XeinTDM%2FTelegramRAT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XeinTDM","download_url":"https://codeload.github.com/XeinTDM/TelegramRAT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244894317,"owners_count":20527677,"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":["administration","csharp","dotnet","rat","remote-access","remote-control","telegram","telegram-bot","telegram-rat","tg-rat","windows"],"created_at":"2025-01-26T20:15:11.981Z","updated_at":"2026-05-04T22:32:42.990Z","avatar_url":"https://github.com/XeinTDM.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TelegramRAT\n\n**Telegram Remote Access Tool**  \nA modern and optimized administration tool for Windows, accessible via your personal Telegram bot. Built for educational and administrative purposes, this tool offers robust features to interact with and control Windows systems remotely.\n\n## Features\n\n- **Keyboard and Mouse Input Simulation**\n- **File System Access**\n  - Upload, download, delete, and manage files.\n- **CMD Command Execution**\n- **Python Scripting**\n  - Execute Python scripts directly.\n- **Audio and Video**\n  - Record audio and capture webcam photos.\n- **System Control**\n  - Shutdown, restart, logoff, monitor power control, etc.\n- **Monitoring**\n  - Keylogging (educational use only).\n- **Miscellaneous**\n  - Screenshot capturing, URL opening, and more.\n\nFor a full list of available commands, use the `/commands` bot command or click on the `Show All Commands` button.\n\n## Requirements\n\n- **Platform:** Windows 7+\n- **Framework:** .NET 8\n- **Telegram Bot:** Create one [here](https://core.telegram.org/bots).\n\n## Improvements Over the Original\n\nThis version is based on the [Garneg's TelegramRAT](https://github.com/Garneg/TelegramRAT), with significant enhancements:\n- Updated to **.NET 8** for better performance and support.\n- Optimized and refactored the entire codebase.\n- Improved stability and error handling.\n- Enhanced security practices.\n- Streamlined the command architecture for easier extension.\n- Updated all the third-party libraries.\n\n## Setup\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/XeinTDM/TelegramRAT.git\n   ```\n2. Configure your bot token and owner ID (see [Configuration](#configuration)).\n3. Build the project using Visual Studio or any compatible IDE.\n4. Deploy the compiled binary on the target system.\n5. Start the application and control it through your Telegram bot.\n\n## Runtime behavior\n\n`TelegramRAT` supervises the polling loop and automatically recreates the Telegram client if an unexpected error occurs. Each retry clears any cached command state, notifies the configured owner about the failure, and waits with an exponential backoff (up to 60 seconds) before reconnecting. Pressing \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eC\u003c/kbd\u003e requests a graceful shutdown so the bot can stop polling without forcing another restart.\n\n## Configuration\n\n`TelegramRAT` reads its runtime configuration from **environment variables** or an optional `appsettings.json` file located next to the executable. Environment variables have priority; any value that is missing falls back to `appsettings.json`.\n\n| Setting   | Environment variable       | `appsettings.json` key |\n|-----------|----------------------------|------------------------|\n| Bot token | `TELEGRAMRAT_BOT_TOKEN`    | `BotToken`             |\n| Owner ID  | `TELEGRAMRAT_OWNER_ID`     | `OwnerId`              |\n\n### Example `appsettings.json`\n\n```json\n{\n  \"BotToken\": \"123456789:telegram-bot-token\",\n  \"OwnerId\": \"123456789\"\n}\n```\n\n\u003e ⚠️ **Never commit secrets.** Keep your production `appsettings.json` outside of source control and distribute it securely alongside the compiled binary when deploying.\n\n### Setting secrets via environment variables\n\nEnvironment variables are the recommended option for CI/CD or server deployments because they keep secrets out of the file system.\n\n- **PowerShell**\n  ```powershell\n  $env:TELEGRAMRAT_BOT_TOKEN = '123456789:telegram-bot-token'\n  $env:TELEGRAMRAT_OWNER_ID = '123456789'\n  ```\n\n- **Windows Command Prompt**\n  ```cmd\n  set TELEGRAMRAT_BOT_TOKEN=123456789:telegram-bot-token\n  set TELEGRAMRAT_OWNER_ID=123456789\n  ```\n\n- **Linux / macOS (Bash/Zsh)**\n  ```bash\n  export TELEGRAMRAT_BOT_TOKEN=123456789:telegram-bot-token\n  export TELEGRAMRAT_OWNER_ID=123456789\n  ```\n\nFor long-running deployments (e.g., systemd services, container images), store the variables in the service definition or secret manager provided by your hosting environment.\n\n## License\n\nThis project is licensed under the [The Unlicense](LICENSE), granting you the freedom to use, modify, and distribute the code as you see fit.\n\n## Disclaimer\n\n\u003e **This tool is for educational and ethical purposes only.**  \n\u003e Using this software maliciously or in violation of any laws is strictly prohibited.  \n\u003e **The author is not responsible for any misuse or damage caused by this code.**  \n\u003e Ensure you have proper authorization before using this tool on any system.\n\nBy using this tool, you agree to take full responsibility for your actions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxeintdm%2Ftelegramrat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxeintdm%2Ftelegramrat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxeintdm%2Ftelegramrat/lists"}