通过 Spotify 播放列表执行命令,并通过 Telegram 接收命令输出。
SpotifyC2 是一个基于 Windows 的网络安全研究项目,演示了如何利用公开可用的云服务作为控制器与客户端之间的通信通道。
客户端不与传统服务器通信,而是定期轮询 Spotify 播放列表,并将播放列表标题解释为命令。命令在本地执行后,生成的输出将发送到配置好的 Telegram Bot。
该项目探索了使用合法 Web 服务构建云辅助指令通道的概念,用于教育性和防御性安全研究。
本项目仅用于网络安全研究、授权实验室环境、检测工程及教育目的。
Operator
│
▼
Spotify Playlist Title
│
▼
Spotify oEmbed API
│
▼
SpotifyC2 Client
│
Execute Command
│
Capture stdout
│
▼
Telegram Bot API
│
▼
Operator Receives Output
Spotify Playlist
│
▼
Poll Spotify every 20 seconds
│
▼
Read Playlist Title
│
▼
Extract Command
│
▼
Execute with _popen()
│
▼
Capture Command Output
│
▼
URL Encode Response
│
▼
Send Output to Telegram Bot
SpotifyC2
│
├── main.c
│
├── GetCommandFromSpotify()
│ Downloads playlist metadata
│ Extracts playlist title
│
├── RunCommand()
│ Executes Windows command
│ Captures stdout
│
├── SendToTelegram()
│ Sends command output
│ Uses Telegram Bot API
│
├── SaveData()
│ libcurl callback
│ Stores downloaded data
│
└── URLEncode()
Encodes output before transmission
编译前编辑以下常量:
#define PLAYLIST_ID "YOUR_PLAYLIST_ID"
#define TELEGRAM_BOT_TOKEN "YOUR_BOT_TOKEN"
#define TELEGRAM_CHAT_ID "YOUR_CHAT_ID"
#define SLEEP_SECONDS 20
在 Visual Studio 中打开项目。
添加 libcurl 包含路径和库路径。
编译目标:
x64
Release
构建项目。
Spotify Playlist
│
▼
Playlist Title
│
▼
Client Polls Spotify
│
▼
Execute Command
│
▼
Collect Output
│
▼
Telegram Bot
│
▼
Operator
开发 SpotifyC2 的目的是研究:
本软件严格用于教育目的、网络安全研究、威胁模拟及授权安全测试。
它旨在帮助研究人员理解基于云的通信技术并开发防御性检测手段。禁止在未经明确授权的系统或网络上部署或使用本软件。
MIT 许可证
SpotifyC2
一个轻量级的云辅助指令通道研究项目,利用 Spotify 和 Telegram 进行网络安全教育与防御性研究。