logo svg
logo

August 18, 2023

A Comprehensive Look at Inter-Platform Exploits

This article unveils an email-based vulnerability across digital platforms, demonstrating how it enables unauthorized access to company resources and suggests potential remedies for such security risks.

DeepStrike

DeepStrike

Featured Image

Introduction:

During a security assessment, our team identified a vulnerability in the email-based invoice import functionality. By exploiting this weakness, we gained access to the organization's internal resources, including GitHub and Slack.

Functionality Overview:

The platform (redacted.com), offers a diverse range of accounting services. A particular feature that stood out was the ability to add expenses through email. To utilize this function, users are required to forward their email receipts to [email protected]. However, before doing so, one needs to set a source email address with redacted.com to ensure that the emails are recognized and accepted.

For illustration, if I receive an invoice at [email protected] and need to upload it to the accounting website, I first need to set [email protected] on redacted.com as the source email to store the received mails from. Subsequently, I forward the invoice from [email protected] to [email protected]. The platform then processes this email, converting its HTML content into a PDF, which gets stored in the user's portal.

screenshot

The Exploit:

To leverage this vulnerability and infiltrate the company's workspace, our approach was to register on GitHub as example using the [email protected] email. Here's a step-by-step breakdown of our exploitation process:

screenshot

Limitations and Bypasses

Dynamic Email Addresses

While exploiting GitHub was relatively straightforward given their consistent use of the static [email protected] address, other platforms presented challenges. For instance, Slack employs dynamic emails in the form of no-reply-{{Random-Token}}@slack.com, making it nearly impossible to predict the exact source email for our portal.

However, where there's a will, there's a way. We found an ingenious workaround by leveraging the trust relationships between third-party authentication providers and platforms:

screenshot

screenshot

In essence, we managed to circumvent the dynamic email hurdle by harnessing the implicit trust platforms place in third-party authentication providers, exemplifying the potential risks inherent in such trust relationships.

Limited Source Email:

Certain accounting platforms require the use of a single source email, specifically the one utilized during sign up. For instance, if you register with [email protected], only the emails forwarded from [email protected] to [email protected] will appear in your account. This implies you'd need to register with [email protected] (in the context of GitHub) to successfully exploit the system. The trick lies in the fact that some applications mandate email confirmation, while others do not. We successfully circumvented the email confirmation in certain targets because some platforms underestimate the security implications of such a requirement.

Remediation

The most effective method to rectify this problem is to offer users a completely distinct email domain. For instance, if your employees are using redacted.com, establish a new domain for user emails like redacted.co, or create a new subdomain, such as mail.redacted.com. Consequently, the receipts email would change to [email protected] or [email protected]. This strategy effectively compartmentalizes different email functions, significantly reducing the risk of such vulnerabilities.

Identifying Potential Targets:

We initiated our search by looking for recurring patterns in email addresses and keywords that might indicate similar functionalities, such as "receipts@" and "expenses@" To aid in our search, we employed search dorks to comb through networks for comparable features, using search terms like "“receipt@" and "Forward" We then applied these discovered patterns to identify new potential targets. One notable example was within lifestyle and time management applications, where users are often required to forward specific emails to addresses like [email protected] We frequently found mentions of these functionalities in community forums, support sections, or official documentation, either as user queries or as described features.

Statistical Overview:

Throughout our exhaustive research, we scrutinized over 75 platforms that employed similar email-based functionalities. The security landscape of these platforms is as follows: