Issue 138: Vulnerabilities in Microsoft Teams and Instagram

The Latest API Security News, Vulnerabilities and Best Practices
Issue: #138
Vulnerabilities in Microsoft Teams and Instagram
This week, we check out the recent vulnerabilities in Microsoft Teams and Instagram, the awesome-apisecurity repo in GitHub, and the upcoming DevSecCon24 conference.
Vulnerability: Microsoft Teams
 

Evan Grant found a way to break into Microsoft Teams accounts by leveraging Microsoft Power Apps.

Microsoft Power Apps and Power Automate services are meant to provide easy tools to add custom applications and flows to Teams. A small bug in Power Apps snowballed into a big issue, allowing attackers to create a Teams tab, steal the victim’s tokens through a rogue iFrame, and then use that token to gain persistent read/write access to the victim’s email, Teams chats, OneDrive, Sharepoint, and a variety of other services.

Here’s a quick video on Grant’s proof of concept for gaining access to another user’s OneDrive file:

Teams_video_thumbnail

The Teams tabs were checking the location of iFrames and ensuring that those began with https://make.powerapps.com. However, Grant could circumvent this by simply creating a subdomain that starts with that string but is hosted on his own domain, like https://make.powerapps.com.fakecorp.ca/. This allowed him to get his custom code to run on a Teams tab and get access to the victim’s tokens.

He could then use the https://apps.powerapps.com/auth/onbehalfof endpoint to silently exchange the tokens into tokens from other systems, such as:

    • apihub.azure.com
    • graph.microsoft.com
    • service.flow.microsoft.com
    • service.powerapps.com
    • Dynamics apps subdomains

Grant then used these tokens to access private data. For example, he could use the service flow token to create a Power Automate flow to access the Outlook mails, Teams messages, and OneDrive and SharePoint files of another user. The whole process looked like this:

Microsoft_Teams_vulnerability_flow

Grant’s write-up is fascinating (do read it for more details) and shows how trivial-looking things here and there can turn into a serious exploit opportunity. Luckily, Microsoft has since fixed the issue.

Lessons learned here:

  • Perform strict data validation on any URLs, parameters, and payloads.
  • Adhere to the zero trust approach. Every API must assume that other application components have been compromised instead of blindly trusting them.
  • Ask for explicit user approvals on the first token use and token exchange.
Vulnerability: Instagram
 

Facebook continues to patch broken object-level authorization (BOLA, aka IDOR) in their GraphQL APIs. This time, they paid the $30,000 prize to Mayur Fartade for finding a bug that allowed a malicious user to view targeted media on Instagram.

Attackers could get access to details of private and archived Instagram posts, stories, Reels, or IGTV of other users if they knew the media ID of the resource.

Here are the steps that he followed:

  1. Obtain the media ID of the target post, Reel, IGTV, or story, either by brute-forcing or by other means.
  2. Send a POST request with  the following parameters to the endpoint https://i.instagram.com/api/v1/ads/graphql/
    Parameters:
    doc_id=[REDACTED]&query_params={"query_params":{"access_token":"","id":"[MEDIA_ID]"}}
    [MEDIA_ID] is the media id of the post/reel/IGTV/story, doc_id is redacted from the example.
  3. The API returns display_url, save_count, and other details of the media, even if the resource is not supposed to be accessible or had already been archived.
Instagram_data_leak

Fartade also found another endpoint with similar behavior. Instagram has since fixed the issue.

Lessons learned:

  • Authentication is not enough. Make sure that any resource access also enforces authorization checks to ensure that only users who are supposed to have access to the resource can access it.
Resources: awesome-apisec
 

GitHub has plenty of repositories that collect links to useful resources on a certain topic handily accessible in one place.

One such GitHub repository is awesome-apisec by André Rainho. This repository pulls together a collection of API security resources, such as tools, cheat sheets, checklists, labs, videos, and so on.

Worth checking out and bookmarking it for future reference.

Conferences: DevSecCon24
 

DevSecCon24 is another industry event gone all online this year and thus available wherever you are.

There’s a lot of DevSecOps content at the event and at least one session specifically on API security, “It’s Time for API Security as Code!” by Isabelle Mauny on Thursday Jun 24, 10:35 AM – 11:15 AM GMT +1.

You can read the abstract and register for free here.

 
 
Thanks for reading.

That's it for today. If you have any feedback or stories to share, simply reply to this email.

