TELEGRAM
BOT API
SYSMON 22
EGRESS
DetectionBlue TeamSOCOctober 12, 2026•9 min read

Detecting Stealer Exfiltration via Telegram Bots

Telegram gives a stealer free, reliable hosting on a domain most proxies allow. The only odd part is who is calling it.

Scroll

Many commodity stealers and clippers send their results through the Telegram Bot API: the sample holds a bot token and a chat ID and uploads a file or message to api.telegram.org. There is no operator-owned server to block, and the domain has a good reputation. Telegram sits under exfiltration over web services in ATT&CK, so we use the parent technique. Detection comes from asking which process made the call.

Signals at a Glance

SignalWhereATT&CK
DNS lookup of api.telegram.org by a process that is not Telegram or a browserSysmon 22, EDR networkT1567
HTTPS to api.telegram.org from a binary in a user-writable pathEDR networkT1567
URL path /bot...: sendDocument or sendMessage visible after TLS inspectionTLS-inspecting proxyT1567
Host with no Telegram install or approved use contacting the APIProxy, asset inventoryT1071.001
Recurring small sendMessage calls from one host (status or clipper beacons)Proxy, flowT1567

Process-Aware DNS and Network Hunting

Sysmon event 22 records the process behind each DNS query, which is exactly the field that turns an allowed domain into an alert:

index=sysmon EventCode=22 QueryName="api.telegram.org"
  NOT Image IN ("*\\Telegram.exe","*\\chrome.exe","*\\msedge.exe","*\\firefox.exe")
| stats count values(Image) AS processes earliest(_time) AS first latest(_time) AS last BY host, User
| sort - count
`comment("tune/validate: add sanctioned bots and automation by full image path")`
// Microsoft Defender (KQL) - same logic on network events, with a path filter
DeviceNetworkEvents
| where RemoteUrl has "api.telegram.org"
| where InitiatingProcessFileName !in~ ("telegram.exe","chrome.exe","msedge.exe","firefox.exe")
| extend UserWritable = InitiatingProcessFolderPath has_any ("\\AppData\\","\\Temp\\","\\ProgramData\\","\\Users\\Public\\")
| summarize conns=count(), first=min(Timestamp) by DeviceName, InitiatingProcessFileName, InitiatingProcessFolderPath, UserWritable
| order by UserWritable desc, conns desc

Egress Policy

Vetted sources

Use SigmaHQ DNS and network rules for Telegram API access from uncommon processes, Elastic and Splunk ESCU analytics for exfiltration over web services, and Telegram’s Bot API documentation for URL structure. Baseline sanctioned bots and approved Telegram use before enabling blocking.

Build Detections That Fire

Mjolnir Security helps blue teams turn threat intelligence into high-fidelity detections across endpoint, network, identity and cloud telemetry.

Detection EngineeringManaged Detection & ResponseThreat HuntingIncident ResponsePurple Teaming
  • Detection Engineering We build and tune detections mapped to ATT&CK from your own telemetry.
  • Threat Hunting as a Service Hypothesis-driven hunts for the behaviours on this page.
  • 24/7 Incident Response Containment when a detection fires. Call +1 833 403 5875.
Written by: Mjolnir Threat Research (MTAC)  |  Published: October 12, 2026  |  Last reviewed: October 12, 2026