CodeCommitsIssuesPull requestsActionsInsightsSecurity
master

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

Detections/SigninLogs/AnomolousSingleFactorSignin.yaml

49lines · modecode

1id: f7c3f5c8-71ea-49ff-b8b3-148f0e346291
2name: Anomolous Single Factor Signin
3description: |
4 'Detects successful signins using single factor authentication where the device, location, and ASN are abnormal.
5 Single factor authentications pose an opportunity to access compromised accounts, investigate these for anomalous occurrencess.
6 Ref: https://docs.microsoft.com/azure/active-directory/fundamentals/security-operations-devices#non-compliant-device-sign-in'
7severity: Low
8requiredDataConnectors:
9 - connectorId: AzureActiveDirectory
10 dataTypes:
11 - SigninLogs
12queryFrequency: 1d
13queryPeriod: 7d
14triggerOperator: gt
15triggerThreshold: 0
16tactics:
17 - InitialAccess
18relevantTechniques:
19 - T1078.004
20tags:
21 - AADSecOpsGuide
22query: |
23 let known_locations = (SigninLogs
24 | where TimeGenerated between(ago(7d)..ago(1d))
25 | where ResultType == 0
26 | extend LocationDetail = strcat(Location, "-", LocationDetails.state)
27 | summarize by LocationDetail);
28 let known_asn = (SigninLogs
29 | where TimeGenerated between(ago(7d)..ago(1d))
30 | where ResultType == 0
31 | summarize by AutonomousSystemNumber);
32 SigninLogs
33 | where TimeGenerated > ago(1d)
34 | where ResultType == 0
35 | where isempty(DeviceDetail.deviceId)
36 | where AuthenticationRequirement == "singleFactorAuthentication"
37 | extend LocationDetail = strcat(Location, "-", LocationDetails.state)
38 | where AutonomousSystemNumber !in (known_asn) and LocationDetail !in (known_locations)
39entityMappings:
40 - entityType: Account
41 fieldMappings:
42 - identifier: Name
43 columnName: UserPrincipalName
44 - entityType: IP
45 fieldMappings:
46 - identifier: Address
47 columnName: IpAddress
48version: 1.0.0
49kind: Scheduled