Please forward the newsletter to your friends and colleagues who might benefit from it.

 
42Crunch, Inc.   95 Third Street  2nd Floor  San Francisco  CA   94103   United States
You received this email because you are subscribed to API Security News from 42Crunch, Inc..

Update your email preferences to choose the types of emails you receive or Unsubscribe from all future emails  
 
 

Older messages

Issue 137: Vulnerabilities in VMware vCenter and Apache Pulsar, GraphQL and CSRF attacks

Thursday, June 10, 2021

Hi, today we look at a couple of recent API vulnerabilities, API Security in Postman, CSRF and GraphQL, my upcoming live Q&A, and a buyer's APIsecurity.io The Latest API Security News,

Issue 136: OAuth 2.0 security checklist and pentesting ✔️

Thursday, June 3, 2021

Hi, today we look at a recent API breach, a couple of pentesting case studies, and OAuth 2.0 security checklist and pentesting APIsecurity.io The Latest API Security News, Vulnerabilities and Best

Issue 135: Millions stolen from cryptoexchanges through APIs 💱

Thursday, May 27, 2021

Hi, today we look at the recent Rocket.Chat API vulnerability, cybercriminals exploiting cryptoexchange API keys, effect of Let's Encrypt root APIsecurity.io The Latest API Security News,

Issue 134: API vulnerabilities at Echelon, Instagram, Facebook Workspace

Thursday, May 20, 2021

Hi, today we look into details of 3 recent API vulnerability reports and have an RSCA interview with Forrester's Sandy Carielli APIsecurity.io The Latest API Security News, Vulnerabilities and Best

Issue 133: Vulnerable Peloton APIs, API contract generation for .NET 💻

Friday, May 14, 2021

Hi, this week we look at Peloton and India's CoWIN, OpenAPI contracts based on .NET annotations, API Security sessions at RSAC AppSec Village APIsecurity.io The Latest API Security News,

You Might Also Like

🔐 Why Microsoft Replacing Passwords Is a Good Thing — Linux Mint vs. Ubuntu

Thursday, December 26, 2024

Also: How I Used QR Codes and Google Sheets to Organize My Home How-To Geek Logo December 26, 2024 Did You Know A "moment" used to be an actual measure of time, corresponding to roughly 90

Ranked | The World's 10 Largest Companies by Revenue (2019-2024) 💰

Thursday, December 26, 2024

We show the world's largest companies by revenue, based on the Fortune Global 500 rankings as stock markets rally in 2024. View Online | Subscribe | Download Our App FEATURED STORY The World's

Issue 345 - OTA software updates are amazing

Thursday, December 26, 2024

View this email in your browser If you are just now finding out about Tesletter, you can subscribe here! If you already know Tesletter and want to support us, check out our Patreon page Issue 345 - OTA

Do Honeypots Still Matter?

Thursday, December 26, 2024

Top Tech Content sent at Noon! Boost Your Article on HackerNoon for $159.99! Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, December 26, 2024? The

Best Practices for Composition Patterns in Jetpack Compose

Thursday, December 26, 2024

View in browser 🔖 Articles Best Practices for Composition Patterns in Jetpack Compose Jetpack Compose is a newly introduced declarative UI framework compared to other declarative UIs, and there hasn

wpmail.me issue#699

Thursday, December 26, 2024

wpMail.me wpmail.me issue#699 - The weekly WordPress newsletter. No spam, no nonsense. - December 26, 2024 Is this email not displaying correctly? View it in your browser. News & Articles 12 Best

Post from Syncfusion Blogs on 12/26/2024

Thursday, December 26, 2024

New blogs from Syncfusion Create a Flutter 3D Column Chart to Showcase the Top 6 Renewable Energy-Consuming Countries By Praveen Balu Let's visualize the top 6 renewable energy-consuming countries

Ruijie Networks' Cloud Platform Flaws Could Expose 50,000 Devices to Remote Attacks

Thursday, December 26, 2024

THN Daily Updates Newsletter cover Improve IT Efficiency with a Standardized OS: Nine considerations for building a standardized operating environment Optimize your IT with a standardized operating

Edge 460: Anthropic's New Protocol to Link AI Assistants to Data Sources

Thursday, December 26, 2024

Model Context Protocols is one of the recent AI contributions of the AI lab. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

December 26th 2024

Thursday, December 26, 2024

Curated news all about PHP. Here's the latest edition Is this email not displaying correctly? View it in your browser. PHP Weekly 26th December 2024 Hi everyone, It's boxing day in some parts