Phishing campaign are a common tactic in which cybercriminals impersonate a well-known company, product, or brand to steal account credentials, financial information, or other data from unsuspecting victims. A typical phishing attack convinces the user to directly enter their password and login credentials, which are then captured by the attacker.
But a more specialized type of campaign known as consent phishing aims to grab sensitive data not by snagging your password but by tricking you into giving the necessary permissions to a malicious app.
This type of consent phishing relies on the OAuth 2.0 authorization technology. By implementing the OAuth protocol into an app or website, a developer gives a user the ability to grant permission to certain data without having to enter their password or other credentials.
Used by a variety of online companies including Microsoft, Google, and Facebook, OAuth is a way to try to simplify the login and authorization process for apps and websites through a single sign-on mechanism. However, as with many technologies, OAuth can be used for both beneficial and malicious
Microsoft details the problem step by step in its blog post:
- An attacker registers an app with an OAuth 2.0 provider, such as Azure AD
- The app is configured in a way that makes it seem trustworthy, such as using the name of a popular product used in the same ecosystem.
- The attacker gets a link in front of users, which may be done through conventional email-based phishing, by compromising a non-malicious website, or through other techniques.
- The user clicks the link and is shown an authentic consent prompt asking them to grant the malicious app permissions to data.
- If a user clicks Accept, they grant the app permissions to access sensitive data.
- The app gets an authorization code, which it redeems for an access token, and potentially a refresh token.
- The access token is used to make API calls on behalf of the user.
- The attacker can then gain access to the user’s mail, forwarding rules, files, contacts, notes, profile, and other sensitive data.
Microsoft touted some of the steps it’s taken to try to prevent this type of malicious behavior. The company said it uses such security tools as identity and access management, device management, threat protection, and cloud security to analyze millions of data points to help detect malicious apps. Further, Microsoft is trying to better secure its application ecosystems by allowing customers to set policies on the types of apps to which users can give certain consent.
Despite the efforts of Microsoft and other companies, these attacks persist as cybercriminals stay one step ahead of the game. To help protect against consent phishing campaigns, Microsoft offers advice for individuals and organizations.
- Check for poor spelling and grammar. If an email message or the application’s consent screen has spelling and grammatical errors, it’s likely to be a suspicious application.
- Keep a watchful eye on app names and domain URLs. Attackers like to spoof app names that make it appear to come from legitimate applications or companies but drive you to consent to a malicious app. Make sure you recognize the app name and domain URL before consenting to an application.
- Understand the data and permissions an application is asking for
- Ensure administrators know how to manage and evaluate
- Audit consent application and policies in your organisation.
- Promote the use of applications that have been accessed
- Configure consent policies.
Three pieces of advice for app and website developers that use OAuth:
- Make the permission prompts far more understandable to the casual end user. For instance, include a message that says: “If you say okay, you are giving this third party full control over all documents you can see, so make sure you trust the person asking. The request might be malicious.”
- Somehow make the system intelligent enough to make the risk decision on behalf of the user so a user not trained in computer security doesn’t have to make computer security decisions.
- Don’t allow high-risk decisions to be made, especially by default and so easily. The system should default to the least permissive permission and make the user go out of their way to give away the keys to the kingdom.