# Exploit Title : Telegram Bot API CSRF Vulnerability and use it as a ddoser # Exploit Author : 4L1R3Z4 # Date : 2016/08/15 # Google Dork : No # Home Page : https://core.telegram.org/bots/api # Category : Web Application # Discovered by : 4L1R3Z4 ============================== # Description : ============================== In new version of telegram bot api, a new object called "MessageEntity" permits you that send Urls as message. By this object, We can achieve GET request from telegram server. Telegram doesn't check that the image is real or not, and also it doesn't have a captcha or securtiy token so we can run our php files through Telegram Server ============================== # Proof Of Concepts : ============================== In this section, I'll show you that how you can grab telegram Server IP create a folder named "tg" on your host and create a .htaccess file in that with the following contents: ------------- ErrorDocument 404 /tg/log.php ------------- And this is the "log.php": -------------------------------------------- ---------------------------------------------- and a file called "request.php" with this contets: ----------------------- message->chat->id."&parse_mode=HTML&text=".urldecode("".'test'.""))); ?> ------------------------- Then activate WebHook for you bot and set the "request.php" address for web hook, Then, Send a message to your bot, if you do everything right, the IP will write on "log.txt" file ************ ************ Exploiting it to ddos ************ Change request.php with this: -------------------------------------------- message->chat->id."&parse_mode=HTML&text=".urldecode("".'test'.""))); } ?> -------------------------------------------- and change log.php with this: -------------------------------------------- --------------------------------------------- This code will send 100 requests to "exampledomain.com" from telegram IP You can increase or decrease the request numbers depending on your server features Also you can exploit it through IRC servers if your server is not strong. Exploited by 4L1R3Z4