Skip to content

Commit

Permalink
[Detection Rules] Add 7.12 rules (elastic#94022) (elastic#94047)
Browse files Browse the repository at this point in the history
Co-authored-by: Justin Ibarra <[email protected]>
  • Loading branch information
kibanamachine and brokensound77 authored Mar 9, 2021
1 parent b35782c commit 8990d33
Show file tree
Hide file tree
Showing 547 changed files with 1,151 additions and 889 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"apm-*-transaction*"
],
"language": "kuery",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Web Application Suspicious Activity: POST Request Declined",
"query": "http.response.status_code:403 and http.request.method:post",
"references": [
Expand All @@ -25,5 +25,5 @@
],
"timestamp_override": "event.ingested",
"type": "query",
"version": 5
"version": 6
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"apm-*-transaction*"
],
"language": "kuery",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Web Application Suspicious Activity: Unauthorized Method",
"query": "http.response.status_code:405",
"references": [
Expand All @@ -25,5 +25,5 @@
],
"timestamp_override": "event.ingested",
"type": "query",
"version": 5
"version": 6
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"apm-*-transaction*"
],
"language": "kuery",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Web Application Suspicious Activity: No User Agent",
"query": "url.path:*",
"references": [
Expand All @@ -43,5 +43,5 @@
],
"timestamp_override": "event.ingested",
"type": "query",
"version": 5
"version": 6
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"apm-*-transaction*"
],
"language": "kuery",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Web Application Suspicious Activity: sqlmap User Agent",
"query": "user_agent.original:\"sqlmap/1.3.11#stable (http://sqlmap.org)\"",
"references": [
Expand All @@ -25,5 +25,5 @@
],
"timestamp_override": "event.ingested",
"type": "query",
"version": 5
"version": 6
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
],
"interval": "10m",
"language": "kuery",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Application Added to Google Workspace Domain",
"note": "### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information.\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-gsuite.html",
"query": "event.dataset:(gsuite.admin or google_workspace.admin) and event.provider:admin and event.category:iam and event.action:ADD_APPLICATION",
Expand All @@ -33,5 +33,5 @@
],
"timestamp_override": "event.ingested",
"type": "query",
"version": 2
"version": 3
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"logs-okta*"
],
"language": "kuery",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Attempt to Deactivate an Okta Network Zone",
"note": "The Okta Fleet integration or Filebeat module must be enabled to use this rule.",
"query": "event.dataset:okta.system and event.action:zone.deactivate",
Expand All @@ -33,5 +33,5 @@
],
"timestamp_override": "event.ingested",
"type": "query",
"version": 2
"version": 3
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"logs-okta*"
],
"language": "kuery",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Attempt to Delete an Okta Network Zone",
"note": "The Okta Fleet integration or Filebeat module must be enabled to use this rule.",
"query": "event.dataset:okta.system and event.action:zone.delete",
Expand All @@ -33,5 +33,5 @@
],
"timestamp_override": "event.ingested",
"type": "query",
"version": 2
"version": 3
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
],
"interval": "10m",
"language": "kuery",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "AWS CloudTrail Log Created",
"note": "The AWS Filebeat module must be enabled to use this rule.",
"query": "event.action:CreateTrail and event.dataset:aws.cloudtrail and event.provider:cloudtrail.amazonaws.com and event.outcome:success",
Expand Down Expand Up @@ -51,5 +51,5 @@
],
"timestamp_override": "event.ingested",
"type": "query",
"version": 3
"version": 4
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"logs-windows.*"
],
"language": "eql",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Exporting Exchange Mailbox via PowerShell",
"query": "process where event.type in (\"start\", \"process_started\") and\n process.name: (\"powershell.exe\", \"pwsh.exe\") and process.args : \"New-MailboxExportRequest*\"\n",
"references": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"logs-gcp*"
],
"language": "kuery",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "GCP Pub/Sub Subscription Creation",
"note": "The GCP Filebeat module must be enabled to use this rule.",
"query": "event.dataset:(googlecloud.audit or gcp.audit) and event.action:google.pubsub.v*.Subscriber.CreateSubscription and event.outcome:success",
Expand Down Expand Up @@ -48,5 +48,5 @@
],
"timestamp_override": "event.ingested",
"type": "query",
"version": 3
"version": 4
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"logs-gcp*"
],
"language": "kuery",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "GCP Pub/Sub Topic Creation",
"note": "The GCP Filebeat module must be enabled to use this rule.",
"query": "event.dataset:(googlecloud.audit or gcp.audit) and event.action:google.pubsub.v*.Publisher.CreateTopic and event.outcome:success",
Expand Down Expand Up @@ -48,5 +48,5 @@
],
"timestamp_override": "event.ingested",
"type": "query",
"version": 3
"version": 4
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"logs-windows.*"
],
"language": "eql",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "New ActiveSyncAllowedDeviceID Added via PowerShell",
"query": "process where event.type in (\"start\", \"process_started\") and\n process.name: (\"powershell.exe\", \"pwsh.exe\") and process.args : \"Set-CASMailbox*ActiveSyncAllowedDeviceIDs*\"\n",
"references": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"logs-azure*"
],
"language": "kuery",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Azure Event Hub Authorization Rule Created or Updated",
"note": "The Azure Filebeat module must be enabled to use this rule.",
"query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:MICROSOFT.EVENTHUB/NAMESPACES/AUTHORIZATIONRULES/WRITE and event.outcome:(Success or success)",
"query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.EVENTHUB/NAMESPACES/AUTHORIZATIONRULES/WRITE\" and event.outcome:(Success or success)",
"references": [
"https://docs.microsoft.com/en-us/azure/event-hubs/authorize-access-shared-access-signature"
],
Expand Down Expand Up @@ -64,5 +64,5 @@
],
"timestamp_override": "event.ingested",
"type": "query",
"version": 3
"version": 4
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"logs-windows.*"
],
"language": "eql",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Encrypting Files with WinRar or 7z",
"query": "process where event.type in (\"start\", \"process_started\") and\n ((process.name:\"rar.exe\" or process.code_signature.subject_name == \"win.rar GmbH\" or\n process.pe.original_file_name == \"Command line RAR\") and\n process.args == \"a\" and process.args : (\"-hp*\", \"-p*\", \"-dw\", \"-tb\", \"-ta\", \"/hp*\", \"/p*\", \"/dw\", \"/tb\", \"/ta\"))\n\n or\n (process.pe.original_file_name in (\"7z.exe\", \"7za.exe\") and\n process.args == \"a\" and process.args : (\"-p*\", \"-sdel\"))\n\n /* uncomment if noisy for backup software related FPs */\n /* not process.parent.executable : (\"C:\\\\Program Files\\\\*.exe\", \"C:\\\\Program Files (x86)\\\\*.exe\") */\n",
"references": [
Expand All @@ -24,7 +24,7 @@
"Host",
"Windows",
"Threat Detection",
"Exfiltration"
"Collection"
],
"threat": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"logs-windows.*"
],
"language": "eql",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Network Connection via Certutil",
"query": "sequence by process.entity_id\n [process where process.name : \"certutil.exe\" and event.type == \"start\"]\n [network where process.name : \"certutil.exe\" and\n not cidrmatch(destination.ip, \"10.0.0.0/8\", \"172.16.0.0/12\", \"192.168.0.0/16\")]\n",
"risk_score": 21,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"packetbeat-*"
],
"language": "lucene",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Cobalt Strike Command and Control Beacon",
"note": "This activity has been observed in FIN7 campaigns.",
"query": "event.category:(network OR network_traffic) AND type:(tls OR http) AND network.transport:tcp AND destination.domain:/[a-z]{3}.stage.[0-9]{8}\\..*/",
Expand Down Expand Up @@ -58,5 +58,5 @@
],
"timestamp_override": "event.ingested",
"type": "query",
"version": 3
"version": 4
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"packetbeat-*"
],
"language": "kuery",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Default Cobalt Strike Team Server Certificate",
"note": "While Cobalt Strike is intended to be used for penetration tests and IR training, it is frequently used by actual threat actors (TA) such as APT19, APT29, APT32, APT41, FIN6, DarkHydrus, CopyKittens, Cobalt Group, Leviathan, and many other unnamed criminal TAs. This rule uses high-confidence atomic indicators, alerts should be investigated rapidly.",
"query": "event.category:(network or network_traffic) and (tls.server.hash.md5:950098276A495286EB2A2556FBAB6D83 or tls.server.hash.sha1:6ECE5ECE4192683D2D84E25B0BA7E04F9CB7EB7C or tls.server.hash.sha256:87F2085C32B6A2CC709B365F55873E207A9CAA10BFFECF2FD16D3CF9D94D390C)",
Expand All @@ -25,7 +25,7 @@
"tags": [
"Command and Control",
"Post-Execution",
"Threat Detection, Prevention and Hunting",
"Threat Detection",
"Elastic",
"Network"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"logs-windows.*"
],
"language": "eql",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Connection to Commonly Abused Web Services",
"query": "network where network.protocol == \"dns\" and\n /* Add new WebSvc domains here */\n dns.question.name :\n (\n \"*.githubusercontent.*\",\n \"*.pastebin.*\",\n \"*drive.google.*\",\n \"*docs.live.*\",\n \"*api.dropboxapi.*\",\n \"*dropboxusercontent.*\",\n \"*onedrive.*\",\n \"*4shared.*\",\n \"*.file.io\",\n \"*filebin.net\",\n \"*slack-files.com\",\n \"*ghostbin.*\",\n \"*ngrok.*\",\n \"*portmap.*\",\n \"*serveo.net\",\n \"*localtunnel.me\",\n \"*pagekite.me\",\n \"*localxpose.io\",\n \"*notabug.org\"\n ) and\n /* Insert noisy false positives here */\n not process.name :\n (\n \"MicrosoftEdgeCP.exe\",\n \"MicrosoftEdge.exe\",\n \"iexplore.exe\",\n \"chrome.exe\",\n \"msedge.exe\",\n \"opera.exe\",\n \"firefox.exe\",\n \"Dropbox.exe\",\n \"slack.exe\",\n \"svchost.exe\",\n \"thunderbird.exe\",\n \"outlook.exe\",\n \"OneDrive.exe\"\n )\n",
"risk_score": 21,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"packetbeat-*"
],
"language": "kuery",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "DNS Activity to the Internet",
"query": "event.category:(network or network_traffic) and (event.type:connection or type:dns) and (destination.port:53 or event.dataset:zeek.dns) and source.ip:( 10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16 ) and not destination.ip:( 10.0.0.0/8 or 127.0.0.0/8 or 169.254.0.0/16 or 172.16.0.0/12 or 192.168.0.0/16 or 224.0.0.0/4 or 255.255.255.255 or \"::1\" or \"FE80::/10\" or \"FF00::/8\")",
"references": [
Expand Down Expand Up @@ -40,5 +40,5 @@
],
"timestamp_override": "event.ingested",
"type": "query",
"version": 7
"version": 8
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"logs-windows.*"
],
"language": "kuery",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Potential DNS Tunneling via NsLookup",
"query": "event.category:process and event.type:start and process.name:nslookup.exe and process.args:(-querytype=* or -qt=* or -q=* or -type=*)",
"references": [
Expand Down Expand Up @@ -44,7 +44,9 @@
}
],
"threshold": {
"field": "host.id",
"field": [
"host.id"
],
"value": 15
},
"type": "threshold",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"packetbeat-*"
],
"language": "lucene",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Roshal Archive (RAR) or PowerShell File Downloaded from the Internet",
"note": "This activity has been observed in FIN7 campaigns.",
"query": "event.category:(network OR network_traffic) AND network.protocol:http AND url.path:/.*(rar|ps1)/ AND source.ip:(10.0.0.0\\/8 OR 172.16.0.0\\/12 OR 192.168.0.0\\/16)",
Expand Down Expand Up @@ -46,5 +46,5 @@
],
"timestamp_override": "event.ingested",
"type": "query",
"version": 2
"version": 3
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"logs-windows.*"
],
"language": "eql",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Connection to Commonly Abused Free SSL Certificate Providers",
"query": "network where network.protocol == \"dns\" and\n /* Add new free SSL certificate provider domains here */\n dns.question.name : (\"*letsencrypt.org\", \"*.sslforfree.com\", \"*.zerossl.com\", \"*.freessl.org\") and\n \n /* Native Windows process paths that are unlikely to have network connections to domains secured using free SSL certificates */\n process.executable : (\"C:\\\\Windows\\\\System32\\\\*.exe\",\n \"C:\\\\Windows\\\\System\\\\*.exe\",\n\t \"C:\\\\Windows\\\\SysWOW64\\\\*.exe\",\n\t\t \"C:\\\\Windows\\\\Microsoft.NET\\\\Framework*\\\\*.exe\",\n\t\t \"C:\\\\Windows\\\\explorer.exe\",\n\t\t \"C:\\\\Windows\\\\notepad.exe\") and\n \n /* Insert noisy false positives here */\n not process.name : (\"svchost.exe\", \"MicrosoftEdge*.exe\", \"msedge.exe\")\n",
"risk_score": 21,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"packetbeat-*"
],
"language": "lucene",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Possible FIN7 DGA Command and Control Behavior",
"note": "In the event this rule identifies benign domains in your environment, the `destination.domain` field in the rule can be modified to include those domains. Example: `...AND NOT destination.domain:(zoom.us OR benign.domain1 OR benign.domain2)`.",
"query": "event.category:(network OR network_traffic) AND type:(tls OR http) AND network.transport:tcp AND destination.domain:/[a-zA-Z]{4,5}\\.(pw|us|club|info|site|top)/ AND NOT destination.domain:zoom.us",
Expand Down Expand Up @@ -57,5 +57,5 @@
],
"timestamp_override": "event.ingested",
"type": "query",
"version": 3
"version": 4
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"logs-endpoint.events.*"
],
"language": "kuery",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "FTP (File Transfer Protocol) Activity to the Internet",
"query": "event.category:(network or network_traffic) and network.transport:tcp and (destination.port:(20 or 21) or event.dataset:zeek.ftp) and source.ip:( 10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16 ) and not destination.ip:( 10.0.0.0/8 or 127.0.0.0/8 or 169.254.0.0/16 or 172.16.0.0/12 or 192.168.0.0/16 or 224.0.0.0/4 or \"::1\" or \"FE80::/10\" or \"FF00::/8\" )",
"risk_score": 21,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"packetbeat-*"
],
"language": "lucene",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Halfbaked Command and Control Beacon",
"note": "This activity has been observed in FIN7 campaigns.",
"query": "event.category:(network OR network_traffic) AND network.protocol:http AND network.transport:tcp AND url.full:/http:\\/\\/[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}\\/cd/ AND destination.port:(53 OR 80 OR 8080 OR 443)",
Expand Down Expand Up @@ -58,5 +58,5 @@
],
"timestamp_override": "event.ingested",
"type": "query",
"version": 3
"version": 4
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"logs-windows.*"
],
"language": "eql",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "Potential Command and Control via Internet Explorer",
"query": "sequence by host.id, process.entity_id with maxspan = 1s\n [process where event.type == \"start\" and process.parent.name : \"iexplore.exe\" and process.parent.args : \"-Embedding\"]\n /* IE started via COM in normal conditions makes few connections, mainly to Microsoft and OCSP related domains, add FPs here */\n [network where network.protocol == \"dns\" and process.name : \"iexplore.exe\" and\n not dns.question.name :\n (\n \"*.microsoft.com\",\n \"*.digicert.com\",\n \"*.msocsp.com\",\n \"*.windowsupdate.com\",\n \"*.bing.com\",\n \"*.identrust.com\"\n )\n ]\n",
"risk_score": 47,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"logs-endpoint.events.*"
],
"language": "kuery",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "IRC (Internet Relay Chat) Protocol Activity to the Internet",
"query": "event.category:(network or network_traffic) and network.transport:tcp and (destination.port:(6667 or 6697) or event.dataset:zeek.irc) and source.ip:( 10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16 ) and not destination.ip:( 10.0.0.0/8 or 127.0.0.0/8 or 169.254.0.0/16 or 172.16.0.0/12 or 192.168.0.0/16 or 224.0.0.0/4 or \"::1\" or \"FE80::/10\" or \"FF00::/8\" )",
"risk_score": 47,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"logs-endpoint.events.*"
],
"language": "kuery",
"license": "Elastic License",
"license": "Elastic License v2",
"name": "IPSEC NAT Traversal Port Activity",
"query": "event.category:(network or network_traffic) and network.transport:udp and destination.port:4500",
"risk_score": 21,
Expand Down
Loading

0 comments on commit 8990d33

Please sign in to comment.