Microsoft Teams Updater Living off the Land
The Microsoft Teams updater was patched to block URL-based updates but still accepted UNC paths, so an attacker could point it at a remote SMB share hosting a crafted update package. The updater would download and execute the attacker's payload, letting them run code on the victim machine and blend in with normal Teams traffic.
trustwave.com
Published on trustwave.com
Change theme to light
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 patch only filtered URL-style strings and port numbers, so UNC share paths pointing at a remote SMB server were still accepted and fetched.
Impact
An attacker could use the signed Teams updater to download and run their own code without admin rights, and could masquerade the traffic, for example during lateral movement.
What the attacker needed
Attacker-controlled SMB share; victim can reach the share; local access to run update.exe
The fix
Microsoft declined to change the behaviour, calling it by design, so the report recommends installing Teams under Program Files, restricting SMB traffic and monitoring updater command lines.
How it was found
- Open the Teams application folder in the victim's local app data directory.
- Run the updater with the update flag pointed at the remote Samba share holding the crafted package.
- Wait roughly ten to fifteen seconds for the payload to download and execute.
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.
An updater is a small program that fetches new versions of software. Teams' updater was told to only accept updates from local network folders, but a network share address (a folder on another machine, written with two leading backslashes) still got through. An attacker who controls such a share can hand the updater a fake update, and the updater runs it as if it were genuine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.