Commit Graph

3314 Commits

Author SHA1 Message Date
Jonhnathan f6421d8c53 Additional Att&ck Mappings for credential access Rules (#1495)
Updates MITRE Technique IDs for Credential Access DRs
2021-09-21 11:04:16 -05:00
Khristinin Nikita 10a977914b Add default timestamp condition for threat_query (#1486) 2021-09-20 11:19:52 -08:00
Justin Ibarra 582a842e32 [KQL] Add support for date fields in parser (#1487)
* [KQL] Add support for date fields in parser

* add test for parsing date value
2021-09-16 09:25:26 -08:00
Justin Ibarra 7179942be3 Allow CLi config to be multiple formats (#1485) 2021-09-15 20:12:39 -08:00
dstepanic17 9ff3873ee7 [rule-tuning] Adding more context with triage/investigation (#1481)
* [rule-tuning] Adding more context with triage/investigation

* Adding mimikatz rule

* Fixed updated date on mimikatz rule

* Adding Defender update

* Adding scheduled task

* Adding AdFind

* Adding rare process

* Adding cloudtrail country

* Adding cloudtrail spike

* Adding threat intel

* Fixed minor spelling/syntax

* Fixed minor spelling/syntax p2

* Update rules/cross-platform/threat_intel_module_match.toml

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

* Update rules/integrations/aws/ml_cloudtrail_error_message_spike.toml

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

* Update rules/ml/ml_rare_process_by_host_windows.toml

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

* Update rules/windows/credential_access_mimikatz_powershell_module.toml

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

* Update rules/windows/credential_access_mimikatz_powershell_module.toml

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

* Update rules/windows/defense_evasion_defender_exclusion_via_powershell.toml

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

* Update rules/windows/discovery_adfind_command_activity.toml

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

* Update rules/windows/discovery_adfind_command_activity.toml

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

* Update rules/windows/discovery_adfind_command_activity.toml

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

* Update rules/windows/discovery_adfind_command_activity.toml

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

* Update rules/windows/discovery_adfind_command_activity.toml

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

* Update rules/windows/discovery_adfind_command_activity.toml

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

* Removed MITRE link, added Microsoft

* Update ml_cloudtrail_error_message_spike.toml

* Update ml_cloudtrail_rare_method_by_country.toml

* Update ml_rare_process_by_host_windows.toml

* Update credential_access_mimikatz_powershell_module.toml

* Update defense_evasion_defender_exclusion_via_powershell.toml

* Update discovery_adfind_command_activity.toml

* Update lateral_movement_dns_server_overflow.toml

* Update lateral_movement_scheduled_task_target.toml

* Update persistence_evasion_registry_startup_shell_folder_modified.toml

* Update defense_evasion_defender_exclusion_via_powershell.toml

* Update lateral_movement_scheduled_task_target.toml

* Update persistence_evasion_registry_startup_shell_folder_modified.toml

Co-authored-by: Justin Ibarra <brokensound77@users.noreply.github.com>
2021-09-15 20:07:21 -05:00
Justin Ibarra 51a2bc815b [Rule tuning] Fix typo in ML rule descriptions (#1484) 2021-09-14 11:37:01 -05:00
Justin Ibarra 5b24eca0bc [Bug] CLI Fixes (#1073)
* add support for self-signed certs in es and kibana
* allow Kibana to auth against any providerType
* fix export-rules command
* fix kibana upload-rule command
* fix view-rule command
* fix validate-rule command
* fix search-rules command
* fix dev kibana-diff command
* fix dev package-stats command
* fix dev search-rule-prs command
* fix dev deprecate-rule command
* replace toml with pytoml to fix import-rules command
* use no_verify in get_kibana_client
* use Path for rule-file type in view-rule
* update schemas to resolve additionalProperties type bug
* fix missing unique_fields in package rule filter
* fix github pr loader
* Load gh rules as TOMLRule instead of dict
* remove unnecessary version insertion
2021-09-10 10:06:04 -08:00
Samirbous 0875c1e4c4 [New Rule] Behavior Rule for CVE-2021-40444 Exploitation (#1479)
* [New Rule] Behavior Rule for CVE-2021-40444 Exploitation

* added a ref

* replaced \ with /

* removed unecessary wildcard
2021-09-08 21:26:14 +02:00
dstepanic17 cb27c686e0 Adding control.exe (#1477) 2021-09-08 13:30:46 -05:00
github-actions[bot] 58a4483222 Lock versions for releases: 7.13,7.14,7.15 (#1474)
* Locked versions for releases: 7.13,7.14,7.15
* remove extra previous sections
* add backport label to workflow
2021-09-07 12:32:40 -08:00
David French 90aa65aed3 Generate detection rule to alert on traffic to typosquatting/homonym domains (#1199)
* create new cli commands

* add kibana object to create_dnstwist_rule

* Adding code for index-dnstwist-results

* Changed es to es_client

* Tested. it works!

* flake8-ed

* Adding timestamps

* use eql.utils.load_dump to load json file

* rename data to dnstwist_data

* start working on create-dnstwist-rule command

* add print statements for user

* tweak formatting for line length

* add template threat match rule file

* continue working on threat match rule creation

* create rule using TomlRuleContents

* save rule to toml file

* Moving rule creation to eswrap.py

* Moving create dnstwist rule stuff to eswrap

* Fixed imports

* flake8 fixes

* More flake8 fixes

* fix usage of @add_client('kibana')

* use ctx.invoke to upload rule

* cleanup record assembly and use bulk api

* swap order of notes in `note` for sample rule

* small modifications

* move command to root click group

* remove unused click group

* Update detection_rules/main.py

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

* remove rule upload and convert template to ndjson

* Adding docs for typosquatting rule

* renaming the file

* Adding a note

* separate index and rule prep commands

* Final changes

Co-authored-by: Apoorva <appujo@gmail.com>
Co-authored-by: brokensound77 <brokensound77@users.noreply.github.com>
Co-authored-by: Apoorva Joshi <30438249+ajosh0504@users.noreply.github.com>
2021-09-03 13:35:59 -07:00
Ross Wolf c9d6527280 Revert #1440 new endpoint promotion rule (#1470)
* Revert #1440 new endpoint promotion rule
* Set the updated_at date
2021-09-03 08:07:20 -06:00
Justin Ibarra 7710e2b798 Add DeprecatedCollection to RuleCollection to bypass validation (#1454)
* Add DeprecatedCollection to RuleCollection to bypass validation
* use DeprecatedRule properties in RuleCollection
* use RuleCollection filter for max/min filtering in Package
2021-09-01 15:29:53 -08:00
Ross Wolf c395d799b4 [CI] Notify slack on backport failure (#1468) 2021-09-01 06:47:48 -06:00
Justin Ibarra 2a7d036443 [Bug] Community label: use getMembershipForUser (#1469)
Use getMembershipForUser to determine the proper org membership status
2021-08-31 21:32:30 -08:00
Justin Ibarra 9d10458be4 [Bug] RuleTOMLContents.to_dict serialize with proper schema (#1460) 2021-08-31 21:06:14 -08:00
Justin Ibarra 655f7d91d0 [Rule tuning] Fix spacing in reference URLs (#1455) 2021-08-31 15:59:06 -08:00
Nic 8b2c8c2e03 [Rule tuning] Azure Active Directory High Risk Sign-in (#1463)
* Add Aggregated Risk Level
* There can be a risk_level_during_signin:low but have a risk_level_aggregated:high which is also just as concerning and must be alerted on.
* An example is a password spray attack and have a successful login. Which makes me consider a new rule for interesting risk event types
2021-08-30 14:33:44 -08:00
Ross Wolf 7b8b18cb20 Update main to point to 7.16 (#1457)
* Update main to point to 7.16
* Add 7.16 -> 7.15 migration
* Update stack-schema-map
* Update conditions.kibana.version
2021-08-26 14:23:55 -06:00
Ross Wolf 4adad703fc [CI] Add GitHub actions workflow to lock versions across branches (#1456)
* Start job to lock versions
* Update lock-versions workflow
* Call lock-multiple script
* Fix script
* Add the lock file to staging
* pass branches to the job
* Fetch all branches and tags
* Push the branch first
* Push with upstream
* Change PR params
* Remove protections machine token
* Add 7.14.0 to the lock for min_stack_version=7.14.0
* Fix branch prefix
* Add trailing newline
* Trailing newline
* Restrict to main branch
2021-08-26 14:17:34 -06:00
Ross Wolf 675e870a30 Set min stack to 7.15 for Behavior Protection promotion 2021-08-26 08:53:02 -06:00
Apoorva Joshi 227b67e636 Small update to docs (#1442) 2021-08-25 22:40:39 -08:00
Ross Wolf 3b338baab0 [New Rule] Endpoint Security Behavior Protection (#1440)
* [New Rule] Endpoint Security Behavioral Protection
* Update readme and labeler for endpoint integration
* Fix new rule to use event.code
* Fix old rule to use event.code
* Changed from behavioral to behavior
* Rename elastic_endpoint_security_behavioral.toml to elastic_endpoint_security_behavior_protection.toml
* Back from the future (updated_date)

Co-authored-by: David French <56409778+threat-punter@users.noreply.github.com>
2021-08-25 09:56:59 -06:00
Ross Wolf 0d47cb324a Track multiple stacks in lock (#1434)
* Save the stack versions in the lock file
* Support tracking of multiple stacks in the lock
* Update the version locking logic
* Fix bugs and test lock file
* Restore version lock
* Fix lint errors
* Call both click.echo and verbose echo separately
* Change when the change_rules message is output
2021-08-24 16:56:11 -06:00
dstepanic17 8ddffc298b [New rule] Webshell Detection (#1448)
* [new-rule] Webshell Detection

* Update rules/windows/persistence_webshell_detection.toml

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

* Added FP note section

* Update rules/windows/persistence_webshell_detection.toml

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

Co-authored-by: Justin Ibarra <brokensound77@users.noreply.github.com>
2021-08-24 15:17:28 -05:00
Justin Ibarra 8099e1c733 [Rule Tuning] Add technique T1005 to 2 rules (#1405) 2021-08-20 00:19:11 -08:00
Ross Wolf 11c443ba26 Fix encoding of 'Any' type in jsonschema (#1438) 2021-08-19 10:15:21 -06:00
Justin Ibarra 2d517432e3 Bump package versions (#1418)
* Bump package versions
* Add 7.14 migration; use master schema map if one does not exist
* add test to ensure an entry exists in the stack-schema-map for the current package version

Co-authored-by: Ross Wolf <31489089+rw-access@users.noreply.github.com>
2021-08-18 21:25:53 -08:00
Ross Wolf d647c7b809 Skip etc/packages.yml from backport: auto (#1437) 2021-08-18 16:55:21 -06:00
Austin Songer 3b29498907 [Rule Tuning] AWS Security Group Configuration Change Detection (#1426)
* move rule "AWS Security Group Configuration Change Detection" to integrations directory and add "aws" integration
2021-08-14 20:34:13 -08:00
Christian Clauss ddec37b731 Fix typos discovered by codespell (#1430) 2021-08-14 20:29:10 -08:00
Justin Ibarra 4a3bacae48 Remove labeling from community workflow (#1432) 2021-08-14 02:43:34 -08:00
Justin Ibarra f63a72f1ac Add revised workflow for community label (#1431) 2021-08-14 02:18:53 -08:00
Justin Ibarra 006cb0e702 Add label workflow for community issues and pulls (#1406)
* Add label workflow for community issues and pulls
* run on label changes
2021-08-13 22:36:59 -08:00
Justin Ibarra 5c8029ad55 Add botelastic workflow for stale issues and PRs (#1414) 2021-08-13 22:24:55 -08:00
Justin Ibarra 75d6d76926 Add paths-labeller workflow (#1407)
* add botelastic workflow
2021-08-13 22:13:34 -08:00
Justin Ibarra b27a20fc3a Pull latest ECS+beats schemas and update schema-map (#1417) 2021-08-12 13:08:12 -08:00
Austin Songer 67ba66c8e7 [New Rule] AWS EC2 Security Group Configuration Change Detection (#1144) 2021-08-12 11:36:50 -08:00
David French 14493689b9 [New Rule] Whitespace Padding in Process Command Line (#1392)
* Create defense_evasion_whitespace_padding_in_command_line.toml

* add newline

* update description

Co-authored-by: Ross Wolf <31489089+rw-access@users.noreply.github.com>

* Apply suggestions from code review

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

Co-authored-by: Ross Wolf <31489089+rw-access@users.noreply.github.com>
Co-authored-by: Justin Ibarra <brokensound77@users.noreply.github.com>
2021-08-11 10:15:01 -06:00
Justin Ibarra 95486ecfdf [Bug] Flatten method improperly added subtechniques (#1404) 2021-08-05 11:15:07 -08:00
Ross Wolf 17bf3c1e16 Add RuleCollection.load_git_branch (#1403) 2021-08-05 01:15:39 -06:00
dishadasgupta 7be58b7b09 Adding docs for URL Spoofing (#1400)
* Adding docs for urlspoof

* Fixing typo in readme

* Editing documentation to reflect rule upload process

Co-authored-by: Justin Ibarra <brokensound77@users.noreply.github.com>
2021-08-04 17:13:10 -07:00
Justin Ibarra d31ea6253e Refresh ATT&CK mappings to v9.0 (#1401)
* Refresh ATT&CK mappings to v9.0
* Update rules to reflect ATT&CK changes
2021-08-04 14:16:10 -08:00
Justin Ibarra f8f643041a [Rule tuning] Revise rule description and other text (#1398) 2021-08-03 13:07:47 -08:00
Austin Songer d2365783fa [Rule Tuning] NTDS or SAM Database File Copied (#1378)
* Update credential_access_copy_ntds_sam_volshadowcp_cmdline.toml to include esentutl.exe

Co-authored-by: David French <56409778+threat-punter@users.noreply.github.com>
2021-08-03 12:28:17 -08:00
Apoorva Joshi 06a9ba6463 Update Host Risk Score docs (#1397) 2021-08-02 20:52:12 -08:00
Apoorva Joshi c283d2a2f3 Adding host risk score docs (#1390)
* Adding host risk score docs
* Highlighting caveats around hostname
* Update host-risk-score.md
* Adding host risk score to the experimental detections readme
2021-08-02 13:43:27 -08:00
Justin Ibarra b736d6e748 [Rule Tuning] Rule description tweaks (#1388) 2021-07-29 10:56:13 -08:00
Ross Wolf 2e8f7cd13f [CI] Add missing clone for Fleet on-demand job (#1387) 2021-07-27 16:55:28 -06:00
Ross Wolf 92937a1ad1 [CI] Fix kibana PR command again (#1386) 2021-07-27 16:29:50 -06:00