Skip to content
Info disclosure Write-up Beginner

How Black Hat Hackers Hack into your Telegram Groups !!!

The author shows that anyone holding a Telegram bot token and a chat ID can use a public Python tool to send messages into a group and pull information from it. The text claims leaked bot tokens from the dark web would let an attacker do this to groups they do not own, but the demonstration only uses the author's own bot in a lab.

josuofficial327 Follow

Published on medium.com

TILL THIS STEP IS MADE ON LAB ENVIRONMENT, I PREVIOUSLY MENTIONED REAL BOT TOKENS AND TELEGRAM CHAT IDS ARE LEAKED IN DARK WEB RECENTLY.

Josekutty Kunnelthazhe Binu, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the weakness is that a bot token acts as a bearer credential with no extra check, so anyone who obtains a leaked token can act as the bot in every chat it belongs to.

Impact

Anyone who obtains a leaked bot token could use the bot to post into, and gather information from, the groups that bot belongs to; the post does not show this working against a group the attacker does not control.

What the attacker needed

A Telegram bot token; the target group's chat ID; the bot added to that group

The fix

Bot tokens should be treated as secrets, rotated when exposed, and bots should be removed from groups they no longer need to be in.

How it was found

  1. Create a Telegram bot through a free bot-making website and log in to Telegram.
  2. Note the token that BotFather sends in Telegram.
  3. Start a chat with the bot and add it to a Telegram group.
  4. Obtain the group's chat ID using a helper bot.
  5. Install the TeleTracker scripts and their Python requirements.
  6. Run the gathering script with the bot token and chat ID to pull information from the group.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A Telegram bot is a small automated account that a program controls using a secret string called a token. If someone else gets that token, they can make the bot post messages or read what it can see, just as if they were the owner. This post shows that with a token and a group's chat ID, a ready-made script can send messages to the group.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by josuofficial327

View all

7 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.