
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.