Python Penetration Testing This Team Must Be Token
The Microsoft Teams desktop app stores an authentication token in a cookie that can be read from the local browser profile. An attacker with local access could extract this token and use it to access Teams and other Microsoft 365 services.
Published on infosecwriteups.com
In 2022 vectra.ai released a statement about stumbling upon a vulnerability in the Microsoft Teams desktop app. To date, Microsoft has not addressed the patch for this issue.
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 Teams desktop app stores its authentication token in a browser cookie database without additional protection, allowing any local process to read it.
Impact
An attacker with local system access could steal the token and use it to access Teams and other Microsoft 365 services, though Microsoft argues that local access is already a significant compromise.
What the attacker needed
Local access to the victim's computer; Firefox or Chrome installed; Teams token stored in browser cookies
How it was found
- Open the Firefox profile directory and find the latest profile.
- Check that the cookies database file exists in that profile.
- Connect to the cookies database and query for the token named skypetoken_asm.
- Print the extracted token.
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.
When you log into a website, it gives your browser a small piece of text called a token that proves who you are. This article shows that the Teams app leaves that token in a file on your computer, and a simple script can read it. Anyone who can run a program on your computer could copy the token and pretend to be you online.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.