Picking apart a bot raid on my Telegram chat
Based on a post from my Telegram channel.
On September 26, my Telegram chat got raided. Not a couple of spam accounts dropping links, but almost twenty thousand bots pouring in over an hour and three quarters.
The chat was moderated by Iris, which banned most of them, but a good chunk still got in. Once it was over, I got curious about what had actually happened: how the raid was put together, what kind of accounts were used, and what slipped through. So I went through the numbers.
- Bots in total: 19,299
- Duration: 1 hour 43 minutes
- Waves: 6, roughly 2,500 bots each
- Time between waves: 5.5 to 13 minutes
- Peak load: ~174 bots per second
- Average load: ~50 bots per second
It didn’t come all at once. It came in six waves with quiet gaps in between, which means this wasn’t someone spamming by hand. Someone set this up, and set it up to come in bursts. At its worst, 174 bots were joining every second. No human moderator does anything useful against that, and that’s exactly what moderation bots exist for.
Then there’s the age of the accounts:
| Account age | Bots | Share |
|---|---|---|
| Under 6 months | 0 | 0% |
| 6 to 12 months | 10,088 | 52.3% |
| 1 to 2 years | 4,245 | 22.0% |
| 2 to 5 years | 4,407 | 22.8% |
| Over 5 years | 559 | 2.9% |
Not a single account was younger than six months. Fresh accounts are the easiest thing in the world to filter out, so whoever ran this didn’t even bother with them. Half the bots were six months to a year old, and a few hundred were older than five years. Someone had been sitting on these accounts for a while…
17,944 of them got banned, which is 93%. Not bad, not great. Sounds nice until you remember that the other 7% is still 1,355 bots sitting in your chat. Here’s who got through:
| Account age | Got in | Share of those who got in | Share of that age group |
|---|---|---|---|
| 6 to 12 months | 951 | 70.2% | 9.4% |
| 1 to 2 years | 196 | 14.5% | 4.6% |
| 2 to 5 years | 191 | 14.1% | 4.3% |
| Over 5 years | 17 | 1.3% | 3.0% |
And this part sucks. 70% of the bots that got in were 6–12 months old, and almost one in ten accounts of that age made it through, about twice as often as the older ones. The youngest accounts in the raid, the ones you’d expect to be the most suspicious, are exactly the ones that got in the most.
But the worst part came after.
Out of the 1,355 bots that got into the chat, Iris’s “kick newcomers” command only managed to kick 337. The other 1,018 were simply forgotten: Iris doesn’t see them as newcomers anymore, and there’s no other way to remove them in bulk with the bot.
Adding another moderation bot after the fact doesn’t help either. Telegram doesn’t let bots pull a list of chat members, so a bot only knows about the people whose joins it saw itself. A bot added after the raid saw nothing, and for it those thousand bots simply don’t exist.
So if you only have one moderation bot in your chat, you get to clean out 1,000+ bots by hand. One by one.
Blocking 93% of a raid like this is something no human could do. But the bots that get through are the ones that cost you the most time, and the only way to deal with them is to have a second line of defense set up before the raid happens. Afterwards it’s already too late.