Abusing Microsoft Teams Direct Routing
Microsoft Teams Direct Routing installations using AudioCodes SBCs lack authentication for SIP messages, allowing an unauthenticated attacker to send crafted SIP messages that are classified as coming from Microsoft and make unauthorised external calls, leading to toll fraud.
Published on blog.syss.com
In this blog post, a practical problem and security issue when it comes to phone integration with Microsoft Teams Direct Routing is described. Due to a lack of authentication methods provided by Microsoft, current Microsoft Teams Direct Routing installations may be vulnerable to toll fraud attacks.
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
The SBC classification rules rely only on static strings in SIP headers and do not authenticate the sender, so any attacker can craft messages that pass the checks.
Impact
An attacker could impersonate the victim to make calls (e.g. CEO fraud) and commit toll fraud by routing calls to premium numbers under their control, though the text notes that IP filtering or firewall rules can block the attack if correctly applied.
What the attacker needed
Victim uses Microsoft Teams Direct Routing with an SBC; Attacker can reach the SBC's SIP service; Attacker knows the SBC's FQDN
How it was found
- Obtain the FQDN of the victim's SBC, for example from the X.509 certificate of the exposed SIP-TLS service.
- Craft SIP messages that include the SBC's FQDN as the destination host and the string pstnhub.microsoft.com in the Contact header.
- Send the messages to the SBC's SIP-TLS service using a tool such as SIPp with a self-signed certificate.
- The SBC classifies the messages as legitimate and establishes an external call through the victim's PSTN carrier.
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.
Microsoft Teams can connect to phone networks via Direct Routing, which uses a Session Border Controller (SBC) to handle calls. The SBC was configured to trust any SIP message that appeared to come from Microsoft, without checking who really sent it. An attacker could therefore send fake messages and make expensive international calls charged to the victim.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.