Skip to content

Azure Network Watcher

Overview

Azure Network Watcher provides tools to monitor, diagnose, view metrics, and enable or disable logs for resources in an Azure virtual network. It also allows to log information about IP traffic flowing through a network security group: NSG flow logs.

The following Sekoia.io built-in rules match the intake Azure Network Watcher. This documentation is updated automatically and is based solely on the fields used by the intake which are checked against our rules. This means that some rules will be listed but might not be relevant with the intake.

SEKOIA.IO x Azure Network Watcher on ATT&CK Navigator

Account Added To A Security Enabled Group

Detection in order to investigate who has added a specific Domain User in Domain Admins or Group Policy Creator Owners (Security event 4728)

  • Effort: master
Account Removed From A Security Enabled Group

Detection in order to investigate who has removed a specific Domain User in Domain Admins or Group Policy Creator Owners (Security event 4729)

  • Effort: master
Computer Account Deleted

Detects computer account deletion.

  • Effort: master
Domain Trust Created Or Removed

A trust was created or removed to a domain. An attacker could perform that in order to do lateral movement easily between domains or shutdown the ability of two domains to communicate.

  • Effort: advanced
Failed Logon Source From Public IP Addresses

A login from a public IP can indicate a misconfigured firewall or network boundary. The sekoia.tags are used to filter internal Ipv4 addresses (10.0.0.0/8 172.16.0.0/12 127.0.0.0/8 169.254.0.0/16 192.168.0.0/16).

  • Effort: master
Password Change On Directory Service Restore Mode (DSRM) Account

The Directory Service Restore Mode (DSRM) account is a local administrator account on Domain Controllers. Attackers may change the password to gain persistence.

  • Effort: intermediate
Possible Replay Attack

This event can be a sign of Kerberos replay attack or, among other things, network device configuration or routing problems.

  • Effort: intermediate
Potential RDP Connection To Non-Domain Host

Detects logons using NTLM to hosts that are potentially not part of the domain using RDP (TermSrv). Event ID 8001 corresponds to outgoing NTLM authentication traffic and TermSrv stands for RDP Terminal Services Server. Check if the contacted host is legitimate. To use this detection rule, enable logging of outbound NTLM authentications on all domain controllers, using the following Group Policy (GPO) - Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > Security Options > Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers -> Define this policy setting: Audit all.

  • Effort: master
SEKOIA.IO Intelligence Feed

Detect threats based on indicators of compromise (IOCs) collected by SEKOIA's Threat and Detection Research team.

  • Effort: elementary
User Account Created

Detects user creation on windows servers, which shouldn't happen in an Active Directory environment. Apply this on your windows server logs and not on your DC logs. One default account defaultuser0 is excluded as only used during Windows set-up. This detection use Security Event ID 4720.

  • Effort: master
User Account Deleted

Detects local user deletion

  • Effort: master

Event Categories

The following table lists the data source offered by this integration.

Data Source Description
Host network interface every packets passing through the Network Security Group are logged
Netflow/Enclave netflow Azure Network Watcher NSG Flow Logs are Netflow-like
Network device logs packets logged by NSG Flow Logs
Network protocol analysis traffic analysis at levels 2/3/4

In details, the following table denotes the type of events produced by this integration.

Name Values
Kind ``
Category network
Type allowed, denied

Event Samples

Find below few samples of events and how they are normalized by Sekoia.io.

