Commit Graph

978 Commits

Author SHA1 Message Date
Samirbous 9121a25b02 Update collection_email_powershell_exchange_mailbox.toml (#2457) 2023-01-11 16:29:01 +00:00
Jonhnathan 4124a82496 [Rule Tuning] Exclude SYSTEM user.id from PowerShell Script Block rules (#2449)
* [Rule Tuning] Exclude SYSTEM user.id from PowerShell Script Block rules

* Update privilege_escalation_posh_token_impersonation.toml

* Update privilege_escalation_posh_token_impersonation.toml

* Adjust severity
2023-01-10 09:37:07 -03:00
Jonhnathan 7725e32126 [Security Content] Fix Osquery Markdown Plugin Escaped queries (#2447)
* [Security Content] Fix Osquery Markdown Plugin Escaped queries

* Re-add line

* Update credential_access_credential_dumping_msbuild.toml

* Update command_and_control_common_webservices.toml
2023-01-09 14:45:31 -03:00
Jonhnathan 9981cca275 [Security Content] Investigation Guides Line breaks refactor (#2454)
* [Security Content] Investigation Guides Line breaks refactor (#2412)

* [Security Content] Investigation Guides Line break refactor

* undo updated_date bump on deprecated rules

* Remove duplicated key

* Remove changes to deprecated rules

* Update command_and_control_certutil_network_connection.toml
2023-01-09 13:28:10 -03:00
Terrance DeJesus b1a689b6fd Revert "[Security Content] Investigation Guides Line breaks refactor (#2412)" (#2453)
This reverts commit d1481e1a88.
2023-01-09 10:44:54 -05:00
Jonhnathan d1481e1a88 [Security Content] Investigation Guides Line breaks refactor (#2412)
* [Security Content] Investigation Guides Line break refactor

* undo updated_date bump on deprecated rules

* Remove duplicated key
2023-01-09 11:56:39 -03:00
shashank-elastic 896a25bc0f Refactor file path name (#2452) 2023-01-05 22:10:55 +05:30
Terrance DeJesus 4312d8c958 [FR] Add Endpoint, APM and Windows Integration Tags to Rules and Supportability (#2429)
* initial commit

* addressing flake errors

* added apm to _get_packagted_integrations logic

* addressed flake errors

* adjusted integration schema and updated rules to be a list

* updated several rules and removed a unit test

* updated rules with logs-* only index patterns

* Update tests/test_all_rules.py

Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com>

* addressed flake errors

* integration is none is windows, endpoint or apm

* adding rules with accepted incoming changes from main

* fixed tag and tactic alignment errors from unit testing

* adjusted unit testing logic for integration tags; added more exclusion rules

* adjusted test_integration logic to be rule resistent and skip if -8.3

* adjusted comments for unit test skip

* fixed merge conflicts from main

* changing test_integration_tag to remove logic for rule version comparisons

* added integration tag to new rule

* adjusted rules updated_date value

* ignore guided onboarding rule in unit tests

* added integration tag to new rule

Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com>
2023-01-04 09:30:07 -05:00
Samirbous 46eccea704 [New Rule] Suspicious Module Loaded by LSASS (#2441)
* Create credential_access_lsass_loaded_susp_dll.toml

* Update credential_access_lsass_loaded_susp_dll.toml

* Update rules/windows/credential_access_lsass_loaded_susp_dll.toml

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>

* Update rules/windows/credential_access_lsass_loaded_susp_dll.toml

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>

* Update rules/windows/credential_access_lsass_loaded_susp_dll.toml

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>
2023-01-04 07:56:07 +00:00
Samirbous 3dbb87e46c Update credential_access_kerberoasting_unusual_process.toml (#2444) 2023-01-04 07:50:04 +00:00
Samirbous 73ebdb64c3 Update privilege_escalation_persistence_phantom_dll.toml (#2443) 2023-01-04 07:46:59 +00:00
Jonhnathan 0acbe1d832 [New Rule] Multiple Alerts Involving a User (#2401)
* [New Rule] Multiple Alerts Involving a User

* Update definitions.py

* update query

* Update multiple_alerts_involving_user.toml

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
2023-01-03 12:25:40 -03:00
Mika Ayenson be884a1cf3 [Rule Tuning] Screensaver Plist File Modified by Unexpected Process (#2413) 2022-12-22 10:27:10 -05:00
Samirbous 7cf14dd515 [Rule Tuning] Parent Process PID Spoofing (#2432)
* Update defense_evasion_parent_process_pid_spoofing.toml

* Update defense_evasion_parent_process_pid_spoofing.toml

* Update defense_evasion_parent_process_pid_spoofing.toml

* Update defense_evasion_parent_process_pid_spoofing.toml

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
2022-12-22 14:23:13 +00:00
Samirbous ae4f671bae [New Rule] First Time Seen Driver Loaded (#2434)
* Create persistence_driver_newterm_imphash.toml

* Update persistence_driver_newterm_imphash.toml

* Update persistence_driver_newterm_imphash.toml

* Update persistence_driver_newterm_imphash.toml

Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
2022-12-22 14:10:33 +00:00
Terrance DeJesus baa6b77040 [Rule Tuning] Change Guided Onboarding Rule to Experimental (#2439)
* initial commit with rule changes

* removed rule from version lock file to pass unit testing; adjusted rule file name

* adjusted maturity to development
2022-12-21 13:36:24 -05:00
Jonhnathan 9c1bd50a63 [Rule Tuning] Adjust Index Pattern on Windows rules to support WEF (#2438)
* [Rule Tuning] Adjust Index Pattern on Windows rules to support WEF

* s/host.id/winlog.computer_name
2022-12-21 11:30:04 -03:00
Samirbous 2516a4013a [Rule Tuning] PrivEsc via Print Spool Service (#2431)
* Update privilege_escalation_printspooler_service_suspicious_file.toml

* Update privilege_escalation_printspooler_suspicious_spl_file.toml

Co-authored-by: shashank-elastic <91139415+shashank-elastic@users.noreply.github.com>
2022-12-21 11:51:26 +00:00
Samirbous 80548b97f4 [Rule Tuning] Access to a Sensitive LDAP Attribute (#2430)
* Update credential_access_ldap_attributes.toml

* Update credential_access_ldap_attributes.toml

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
2022-12-18 20:36:17 +00:00
Jonhnathan 9f6a54e645 [Rule Tuning] Multiple Alerts in Different ATT&CK Tactics on a Single Host (#2423)
* [Rule Tuning] Multiple Alerts in Different ATT&CK Tactics on a Single Host

* Update non-ecs-schema.json

* Remove duplicated value on non-ecs-schema.json

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
2022-12-16 16:05:18 -03:00
Terrance DeJesus ae4e59ec7d [FR] Update ATT&CK Package to v12.1 (#2422)
* initial update to v12.1 attack package

* added additional click echo output

* addressed flake errors

* updated rules with refreshed att&ck data

* Update detection_rules/devtools.py

Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com>

Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com>
2022-12-16 12:04:20 -05:00
Isai c6f5d47cdf Update guided_onborading_sample_rule.toml (#2408)
changed name to "My First Rule"

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>
2022-11-28 08:47:37 -08:00
Jonhnathan b0085f4304 [Rule Tuning] Temporarily Scheduled Task Creation (#2411) 2022-11-28 09:50:08 -03:00
Isai 1637f2dc79 [Rule Tuning] Shadow File Read via Command Line Utilities (#2403)
* Update privilege_escalation_shadow_file_read.toml

description update, name update, query update, tags update, MITRE update

* Update privilege_escalation_shadow_file_read.toml

edited order of MITRE

* changed file name to match credential_access as primary tactic

changed file name to match credential_access as primary tactic

* excluded common executables, not related to "read", based on telemetry

excluded common executables, not related to "read", based on telemetry

* update cred access reference MITRE

* toml-lint file for final validation

* Rename credential_access_shadow_file_access.toml to privilege_escalation_shadow_file_access.toml

revert name back to privilege_escalation...

* Rename privilege_escalation_shadow_file_access.toml to privilege_escalation_shadow_file_read.toml

* update update_date

* Changed primary tactic back to privilege_escalation to match rule name 

Changed primary tactic back to privilege_escalation to match rule name
2022-11-21 11:25:39 -05:00
Jonhnathan a7caa4baf3 [New Rule] Multiple Alerts in Different ATT&CK Tactics on a Single Host (#2399)
* [New Rule] Multiple Alerts in Different ATT&CK Tactics on a Single Host

* Update definitions.py

* Update rules/cross-platform/multiple_alerts_different_tactics_host.toml

Co-authored-by: Justin Ibarra <brokensound77@users.noreply.github.com>

Co-authored-by: Justin Ibarra <brokensound77@users.noreply.github.com>
2022-11-18 17:38:27 -03:00
Jonhnathan ac01718bb6 [Rule Tuning] Add tags to flag Sysmon-only rules & Modify Investigation Guide-related tag (#2352)
* [Rule Tuning] Add tags to flag Sysmon-only rules

* Modify tags

* Revert "Modify tags"

This reverts commit 3d9267d171a41f727bb499501d71d5c4db4f0434.

* Modify tags

* Update test_all_rules.py

* Update test_all_rules.py

* Update test_all_rules.py

* Update test_all_rules.py

* Update test_all_rules.py
2022-11-18 12:32:27 -03:00
Jonhnathan 6055d0db60 [Security Content] Introduce Osquery Markdown Plugin Queries in Investigation Guides (#2387)
* [Security Content] Introduce Osquery Markdown Plugin Queries in Investigation Guides

* Remove min_stack and add Note

* Fix Typo and preffix

* Update command_and_control_certutil_network_connection.toml

* Add unit test to check Note about Osquery Markdown plugin and Version limitations

* Update test_all_rules.py

* Update test_all_rules.py

* Change Note Verbiage
2022-11-17 18:38:34 -03:00
shashank-elastic 8766a23ad6 Rule Tuning as part of 8.6 (#2398) 2022-11-17 22:55:39 +05:30
Jonhnathan 6555bba965 [New Rule] Persistence via PowerShell profile (#2357)
* [New Rule] Persistence via PowerShell profile

* Apply suggestions from code review

Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>

* Update persistence_powersshell_profiles.toml

Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>
2022-11-16 08:42:49 -03:00
Jonhnathan 5a762eaf85 [Rule Tuning] NullSessionPipe Registry Modification (#2350)
* [Rule Tuning] NullSessionPipe Registry Modification

* Trying length

Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>
2022-11-16 10:15:18 +00:00
Samirbous b1ddfb11d4 [New Rule] Windows Services - winlog (#2280)
* [New Rule] Windows Services - winlog

https://github.com/elastic/detection-rules/issues/2164 (T1543.003 - Windows Service)

- remote windows service (4624,4697)
- suspicious windows service imagepath (7045, 4697) : cmd, powershell etc.

* added winlog.logon.type (keyword)

* Update non-ecs-schema.json

* Update persistence_service_windows_service_winlog.toml

* Update non-ecs-schema.json

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
2022-11-16 10:08:02 +00:00
Samirbous cbbac02b56 [Rule Tuning] Potential Shadow Credentials added to AD Object (#2359)
limit the query to suspicious KEYCREDENTIALLINK_BLOB value length to 828 `DN-Binary data: B:<char count>:<binary value>:<object DN>` which matches on the add of a keycredential structure using public offensive tooling and avoid FPs (Azure, CredGuard and others).

Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
2022-11-15 20:01:22 +00:00
Samirbous b0156181e7 [New Rules] T1134 Access Token Manipulation (#2373)
* New Rules] T1134 Access Token Manipulation

3 rules (2 compatible only with Elastic endpoint) and 1 generic one using winlogs.

* Update privilege_escalation_tokenmanip_sedebugpriv_enabled.toml

* fix ruleid

* Update privilege_escalation_via_token_theft.toml

* timestamp_override = "event.ingested"

* Update non-ecs-schema.json

* linted

* Update privilege_escalation_tokenmanip_sedebugpriv_enabled.toml

* Update non-ecs-schema.json

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
2022-11-15 19:50:47 +00:00
Samirbous 6233c01c34 Update privilege_escalation_suspicious_dnshostname_update.toml (#2394) 2022-11-15 19:26:41 +00:00
Samirbous 0bf7dd15a5 [New Rules] CredAccess via LDAP Attributes (#2391)
* Create credential_access_ldap_attributes.toml

* Create privilege_escalation_credroaming_ldap.toml

* Update non-ecs-schema.json

* Update privilege_escalation_credroaming_ldap.toml

just deleted the extra 'to'

Co-authored-by: Isai <59296946+imays11@users.noreply.github.com>
2022-11-15 15:55:01 +00:00
Isai 2289fd6496 [New Rule] Masquerading Space After Filename (#2368)
* Create defense_evasion_masquerading_space_after_filename.toml

new rule toml

* Update defense_evasion_masquerading_space_after_filename.toml

toml-lint the file

* Moved to cross-platform folder

moved to cross-platform folder

* update query to specify OS

added filter for host OS to query ```host.os.type:("linux","macos")```

* Update rule query: regex and process.executable

update rule query to use regex instead of wildcards and alert on process.executable instead of process.args and process.name to reduce noise.

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
2022-11-15 09:54:46 -05:00
shashank-elastic 48839ad6fe Rule to Identify Non-Standard Port connection(s) (#2365) 2022-11-15 20:13:12 +05:30
Terrance DeJesus 64dd305867 adding new rule File Transfer or Listener Established via Netcat (#2395) 2022-11-15 09:37:35 -05:00
Terrance DeJesus cc03899a2c [New Rule] Reverse Shell Created via Named Pipe (#2396)
* adding new rule Reverse Shell Created via Named Pipe

* added event.type start to first sequence
2022-11-15 09:27:44 -05:00
Isai 7adb199afa [Deprecation] GCP Kubernetes Rolebindings Created or Patched (#2340)
* Update privilege_escalation_gcp_kubernetes_rolebindings_created_or_patched.toml

Deprecating this rule due to high false positive rate. This behavior is too generic for an effective malicious behavior detection.

* move toml file to _deprecated

move toml file to _deprecated

Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
2022-11-09 12:51:52 -05:00
Terrance DeJesus 4997f95300 [Rule Tuning] Link Elastic Security Labs content to compatible rules (#2388)
* added elastic security labs URL references

* Update rules/macos/credential_access_keychain_pwd_retrieval_security_cmd.toml

Is not compatible with Windows blog.

* Update rules/macos/credential_access_keychain_pwd_retrieval_security_cmd.toml

Is not compatible with Windows blog. Reverting updated date.

* Update rules/macos/credential_access_access_to_browser_credentials_procargs.toml

Is not compatible with Windows blog. Reverting updated date.

* Update rules/macos/credential_access_access_to_browser_credentials_procargs.toml

Is not compatible with Windows blog.

* Update rules/ml/execution_ml_windows_anomalous_script.toml

Is not compatible with Windows blog. Reverting updated date.

* Update rules/linux/credential_access_collection_sensitive_files.toml

Not compatible with Windows blog. Reverting updated date.

* Update rules/linux/credential_access_collection_sensitive_files.toml

Not compatible with Windows blog.

* added credential access URL for mimikatz rules

* updated version ml windows anomalous script rule

* removed change to macOS rule since no blog correlation
2022-11-07 15:17:49 -05:00
Terrance DeJesus fd1260c109 [Rule Tuning] Tune "Telnet Port Activity" Rule for Accepted Connections Only (#2374)
* adjusted query to include event action and network direction filters

* adjusted rule name and file name

* toml linted and tags updated

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
2022-11-07 14:00:25 -05:00
Isai 25458123dd Update lateral_movement_mount_hidden_or_webdav_share_net.toml (#2385)
rule tune: update by adding MITRE tactic/technique/subtechnique : Initial Access>Valid Accounts>Local Accounts. Added new tag for new tactic : Initial Access
2022-11-07 12:14:06 -05:00
Justin Ibarra c1dd3c57ad Adds commands to manage ATT&CK mappings (#2343)
* add att&ck commands; fix 2 rule mappings

* update message to stdout

* updated date for rule changes

* unrelated click bug fix

* add type hinting
2022-11-01 13:14:40 -06:00
Samirbous 85e8c0abad [Rule Tuning] Update User.ID or Registry.Path to include Azure Users SID (#2378)
Azure AD SIDs start with S-1-12-1-* and we have 8 rules that uses user.id or registry.path to limit activity to AD/local users which starts with S-1-5-21-*.

![image](https://user-images.githubusercontent.com/64742097/198011301-638e95a6-2a3f-452b-a9d3-b45d4a01dfb4.png)

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
2022-11-01 17:45:39 +00:00
Samirbous e89bc230ab [Tuning] Diverse Windows Rules Tuning (#2383)
* [Rules Tuning] TPrep

* more

* Update credential_access_wireless_creds_dumping.toml

* Update persistence_user_account_creation_event_logs.toml

* Update discovery_files_dir_systeminfo_via_cmd.toml

* fix errors

* Update command_and_control_common_webservices.toml

* fix errors

* Update persistence_user_account_creation_event_logs.toml

* Update rules/windows/credential_access_wireless_creds_dumping.toml

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>

* Update rules/windows/defense_evasion_persistence_account_tokenfilterpolicy.toml

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>

* Update rules/windows/discovery_files_dir_systeminfo_via_cmd.toml

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>

* switched back to kql

* Update persistence_user_account_creation_event_logs.toml

* Update rules/windows/credential_access_wireless_creds_dumping.toml

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>

* Update rules/windows/defense_evasion_persistence_account_tokenfilterpolicy.toml

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>

* added T1555

* Update persistence_user_account_creation_event_logs.toml

* Update defense_evasion_persistence_account_tokenfilterpolicy.toml

* Update defense_evasion_persistence_account_tokenfilterpolicy.toml

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>
2022-11-01 16:48:25 +00:00
Jonhnathan 97c90aaf3c [Rule Tuning] Adversary Behavior - Detected - Elastic Endgame (#2382) 2022-11-01 11:29:29 -03:00
Xavier G Pich 4615b462be [New Rule] AWS KMS CMK Disabled or Scheduled for Deletion (#2318)
* [New Rule] AWS KMS CMK Disabled or Scheduled for Deletion

* Fixed double double quotes

Co-authored-by: Jonhnathan <jonhnathancesar@gmail.com>

* Add min_stack metadata

Co-authored-by: Jonhnathan <jonhnathancesar@gmail.com>

* Update rule description as per suggestion

Co-authored-by: Jonhnathan <jonhnathancesar@gmail.com>

* Remove MITRE ATT&CK tactic

Co-authored-by: Jonhnathan <jonhnathancesar@gmail.com>

* Update rule_id

Co-authored-by: Jonhnathan <jonhnathancesar@gmail.com>

* Indent false positive section

Co-authored-by: Jonhnathan <jonhnathancesar@gmail.com>

* Keep ownership as per suggestion

Co-authored-by: Jonhnathan <jonhnathancesar@gmail.com>

* Update rule name

Co-authored-by: Jonhnathan <jonhnathancesar@gmail.com>

* Fix FPs section

* Delete .dccache

* Revert "Update rule name"

This reverts commit 8611c926dfe312f897399343c19d2a37783ada71.

* Revert "Fix FPs section"

This reverts commit 14148392dadf9a7870be1b0b4dbacf311dbbb4af.

* Update FPs section

* Delete .dccache

* Update rules/integrations/aws/impact_kms_cmk_disabled_or_scheduled_for_deletion.toml

Co-authored-by: Jonhnathan <jonhnathancesar@gmail.com>
Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
2022-10-20 14:29:08 -03:00
Jonhnathan 183b1ffdd3 [Rule Tuning] Add endgame support for Windows Rules (#2285)
* [Rule Tuning] Add endgame support for Windows Rules

* Update collection_email_powershell_exchange_mailbox.toml

* Supported Rules - First Half

* bum updated_date

* Add tag

* Revert compat

* missing tags
2022-10-19 08:27:44 -07:00
Isai aad546e65b [Rule Tuning] Kubernetes Rules- Add MITRE technique "Deploy Container" (#2341)
* [Rule Tuning] Kubernetes Rules adds Mitre Execution-Deploy Container

This adds the following attacker threat and technique to each of these rules. Execute.Deploy Container

* updated_date

update the updated_date fields
2022-10-18 09:29:59 -04:00