Skip to content

Commit 62339dd

Browse files
hazcodgithub-actions[bot]
authored andcommitted
sync: update community detections
1 parent 471c5b7 commit 62339dd

3 files changed

Lines changed: 58 additions & 0 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
id: 019cc769-8a6e-7799-ab73-dd15c4a45800
2+
name: Network Connections and Sign-ins from Iranian IP Addresses
3+
description: This rule detects network connections and user sign-ins originating from IP addresses identified as belonging to Iran. It also identifies sign-ins where the reported country is Iran, but the IP address is not found within the provided Iranian IP list, which could indicate IP geolocation discrepancies or obfuscation attempts.
4+
query: "let IranIPList = toscalar(\r\n externaldata(ip:string)\r\n [\r\n h@\"https://raw.githubusercontent.com/Ramtiiin/iran-ip/main/ip-list.rsc\"\r\n ]\r\n with(format=\"txt\")\r\n | summarize make_list(ip)\r\n);\r\nlet DNE_IranRanges = DeviceNetworkEvents\r\n| where isnotempty(RemoteIP)\r\n| where ipv4_is_in_any_range(RemoteIP, IranIPList)\r\n| extend SourceType = \"DeviceNetworkEvent_IranIPRange\"\r\n| project\r\n TimeGenerated,\r\n SourceType,\r\n IP = RemoteIP,\r\n RemotePort,\r\n Protocol,\r\n DeviceName,\r\n InitiatingProcessFileName,\r\n ActionType;\r\nlet Signin_IranRanges = SigninLogs\r\n| where isnotempty(IPAddress)\r\n| where ipv4_is_in_any_range(IPAddress, IranIPList)\r\n| extend SourceType = \"SigninLog_IranIPRange\"\r\n| project\r\n TimeGenerated,\r\n SourceType,\r\n IP = IPAddress,\r\n UserPrincipalName,\r\n LocationDetails,\r\n ClientAppUsed,\r\n ConditionalAccessStatus,\r\n ResultType;\r\nlet Signin_IranCountryNotInRange = SigninLogs\r\n| where isnotempty(IPAddress)\r\n| extend Country = tostring(LocationDetails.countryOrRegion)\r\n| where Country == \"IR\"\r\n| where not(ipv4_is_in_any_range(IPAddress, IranIPList))\r\n| extend SourceType = \"SigninLog_IranCountry_NotInRange\"\r\n| project\r\n TimeGenerated,\r\n SourceType,\r\n IP = IPAddress,\r\n UserPrincipalName,\r\n Country,\r\n ClientAppUsed,\r\n ConditionalAccessStatus,\r\n ResultType;\r\nDNE_IranRanges\r\n| union Signin_IranRanges\r\n| union Signin_IranCountryNotInRange\r\n| order by TimeGenerated desc\r\n"
5+
query_type: kql
6+
severity: medium
7+
tags:
8+
- kql
9+
version: "1"
10+
references:
11+
- https://raw.githubusercontent.com/Ramtiiin/iran-ip/main/ip-list.rsc
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
id: 019cc806-9f48-747d-afec-9f5db45e07ad
2+
name: 'Suspicious sign-in activities '
3+
description: 'Detects suspicious sign-in activities by user in a specified timeframe '
4+
query: "let UPN = \"userupn\";\r\nlet TimeFrame = ago(30d);\r\nSigninLogs\r\n| where TimeGenerated > TimeFrame\r\n| where UserPrincipalName =~ UPN\r\n| summarize FirstSeen = min(TimeGenerated = 0), LastObserved = max(TimeGenerated), SuccessfullCount = count(ResultType= 0 ), FailureCount = count(ResultType!=0) by UserPrincipalName, IPAddress, Location, UserAgent, ClientAppUsed, AppDisplayName"
5+
query_type: kql
6+
severity: medium
7+
tactics:
8+
- TA0005
9+
- TA0003
10+
- TA0004
11+
- TA0001
12+
techniques:
13+
- T1078
14+
- T1078.004
15+
tags:
16+
- kql
17+
author: Mahdi Akbari
18+
version: "1"

library.index.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42161,6 +42161,35 @@ entries:
4216142161
references:
4216242162
- https://www.derp.ca/research/fakegit-luajit-github-campaign/
4216342163
file: entries/kql/019cc4ec-d430-75ff-8869-f41c2618d04d.yaml
42164+
- id: 019cc769-8a6e-7799-ab73-dd15c4a45800
42165+
name: Network Connections and Sign-ins from Iranian IP Addresses
42166+
description: This rule detects network connections and user sign-ins originating from IP addresses identified as belonging to Iran. It also identifies sign-ins where the reported country is Iran, but the IP address is not found within the provided Iranian IP list, which could indicate IP geolocation discrepancies or obfuscation attempts.
42167+
query_type: kql
42168+
severity: medium
42169+
tags:
42170+
- kql
42171+
version: "1"
42172+
references:
42173+
- https://raw.githubusercontent.com/Ramtiiin/iran-ip/main/ip-list.rsc
42174+
file: entries/kql/019cc769-8a6e-7799-ab73-dd15c4a45800.yaml
42175+
- id: 019cc806-9f48-747d-afec-9f5db45e07ad
42176+
name: 'Suspicious sign-in activities '
42177+
description: 'Detects suspicious sign-in activities by user in a specified timeframe '
42178+
query_type: kql
42179+
severity: medium
42180+
tactics:
42181+
- TA0005
42182+
- TA0003
42183+
- TA0004
42184+
- TA0001
42185+
techniques:
42186+
- T1078
42187+
- T1078.004
42188+
tags:
42189+
- kql
42190+
author: Mahdi Akbari
42191+
version: "1"
42192+
file: entries/kql/019cc806-9f48-747d-afec-9f5db45e07ad.yaml
4216442193
- id: 01bc2aa2-98db-4217-951d-727eacf33034
4216542194
name: Exposure Management + Defender for Office 365
4216642195
description: 'KQL Query from file: Exposure Management + Defender for Office 365'

0 commit comments

Comments
 (0)