/
Azure Event Hub collector

Azure Event Hub collector

[ 1 Purpose ] [ 2 Example tables ] [ 3 Authorize It ] [ 4 Send Data ] [ 5 Run It ] [ 6 Secure It ] [ 6.1 Entra ID ] [ 6.2 Azure Storage ] [ 6.3 Azure App Service ] [ 7 Monitor It ]

Purpose

An analyst wants to detect unauthorized changes in Azure or Entra ID.  Using the Azure Event Hub collector to send identity and access logs to Devo, the analyst will find privilege escalation events.  As a result, the analyst will remove malicious accounts, preventing them from disabling or modifying Azure resources.

The Azure Event Hub collector gets data from:

  • Azure Monitor, which includes auditing, metrics, and logs of all Azure cloud computing services.

  • Entra ID, which includes authentication and role threats.

  • Any other kind of string data, which can be sent using a simple script.

Example tables

Table

Description

Table

Description

cloud.azure

Data from Event Hubs, VM Metrics, Entra ID, and other sources.

cloud.azure.service.type

For most Azure services, there is a separate table for each type of log associated with that service.

cloud.azure.ad.*

Entra ID identity and access management logs.

cloud.azure.ad.signin_all

This union table combines all the different Entra ID authentication logs.

auth.all

Authentication logs, including Entra ID and Azure SQL authentication.

web.all.access

Web activity, including Azure Application Gateway.

firewall.all.traffic

Firewall activity, including Azure Firewall

network.dns

DNS activity, including Azure Firewall DNS Proxy.

Authorize It

To perform the authorization, the Entra Security Administrator role is required.

Items required before authorizing an Event Hub:

  • Subscription containing your Azure resources.

  • Resource group containing your Azure resources.

  • Name of the region containing Azure resources. Example: East US

  • Entra directory.

If you have more than one set of these items, then authorize an Event Hub for each set.

 

Items created or used during the authorization process:

 

  1. In Azure Portal, search for Entra ID.

    image-20250206-182248.png
  2. Click App registrations in the left menu and click new registration

    image-20250206-182408.png
  3. Register the application

  4. Search for the Event Hubs service and click on it. 

  5. Click Create.

  6. Select the subscription and resource group corresponding to the resources that must be monitored.

  7. Enter a name.

  8. In the Location field, select the region containing the resources that must be monitored.

  9. To capture Blob or Data Lake, see How Event Hubs Capture is charged to select a tier. Otherwise, select the cheapest tier and one throughput unit. If you need more resources, they can be added later.

     

  10. Select “Review+Create,” then “Create.”

  11. Return to Event Hubs and open the namespace created in the previous steps.

  12. Select Access control (IAM) in the left menu, click Add, and click Add Access Role Assignment.

  13. Search for the Azure Event Hubs Data Receiver role and select it and then click Next.

  14. Click Select members and search for the previously created App registration.

  15. Select the Application by clicking its name.

  16. Once the application is already listed as a selected member, click Select.

  17. Click Review + Assign.

  18. In the namespace, Create a shared access policy for sending data to the event hub.

  19. Create a second shared access policy for listening to the event hub.

  20. Open the listen policy and copy the primary connection string.

     

  21. Return to the event hub and check the list of consumer groups. The Devo collector must have a dedicated consumer group. Devo recommends using the $Default consumer group for the collector without allowing other entities to use the event hub. If the consumer group is shared with other entities, data will be lost.

Send Data

  • Enable Monitor to get audit, reliability, metrics, and Microsoft recommendation data.

  • Enable Entra ID to get authentication data.

  • Use an SDK to send data from your custom applications.

  • Use HTTPs.

Run It

In the Cloud Collector App, create an Azure Collector instance using this parameters template, replacing the values enclosed in < >. The region name for each event hub will be logged in the region field of cloud.azure. It is not required to be your Azure region.

{ "inputs": { "azure_event_hub": { "enabled": true, "id": "<UNIQUE VALUE>", "services": { "event_hubs": { "queues": { "<REGION>": { "consumer_group": "$Default", "event_hub_connection_string": "<CONNECTION STRING>", "event_hub_name": "<EVENT HUB>", "namespace": "<NAMESPACE OF EVENT HUB>" } } } } } } }

For each event hub, the consumer group should only be used by one collector. If the consumer group is shared with other entities, data will be lost. To check if your collector has been enabled successfully, validate it.

Secure It

Devo Exchange provides an Azure alert pack. The Authentication alert pack works with Entra ID data. The Collective Defense alert pack works with Azure Application Gateway and Azure Firewall. The DNS alert pack works with Azure Firewall DNS proxy.

Entra ID

See Entra ID collector.

Azure Storage

IP address 1.1.1.1 has been identified as an indicator of compromise. Identify storage actions taken by this IP to determine how many storage resources have been modified. Use the results to assess if the IP should be blocked.

from cloud.azure.storage.administrative where eq(callerIpAddress,1.1.1.1) group by operationName select length(collectdistinct(resourceId)) as resources

Azure App Service

Malicious principals have been stopping applications. Before reenabling the applications, identify the principals and revoke their access so they cannot stop the applications again.

from cloud.azure.appservice.administrative where eq(operationName,"MICROSOFT.WEB/SITES/STOP/ACTION") group by identity__authorization__evidence__principalId as principal, resultType select length(collectdistinct(resourceId)) as applications_stopped

Monitor It

Create an inactivity alert to detect interruptions of transfer of data from the source to the event hub using the query

Set the inactivity alert to keep track of the collector_id.

Select values of the product field can also be monitored for inactivity.

Related content

Microsoft Azure collector
Microsoft Azure collector
More like this
Microsoft Azure collector
Microsoft Azure collector
More like this
Validate your Azure Event Hub collector
Validate your Azure Event Hub collector
Read with this
Entra ID collector
More like this
Basic operations in the Credentials API
Basic operations in the Credentials API
Read with this
Microsoft Graph collector
Microsoft Graph collector
More like this