
Windows-based C2 research tool that uses Spotify playlists as a command channel and Telegram for output delivery, demonstrating cloud-assisted command communication without requiring the Spotify Web API.
Execute commands through a Spotify playlist and receive command output through Telegram.
SpotifyC2 is a Windows-based cybersecurity research project that demonstrates how publicly accessible cloud services can be used as a communication channel between a controller and a client.
Instead of communicating with a traditional server, the client periodically polls a Spotify playlist and interprets the playlist title as a command. After executing the command locally, the resulting output is delivered to a configured Telegram Bot.
The project explores the concept of cloud-assisted command channels using legitimate web services for educational and defensive security research.
This project is intended solely for cybersecurity research, authorized laboratory environments, detection engineering, and educational purposes.
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
Edit the following constants before compiling:
#define PLAYLIST_ID "YOUR_PLAYLIST_ID"
#define TELEGRAM_BOT_TOKEN "YOUR_BOT_TOKEN"
#define TELEGRAM_CHAT_ID "YOUR_CHAT_ID"
#define SLEEP_SECONDS 20
Open the project in Visual Studio.
Add libcurl include and library paths.
Compile for:
x64
Release
Build the project.
Spotify Playlist
│
▼
Playlist Title
│
▼
Client Polls Spotify
│
▼
Execute Command
│
▼
Collect Output
│
▼
Telegram Bot
│
▼
Operator
SpotifyC2 was developed to study:
This software is provided strictly for educational purposes, cybersecurity research, threat emulation, and authorized security testing.
It is intended to help researchers understand cloud-based communication techniques and develop defensive detections. Do not deploy or use this software on systems or networks without explicit authorization.
MIT License
SpotifyC2
A lightweight cloud-assisted command channel research project using Spotify and Telegram for cybersecurity education and defensive research.