Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
4731843
Update DomainEntity_CommonSecurityLog.yaml
ep3p Nov 19, 2021
21b1059
Update DomainEntity_DnsEvents.yaml
ep3p Nov 19, 2021
8695fb4
Update DomainEntity_CommonSecurityLog.yaml
ep3p Nov 19, 2021
7bc621b
Update DomainEntity_PaloAlto.yaml
ep3p Nov 19, 2021
c054580
Update DomainEntity_SecurityAlert.yaml
ep3p Nov 19, 2021
e2ba8c2
Update DomainEntity_Syslog.yaml
ep3p Nov 19, 2021
34337b4
Update EmailEntity_AzureActivity.yaml
ep3p Nov 19, 2021
d14ac93
Update EmailEntity_OfficeActivity.yaml
ep3p Nov 19, 2021
e221db2
Update EmailEntity_PaloAlto.yaml
ep3p Nov 19, 2021
989ca4d
Update EmailEntity_SecurityAlert.yaml
ep3p Nov 19, 2021
90af703
Update EmailEntity_SecurityEvent.yaml
ep3p Nov 19, 2021
764573d
Update EmailEntity_SigninLogs.yaml
ep3p Nov 19, 2021
6f787ce
Update FileHashEntity_CommonSecurityLog.yaml
ep3p Nov 19, 2021
39cfc4f
Update FileHashEntity_SecurityEvent.yaml
ep3p Nov 19, 2021
5f4655b
Update IPEntity_AWSCloudTrail.yaml
ep3p Nov 19, 2021
4087930
Update IPEntity_AppServiceHTTPLogs.yaml
ep3p Nov 19, 2021
7671307
Update IPEntity_AzureActivity.yaml
ep3p Nov 19, 2021
7f4f49f
Update IPEntity_AzureNetworkAnalytics.yaml
ep3p Nov 19, 2021
30219e1
Update IPEntity_AzureNetworkAnalytics.yaml
ep3p Nov 19, 2021
eb3bff0
Update IPEntity_DnsEvents.yaml
ep3p Nov 19, 2021
4deee22
Update IPEntity_OfficeActivity.yaml
ep3p Nov 19, 2021
a77c079
Update IPEntity_VMConnection.yaml
ep3p Nov 19, 2021
0d06765
Update IPEntity_W3CIISLog.yaml
ep3p Nov 19, 2021
d05b86d
Update IPEntity_WireData.yaml
ep3p Nov 19, 2021
e341786
Update IPentity_SigninLogs.yaml
ep3p Nov 19, 2021
80538e1
Update URLEntity_AuditLogs.yaml
ep3p Nov 19, 2021
7f3155c
Update URLEntity_OfficeActivity.yaml
ep3p Nov 19, 2021
531083e
Update URLEntity_PaloAlto.yaml
ep3p Nov 19, 2021
52a4060
Update URLEntity_SecurityAlerts.yaml
ep3p Nov 19, 2021
eb73dd5
Update URLEntity_Syslog.yaml
ep3p Nov 19, 2021
a4ede61
Update DomainEntity_CommonSecurityLog.yaml
ep3p Nov 19, 2021
ffcb136
Update DomainEntity_DnsEvents.yaml
ep3p Nov 19, 2021
f745b84
Update DomainEntity_PaloAlto.yaml
ep3p Nov 19, 2021
3907d69
Update DomainEntity_SecurityAlert.yaml
ep3p Nov 19, 2021
7f4636b
Update DomainEntity_Syslog.yaml
ep3p Nov 19, 2021
740d2ef
Update EmailEntity_AzureActivity.yaml
ep3p Nov 19, 2021
0c2b1f1
Update EmailEntity_OfficeActivity.yaml
ep3p Nov 19, 2021
4b52f76
Update EmailEntity_PaloAlto.yaml
ep3p Nov 19, 2021
86c1611
Update EmailEntity_SecurityAlert.yaml
ep3p Nov 19, 2021
37bfeed
Update EmailEntity_SecurityEvent.yaml
ep3p Nov 19, 2021
e136a3b
Update EmailEntity_SigninLogs.yaml
ep3p Nov 19, 2021
9a58e4c
Update FileHashEntity_CommonSecurityLog.yaml
ep3p Nov 19, 2021
38de543
Update FileHashEntity_SecurityEvent.yaml
ep3p Nov 19, 2021
50c217f
Update IPEntity_AWSCloudTrail.yaml
ep3p Nov 19, 2021
9e7dc5f
Update IPEntity_AppServiceHTTPLogs.yaml
ep3p Nov 19, 2021
caa2f6d
Update IPEntity_AzureActivity.yaml
ep3p Nov 19, 2021
e5d3c82
Update IPEntity_AzureNetworkAnalytics.yaml
ep3p Nov 19, 2021
0600448
Update IPEntity_AzureNetworkAnalytics.yaml
ep3p Nov 19, 2021
e7841ef
Update IPEntity_DnsEvents.yaml
ep3p Nov 19, 2021
9a4c186
Update IPEntity_OfficeActivity.yaml
ep3p Nov 19, 2021
be446f6
Update IPEntity_VMConnection.yaml
ep3p Nov 19, 2021
f292098
Update IPEntity_W3CIISLog.yaml
ep3p Nov 19, 2021
2c5cc22
Update IPEntity_WireData.yaml
ep3p Nov 19, 2021
ce423a9
Update IPentity_SigninLogs.yaml
ep3p Nov 19, 2021
acf7b2f
Update URLEntity_AuditLogs.yaml
ep3p Nov 19, 2021
7921aa3
Update URLEntity_OfficeActivity.yaml
ep3p Nov 19, 2021
8c536f0
Update URLEntity_PaloAlto.yaml
ep3p Nov 19, 2021
1088071
Update URLEntity_SecurityAlerts.yaml
ep3p Nov 19, 2021
2ab8b10
Update URLEntity_Syslog.yaml
ep3p Nov 19, 2021
f253f15
Merge branch 'master' into ep3p-patch-13
ep3p Nov 25, 2021
424f9b1
Update versions
ep3p Nov 25, 2021
72cd8ad
Space formatting, specifying join, removing ExpirationDateTime
ep3p Nov 25, 2021
02c7c74
Update versions and equalize COVID19 detection
ep3p Nov 25, 2021
d635700
Made error formatting
ep3p Nov 25, 2021
998ec29
Correct error
ep3p Nov 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,47 +17,49 @@ triggerThreshold: 0
tactics:
- Impact
query: |
let dt_lookBack = 1h;
let ioc_lookBack = 14d;
//Create a list of TLDs in our threat feed for later validation of extracted domains
let list_tlds = ThreatIntelligenceIndicator
| where TimeGenerated > ago(ioc_lookBack)
| where isnotempty(DomainName)
| extend DomainName = tolower(DomainName)
| extend parts = split(DomainName, '.')
| extend tld = parts[(array_length(parts)-1)]
| summarize count() by tostring(tld)
| summarize make_list(tld);
ThreatIntelligenceIndicator
| where TimeGenerated >= ago(ioc_lookBack) and ExpirationDateTime > now()
| summarize LatestIndicatorTime = arg_max(TimeGenerated, *) by IndicatorId
| where Active == true
// Picking up only IOC's that contain the entities we want
| where isnotempty(DomainName)
| join (
CommonSecurityLog
| extend IngestionTime = ingestion_time()
| where IngestionTime > ago(dt_lookBack)
| where DeviceEventClassID =~ 'url'
//Uncomment the line below to only alert on allowed connections
//| where DeviceAction !~ "block-url"
//Extract domain from RequestURL, if not present extarct it from AdditionalExtentions
| extend PA_Url = columnifexists("RequestURL", "None")
| extend PA_Url = iif(isempty(PA_Url) and AdditionalExtensions !startswith "PanOS", extract("([^\"]+)", 1, tolower(AdditionalExtensions)), trim('"', PA_Url))
| extend PA_Url = iif(PA_Url !startswith "http://" and ApplicationProtocol !~ "ssl", strcat('http://', PA_Url), iif(PA_Url !startswith "https://" and ApplicationProtocol =~ "ssl", strcat('https://', PA_Url), PA_Url))
| extend Domain = trim(@"""",tostring(parse_url(PA_Url).Host))
| where isnotempty(Domain)
| extend Domain = tolower(Domain)
| extend parts = split(Domain, '.')
//Split out the TLD for the purpose of checking if we have any TI indicators with this TLD to match on
| extend tld = parts[(array_length(parts)-1)]
//Validate parsed domain by checking TLD against TLDs from threat feed and drop domains where there is no chance of a match
| where tld in~ (list_tlds)
| extend CommonSecurityLog_TimeGenerated = TimeGenerated
) on $left.DomainName==$right.Domain
| where CommonSecurityLog_TimeGenerated >= TimeGenerated and CommonSecurityLog_TimeGenerated < ExpirationDateTime
| project LatestIndicatorTime, Description, ActivityGroupNames, PA_Url, Domain, IndicatorId, ThreatType, ExpirationDateTime, ConfidenceScore, CommonSecurityLog_TimeGenerated, DeviceAction, DestinationIP, DestinationPort, DeviceName, SourceIP, SourcePort, ApplicationProtocol, RequestMethod
| extend timestamp = CommonSecurityLog_TimeGenerated, IPCustomEntity = SourceIP, HostCustomEntity = DeviceName, URLCustomEntity = PA_Url

let dt_lookBack = 1h;
let ioc_lookBack = 14d;
//Create a list of TLDs in our threat feed for later validation of extracted domains
let list_tlds = ThreatIntelligenceIndicator
| where TimeGenerated > ago(ioc_lookBack)
| where isnotempty(DomainName)
| extend DomainName = tolower(DomainName)
| extend parts = split(DomainName, '.')
| extend tld = parts[(array_length(parts)-1)]
| summarize count() by tostring(tld)
| summarize make_list(tld);
ThreatIntelligenceIndicator
| where TimeGenerated >= ago(ioc_lookBack) and ExpirationDateTime > now()
| summarize LatestIndicatorTime = arg_max(TimeGenerated, *) by IndicatorId
| where Active == true
// Picking up only IOC's that contain the entities we want
| where isnotempty(DomainName)
// using innerunique to keep perf fast and result set low, we only need one match to indicate potential malicious activity that needs to be investigated
| join kind=innerunique (
CommonSecurityLog
| extend IngestionTime = ingestion_time()
| where IngestionTime > ago(dt_lookBack)
| where DeviceEventClassID =~ 'url'
//Uncomment the line below to only alert on allowed connections
//| where DeviceAction !~ "block-url"
//Extract domain from RequestURL, if not present extarct it from AdditionalExtentions
| extend PA_Url = columnifexists("RequestURL", "None")
| extend PA_Url = iif(isempty(PA_Url) and AdditionalExtensions !startswith "PanOS", extract("([^\"]+)", 1, tolower(AdditionalExtensions)), trim('"', PA_Url))
| extend PA_Url = iif(PA_Url !startswith "http://" and ApplicationProtocol !~ "ssl", strcat('http://', PA_Url), iif(PA_Url !startswith "https://" and ApplicationProtocol =~ "ssl", strcat('https://', PA_Url), PA_Url))
| extend Domain = trim(@"""",tostring(parse_url(PA_Url).Host))
| where isnotempty(Domain)
| extend Domain = tolower(Domain)
| extend parts = split(Domain, '.')
//Split out the TLD for the purpose of checking if we have any TI indicators with this TLD to match on
| extend tld = parts[(array_length(parts)-1)]
//Validate parsed domain by checking TLD against TLDs from threat feed and drop domains where there is no chance of a match
| where tld in~ (list_tlds)
| extend CommonSecurityLog_TimeGenerated = TimeGenerated
)
on $left.DomainName==$right.Domain
| project LatestIndicatorTime, Description, ActivityGroupNames, PA_Url, Domain, IndicatorId, ThreatType, ExpirationDateTime, ConfidenceScore, CommonSecurityLog_TimeGenerated, DeviceAction, DestinationIP, DestinationPort, DeviceName, SourceIP, SourcePort, ApplicationProtocol, RequestMethod
| extend timestamp = CommonSecurityLog_TimeGenerated, IPCustomEntity = SourceIP, HostCustomEntity = DeviceName, URLCustomEntity = PA_Url
entityMappings:
- entityType: Host
fieldMappings:
Expand All @@ -71,5 +73,5 @@ entityMappings:
fieldMappings:
- identifier: Url
columnName: URLCustomEntity
version: 1.1.0
kind: Scheduled
version: 1.1.1
kind: Scheduled
Original file line number Diff line number Diff line change
Expand Up @@ -21,38 +21,39 @@ tactics:
- Impact
query: |

let dt_lookBack = 1h;
let ioc_lookBack = 14d;
//Create a list of TLDs in our threat feed for later validation
let list_tlds = ThreatIntelligenceIndicator
| where TimeGenerated > ago(ioc_lookBack)
| where isnotempty(DomainName)
| extend parts = split(DomainName, '.')
| extend tld = parts[(array_length(parts)-1)]
| summarize count() by tostring(tld)
| summarize make_list(tld);
ThreatIntelligenceIndicator
| where TimeGenerated >= ago(ioc_lookBack) and ExpirationDateTime > now()
| summarize LatestIndicatorTime = arg_max(TimeGenerated, *) by IndicatorId
| where Active == true
// Picking up only IOC's that contain the entities we want
| where isnotempty(DomainName)
| join (
DnsEvents
| where TimeGenerated > ago(dt_lookBack)
//Extract domain patterns from syslog message
| where isnotempty(Name)
| extend parts = split(Name, '.')
//Split out the TLD
| extend tld = parts[(array_length(parts)-1)]
//Validate parsed domain by checking if the TLD is in the list of TLDs in our threat feed
| where tld in~ (list_tlds)
| extend DNS_TimeGenerated = TimeGenerated
) on $left.DomainName==$right.Name
| where DNS_TimeGenerated >= TimeGenerated and DNS_TimeGenerated < ExpirationDateTime
| summarize LatestIndicatorTime = arg_max(TimeGenerated, *) by IndicatorId
| project LatestIndicatorTime, Description, ActivityGroupNames, IndicatorId, ThreatType, ExpirationDateTime, ConfidenceScore, Url, DNS_TimeGenerated, Computer, ClientIP, Name, QueryType
| extend timestamp = DNS_TimeGenerated, HostCustomEntity = Computer, IPCustomEntity = ClientIP, URLCustomEntity = Url
let dt_lookBack = 1h;
let ioc_lookBack = 14d;
//Create a list of TLDs in our threat feed for later validation
let list_tlds = ThreatIntelligenceIndicator
| where TimeGenerated > ago(ioc_lookBack)
| where isnotempty(DomainName)
| extend parts = split(DomainName, '.')
| extend tld = parts[(array_length(parts)-1)]
| summarize count() by tostring(tld)
| summarize make_list(tld);
ThreatIntelligenceIndicator
| where TimeGenerated >= ago(ioc_lookBack) and ExpirationDateTime > now()
| summarize LatestIndicatorTime = arg_max(TimeGenerated, *) by IndicatorId
| where Active == true
// Picking up only IOC's that contain the entities we want
| where isnotempty(DomainName)
// using innerunique to keep perf fast and result set low, we only need one match to indicate potential malicious activity that needs to be investigated
| join kind=innerunique (
DnsEvents
| where TimeGenerated > ago(dt_lookBack)
//Extract domain patterns from syslog message
| where isnotempty(Name)
| extend parts = split(Name, '.')
//Split out the TLD
| extend tld = parts[(array_length(parts)-1)]
//Validate parsed domain by checking if the TLD is in the list of TLDs in our threat feed
| where tld in~ (list_tlds)
| extend DNS_TimeGenerated = TimeGenerated
)
on $left.DomainName==$right.Name
| summarize DNS_TimeGenerated = arg_max(DNS_TimeGenerated, *) by IndicatorId
| project LatestIndicatorTime, Description, ActivityGroupNames, IndicatorId, ThreatType, ExpirationDateTime, ConfidenceScore, Url, DNS_TimeGenerated, Computer, ClientIP, Name, QueryType
| extend timestamp = DNS_TimeGenerated, HostCustomEntity = Computer, IPCustomEntity = ClientIP, URLCustomEntity = Url
entityMappings:
- entityType: Host
fieldMappings:
Expand All @@ -66,5 +67,5 @@ entityMappings:
fieldMappings:
- identifier: Url
columnName: URLCustomEntity
version: 1.1.1
kind: Scheduled
version: 1.1.2
kind: Scheduled
89 changes: 45 additions & 44 deletions Detections/ThreatIntelligenceIndicator/DomainEntity_PaloAlto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,48 +21,49 @@ tactics:
- Impact
query: |

let dt_lookBack = 1h;
let ioc_lookBack = 14d;
//Create a list of TLDs in our threat feed for later validation of extracted domains
let list_tlds = ThreatIntelligenceIndicator
| where TimeGenerated > ago(ioc_lookBack)
| where isnotempty(DomainName)
| extend DomainName = tolower(DomainName)
| extend parts = split(DomainName, '.')
| extend tld = parts[(array_length(parts)-1)]
| summarize count() by tostring(tld)
| summarize make_list(tld);
ThreatIntelligenceIndicator
| where TimeGenerated >= ago(ioc_lookBack) and ExpirationDateTime > now()
| summarize LatestIndicatorTime = arg_max(TimeGenerated, *) by IndicatorId
| where Active == true
// Picking up only IOC's that contain the entities we want
| where isnotempty(DomainName)
| join (
CommonSecurityLog
| extend IngestionTime = ingestion_time()
| where IngestionTime > ago(dt_lookBack)
| where DeviceVendor =~ 'Palo Alto Networks'
| where DeviceEventClassID =~ 'url'
//Uncomment the line below to only alert on allowed connections
//| where DeviceAction !~ "block-url"
//Extract domain from RequestURL, if not present extarct it from AdditionalExtentions
| extend PA_Url = columnifexists("RequestURL", "None")
| extend PA_Url = iif(isempty(PA_Url) and AdditionalExtensions !startswith "PanOS", extract("([^\"]+)", 1, tolower(AdditionalExtensions)), trim('"', PA_Url))
| extend PA_Url = iif(PA_Url !startswith "http://" and ApplicationProtocol !~ "ssl", strcat('http://', PA_Url), iif(PA_Url !startswith "https://" and ApplicationProtocol =~ "ssl", strcat('https://', PA_Url), PA_Url))
| extend Domain = trim(@"""",tostring(parse_url(PA_Url).Host))
| where isnotempty(Domain)
| extend Domain = tolower(Domain)
| extend parts = split(Domain, '.')
//Split out the TLD for the purpose of checking if we have any TI indicators with this TLD to match on
| extend tld = parts[(array_length(parts)-1)]
//Validate parsed domain by checking TLD against TLDs from threat feed and drop domains where there is no chance of a match
| where tld in~ (list_tlds)
| extend CommonSecurityLog_TimeGenerated = TimeGenerated
) on $left.DomainName==$right.Domain
| where CommonSecurityLog_TimeGenerated >= TimeGenerated and CommonSecurityLog_TimeGenerated < ExpirationDateTime
| project LatestIndicatorTime, Description, ActivityGroupNames, PA_Url, Domain, IndicatorId, ThreatType, ExpirationDateTime, ConfidenceScore, CommonSecurityLog_TimeGenerated, DeviceAction, DestinationIP, DestinationPort, DeviceName, SourceIP, SourcePort, ApplicationProtocol, RequestMethod
| extend timestamp = CommonSecurityLog_TimeGenerated, IPCustomEntity = SourceIP, HostCustomEntity = DeviceName, URLCustomEntity = PA_Url
let dt_lookBack = 1h;
let ioc_lookBack = 14d;
//Create a list of TLDs in our threat feed for later validation of extracted domains
let list_tlds = ThreatIntelligenceIndicator
| where TimeGenerated > ago(ioc_lookBack)
| where isnotempty(DomainName)
| extend DomainName = tolower(DomainName)
| extend parts = split(DomainName, '.')
| extend tld = parts[(array_length(parts)-1)]
| summarize count() by tostring(tld)
| summarize make_list(tld);
ThreatIntelligenceIndicator
| where TimeGenerated >= ago(ioc_lookBack) and ExpirationDateTime > now()
| summarize LatestIndicatorTime = arg_max(TimeGenerated, *) by IndicatorId
| where Active == true
// Picking up only IOC's that contain the entities we want
| where isnotempty(DomainName)
// using innerunique to keep perf fast and result set low, we only need one match to indicate potential malicious activity that needs to be investigated
| join kind=innerunique (
CommonSecurityLog
| extend IngestionTime = ingestion_time()
| where IngestionTime > ago(dt_lookBack)
| where DeviceVendor =~ 'Palo Alto Networks'
| where DeviceEventClassID =~ 'url'
//Uncomment the line below to only alert on allowed connections
//| where DeviceAction !~ "block-url"
//Extract domain from RequestURL, if not present extarct it from AdditionalExtentions
| extend PA_Url = columnifexists("RequestURL", "None")
| extend PA_Url = iif(isempty(PA_Url) and AdditionalExtensions !startswith "PanOS", extract("([^\"]+)", 1, tolower(AdditionalExtensions)), trim('"', PA_Url))
| extend PA_Url = iif(PA_Url !startswith "http://" and ApplicationProtocol !~ "ssl", strcat('http://', PA_Url), iif(PA_Url !startswith "https://" and ApplicationProtocol =~ "ssl", strcat('https://', PA_Url), PA_Url))
| extend Domain = trim(@"""",tostring(parse_url(PA_Url).Host))
| where isnotempty(Domain)
| extend Domain = tolower(Domain)
| extend parts = split(Domain, '.')
//Split out the TLD for the purpose of checking if we have any TI indicators with this TLD to match on
| extend tld = parts[(array_length(parts)-1)]
//Validate parsed domain by checking TLD against TLDs from threat feed and drop domains where there is no chance of a match
| where tld in~ (list_tlds)
| extend CommonSecurityLog_TimeGenerated = TimeGenerated
)
on $left.DomainName==$right.Domain
| project LatestIndicatorTime, Description, ActivityGroupNames, PA_Url, Domain, IndicatorId, ThreatType, ExpirationDateTime, ConfidenceScore, CommonSecurityLog_TimeGenerated, DeviceAction, DestinationIP, DestinationPort, DeviceName, SourceIP, SourcePort, ApplicationProtocol, RequestMethod
| extend timestamp = CommonSecurityLog_TimeGenerated, IPCustomEntity = SourceIP, HostCustomEntity = DeviceName, URLCustomEntity = PA_Url
entityMappings:
- entityType: Host
fieldMappings:
Expand All @@ -76,5 +77,5 @@ entityMappings:
fieldMappings:
- identifier: Url
columnName: URLCustomEntity
version: 1.1.0
kind: Scheduled
version: 1.1.1
kind: Scheduled
Loading