-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Security] Add security detection engine package #797
Merged
Merged
Changes from 10 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
5b70331
Add security detection engine package
rw-access 8b30ae9
Fix some lint errors
rw-access 98fe8b6
Format the package
rw-access b0590e3
Merge remote-tracking branch 'origin/master' into add-detection-rules…
rw-access a7ca3a3
Update version in the changelog
rw-access c474565
Update dependencies
rw-access 8ad404c
Merge branch 'add-detection-rules-pkg' of github.com:rw-access/integr…
rw-access 3610bcd
Change the default owner for the detection engine package
rw-access 7521c68
Update go deps
rw-access a8aa228
Fix package-* dependencies
rw-access 527f131
Merge remote-tracking branch 'origin/master' into add-detection-rules…
rw-access 1de305e
Merge remote-tracking branch 'origin/master' into add-detection-rules…
rw-access f9f5807
Change the security_rule structure to match other Kibana assets
rw-access f78f5ea
Merge remote-tracking branch 'origin/master' into add-detection-rules…
rw-access File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
Detection Rules | ||
Copyright 2020 Elasticsearch B.V. | ||
|
||
--- | ||
This product bundles rules based on https://github.com/BlueTeamLabs/sentinel-attack | ||
which is available under a "MIT" license. The files based on this license are: | ||
|
||
- defense_evasion_via_filter_manager | ||
- discovery_process_discovery_via_tasklist_command | ||
- persistence_priv_escalation_via_accessibility_features | ||
- persistence_via_application_shimming | ||
- defense_evasion_execution_via_trusted_developer_utilities | ||
|
||
MIT License | ||
|
||
Copyright (c) 2019 Edoardo Gerosa, Olaf Hartong | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
of the Software, and to permit persons to whom the Software is furnished to do | ||
so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
||
--- | ||
This product bundles rules based on https://github.com/FSecureLABS/leonidas | ||
which is available under a "MIT" license. The files based on this license are: | ||
|
||
- credential_access_secretsmanager_getsecretvalue.toml | ||
|
||
MIT License | ||
|
||
Copyright (c) 2020 F-Secure LABS | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# newer versions go on top | ||
- version: "0.0.1-dev.1" | ||
changes: | ||
- description: Create package for security's detection engine | ||
type: enhancement | ||
link: https://github.com/elastic/integrations/pull/797 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Security detection engine rules | ||
|
||
The security detection engine rules package stores all the security rules for the detection engine within the Elastic Security solution. | ||
|
37 changes: 37 additions & 0 deletions
37
...rity_detection_engine/kibana/security_rule/rule-000047bb-b27a-47ec-8b62-ef1a5d2c9e19.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"author": [ | ||
"Elastic" | ||
], | ||
"description": "Detects attempts to modify a rule within an Okta policy. An adversary may attempt to modify an Okta policy rule in order to weaken an organization's security controls.", | ||
"false_positives": [ | ||
"Consider adding exceptions to this rule to filter false positives if Okta MFA rules are regularly modified in your organization." | ||
], | ||
"index": [ | ||
"filebeat-*", | ||
"logs-okta*" | ||
], | ||
"language": "kuery", | ||
"license": "Elastic License v2", | ||
"name": "Attempt to Modify an Okta Policy Rule", | ||
"note": "The Okta Fleet integration or Filebeat module must be enabled to use this rule.", | ||
"query": "event.dataset:okta.system and event.action:policy.rule.update", | ||
"references": [ | ||
"https://help.okta.com/en/prod/Content/Topics/Security/Security_Policies.htm", | ||
"https://developer.okta.com/docs/reference/api/system-log/", | ||
"https://developer.okta.com/docs/reference/api/event-types/" | ||
], | ||
"risk_score": 21, | ||
"rule_id": "000047bb-b27a-47ec-8b62-ef1a5d2c9e19", | ||
"severity": "low", | ||
"tags": [ | ||
"Elastic", | ||
"Identity", | ||
"Okta", | ||
"Continuous Monitoring", | ||
"SecOps", | ||
"Identity and Access" | ||
], | ||
"timestamp_override": "event.ingested", | ||
"type": "query", | ||
"version": 5 | ||
} |
49 changes: 49 additions & 0 deletions
49
...rity_detection_engine/kibana/security_rule/rule-00140285-b827-4aee-aa09-8113f58a08f3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"author": [ | ||
"Elastic" | ||
], | ||
"description": "Identifies the execution of known Windows utilities often abused to dump LSASS memory or the Active Directory database (NTDS.dit) in preparation for credential access.", | ||
"from": "now-9m", | ||
"index": [ | ||
"winlogbeat-*", | ||
"logs-endpoint.events.*", | ||
"logs-windows.*" | ||
], | ||
"language": "eql", | ||
"license": "Elastic License v2", | ||
"name": "Potential Credential Access via Windows Utilities", | ||
"query": "process where event.type in (\"start\", \"process_started\") and\n/* update here with any new lolbas with dump capability */\n(process.pe.original_file_name == \"procdump\" and process.args : \"-ma\") or\n(process.name : \"ProcessDump.exe\" and not process.parent.executable : \"C:\\\\Program Files*\\\\Cisco Systems\\\\*.exe\") or\n(process.pe.original_file_name == \"WriteMiniDump.exe\" and not process.parent.executable : \"C:\\\\Program Files*\\\\Steam\\\\*.exe\") or\n(process.pe.original_file_name == \"RUNDLL32.EXE\" and (process.args : \"MiniDump*\" or process.command_line : \"*comsvcs.dll*#24*\")) or\n(process.pe.original_file_name == \"RdrLeakDiag.exe\" and process.args : \"/fullmemdmp\") or\n(process.pe.original_file_name == \"SqlDumper.exe\" and process.args : \"0x01100*\") or\n(process.pe.original_file_name == \"TTTracer.exe\" and process.args : \"-dumpFull\" and process.args : \"-attach\") or\n(process.pe.original_file_name == \"ntdsutil.exe\" and process.args : \"create*full*\") or\n(process.pe.original_file_name == \"diskshadow.exe\" and process.args : \"/s\")\n", | ||
"references": [ | ||
"https://lolbas-project.github.io/" | ||
], | ||
"risk_score": 73, | ||
"rule_id": "00140285-b827-4aee-aa09-8113f58a08f3", | ||
"severity": "high", | ||
"tags": [ | ||
"Elastic", | ||
"Host", | ||
"Windows", | ||
"Threat Detection", | ||
"Credential Access" | ||
], | ||
"threat": [ | ||
{ | ||
"framework": "MITRE ATT\u0026CK", | ||
"tactic": { | ||
"id": "TA0006", | ||
"name": "Credential Access", | ||
"reference": "https://attack.mitre.org/tactics/TA0006/" | ||
}, | ||
"technique": [ | ||
{ | ||
"id": "T1003", | ||
"name": "OS Credential Dumping", | ||
"reference": "https://attack.mitre.org/techniques/T1003/" | ||
} | ||
] | ||
} | ||
], | ||
"timestamp_override": "event.ingested", | ||
"type": "eql", | ||
"version": 3 | ||
} |
53 changes: 53 additions & 0 deletions
53
...rity_detection_engine/kibana/security_rule/rule-0022d47d-39c7-4f69-a232-4fe9dc7a3acd.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"author": [ | ||
"Elastic" | ||
], | ||
"description": "Windows services typically run as SYSTEM and can be used as a privilege escalation opportunity. Malware or penetration testers may run a shell as a service to gain SYSTEM permissions.", | ||
"from": "now-9m", | ||
"index": [ | ||
"winlogbeat-*", | ||
"logs-endpoint.events.*", | ||
"logs-windows.*" | ||
], | ||
"language": "kuery", | ||
"license": "Elastic License v2", | ||
"name": "System Shells via Services", | ||
"query": "event.category:process and event.type:(start or process_started) and process.parent.name:services.exe and process.name:(cmd.exe or powershell.exe)", | ||
"risk_score": 47, | ||
"rule_id": "0022d47d-39c7-4f69-a232-4fe9dc7a3acd", | ||
"severity": "medium", | ||
"tags": [ | ||
"Elastic", | ||
"Host", | ||
"Windows", | ||
"Threat Detection", | ||
"Persistence" | ||
], | ||
"threat": [ | ||
{ | ||
"framework": "MITRE ATT\u0026CK", | ||
"tactic": { | ||
"id": "TA0003", | ||
"name": "Persistence", | ||
"reference": "https://attack.mitre.org/tactics/TA0003/" | ||
}, | ||
"technique": [ | ||
{ | ||
"id": "T1543", | ||
"name": "Create or Modify System Process", | ||
"reference": "https://attack.mitre.org/techniques/T1543/", | ||
"subtechnique": [ | ||
{ | ||
"id": "T1543.003", | ||
"name": "Windows Service", | ||
"reference": "https://attack.mitre.org/techniques/T1543/003/" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"timestamp_override": "event.ingested", | ||
"type": "query", | ||
"version": 8 | ||
} |
59 changes: 59 additions & 0 deletions
59
...rity_detection_engine/kibana/security_rule/rule-027ff9ea-85e7-42e3-99d2-bbb7069e02eb.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"author": [ | ||
"Elastic" | ||
], | ||
"description": "Identifies the execution of a Chromium based browser with the debugging process argument, which may indicate an attempt to steal authentication cookies. An adversary may steal web application or service session cookies and use them to gain access web applications or Internet services as an authenticated user without needing credentials.", | ||
"false_positives": [ | ||
"Developers performing browsers plugin or extension debugging." | ||
], | ||
"from": "now-9m", | ||
"index": [ | ||
"auditbeat-*", | ||
"winlogbeat-*", | ||
"logs-endpoint.events.*", | ||
"logs-windows.*" | ||
], | ||
"language": "eql", | ||
"license": "Elastic License v2", | ||
"max_signals": 33, | ||
"name": "Potential Cookies Theft via Browser Debugging", | ||
"query": "process where event.type in (\"start\", \"process_started\", \"info\") and\n process.name in (\n \"Microsoft Edge\",\n \"chrome.exe\",\n \"Google Chrome\",\n \"google-chrome-stable\",\n \"google-chrome-beta\",\n \"google-chrome\",\n \"msedge.exe\") and\n process.args : (\"--remote-debugging-port=*\", \n \"--remote-debugging-targets=*\", \n \"--remote-debugging-pipe=*\") and\n process.args : \"--user-data-dir=*\" and not process.args:\"--remote-debugging-port=0\"\n", | ||
"references": [ | ||
"https://github.com/defaultnamehere/cookie_crimes", | ||
"https://embracethered.com/blog/posts/2020/cookie-crimes-on-mirosoft-edge/", | ||
"https://github.com/rapid7/metasploit-framework/blob/master/documentation/modules/post/multi/gather/chrome_cookies.md", | ||
"https://posts.specterops.io/hands-in-the-cookie-jar-dumping-cookies-with-chromiums-remote-debugger-port-34c4f468844e" | ||
], | ||
"risk_score": 47, | ||
"rule_id": "027ff9ea-85e7-42e3-99d2-bbb7069e02eb", | ||
"severity": "medium", | ||
"tags": [ | ||
"Elastic", | ||
"Host", | ||
"Linux", | ||
"Windows", | ||
"macOS", | ||
"Threat Detection", | ||
"Credential Access" | ||
], | ||
"threat": [ | ||
{ | ||
"framework": "MITRE ATT\u0026CK", | ||
"tactic": { | ||
"id": "TA0006", | ||
"name": "Credential Access", | ||
"reference": "https://attack.mitre.org/tactics/TA0006/" | ||
}, | ||
"technique": [ | ||
{ | ||
"id": "T1539", | ||
"name": "Steal Web Session Cookie", | ||
"reference": "https://attack.mitre.org/techniques/T1539/" | ||
} | ||
] | ||
} | ||
], | ||
"timestamp_override": "event.ingested", | ||
"type": "eql", | ||
"version": 1 | ||
} |
49 changes: 49 additions & 0 deletions
49
...rity_detection_engine/kibana/security_rule/rule-02ea4563-ec10-4974-b7de-12e65aa4f9b3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"author": [ | ||
"Elastic" | ||
], | ||
"description": "Identifies the execution of macOS built-in commands used to dump user account hashes. Adversaries may attempt to dump credentials to obtain account login information in the form of a hash. These hashes can be cracked or leveraged for lateral movement.", | ||
"from": "now-9m", | ||
"index": [ | ||
"auditbeat-*", | ||
"logs-endpoint.events.*" | ||
], | ||
"language": "kuery", | ||
"license": "Elastic License v2", | ||
"name": "Dumping Account Hashes via Built-In Commands", | ||
"query": "event.category:process and event.type:start and process.name:(defaults or mkpassdb) and process.args:(ShadowHashData or \"-dump\")", | ||
"references": [ | ||
"https://apple.stackexchange.com/questions/186893/os-x-10-9-where-are-password-hashes-stored", | ||
"https://www.unix.com/man-page/osx/8/mkpassdb/" | ||
], | ||
"risk_score": 73, | ||
"rule_id": "02ea4563-ec10-4974-b7de-12e65aa4f9b3", | ||
"severity": "high", | ||
"tags": [ | ||
"Elastic", | ||
"Host", | ||
"macOS", | ||
"Threat Detection", | ||
"Credential Access" | ||
], | ||
"threat": [ | ||
{ | ||
"framework": "MITRE ATT\u0026CK", | ||
"tactic": { | ||
"id": "TA0006", | ||
"name": "Credential Access", | ||
"reference": "https://attack.mitre.org/tactics/TA0006/" | ||
}, | ||
"technique": [ | ||
{ | ||
"id": "T1003", | ||
"name": "OS Credential Dumping", | ||
"reference": "https://attack.mitre.org/techniques/T1003/" | ||
} | ||
] | ||
} | ||
], | ||
"timestamp_override": "event.ingested", | ||
"type": "query", | ||
"version": 1 | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you pull this go mod change into a speparate PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did it here: #804 (spotted also a different issue). Once it's merged, please rebase this PR against master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged in master and confirmed the go changes are gone.
Thanks @mtojek