{
    "message": "{\"macAddress\": \"000D124564789\", \"operationName\": \"NetworkSecurityGroupFlowEvents\", \"resourceId\": \"/SUBSCRIPTIONS/12345674-1234-1234-1234-12345646546875/RESOURCEGROUPS/FOO/PROVIDERS/MICROSOFT.NETWORK/NETWORKSECURITYGROUPS/AZNTDC02-NSG\", \"time\": \"2024-03-18T13:21:42.6259228Z\", \"rule\": \"DefaultRule_AllowVnetInBound\", \"flow.0\": \"1710768066,1.1.1.1,2.2.2.2,35336,53,U,I,A,C,1,99,1,167\"}",
    "event": {
        "action": "accept",
        "category": [
            "network"
        ],
        "code": "NetworkSecurityGroupFlowEvents",
        "outcome": "success",
        "start": "2024-03-18T13:21:42.625922Z",
        "type": [
            "allowed"
        ]
    },
    "@timestamp": "2024-03-18T13:21:42.625922Z",
    "action": {
        "name": "accept",
        "outcome": "success",
        "properties": {
            "FlowState": "continue",
            "OperationName": "NetworkSecurityGroupFlowEvents"
        },
        "target": "network-traffic",
        "type": "DefaultRule_AllowVnetInBound"
    },
    "destination": {
        "address": "2.2.2.2",
        "bytes": 167,
        "ip": "2.2.2.2",
        "packets": 1,
        "port": 53
    },
    "host": {
        "name": "/SUBSCRIPTIONS/12345674-1234-1234-1234-12345646546875/RESOURCEGROUPS/FOO/PROVIDERS/MICROSOFT.NETWORK/NETWORKSECURITYGROUPS/AZNTDC02-NSG"
    },
    "network": {
        "direction": "inbound",
        "transport": "udp"
    },
    "related": {
        "ip": [
            "1.1.1.1",
            "2.2.2.2"
        ]
    },
    "rule": {
        "name": "DefaultRule_AllowVnetInBound"
    },
    "source": {
        "address": "1.1.1.1",
        "bytes": 99,
        "ip": "1.1.1.1",
        "mac": "000D124564789",
        "packets": 1,
        "port": 35336
    }
}
{
    "message": "{\"flow_state\": \"begin\",\"resourceId\":\"/SUBSCRIPTIONS/13C8046C-DB72-4C35-9D71-60667ED9E869/RESOURCEGROUPS/INTEGRATION/PROVIDERS/MICROSOFT.NETWORK/NETWORKSECURITYGROUPS/TEST-NSG\",\"macAddress\":\"DB831EFEC376\",\"flow.0\":\"1493763938,1.2.3.4,5.6.7.8,35370,23,T,I,A,B,,,,\",\"rule\":\"DefaultRule_AllowVnetOutBound\",\"operationName\":\"NetworkSecurityGroupFlowEvents\",\"time\":\"2020-12-14T22:16:46.3528160Z\",\"version\":\"2\"}",
    "event": {
        "action": "accept",
        "category": [
            "network"
        ],
        "code": "NetworkSecurityGroupFlowEvents",
        "outcome": "success",
        "start": "2020-12-14T22:16:46.352816Z",
        "type": [
            "allowed"
        ]
    },
    "@timestamp": "2020-12-14T22:16:46.352816Z",
    "action": {
        "name": "accept",
        "outcome": "success",
        "properties": {
            "FlowState": "begin",
            "OperationName": "NetworkSecurityGroupFlowEvents",
            "Version": "2"
        },
        "target": "network-traffic",
        "type": "DefaultRule_AllowVnetOutBound"
    },
    "destination": {
        "address": "5.6.7.8",
        "ip": "5.6.7.8",
        "port": 23
    },
    "host": {
        "name": "/SUBSCRIPTIONS/13C8046C-DB72-4C35-9D71-60667ED9E869/RESOURCEGROUPS/INTEGRATION/PROVIDERS/MICROSOFT.NETWORK/NETWORKSECURITYGROUPS/TEST-NSG"
    },
    "network": {
        "direction": "inbound",
        "transport": "tcp"
    },
    "related": {
        "ip": [
            "1.2.3.4",
            "5.6.7.8"
        ]
    },
    "rule": {
        "name": "DefaultRule_AllowVnetOutBound"
    },
    "source": {
        "address": "1.2.3.4",
        "ip": "1.2.3.4",
        "mac": "DB831EFEC376",
        "port": 35370
    }
}
{
    "message": "{\"flow_state\": \"end\", \"resourceId\":\"/SUBSCRIPTIONS/13C8046C-DB72-4C35-9D71-60667ED9E869/RESOURCEGROUPS/INTEGRATION/PROVIDERS/MICROSOFT.NETWORK/NETWORKSECURITYGROUPS/TEST-NSG\",\"macAddress\":\"DB831EFEC376\",\"flow.0\":\"1607984156,1.2.3.4,5.6.7.8,36422,8086,T,O,A,E,1,74,1,74\",\"rule\":\"DefaultRule_AllowVnetOutBound\",\"operationName\":\"NetworkSecurityGroupFlowEvents\",\"time\":\"2020-12-14T22:16:46.3528160Z\",\"version\":\"2\"}",
    "event": {
        "action": "accept",
        "category": [
            "network"
        ],
        "code": "NetworkSecurityGroupFlowEvents",
        "outcome": "success",
        "start": "2020-12-14T22:16:46.352816Z",
        "type": [
            "allowed"
        ]
    },
    "@timestamp": "2020-12-14T22:16:46.352816Z",
    "action": {
        "name": "accept",
        "outcome": "success",
        "properties": {
            "FlowState": "end",
            "OperationName": "NetworkSecurityGroupFlowEvents",
            "Version": "2"
        },
        "target": "network-traffic",
        "type": "DefaultRule_AllowVnetOutBound"
    },
    "destination": {
        "address": "5.6.7.8",
        "bytes": 74,
        "ip": "5.6.7.8",
        "packets": 1,
        "port": 8086
    },
    "host": {
        "name": "/SUBSCRIPTIONS/13C8046C-DB72-4C35-9D71-60667ED9E869/RESOURCEGROUPS/INTEGRATION/PROVIDERS/MICROSOFT.NETWORK/NETWORKSECURITYGROUPS/TEST-NSG"
    },
    "network": {
        "direction": "outbound",
        "transport": "tcp"
    },
    "related": {
        "ip": [
            "1.2.3.4",
            "5.6.7.8"
        ]
    },
    "rule": {
        "name": "DefaultRule_AllowVnetOutBound"
    },
    "source": {
        "address": "1.2.3.4",
        "bytes": 74,
        "ip": "1.2.3.4",
        "mac": "DB831EFEC376",
        "packets": 1,
        "port": 36422
    }
}
{
    "message": "{\"flow_state\": \"begin\", \"source_addr\": \"1.3.4.2\", \"macAddress\": \"DB831EFEC376\", \"operationName\": \"NetworkSecurityGroupFlowEvents\", \"resourceId\": \"/SUBSCRIPTIONS/13C8046C-DB72-4C35-9D71-60667ED9E869/RESOURCEGROUPS/INTEGRATION/PROVIDERS/MICROSOFT.NETWORK/NETWORKSECURITYGROUPS/TEST-NSG\", \"time\": \"2021-03-24T10:55:03.0680749Z\", \"rule\": \"DefaultRule_AllowInternetOutBound\", \"flow.0\": \"1616583277,1.2.3.4,5.6.7.8,55486,443,T,O,A\"}",
    "event": {
        "action": "accept",
        "category": [
            "network"
        ],
        "code": "NetworkSecurityGroupFlowEvents",
        "outcome": "success",
        "start": "2021-03-24T10:55:03.068074Z",
        "type": [
            "allowed"
        ]
    },
    "@timestamp": "2021-03-24T10:55:03.068074Z",
    "action": {
        "name": "accept",
        "outcome": "success",
        "properties": {
            "FlowState": "begin",
            "OperationName": "NetworkSecurityGroupFlowEvents"
        },
        "target": "network-traffic",
        "type": "DefaultRule_AllowInternetOutBound"
    },
    "destination": {
        "address": "5.6.7.8",
        "ip": "5.6.7.8",
        "port": 443
    },
    "host": {
        "name": "/SUBSCRIPTIONS/13C8046C-DB72-4C35-9D71-60667ED9E869/RESOURCEGROUPS/INTEGRATION/PROVIDERS/MICROSOFT.NETWORK/NETWORKSECURITYGROUPS/TEST-NSG"
    },
    "network": {
        "direction": "outbound",
        "transport": "tcp"
    },
    "related": {
        "ip": [
            "1.3.4.2",
            "5.6.7.8"
        ]
    },
    "rule": {
        "name": "DefaultRule_AllowInternetOutBound"
    },
    "source": {
        "address": "1.3.4.2",
        "ip": "1.3.4.2",
        "mac": "DB831EFEC376",
        "port": 55486
    }
}

