Analytic rule catalog
CTE - Possible Company-Wide C2 Campaign Multiple Devices Same Destination
Back
| Id | ec08477d-87a1-498d-8f34-72b8ec8f3758 |
| Rulename | CTE - Possible Company-Wide C2 Campaign (Multiple Devices, Same Destination) |
| Description | Multiple distinct devices within the same tenant were blocked attempting to reach the same URL/domain within a 24-hour window. Isolated blocks are usually just one user’s browsing; several independent devices converging on the same destination is a strong signal of a coordinated malware/C2 campaign spreading across the company (e.g. a phishing link opened by several employees, or malware propagating internally). |
| Severity | High |
| Tactics | CommandAndControl LateralMovement |
| Techniques | T1071 T1570 |
| Required data connectors | cybereinforce_cte |
| Kind | Scheduled |
| Query frequency | 30m |
| Query period | 1d |
| Trigger threshold | 0 |
| Trigger operator | gt |
| Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Cybereinforce/Analytic%20Rules/PossibleCompanyWideC2CampaignMultipleDevicesSameDestination.yaml |
| Version | 1.0.0 |
| Arm template | ec08477d-87a1-498d-8f34-72b8ec8f3758.json |
CybereinforceCTE_CL
| where EventType == "block.url"
| extend d = parse_json(Details)
| extend
DeviceId = tostring(d.deviceId),
HostName = iff(isnotempty(tostring(d.hostname)), tostring(d.hostname), strcat("cte-device-", substring(EntityId, 0, 8))),
Pattern = tostring(d.pattern),
Url = tostring(d.url),
IsIoc = tobool(d.ioc),
ClientIp = tostring(split(tostring(d.clientIp), ":")[0])
| summarize DeviceCount=dcount(DeviceId), AffectedHosts=make_set(HostName, 50), SampleIps=make_set(ClientIp, 20), AnyIoc=max(IsIoc), FirstSeen=min(TimeGenerated), LastSeen=max(TimeGenerated) by Pattern, Url, TenantId
| where DeviceCount >= 3
| extend ClientIp = tostring(SampleIps[0])
name: CTE - Possible Company-Wide C2 Campaign (Multiple Devices, Same Destination)
triggerOperator: gt
query: |
CybereinforceCTE_CL
| where EventType == "block.url"
| extend d = parse_json(Details)
| extend
DeviceId = tostring(d.deviceId),
HostName = iff(isnotempty(tostring(d.hostname)), tostring(d.hostname), strcat("cte-device-", substring(EntityId, 0, 8))),
Pattern = tostring(d.pattern),
Url = tostring(d.url),
IsIoc = tobool(d.ioc),
ClientIp = tostring(split(tostring(d.clientIp), ":")[0])
| summarize DeviceCount=dcount(DeviceId), AffectedHosts=make_set(HostName, 50), SampleIps=make_set(ClientIp, 20), AnyIoc=max(IsIoc), FirstSeen=min(TimeGenerated), LastSeen=max(TimeGenerated) by Pattern, Url, TenantId
| where DeviceCount >= 3
| extend ClientIp = tostring(SampleIps[0])
queryFrequency: 30m
description: |
Multiple distinct devices within the same tenant were blocked attempting to reach the same URL/domain within a 24-hour window. Isolated blocks are usually just one user's browsing; several independent devices converging on the same destination is a strong signal of a coordinated malware/C2 campaign spreading across the company (e.g. a phishing link opened by several employees, or malware propagating internally).
id: ec08477d-87a1-498d-8f34-72b8ec8f3758
triggerThreshold: 0
queryPeriod: 1d
version: 1.0.0
kind: Scheduled
relevantTechniques:
- T1071
- T1570
severity: High
requiredDataConnectors:
- connectorId: cybereinforce_cte
dataTypes:
- CybereinforceCTE_CL
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Cybereinforce/Analytic%20Rules/PossibleCompanyWideC2CampaignMultipleDevicesSameDestination.yaml
tactics:
- CommandAndControl
- LateralMovement
entityMappings:
- fieldMappings:
- identifier: Url
columnName: Url
entityType: URL
- fieldMappings:
- identifier: Address
columnName: ClientIp
entityType: IP
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workspace": {
"type": "String"
}
},
"resources": [
{
"apiVersion": "2024-01-01-preview",
"id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/ec08477d-87a1-498d-8f34-72b8ec8f3758')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/ec08477d-87a1-498d-8f34-72b8ec8f3758')]",
"properties": {
"alertRuleTemplateName": "ec08477d-87a1-498d-8f34-72b8ec8f3758",
"customDetails": null,
"description": "Multiple distinct devices within the same tenant were blocked attempting to reach the same URL/domain within a 24-hour window. Isolated blocks are usually just one user's browsing; several independent devices converging on the same destination is a strong signal of a coordinated malware/C2 campaign spreading across the company (e.g. a phishing link opened by several employees, or malware propagating internally).\n",
"displayName": "CTE - Possible Company-Wide C2 Campaign (Multiple Devices, Same Destination)",
"enabled": true,
"entityMappings": [
{
"entityType": "URL",
"fieldMappings": [
{
"columnName": "Url",
"identifier": "Url"
}
]
},
{
"entityType": "IP",
"fieldMappings": [
{
"columnName": "ClientIp",
"identifier": "Address"
}
]
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Cybereinforce/Analytic%20Rules/PossibleCompanyWideC2CampaignMultipleDevicesSameDestination.yaml",
"query": "CybereinforceCTE_CL\n| where EventType == \"block.url\"\n| extend d = parse_json(Details)\n| extend\n DeviceId = tostring(d.deviceId),\n HostName = iff(isnotempty(tostring(d.hostname)), tostring(d.hostname), strcat(\"cte-device-\", substring(EntityId, 0, 8))),\n Pattern = tostring(d.pattern),\n Url = tostring(d.url),\n IsIoc = tobool(d.ioc),\n ClientIp = tostring(split(tostring(d.clientIp), \":\")[0])\n| summarize DeviceCount=dcount(DeviceId), AffectedHosts=make_set(HostName, 50), SampleIps=make_set(ClientIp, 20), AnyIoc=max(IsIoc), FirstSeen=min(TimeGenerated), LastSeen=max(TimeGenerated) by Pattern, Url, TenantId\n| where DeviceCount >= 3\n| extend ClientIp = tostring(SampleIps[0])\n",
"queryFrequency": "PT30M",
"queryPeriod": "P1D",
"severity": "High",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"CommandAndControl",
"LateralMovement"
],
"techniques": [
"T1071",
"T1570"
],
"templateVersion": "1.0.0",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}