Extracted Fields

The following table lists the fields that are extracted, normalized under the ECS format, analyzed and indexed by the parser. It should be noted that infered fields are not listed.

Name Type Description
@timestamp date Date/time when the event originated.
action.properties.FlowState keyword
action.properties.OperationName keyword
action.properties.Version keyword
action.target keyword The target of the action
destination.bytes long Bytes sent from the destination to the source.
destination.ip ip IP address of the destination.
destination.packets long Packets sent from the destination to the source.
destination.port long Port of the destination.
event.action keyword The action captured by the event.
event.category keyword Event category. The second categorization field in the hierarchy.
event.code keyword Identification code for this event.
event.start date event.start contains the date when the event started or when the activity was first observed.
event.type keyword Event type. The third categorization field in the hierarchy.
host.name keyword Name of the host.
rule.name keyword Rule name
source.bytes long Bytes sent from the source to the destination.
source.ip ip IP address of the source.
source.mac keyword MAC address of the source.
source.packets long Packets sent from the source to the destination.
source.port long Port of the source.

Configure

Please contact your support to discuss about the network security group to monitor in your Azure infrastructure in order to find the appropriate solution to forward your logs to Sekoia.io.

This setup guide will show you a method to enable and give us access to NSG flow logs produced by Azure Network Watcher service to Sekoia.io.

Enable NSG flow logs

The following instructions are provided for the Azure web portal (https://portal.azure.com).

As a prerequisite you need at least one virtual machine with a network security group, to enable Network Watcher and to register the Microsoft.Insights provider.

Navigate to the Network Watcher service, and select NSG flow logs under LOGS. From the list of NSGs, select your VM(s), and under Flow logs settings, select On to enable the NSG flow logs. Please, select the Version 2 NSG flow log format sample which is integrated to the Operations Center.

These instructions are illustrated and more detailled here.

Share access to logs

This part should be discussed with Sekoia.io people to find an appropriate solution to forward your flow logs to Sekoia.io.

A possible solution consists to share us: - An access key for the Azure Blob Storage - A storage token associated with the resources to share - The name of the container where the NSG flow logs are stored

From this information, we will be able to retrieve each PT1h.json blob which contains the flow logs.

Further Readings