From 541b72fd710ee98ced86edf6a2bcd160872eb04b Mon Sep 17 00:00:00 2001 From: bpatel Date: Tue, 5 Nov 2019 12:22:01 -0800 Subject: [PATCH] merge with develop and testing --- .circleci/config.yml | 7 +- .gitignore | 1 + README.md | 87 +- baselines/baseline_cloud_compute_regions.yml | 4 +- ...y_seen_cloud_compute_creations_by_user.yml | 4 +- .../previously_seen_cloud_compute_images.yml | 4 +- ...usly_seen_cloud_compute_instance_types.yml | 4 +- bin/generate.py | 15 +- bin/validate.py | 1060 +++++------------ .../cloud_compute_activity_in_new_region.yml | 35 +- ...ance_created_by_previously_unseen_user.yml | 30 +- ...reated_with_previously_unseen_image_id.yml | 34 +- ...d_with_previously_unseen_instance_type.yml | 28 +- detections/cscript_via_cmd.yml | 2 + detections/first_time_seen_cmd_line.yml | 2 + detections/local_admin_account_creation.yml | 2 +- ...connect_to_internet_with_hidden_window.yml | 2 + ...ous_powershell_process_encoded_command.yml | 2 + ..._process_multiple_suspicious_arguments.yml | 2 + .../prohibited_apps_spawning_cmdprompt.yml | 6 +- detections/remote_desktop_bruteforce.yml | 2 +- detections/short_lived_accounts.yml | 2 +- detections/sncd_processes.yml | 2 +- detections/unusually_long_commandlines.yml | 2 + .../unusually_long_commandlines_mltk.yml | 12 +- docs/CONTRIBUTING.md | 130 ++ docs/baselines.spec.json | 1 + docs/baselines.spec.md | 2 + docs/detections.spec.json | 1 + docs/detections.spec.md | 2 + docs/investigations.spec.json | 1 + docs/investigations.spec.md | 2 + docs/splunk_docs_categories.wiki | 311 ++++- docs/stories_categories.md | 244 ++-- ...gate_cloud_compute_instance_activities.yml | 4 +- ...e_user_activities_in_all_cloud_regions.yml | 7 +- ...user_activities_in_single_cloud_region.yml | 8 +- ...ons_by_user_search_window_begin_offset.yml | 3 + ...mpute_image_search_window_begin_offset.yml | 3 + ...tance_types_search_window_begin_offset.yml | 4 + ...oud_regions_search_window_begin_offset.yml | 3 + package/app.manifest | 2 +- package/bin/detect.py | 238 ---- package/bin/investigate.py | 49 - package/default/analytic_stories.conf | 18 +- package/default/analyticstories.conf | 763 +++++------- package/default/app.conf | 4 +- package/default/commands.conf | 20 - package/default/content-version.conf | 2 +- .../default/data/ui/views/run_detections.xml | 88 -- package/default/macros.conf | 18 +- package/default/savedsearches.conf | 146 +-- package/default/transforms.conf | 2 +- package/default/use_case_library.conf | 30 +- requirements.txt | 8 +- spec/v2/baselines.spec.json | 42 +- spec/v2/detections.spec.json | 2 +- spec/v2/investigations.spec.json | 3 +- stories/cloud_cryptomining.yml | 8 +- stories_categories.md | 0 60 files changed, 1381 insertions(+), 2139 deletions(-) create mode 100644 docs/CONTRIBUTING.md create mode 100644 macros/previously_seen_cloud_compute_creations_by_user_search_window_begin_offset.yml create mode 100644 macros/previously_seen_cloud_compute_image_search_window_begin_offset.yml create mode 100644 macros/previously_seen_cloud_compute_instance_types_search_window_begin_offset.yml create mode 100644 macros/previously_seen_cloud_regions_search_window_begin_offset.yml delete mode 100644 package/bin/detect.py delete mode 100644 package/bin/investigate.py delete mode 100644 package/default/data/ui/views/run_detections.xml delete mode 100644 stories_categories.md diff --git a/.circleci/config.yml b/.circleci/config.yml index 3a300e75e9..da72e11bae 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,7 +30,12 @@ jobs: - run: name: checkout repo command: | - if [ "${CIRCLE_BRANCH}" == "" ]; then + if [[ ! -z "${CIRCLE_PULL_REQUEST}" && ! -z "${CIRCLE_PR_NUMBER}" ]]; then + git clone https://${GITHUB_TOKEN}@github.com/splunk/security-content.git + cd security-content + git fetch origin pull/${CIRCLE_PR_NUMBER}/head:${CIRCLE_BRANCH} + git checkout ${CIRCLE_BRANCH} + elif [ "${CIRCLE_BRANCH}" == "" ]; then git clone https://${GITHUB_TOKEN}@github.com/splunk/security-content.git else git clone --branch ${CIRCLE_BRANCH} https://${GITHUB_TOKEN}@github.com/splunk/security-content.git diff --git a/.gitignore b/.gitignore index ca99c6d345..50eb23f9ae 100644 --- a/.gitignore +++ b/.gitignore @@ -99,3 +99,4 @@ venv.bak/ # mypy .mypy_cache/ package/bin/sftp-config.json +package/default/sftp-config.json diff --git a/README.md b/README.md index 32ff132537..f1d6a62f97 100644 --- a/README.md +++ b/README.md @@ -1,75 +1,112 @@ security-content ![security-content](static/logo.png) ===== -Contains a collection of topic-based security guides called "Analytic Stories," which are mapped to the MITRE ATT&CK Framework, Lockheed Martin Kill Chain phases, and CIS controls. They include corresponding detection, investigative, and support searches. The content here is packaged and shipped as part of the Splunk Enterprise Security Content Updates (ESCU). | branch | build status | | --- | --- | | develop| [![develop status](https://circleci.com/gh/splunk/security-content/tree/develop.svg?style=svg&circle-token=67ad1fa7779c57d7e5bcfc42bd617baf607ec269)](https://circleci.com/gh/splunk/security-content/tree/develop)| | master | [![master status](https://circleci.com/gh/splunk/security-content/tree/master.svg?style=svg&circle-token=67ad1fa7779c57d7e5bcfc42bd617baf607ec269)](https://circleci.com/gh/splunk/security-content/tree/master)| +The Splunk Security Content Exchange was designed to bring the community together to improve our collective defenses. By sharing research and analytics, we can help the entire industry craft more effective strategies. This project provides a mechanism to facilitate this exchange. + +The repo includes a collection of security guides called Analytic Stories that provide background on TTPs, mapped to the MITRE framework, the Lockheed Martin Kill Chain, and CIS controls. They include Splunk searches, machine-learning algorithms, and Splunk Phantom playbooks (where available)—all designed to work together to detect, investigate, and respond to threats. + +You can set this tool to run [detections and automatically](https://github.com/splunk/analytic_story_execution) funnel the results to investigations, reducing the need for manual intervention. When available, you can automatically trigger reponses, as well. The alerts you'll get include context (history, correlations, etc.), so they help you better understand their importance. The net effect is a more efficient workflow, as well as more comprehensive, effective defenses. + +Follow the instructions below to get started. + + # Usage -Can be consumed using: +The Splunk Security Content Exchange can be used via: #### [Splunk App](https://github.com/splunk/security-content/releases) Grab the latest release of DA-ESS-ContentUpdate and install it on a Splunk Enterprise server (search head). -#### [API](https://github.com/splunk/security-content-api) -`curl https://g7jbilqdth.execute-api.us-west-2.amazonaws.com/api/` +#### [API](https//docs.splunkresearch.com/?version=latest) +``` +curl -s https://content.splunkresearch.com | jq +{ + "hello": "welcome to Splunks Research security content api", + "available_endpoints": [ + "/stories", + "/detections", + "/investigations", + "/baselines", + "/responses", + "/package" + ] +} +``` -#### [CLI](https://github.com/splunk/security-content-api/blob/master/content-update.py) -`python content-update.py -o $SPLUNK_HOME/etc/apps/DA-ESS-ContentUpdate --splunk_user admin --splunk_password xxxx` +# What's in an Analytic Story? +[Analytic Stories](https://github.com/splunk/security-content/blob/develop/docs/stories_categories.md) and their corresponding searches are composed of **.yml** files (manifests) and associated .conf files. The stories reside in [/stories](/stories) and the searches live in [/detections](/detections). + +Manifests contain a number of mandatory and optional fields. You can see the full field list for each piece of content [here](https://github.com/splunk/security-content/tree/develop/docs#spec-documentation). # Writing Content -First, make sure to follow the steps to install **dependecies and pre-commit hook's** under [developing](https://github.com/splunk/security-content#developing) before you begin. +First, make sure to follow the steps to install **dependencies and pre-commit hooks** under ["Developing"](https://github.com/splunk/security-content#developing) before you begin. 1. Select the content [piece](https://github.com/splunk/security-content#content-parts) you want to write. 2. Copy an example and edit it to suit your needs. At a minimum, you must write a [story](stories/), [a detection search](detections/), and an [investigative search](investigations/). 3. Make a pull request. If Circle CI fails, refer to [troubleshooting](https://github.com/splunk/security-content#troubleshooting). +For a more detailed explanation on how to contribute to the project, please see ["Contributing"](#Contributing) + # Security Content Layout ![](static/structure.png) #### Content Parts -* [stories/](stories/): All Analytic Stories for ESCU -* [detections/](detections/): Splunk Enterprise, Splunk UBA, and Splunk Phantom detection searches that power Analytic Stories +* [stories/](stories/): All Analytic Stories +* [detections/](detections/): Splunk Enterprise, Splunk UBA, and Splunk Phantom detections that power Analytic Stories * [investigations/](investigations/): Splunk Enterprise and Splunk Phantom investigative searches and playbooks employed by Analytic Stories -* [responses/](responses/): Automated Splunk Enterprise and Splunk Phantom responses used by Analytic Stories +* [responses/](responses/): Automated Splunk Enterprise and Splunk Phantom responses triggered by Analytic Stories * [baselines/](baselines/): Splunk Phantom and Splunk Enterprise baseline searches needed to support detection searches in Analytic Stories -#### Supporting parts +#### Supporting Parts * [package/](package/): Splunk content app-source files, including lookups, binaries, and default config files * [bin/](bin/): All binaries required to produce and test content # Docs * [docs/](docs/): Documentation for all spec files -* [spec/](spec/): All spec files that describe ESCU content +* [spec/](spec/): All spec files that describe the security content # Developing -##### dependecies and pre-commit hook's -Install project dependecies and tests that run before content is commited +##### Dependecies and Pre-Commit Hooks +Install project dependecies and tests that run before content is committed: 1. Create virtualenv and install requirements: `virtualenv venv && source venv/bin/activate && pip install -r requirements.txt`. 2. Install `pre-commit install`. -##### CI tools -tools that help with testing CI jobs +##### CI Tools +Tools that help with testing CI jobs: -1. Install CircleCi [CLI Tool](https://circleci.com/docs/2.0/local-cli/#installation). -2. To test a local change to CircleCi or build, make sure you are running Docker and then enter -`circleci local execute -e GITHUB_TOKEN=$GITHUB_TOKEN --branch ` +1. Install CircleCI [CLI Tool](https://circleci.com/docs/2.0/local-cli/#installation). +2. To test a local change to CircleCI or build, make sure you are running Docker, then enter +`circleci local execute -e GITHUB_TOKEN=$GITHUB_TOKEN --branch `. -#### Generate docs from schema -To generate docs from schema automatically +#### Generate Docs from Schema +To automatically generate docs from schema: -1. install https://github.com/adobe/jsonschema2md -2. Enter `jsonschema2md -d spec/v2/detections.json.spec -o docs` +1. Install https://github.com/adobe/jsonschema2md. +2. Enter `jsonschema2md -d spec/v2/detections.json.spec -o docs`. # Troubleshooting #### Our Automated Tests 1. [CI](https://github.com/splunk/security-content/blob/44946063173f7bc9921f0da0aa62139c084d1c51/.circleci/config.yml#L27) validates that the content was written to spec using [`validate.py`](https://github.com/splunk/security-content/blob/runstory/bin/generate.py). To run validation manually, execute: `python bin/generate.py --path . --output package --storiesv1 --use_case_lib -v`. -2. [CI](https://github.com/splunk/security-content/blob/44946063173f7bc9921f0da0aa62139c084d1c51/.circleci/config.yml#L60) generates Splunk configuration files using [`generate.py`](https://github.com/splunk/security-content/blob/develop/bin/generate.py). If you want to export Splunk .conf files manually from the content, run: `python bin/generate.py --path . --output package --storiesv1 --use_case_lib -v`. +2. [CI](https://github.com/splunk/security-content/blob/44946063173f7bc9921f0da0aa62139c084d1c51/.circleci/config.yml#L60) generates Splunk configuration files using [`generate.py`](https://github.com/splunk/security-content/blob/develop/bin/generate.py). If you want to export Splunk .conf files manually from the content, run `python bin/generate.py --path . --output package --storiesv1 --use_case_lib -v`. 3. [CI](https://github.com/splunk/security-content/blob/44946063173f7bc9921f0da0aa62139c084d1c51/.circleci/config.yml#L107) builds a DA-ESS-ContentUpdate Splunk package using the [Splunk Packaging Toolkit](http://dev.splunk.com/view/packaging-toolkit/SP-CAAAE9V). 4. [CI](https://github.com/splunk/security-content/blob/44946063173f7bc9921f0da0aa62139c084d1c51/.circleci/config.yml#L145) tests the newly produced package using [Splunk Appinspect](http://dev.splunk.com/view/appinspect/SP-CAAAE9U). -# Todo's +## Support +Please use the [GitHub Issue Tracker](https://github.com/splunk/security_content/issues) to submit bugs or request features. + +If you have questions or need support, you can: + +* Post a question to [Splunk Answers](http://answers.splunk.com) +* Join the [#security-research](https://splunk-usergroups.slack.com/messages/C1RH09ERM/) room in the [Splunk Slack channel](http://splunk-usergroups.slack.com) +* If you are a Splunk Enterprise customer with a valid support entitlement contract and have a Splunk-related question, you can also open a support case on the https://www.splunk.com/ support portal + +## Contributing +We welcome feedback and contributions from the community! Please see our [contribution guidelines](docs/CONTRIBUTING.md) for more information on how to get involved. + +# To Dos * Build CLI for interacting and developing diff --git a/baselines/baseline_cloud_compute_regions.yml b/baselines/baseline_cloud_compute_regions.yml index 61a8d451d0..d3a6f872fa 100644 --- a/baselines/baseline_cloud_compute_regions.yml +++ b/baselines/baseline_cloud_compute_regions.yml @@ -9,13 +9,13 @@ baseline: earliest_time: -30d@d latest_time: -10m@m search: '| tstats earliest(_time) as firstTime, latest(_time) as lastTime from - datamodel=Cloud.Compute where Compute.action=start `previously_seen_cloud_regions_input_filter` + datamodel=Cloud_Infrastructure.Compute where Compute.action=start `previously_seen_cloud_regions_input_filter` by Compute.region | `drop_dm_object_name("Compute")` | outputlookup previously_seen_cloud_regions | stats count' creation_date: '2019-10-02' data_metadata: data_models: - - Cloud + - Cloud_Infrastructure data_source: - Cloud Infrastructure Logs providing_technologies: diff --git a/baselines/previously_seen_cloud_compute_creations_by_user.yml b/baselines/previously_seen_cloud_compute_creations_by_user.yml index e8f9c7a7fc..819fb144a1 100644 --- a/baselines/previously_seen_cloud_compute_creations_by_user.yml +++ b/baselines/previously_seen_cloud_compute_creations_by_user.yml @@ -9,13 +9,13 @@ baseline: earliest_time: -90d@d latest_time: -10m@m search: '| tstats earliest(_time) as firstTime, latest(_time) as lastTime from - datamodel=Cloud_Draft_v6.Compute where Compute.action=run `previously_seen_cloud_compute_creations_by_user_input_filter` + datamodel=Cloud_Infrastructure.Compute where Compute.action=run `previously_seen_cloud_compute_creations_by_user_input_filter` by Compute.src_user | `drop_dm_object_name("Compute")` | outputlookup previously_seen_cloud_compute_creations_by_user | stats count' creation_date: '2019-10-03' data_metadata: data_models: - - Cloud + - Cloud_Infrastructure data_source: - Cloud Infrastructure Logs providing_technologies: diff --git a/baselines/previously_seen_cloud_compute_images.yml b/baselines/previously_seen_cloud_compute_images.yml index 8d5eff5d97..85323c89f9 100644 --- a/baselines/previously_seen_cloud_compute_images.yml +++ b/baselines/previously_seen_cloud_compute_images.yml @@ -9,13 +9,13 @@ baseline: earliest_time: -90d@d latest_time: -10m@m search: '| tstats earliest(_time) as firstTime, latest(_time) as lastTime from - datamodel=Cloud.Compute where Compute.action=run `previously_seen_cloud_compute_image_input_filter` + datamodel=Cloud_Infrastructure.Compute where Compute.action=run `previously_seen_cloud_compute_image_input_filter` by Compute.image_id | `drop_dm_object_name("Compute")` | outputlookup previously_seen_cloud_compute_images | stats count' creation_date: '2019-10-03' data_metadata: data_models: - - Cloud + - Cloud_Infrastructure data_source: - Cloud Infrastructure Logs providing_technologies: diff --git a/baselines/previously_seen_cloud_compute_instance_types.yml b/baselines/previously_seen_cloud_compute_instance_types.yml index e0eaf2b337..5d971aafcf 100644 --- a/baselines/previously_seen_cloud_compute_instance_types.yml +++ b/baselines/previously_seen_cloud_compute_instance_types.yml @@ -9,13 +9,13 @@ baseline: earliest_time: -90d@d latest_time: -10m@m search: '| tstats earliest(_time) as firstTime, latest(_time) as lastTime from - datamodel=Cloud.Compute where Compute.action=run `previously_seen_cloud_compute_instance_types_input_filter` + datamodel=Cloud_Infrastructure.Compute where Compute.action=run `previously_seen_cloud_compute_instance_types_input_filter` by Compute.instance_type | `drop_dm_object_name("Compute")` | outputlookup previously_seen_cloud_compute_instance_types | stats count' creation_date: '2019-10-03' data_metadata: data_models: - - Cloud + - Cloud_Infrastructure data_source: - Cloud Infrastructure Logs providing_technologies: diff --git a/bin/generate.py b/bin/generate.py index c826ebae1a..a4fac66839 100644 --- a/bin/generate.py +++ b/bin/generate.py @@ -92,7 +92,9 @@ def generate_use_case_library_conf(stories, detections, investigations, baseline trim_blocks=True) template = j2_env.get_template('use_case_library.j2') output_path = OUTPUT_PATH + "/default/use_case_library.conf" - output = template.render(stories=stories, detections=detections, investigations=investigations, baselines=baselines, time=utc_time) + output = template.render(stories=stories, detections=detections, + investigations=investigations, + baselines=baselines, time=utc_time) with open(output_path, 'w') as f: f.write(output) @@ -126,7 +128,8 @@ def identify_next_steps(detections, investigations): if i['type'] == 'splunk': investigations_output += "ESCU - {0}\\n".format(i['name']) next_steps = "{\"version\": 1, \"data\": \"Recommended following steps:\\n\\n" - next_steps += "1.[[action|escu_investigate]]: Based on ESCU investigate recommendations:\\n%s\"}" % investigations_output + next_steps += "1.[[action|escu_investigate]]: Based on ESCU investigate \ + recommendations:\\ n%s\"}" % investigations_output if i['type'] == 'phantom': has_phantom = True @@ -244,9 +247,10 @@ def enrich_stories(stories, detections, investigations, baselines): for detection in story['detections']: for detection_obj in detections: - if detection['detection_id']==detection_obj['id']: + if detection['detection_id'] == detection_obj['id']: if 'providing_technologies' in detection_obj['data_metadata']: - providing_technologies = providing_technologies | set(detection_obj['data_metadata']['providing_technologies']) + providing_technologies = providing_technologies | set(detection_obj + ['data_metadata']['providing_technologies']) if 'data_models' in detection_obj['data_metadata']: data_models = data_models | set(detection_obj['data_metadata']['data_models']) if detection_obj['type'] == 'splunk': @@ -268,7 +272,8 @@ def enrich_stories(stories, detections, investigations, baselines): for s in investigation['stories']: if s == story['name']: if 'providing_technologies' in investigation['data_metadata']: - providing_technologies = providing_technologies | set(investigation['data_metadata']['providing_technologies']) + providing_technologies = providing_technologies | set(investigation + ['data_metadata']['providing_technologies']) if 'data_models' in investigation['data_metadata']: data_models = data_models | set(investigation['data_metadata']['data_models']) if investigation['type'] == 'splunk': diff --git a/bin/validate.py b/bin/validate.py index 2c81da921e..1443458011 100644 --- a/bin/validate.py +++ b/bin/validate.py @@ -13,179 +13,93 @@ import argparse from os import path -def validate_detection_contentv2(detection, DETECTION_UUIDS, errors, macros, lookups): +def validate_object(REPO_PATH, schema_path, manifest_path, return_objects, verbose, lookups=None, macros=None): + ''' Validate scheme ''' + error = False - if detection['id'] == '': - errors.append('ERROR: Blank ID') + # uuids + baselines_uuids = [] + story_uuids = [] + detection_uuids = [] + investigation_uuids = [] - if detection['id'] in DETECTION_UUIDS: - errors.append('ERROR: Duplicate UUID found: %s' % detection['id']) - else: - DETECTION_UUIDS.append(detection['id']) - - if detection['name'].endswith(" "): - errors.append( - "ERROR: Detection name has trailing spaces: '%s'" % - detection['name']) + schema_file = path.join(path.expanduser(REPO_PATH), schema_path) try: - detection['description'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: description not ascii") + schema = json.loads(open(schema_file, 'rb').read()) + except IOError: + print "ERROR: reading baseline schema file {0}".format(schema_file) + + objects = {} + manifest_files = path.join(path.expanduser(REPO_PATH), manifest_path) + + for manifest_file in glob.glob(manifest_files): + if verbose: + print "processing manifest {0}".format(manifest_file) + + with open(manifest_file, 'r') as stream: + try: + object = list(yaml.safe_load_all(stream))[0] + except yaml.YAMLError as exc: + print(exc) + print "Error reading {0}".format(manifest_file) + error = True + continue - if 'how_to_implement' in detection: try: - detection['how_to_implement'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: how_to_implement not ascii") + jsonschema.validate(instance=object, schema=schema) + except jsonschema.exceptions.ValidationError as json_ve: + print "ERROR: {0} at:\n\t{1}".format(json.dumps(json_ve.message), manifest_file) + print "\tAffected Object: {}".format(json.dumps(json_ve.instance)) + error = True - if 'eli5' in detection: - try: - detection['eli5'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: eli5 not ascii") + objects[object['name']] = object - if 'known_false_positives' in detection: - try: - detection['known_false_positives'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: known_false_positives not ascii") - # modded to pass validation for uba detections - not yet fleshed out - if 'splunk' in detection['detect']: - # do a regex match here instead of key values - # if (detection['detect']['splunk']['correlation_rule']['search'].find('tstats') != -1) or \ - # (detection['detect']['splunk']['correlation_rule']['search'].find('datamodel') != -1): - if (detection['detect']['splunk']['correlation_rule']['search'].find('datamodel') != -1): - if 'data_models' not in detection['data_metadata']: - errors.append("ERROR: The Splunk search uses a data model but 'data_models' field is not set") + # validate content + if schema_path == 'spec/v2/lookups.spec.json': + error = error or validate_lookups_content(REPO_PATH, "lookups/%s", object, manifest_file) + elif schema_path == 'spec/v2/baselines.spec.json': + error = error or validate_baselines_content(object, macros, lookups, manifest_file, baselines_uuids) + elif schema_path == 'spec/v2/story.spec.json': + error = error or validate_story_content(object, manifest_file, story_uuids) + elif schema_path == 'spec/v2/detections.spec.json': + error = error or validate_detection_content(object, macros, lookups, manifest_file, detection_uuids) + elif schema_path == 'spec/v2/investigations.spec.json': + error = error or validate_investigation_content(object, macros, lookups, manifest_file, investigation_uuids) - if not detection['data_metadata']['data_models']: - errors.append("ERROR: The Splunk search uses a data model but 'data_models' is empty") - - # do a regex match here instead of key values - if (detection['detect']['splunk']['correlation_rule']['search'].find('sourcetype') != -1): - if 'data_sourcetypes' not in detection['data_metadata']: - errors.append("ERROR: The Splunk search specifies a sourcetype but 'data_sourcetypes' field is not set") - elif not detection['data_metadata']['data_sourcetypes']: - errors.append("ERROR: The Splunk search specifies a sourcetype but 'data_sourcetypes' is empty") - - if 'macros' in detection['detect']['splunk']['correlation_rule']: - for macro in detection['detect']['splunk']['correlation_rule']['macros']: - if macro not in macros: - errors.append("ERROR: The Splunk search specifies a macro \"{}\" but there is no macro manifest for it".format(macro)) - - if 'lookups' in detection['detect']['splunk']['correlation_rule']: - for lookup in detection['detect']['splunk']['correlation_rule']['lookups']: - if lookup not in lookups: - errors.append("ERROR: The Splunk search specifies a lookup \"{}\" but there is no lookup manifest for it".format(lookup)) - - - if 'notable' in detection['detect']['splunk']['correlation_rule']: - if ('drilldown_search' in detection['detect']['splunk']['correlation_rule']['notable']) ^ \ - ('drilldown_name' in detection['detect']['splunk']['correlation_rule']['notable']): - - errors.append("ERROR: Both drilldown_search and drilldown_name must be defined") - - elif 'uba' in detection['detect']: - if (detection['detect']['uba']['correlation_rule']['search'].find('tstats') != -1) or \ - (detection['detect']['splunk']['correlation_rule']['search'].find('datamodel') != -1): - - if 'data_models' not in detection['data_metadata']: - errors.append("ERROR: The Splunk search uses a data model but 'data_models' field is not set") - - if not detection['data_metadata']['data_models']: - errors.append("ERROR: The Splunk search uses a data model but 'data_models' is empty") - - # do a regex match here instead of key values - if (detection['detect']['uba']['correlation_rule']['search'].find('sourcetype') != -1): - if 'data_sourcetypes' not in detection['data_metadata']: - errors.append("ERROR: The Splunk search specifies a sourcetype but 'data_sourcetypes' \ - field is not set") - - if not detection['data_metadata']['data_sourcetypes']: - errors.append("ERROR: The Splunk search specifies a sourcetype but \ - 'data_sourcetypes' is empty") - - # do a regex match here instead of key values - - return errors - - -def validate_investigation_contentv2(investigation, investigation_uuids, errors, macros, lookups): - - if investigation['id'] == '': - errors.append('ERROR: Blank ID') - - if investigation['id'] in investigation_uuids: - errors.append('ERROR: Duplicate UUID found: %s' % investigation['id']) + if return_objects: + return error, objects else: - investigation_uuids.append(investigation['id']) - - if investigation['name'].endswith(" "): - errors.append( - "ERROR: Investigation name has trailing spaces: '%s'" % - investigation['name']) - - try: - investigation['description'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: description not ascii") - - if 'how_to_implement' in investigation: - try: - investigation['how_to_implement'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: how_to_implement not ascii") - - if 'eli5' in investigation: - try: - investigation['eli5'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: eli5 not ascii") - - if 'known_false_positives' in investigation: - try: - investigation['known_false_positives'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: known_false_positives not ascii") - - if 'splunk' in investigation['investigate']: - - # do a regex match here instead of key values - if (investigation['investigate']['splunk']['search'].find('tstats') != -1) or \ - (investigation['investigate']['splunk']['search'].find('datamodel') != -1): - - if 'data_models' not in investigation['data_metadata']: - errors.append("ERROR: The Splunk search uses a data model but 'data_models' field is not set") - - if not investigation['data_metadata']['data_models']: - errors.append("ERROR: The Splunk search uses a data model but 'data_models' is empty") - - # do a regex match here instead of key values - if (investigation['investigate']['splunk']['search'].find('sourcetype') != -1): - if 'data_sourcetypes' not in investigation['data_metadata']: - errors.append("ERROR: The Splunk search specifies a sourcetype but 'data_sourcetypes' \ - field is not set") - - if not investigation['data_metadata']['data_sourcetypes']: - errors.append("ERROR: The Splunk search specifies a sourcetype but \ - 'data_sourcetypes' is empty") - - if 'macros' in investigation['investigate']['splunk']: - for macro in investigation['investigate']['splunk']['macros']: - if macro not in macros: - errors.append("ERROR: The Splunk search specifies a macro \"{}\" but there is no macro manifest for it".format(macro)) - - if 'lookups' in investigation['investigate']['splunk']: - for lookup in investigation['investigate']['splunk']['lookups']: - if lookup not in lookups: - errors.append("ERROR: The Splunk search specifies a lookup \"{}\" but there is no lookup manifest for it".format(lookup)) + return error - return errors +def validate_lookups_content(REPO_PATH, lookup_path, lookup, manifest_file): + error = False + if 'filename' in lookup: + lookup_csv_file = path.join(path.expanduser(REPO_PATH), lookup_path % lookup['filename']) + if not path.isfile(lookup_csv_file): + print "ERROR: filename {} does not exist".format(lookup['filename']) + print lookup_csv_file + print "\t{}".format(manifest_file) + error = True + + return error -def validate_baselines_contentv2(baseline, baselines_uuids, errors, macros, lookups): +def validate_baselines_content(baseline, macros, lookups, baselines_manifest_file, baselines_uuids): + errors = [] + error = False + + baselines_errors = validate_single_baseline_content(baseline, baselines_uuids, errors, macros, lookups) + if baselines_errors: + error = True + for err in baselines_errors: + print "{0} at:\n\t {1}".format(err, baselines_manifest_file) + + return error + + +def validate_single_baseline_content(baseline, baselines_uuids, errors, macros, lookups): if baseline['id'] == '': errors.append('ERROR: Blank ID') @@ -248,267 +162,31 @@ def validate_baselines_contentv2(baseline, baselines_uuids, errors, macros, look if 'macros' in baseline['baseline']['splunk']: for macro in baseline['baseline']['splunk']['macros']: if macro not in macros: - errors.append("ERROR: The Splunk search specifies a macro \"{}\" but there is no macro manifest for it".format(macro)) + errors.append("ERROR: The Splunk search specifies a macro \"{}\" \ + but there is no macro manifest for it".format(macro)) if 'lookups' in baseline['baseline']['splunk']: for lookup in baseline['baseline']['splunk']['lookups']: if lookup not in lookups: - errors.append("ERROR: The Splunk search specifies a lookup \"{}\" but there is no lookup manifest for it".format(lookup)) - - + errors.append("ERROR: The Splunk search specifies a lookup \"{}\" \ + but there is no lookup manifest for it".format(lookup)) return errors -def validate_detection_contentv1(detection, DETECTION_UUIDS, errors): +def validate_story_content(story, story_manifest_file, story_uuids): + error = False - try: - detection['search_description'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: description not ascii") + story_errors = validate_single_story_content(story, story_uuids) + if story_errors: + error = True + for err in story_errors: + print "{0} at:\n\t {1}".format(err, story_manifest_file) - if detection['search_name'].endswith(" "): - errors.append( - "ERROR: Detection name has trailing spaces: '%s'" % - detection['search_name']) - - if detection['search_id'] == '': - errors.append('ERROR: Blank ID') - - if detection['search_id'] in DETECTION_UUIDS: - errors.append('ERROR: Duplicate UUID found: %s' % detection['search_id']) - else: - DETECTION_UUIDS.append(detection['search_id']) - - if '| tstats' in detection['search'] or 'datamodel' in detection['search']: - if 'data_models' not in detection['data_metadata']: - errors.append( - "ERROR: The search uses a data model but 'data_models' \ - field is not set") - - if 'data_models' in detection and not \ - detection['data_metadata']['data_models']: - errors.append( - "ERROR: The search uses a data model but 'data_models' is empty") - - if 'sourcetype' in detection['search']: - if 'data_sourcetypes' not in detection['data_metadata']: - errors.append( - "ERROR: The search specifies a sourcetype but 'data_sourcetypes' \ - field is not set") - - if 'data_sourcetypes' in detection and not \ - detection['data_metadata']['data_sourcetypes']: - errors.append( - "ERROR: The search specifies a sourcetype but \ - 'data_sourcetypes' is empty") - - try: - detection['search_description'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: search_description not ascii") - - if 'how_to_implement' in detection: - try: - detection['how_to_implement'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: how_to_implement not ascii") - - if 'eli5' in detection: - try: - detection['eli5'].encode('ascii') - except UnicodeEncodeError: - errors.append("eli5 not ascii") - - if 'known_false_positives' in detection: - try: - detection['known_false_positives'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: known_false_positives not ascii") - - if 'correlation_rule' in detection and 'notable' in \ - detection['correlation_rule']: - try: - detection['correlation_rule']['notable']['rule_title'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: rule_title not ascii") - - try: - detection['correlation_rule']['notable']['rule_description'].encode( - 'ascii') - except UnicodeEncodeError: - errors.append("ERROR: rule_description not ascii") - - return errors + return error -def validate_investigation_contentv1(investigation, investigation_uuids, errors): - - try: - investigation['search_description'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: description not ascii") - - if investigation['search_name'].endswith(" "): - errors.append( - "ERROR: Investigation name has trailing spaces: '%s'" % - investigation['search_name']) - - if investigation['search_id'] == '': - errors.append('ERROR: Blank ID') - - if investigation['search_id'] in investigation_uuids: - errors.append('ERROR: Duplicate UUID found: %s' % investigation['search_id']) - else: - investigation_uuids.append(investigation['search_id']) - - if '| tstats' in investigation['search'] or 'datamodel' in investigation['search']: - if 'data_models' not in investigation['data_metadata']: - errors.append( - "ERROR: The search uses a data model but 'data_models' \ - field is not set") - - if 'data_models' in investigation and not \ - investigation['data_metadata']['data_models']: - errors.append( - "ERROR: The search uses a data model but 'data_models' is empty") - - if 'sourcetype' in investigation['search']: - if 'data_sourcetypes' not in investigation['data_metadata']: - errors.append( - "ERROR: The search specifies a sourcetype but 'data_sourcetypes' \ - field is not set") - - if 'data_sourcetypes' in investigation and not \ - investigation['data_metadata']['data_sourcetypes']: - errors.append( - "ERROR: The search specifies a sourcetype but \ - 'data_sourcetypes' is empty") - - try: - investigation['search_description'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: search_description not ascii") - - if 'how_to_implement' in investigation: - try: - investigation['how_to_implement'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: how_to_implement not ascii") - - if 'eli5' in investigation: - try: - investigation['eli5'].encode('ascii') - except UnicodeEncodeError: - errors.append("eli5 not ascii") - - if 'known_false_positives' in investigation: - try: - investigation['known_false_positives'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: known_false_positives not ascii") - - return errors - - -def validate_baselines_contentv1(baseline, baselines_uuids, errors): - - try: - baseline['search_description'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: description not ascii") - - if baseline['search_name'].endswith(" "): - errors.append( - "ERROR: Baseline name has trailing spaces: '%s'" % - baseline['search_name']) - - if baseline['search_id'] == '': - errors.append('ERROR: Blank ID') - - if baseline['search_id'] in baselines_uuids: - errors.append('ERROR: Duplicate UUID found: %s' % baseline['search_id']) - else: - baselines_uuids.append(baseline['search_id']) - - if '| tstats' in baseline['search'] or 'datamodel' in baseline['search']: - if 'data_models' not in baseline['data_metadata']: - errors.append( - "ERROR: The search uses a data model but 'data_models' \ - field is not set") - - if 'data_models' in baseline and not \ - baseline['data_metadata']['data_models']: - errors.append( - "ERROR: The search uses a data model but 'data_models' is empty") - - if 'sourcetype' in baseline['search']: - if 'data_sourcetypes' not in baseline['data_metadata']: - errors.append( - "ERROR: The search specifies a sourcetype but 'data_sourcetypes' \ - field is not set") - - if 'data_sourcetypes' in baseline and not \ - baseline['data_metadata']['data_sourcetypes']: - errors.append( - "ERROR: The search specifies a sourcetype but \ - 'data_sourcetypes' is empty") - - try: - baseline['search_description'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: search_description not ascii") - - if 'how_to_implement' in baseline: - try: - baseline['how_to_implement'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: how_to_implement not ascii") - - if 'eli5' in baseline: - try: - baseline['eli5'].encode('ascii') - except UnicodeEncodeError: - errors.append("eli5 not ascii") - - if 'known_false_positives' in baseline: - try: - baseline['known_false_positives'].encode('ascii') - except UnicodeEncodeError: - errors.append("ERROR: known_false_positives not ascii") - - return errors - - -def validate_investigation_content(investigation, investigation_uuids, macros, lookups): - '''Validate that the content of a investigation manifest is correct''' - errors = [] - - # run v1 content validation - if investigation["spec_version"] == 1: - errors = validate_investigation_contentv1(investigation, investigation_uuids, errors) - - if investigation["spec_version"] == 2: - errors = validate_investigation_contentv2(investigation, investigation_uuids, errors, macros, lookups) - - return errors - - -def validate_detection_content(detection, DETECTION_UUIDS, macros, lookups): - '''Validate that the content of a detection manifest is correct''' - errors = [] - - # run v1 content validation - if detection["spec_version"] == 1: - errors = validate_detection_contentv1(detection, DETECTION_UUIDS, errors) - - if detection["spec_version"] == 2: - errors = validate_detection_contentv2(detection, DETECTION_UUIDS, errors, macros, lookups) - - return errors - - -def validate_story_content(story, STORY_UUIDS): +def validate_single_story_content(story, STORY_UUIDS): ''' Validate that the content of a story manifest is correct''' errors = [] @@ -533,387 +211,205 @@ def validate_story_content(story, STORY_UUIDS): return errors -def validate_baselines_content(baseline, baselines_uuids, macros, lookups): - '''Validate that the content of a baseline manifest is correct''' +def validate_detection_content(detection, macros, lookups, manifest_file, detection_uuids): + error = False + + detection_errors = validate_single_detection_content(detection, detection_uuids, macros, lookups) + if detection_errors: + error = True + for err in detection_errors: + print "{0} at:\n\t {1}".format(err, manifest_file) + + return error + + +def validate_single_detection_content(detection, DETECTION_UUIDS, macros, lookups): + errors = [] - # run v1 content validation - if baseline["spec_version"] == 1: - errors = validate_baselines_contentv1(baseline, baselines_uuids, errors) + if detection['id'] == '': + errors.append('ERROR: Blank ID') - if baseline["spec_version"] == 2: - errors = validate_baselines_contentv2(baseline, baselines_uuids, errors, macros, lookups) + if detection['id'] in DETECTION_UUIDS: + errors.append('ERROR: Duplicate UUID found: %s' % detection['id']) + else: + DETECTION_UUIDS.append(detection['id']) + + if detection['name'].endswith(" "): + errors.append( + "ERROR: Detection name has trailing spaces: '%s'" % + detection['name']) + + try: + detection['description'].encode('ascii') + except UnicodeEncodeError: + errors.append("ERROR: description not ascii") + + if 'how_to_implement' in detection: + try: + detection['how_to_implement'].encode('ascii') + except UnicodeEncodeError: + errors.append("ERROR: how_to_implement not ascii") + + if 'eli5' in detection: + try: + detection['eli5'].encode('ascii') + except UnicodeEncodeError: + errors.append("ERROR: eli5 not ascii") + + if 'known_false_positives' in detection: + try: + detection['known_false_positives'].encode('ascii') + except UnicodeEncodeError: + errors.append("ERROR: known_false_positives not ascii") + # modded to pass validation for uba detections - not yet fleshed out + if 'splunk' in detection['detect']: + # do a regex match here instead of key values + # if (detection['detect']['splunk']['correlation_rule']['search'].find('tstats') != -1) or \ + # (detection['detect']['splunk']['correlation_rule']['search'].find('datamodel') != -1): + if (detection['detect']['splunk']['correlation_rule']['search'].find('datamodel') != -1): + if 'data_models' not in detection['data_metadata']: + errors.append("ERROR: The Splunk search uses a data model but 'data_models' field is not set") + + if not detection['data_metadata']['data_models']: + errors.append("ERROR: The Splunk search uses a data model but 'data_models' is empty") + + # do a regex match here instead of key values + if (detection['detect']['splunk']['correlation_rule']['search'].find('sourcetype') != -1): + if 'data_sourcetypes' not in detection['data_metadata']: + errors.append("ERROR: The Splunk search specifies a sourcetype but 'data_sourcetypes' field is not set") + elif not detection['data_metadata']['data_sourcetypes']: + errors.append("ERROR: The Splunk search specifies a sourcetype but 'data_sourcetypes' is empty") + + if 'macros' in detection['detect']['splunk']['correlation_rule']: + for macro in detection['detect']['splunk']['correlation_rule']['macros']: + if macro not in macros: + errors.append("ERROR: The Splunk search specifies a macro \"{}\" \ + but there is no macro manifest for it".format(macro)) + + if 'lookups' in detection['detect']['splunk']['correlation_rule']: + for lookup in detection['detect']['splunk']['correlation_rule']['lookups']: + if lookup not in lookups: + errors.append("ERROR: The Splunk search specifies a lookup \"{}\" \ + but there is no lookup manifest for it".format(lookup)) + + if 'notable' in detection['detect']['splunk']['correlation_rule']: + if ('drilldown_search' in detection['detect']['splunk']['correlation_rule']['notable']) ^ \ + ('drilldown_name' in detection['detect']['splunk']['correlation_rule']['notable']): + + errors.append("ERROR: Both drilldown_search and drilldown_name must be defined") + + elif 'uba' in detection['detect']: + if (detection['detect']['uba']['correlation_rule']['search'].find('tstats') != -1) or \ + (detection['detect']['splunk']['correlation_rule']['search'].find('datamodel') != -1): + + if 'data_models' not in detection['data_metadata']: + errors.append("ERROR: The Splunk search uses a data model but 'data_models' field is not set") + + if not detection['data_metadata']['data_models']: + errors.append("ERROR: The Splunk search uses a data model but 'data_models' is empty") + + # do a regex match here instead of key values + if (detection['detect']['uba']['correlation_rule']['search'].find('sourcetype') != -1): + if 'data_sourcetypes' not in detection['data_metadata']: + errors.append("ERROR: The Splunk search specifies a sourcetype but 'data_sourcetypes' \ + field is not set") + + if not detection['data_metadata']['data_sourcetypes']: + errors.append("ERROR: The Splunk search specifies a sourcetype but \ + 'data_sourcetypes' is empty") + + # do a regex match here instead of key values return errors -def validate_investigation(REPO_PATH, verbose, macros, lookups): - ''' Validates Investigation''' - - INVESTIGATION_UUIDS = [] - # retrive - v1_schema_file_investigative = path.join(path.expanduser(REPO_PATH), 'spec/v1/investigative_search.json.spec') - try: - v1_schema_investigative = json.loads(open(v1_schema_file_investigative, 'rb').read()) - except IOError: - print "ERROR: reading version 1 investigations schema file {0}".format(v1_schema_file_investigative) - - v1_schema_file_contexual = path.join(path.expanduser(REPO_PATH), 'spec/v1/contextual_search.json.spec') - try: - v1_schema_contexual = json.loads(open(v1_schema_file_contexual, 'rb').read()) - except IOError: - print "ERROR: reading version 1 investigations schema file {0}".format(v1_schema_file_contexual) - - v2_schema_file = path.join(path.expanduser(REPO_PATH), 'spec/v2/investigations.spec.json') - try: - v2_schema = json.loads(open(v2_schema_file, 'rb').read()) - except IOError: - print "ERROR: reading version 2 investigations schema file {0}".format(v2_schema_file) - +def validate_investigation_content(investigation, macros, lookups, manifest_file, investigation_uuids): error = False - manifest_files = path.join(path.expanduser(REPO_PATH), "investigations/*.yml") - for manifest_file in glob.glob(manifest_files): - if verbose: - print "processing investigation {0}".format(manifest_file) - - # read in each investigation - with open(manifest_file, 'r') as stream: - try: - investigation = list(yaml.safe_load_all(stream))[0] - except yaml.YAMLError as exc: - print(exc) - print "Error reading {0}".format(manifest_file) - error = True - continue - - # validate v1 and v2 stories against spec for both investigations and old contexual searches - - if investigation['spec_version'] == 1 and investigation['search_type'] == "contextual": - try: - jsonschema.validate(instance=investigation, schema=v1_schema_contexual) - except jsonschema.exceptions.ValidationError as json_ve: - print "ERROR: {0} at:\n\t{1}".format(json.dumps(json_ve.message), manifest_file) - print "\tAffected Object: {}".format(json.dumps(json_ve.instance)) - error = True - elif investigation['spec_version'] == 1 and investigation['search_type'] == "investigative": - try: - jsonschema.validate(instance=investigation, schema=v1_schema_investigative) - except jsonschema.exceptions.ValidationError as json_ve: - print "ERROR: {0} at:\n\t{1}".format(json.dumps(json_ve.message), manifest_file) - print "\tAffected Object: {}".format(json.dumps(json_ve.instance)) - error = True - elif investigation['spec_version'] == 2: - try: - jsonschema.validate(instance=investigation, schema=v2_schema) - except jsonschema.exceptions.ValidationError as json_ve: - print "ERROR: {0} at:\n\t{1}".format(json.dumps(json_ve.message), manifest_file) - print "\tAffected Object: {}".format(json.dumps(json_ve.instance)) - error = True - else: - print "ERROR: Story {0} does not contain a spec_version which is required".format(manifest_file) - error = True - continue - - # now lets validate the content - investigation_errors = validate_investigation_content(investigation, INVESTIGATION_UUIDS, macros, lookups) - if investigation_errors: - error = True - for err in investigation_errors: - print "{0} at:\n\t {1}".format(err, manifest_file) + investigation_errors = validate_single_investigation_content(investigation, investigation_uuids, macros, lookups) + if investigation_errors: + error = True + for err in investigation_errors: + print "{0} at:\n\t {1}".format(err, manifest_file) return error -def validate_detection(REPO_PATH, verbose, macros, lookups): - ''' Validates Detections''' +def validate_single_investigation_content(investigation, investigation_uuids, macros, lookups): + errors = [] + + if investigation['id'] == '': + errors.append('ERROR: Blank ID') + + if investigation['id'] in investigation_uuids: + errors.append('ERROR: Duplicate UUID found: %s' % investigation['id']) + else: + investigation_uuids.append(investigation['id']) + + if investigation['name'].endswith(" "): + errors.append( + "ERROR: Investigation name has trailing spaces: '%s'" % + investigation['name']) - DETECTION_UUIDS = [] - # retrive - v1_schema_file = path.join(path.expanduser(REPO_PATH), 'spec/v1/detection_search.json.spec') try: - v1_schema = json.loads(open(v1_schema_file, 'rb').read()) - except IOError: - print "ERROR: reading version 1 detection schema file {0}".format(v1_schema_file) - except ValueError: - print "ERROR: File is not proper JSON {0}".format(v1_schema_file) - - v2_schema_file = path.join(path.expanduser(REPO_PATH), 'spec/v2/detections.spec.json') - try: - v2_schema = json.loads(open(v2_schema_file, 'rb').read()) - except IOError: - print "ERROR: reading version 2 detection schema file {0}".format(v2_schema_file) - except ValueError: - print "ERROR: File is not proper JSON {0}".format(v2_schema_file) - - error = False - manifest_files = path.join(path.expanduser(REPO_PATH), "detections/*.yml") - - for manifest_file in glob.glob(manifest_files): - if verbose: - print "processing detection {0}".format(manifest_file) - - # read in each detection - with open(manifest_file, 'r') as stream: - try: - detection = list(yaml.safe_load_all(stream))[0] - except yaml.YAMLError as exc: - print(exc) - print "Error reading {0}".format(manifest_file) - error = True - continue - - # validate v1 and v2 stories against spec - if detection['spec_version'] == 1: - try: - jsonschema.validate(instance=detection, schema=v1_schema) - except jsonschema.exceptions.ValidationError as json_ve: - print "ERROR: {0} at:\n\t{1}".format(json.dumps(json_ve.message), manifest_file) - print "\tAffected Object: {}".format(json.dumps(json_ve.instance)) - error = True - - elif detection['spec_version'] == 2: - try: - jsonschema.validate(instance=detection, schema=v2_schema) - except jsonschema.exceptions.ValidationError as json_ve: - print "ERROR: {0} at:\n\t{1}".format(json.dumps(json_ve.message), manifest_file) - print "\tAffected Object: {}".format(json.dumps(json_ve.instance)) - error = True - - else: - print "ERROR: Story {0} does not contain a spec_version which is required".format(manifest_file) - error = True - continue - - # now lets validate the content - detection_errors = validate_detection_content(detection, DETECTION_UUIDS, macros, lookups) - if detection_errors: - error = True - for err in detection_errors: - print "{0} at:\n\t {1}".format(err, manifest_file) - - return error - - -def validate_story(REPO_PATH, verbose): - ''' Validates Stories''' - - STORY_UUIDS = [] - - # retrive - v1_schema_file = path.join(path.expanduser(REPO_PATH), 'spec/v1/analytic_story.json.spec') - try: - v1_schema = json.loads(open(v1_schema_file, 'rb').read()) - except IOError: - print "ERROR: reading version 1 story schema file {0}".format(v1_schema_file) - except ValueError: - print "ERROR: File is not proper JSON {0}".format(v1_schema_file) - - v2_schema_file = path.join(path.expanduser(REPO_PATH), 'spec/v2/story.spec.json') - try: - v2_schema = json.loads(open(v2_schema_file, 'rb').read()) - except IOError: - print "ERROR: reading version 2 story schema file {0}".format(v2_schema_file) - except ValueError: - print "ERROR: File is not proper JSON {0}".format(v2_schema_file) - - error = False - story_manifest_files = path.join(path.expanduser(REPO_PATH), "stories/*.yml") - - for story_manifest_file in glob.glob(story_manifest_files): - if verbose: - print "processing story {0}".format(story_manifest_file) - - # read in each story - with open(story_manifest_file, 'r') as stream: - try: - story = list(yaml.safe_load_all(stream))[0] - except yaml.YAMLError as exc: - print(exc) - print "Error reading {0}".format(story_manifest_file) - error = True - continue - - # validate v1 and v2 stories against spec - if story['spec_version'] == 1: - try: - jsonschema.validate(instance=story, schema=v1_schema) - except jsonschema.exceptions.ValidationError as json_ve: - print "ERROR: {0} at:\n\t{1}".format(json.dumps(json_ve.message), story_manifest_file) - print "\tAffected Object: {}".format(json.dumps(json_ve.instance)) - error = True - - elif story['spec_version'] == 2: - try: - jsonschema.validate(instance=story, schema=v2_schema) - except jsonschema.exceptions.ValidationError as json_ve: - print "ERROR: {0} at:\n\t{1}".format(json.dumps(json_ve.message), story_manifest_file) - print "\tAffected Object: {}".format(json.dumps(json_ve.instance)) - error = True - - else: - print "ERROR: Story {0} does not contain a spec_version which is required".format(story_manifest_file) - error = True - continue - - # now lets validate the content - story_errors = validate_story_content(story, STORY_UUIDS) - if story_errors: - error = True - for err in story_errors: - print "{0} at:\n\t {1}".format(err, story_manifest_file) - - return error - - -def validate_baselines(REPO_PATH, verbose, macros, lookups): - ''' Validates Baselines''' - - BASELINE_UUIDS = [] - - # retrive - v1_schema_file = path.join(path.expanduser(REPO_PATH), 'spec/v1/support_search.json.spec') - try: - v1_schema = json.loads(open(v1_schema_file, 'rb').read()) - except IOError: - print "ERROR: reading version 1 baseline schema file {0}".format(v1_schema_file) - except ValueError: - print "ERROR: File is not proper JSON {0}".format(v1_schema_file) - - v2_schema_file = path.join(path.expanduser(REPO_PATH), 'spec/v2/baselines.spec.json') - try: - v2_schema = json.loads(open(v2_schema_file, 'rb').read()) - except IOError: - print "ERROR: reading version 2 baseline schema file {0}".format(v2_schema_file) - except ValueError: - print "ERROR: File is not proper JSON {0}".format(v2_schema_file) - - error = False - baselines_manifest_files = path.join(path.expanduser(REPO_PATH), "baselines/*.yml") - - for baselines_manifest_file in glob.glob(baselines_manifest_files): - if verbose: - print "processing baseline {0}".format(baselines_manifest_file) - - # read in each baseline - with open(baselines_manifest_file, 'r') as stream: - try: - baseline = list(yaml.safe_load_all(stream))[0] - except yaml.YAMLError as exc: - print(exc) - print "Error reading {0}".format(baselines_manifest_file) - error = True - continue - - # validate v1 and v2 stories against spec - if baseline['spec_version'] == 1: - try: - jsonschema.validate(instance=baseline, schema=v1_schema) - except jsonschema.exceptions.ValidationError as json_ve: - print "ERROR: {0} at:\n\t{1}".format(json.dumps(json_ve.message), baselines_manifest_file) - print "\tAffected Object: {}".format(json.dumps(json_ve.instance)) - error = True - - elif baseline['spec_version'] == 2: - try: - jsonschema.validate(instance=baseline, schema=v2_schema) - except jsonschema.exceptions.ValidationError as json_ve: - print "ERROR: {0} at:\n\t{1}".format(json.dumps(json_ve.message), baselines_manifest_file) - print "\tAffected Object: {}".format(json.dumps(json_ve.instance)) - error = True - - else: - print "ERROR: Baseline {0} does not contain a spec_version which is required".format(baselines_manifest_file) - error = True - continue - - # now lets validate the content - baselines_errors = validate_baselines_content(baseline, BASELINE_UUIDS, macros, lookups) - if baselines_errors: - error = True - for err in baselines_errors: - print "{0} at:\n\t {1}".format(err, baselines_manifest_file) - - return error - - -def validate_macros(REPO_PATH, verbose): - ''' Validates Macros''' - error = False - - schema_file = path.join(path.expanduser(REPO_PATH), 'spec/v2/macros.spec.json') - schema = json.loads(open(schema_file, 'rb').read()) - - macro_manifests = {} - macros_manifest_files = path.join(path.expanduser(REPO_PATH), "macros/*.yml") - for macros_manifest_file in glob.glob(macros_manifest_files): - if verbose: - print "processing macro {0}".format(macros_manifest_file) - - # read in each macro - with open(macros_manifest_file, 'r') as stream: - try: - macro = list(yaml.safe_load_all(stream))[0] - except yaml.YAMLError as exc: - print(exc) - print "Error reading {0}".format(macros_manifest_file) - error = True - continue - + investigation['description'].encode('ascii') + except UnicodeEncodeError: + errors.append("ERROR: description not ascii") + if 'how_to_implement' in investigation: try: - jsonschema.validate(instance=macro, schema=schema) - except jsonschema.exceptions.ValidationError as json_ve: - print "ERROR: {0} at:\n\t{1}".format(json.dumps(json_ve.message), macros_manifest_file) - print "\tAffected Object: {}".format(json.dumps(json_ve.instance)) - error = True - - macro_manifests[macro['name']] = macro - - return error, macro_manifests - -def validate_lookups(REPO_PATH, verbose): - ''' Validates Lookups''' - error = False - - schema_file = path.join(path.expanduser(REPO_PATH), 'spec/v2/lookups.spec.json') - schema = json.loads(open(schema_file, 'rb').read()) - - lookup_manifests = {} - lookups_manifest_files = path.join(path.expanduser(REPO_PATH), "lookups/*.yml") - for lookups_manifest_file in glob.glob(lookups_manifest_files): - if verbose: - print "processing lookup {0}".format(lookups_manifest_file) - - # read in each lookup - with open(lookups_manifest_file, 'r') as stream: - try: - lookup = list(yaml.safe_load_all(stream))[0] - except yaml.YAMLError as exc: - print(exc) - print "Error reading {0}".format(lookups_manifest_file) - error = True - continue + investigation['how_to_implement'].encode('ascii') + except UnicodeEncodeError: + errors.append("ERROR: how_to_implement not ascii") + if 'eli5' in investigation: try: - jsonschema.validate(instance=lookup, schema=schema) - except jsonschema.exceptions.ValidationError as json_ve: - print "ERROR: {0} at:\n\t{1}".format(json.dumps(json_ve.message), lookups_manifest_file) - print "\tAffected Object: {}".format(json.dumps(json_ve.instance)) - error = True + investigation['eli5'].encode('ascii') + except UnicodeEncodeError: + errors.append("ERROR: eli5 not ascii") + if 'known_false_positives' in investigation: + try: + investigation['known_false_positives'].encode('ascii') + except UnicodeEncodeError: + errors.append("ERROR: known_false_positives not ascii") - if 'filename' in lookup: - lookup_csv_file = path.join(path.expanduser(REPO_PATH), "lookups/%s" % lookup['filename']) - if not path.isfile(lookup_csv_file): - print "ERROR: filename {} does not exist".format(lookup['filename']) - print lookup_csv_file - print "\t{}".format(lookups_manifest_file) - error = True + if 'splunk' in investigation['investigate']: - lookup_manifests[lookup['name']] = lookup + # do a regex match here instead of key values + if (investigation['investigate']['splunk']['search'].find('tstats') != -1) or \ + (investigation['investigate']['splunk']['search'].find('datamodel') != -1): - return error, lookup_manifests + if 'data_models' not in investigation['data_metadata']: + errors.append("ERROR: The Splunk search uses a data model but 'data_models' field is not set") + + if not investigation['data_metadata']['data_models']: + errors.append("ERROR: The Splunk search uses a data model but 'data_models' is empty") + + # do a regex match here instead of key values + if (investigation['investigate']['splunk']['search'].find('sourcetype') != -1): + if 'data_sourcetypes' not in investigation['data_metadata']: + errors.append("ERROR: The Splunk search specifies a sourcetype but 'data_sourcetypes' \ + field is not set") + + if not investigation['data_metadata']['data_sourcetypes']: + errors.append("ERROR: The Splunk search specifies a sourcetype but \ + 'data_sourcetypes' is empty") + + if 'macros' in investigation['investigate']['splunk']: + for macro in investigation['investigate']['splunk']['macros']: + if macro not in macros: + errors.append("ERROR: The Splunk search specifies a macro \"{}\" \ + but there is no macro manifest for it".format(macro)) + + if 'lookups' in investigation['investigate']['splunk']: + for lookup in investigation['investigate']['splunk']['lookups']: + if lookup not in lookups: + errors.append("ERROR: The Splunk search specifies a lookup \"{}\" \ + but there is no lookup manifest for it".format(lookup)) + + return errors if __name__ == "__main__": @@ -928,30 +424,16 @@ if __name__ == "__main__": REPO_PATH = args.path verbose = args.verbose - macros_error, macros = validate_macros(REPO_PATH, verbose) + macros_error, macros = validate_object(REPO_PATH, 'spec/v2/macros.spec.json', 'macros/*.yml', True, verbose) + lookups_error, lookups = validate_object(REPO_PATH, 'spec/v2/lookups.spec.json', 'lookups/*.yml', True, verbose) + story_error = validate_object(REPO_PATH, 'spec/v2/story.spec.json', 'stories/*.yml', False, verbose) + detection_error = validate_object(REPO_PATH, 'spec/v2/detections.spec.json', 'detections/*.yml', False, + verbose, lookups, macros) + investigation_error = validate_object(REPO_PATH, 'spec/v2/investigations.spec.json', 'investigations/*.yml', + False, verbose, lookups, macros) + baseline_error = validate_object(REPO_PATH, 'spec/v2/baselines.spec.json', 'baselines/*.yml', False, verbose, lookups, macros) - lookups_error, lookups = validate_lookups(REPO_PATH, verbose) - - story_error = validate_story(REPO_PATH, verbose) - - detection_error = validate_detection(REPO_PATH, verbose, macros, lookups) - - investigation_error = validate_investigation(REPO_PATH, verbose, macros, lookups) - - baseline_error = validate_baselines(REPO_PATH, verbose, macros, lookups) - - - if story_error: - sys.exit("Errors found") - elif detection_error: - sys.exit("Errors found") - elif investigation_error: - sys.exit("Errors found") - elif baseline_error: - sys.exit("Errors found") - elif macros_error: - sys.exit("Errors found") - elif lookups_error: + if story_error or detection_error or investigation_error or baseline_error or macros_error or lookups_error: sys.exit("Errors found") else: print "No Errors found" diff --git a/detections/cloud_compute_activity_in_new_region.yml b/detections/cloud_compute_activity_in_new_region.yml index 5f411680b1..4cdc75d773 100644 --- a/detections/cloud_compute_activity_in_new_region.yml +++ b/detections/cloud_compute_activity_in_new_region.yml @@ -7,16 +7,16 @@ confidence: medium creation_date: '2019-10-02' data_metadata: data_models: - - Cloud + - Cloud_Infrastructure data_source: - Cloud Infrastructure Logs providing_technologies: - AWS - Azure - GCP -description: This search looks at cloud infrastructure events where an instance is - created in any region in the last one hour and then compares it to a lookup file - of previously seen regions where an instance was created +description: This search looks at cloud-infrastructure events where an instance is + created in any region within the last hour and then compares it to a lookup file + of previously seen regions where instances have been created. detect: splunk: correlation_rule: @@ -24,11 +24,12 @@ detect: - previously_seen_cloud_regions macros: - previously_seen_cloud_regions_input_filter + - previously_seen_cloud_regions_search_window_begin_offset notable: drilldown_name: See all activity in $region$ - drilldown_search: '| from datamodel:Cloud_Draft_v6.Compute | search region="$region$"' + drilldown_search: '| from datamodel:Cloud_Infrastructure.Compute | search region="$region$"' nes_fields: dest,region - rule_description: A cloud compute instance, $dest$ is started in a new, previously + rule_description: A cloud compute instance, $dest$, is started in a new, previously unseen, region $region$ rule_title: Cloud instance $dest$ started in a new region $region$ risk: @@ -41,32 +42,33 @@ detect: earliest_time: -70m@m latest_time: -10m@m search: '| tstats earliest(_time) as firstTime, latest(_time) as lastTime values(Compute.dest) - as dest from datamodel=Cloud_Draft_v6.Compute where Compute.event_name=RunInstances + as dest from datamodel=Cloud_Infrastructure.Compute where Compute.event_name=RunInstances `previously_seen_cloud_regions_input_filter` by Compute.region, Compute.src_user | `drop_dm_object_name("Compute")` | inputlookup append=t previously_seen_cloud_regions | stats min(firstTime) as firstTime max(lastTime) as lastTime, values(dest) as dest by region, src_user | multireport [| table region, firstTime, lastTime | outputlookup previously_seen_cloud_regions | where fact=fiction][| eval - new_region=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where new_region=1 + new_region=if(firstTime >= relative_time(now(), `previously_seen_cloud_regions_search_window_begin_offset`), 1, 0) + | where new_region=1 | convert ctime(firstTime) ctime(lastTime)] | table region, dest, src_user, firstTime, lastTime' suppress: suppress_fields: dest,region suppress_period: 14400s eli5: In this search, we query cloud infrastructure compute logs to look for events - that indicate that an instance was started in a particular region. Using the `previously_seen_cloud_regions` + that indicate that an instance was started in a particular region. Using the \"previously_seen_cloud_regions\" lookup file created using the support search, we compare the region where this instance - was started to all previously observed regions. The `eval` and `if` functions determine + was started to all previously observed regions. The \"eval\" and \"if\" functions determine that the earliest times seen for this region and instance were within the last day. - If a new region is detected, it will alert you with "Instance Started in a New Region". - However, this region will be added to the list in `previously_seen_cloud_regions`. + If a new region is detected, it will alert you with \"Instance Started in a New Region.\" + However, this region will be added to the list in \"previously_seen_cloud_regions.\" entities: - dest - region - src_user -how_to_implement: You must be ingesting the approrpiate cloud infrastructure logs - and have the Security Research cloud data model installed. Run the "Previously Seen - Cloud Compute Instance Types" support search to create of baseline of previously +how_to_implement: You must be ingesting the appropriate cloud-infrastructure logs + and have the Security Research cloud data model (https://github.com/splunk/cloud-datamodel-security-research/) + installed. Run the \"Previously Seen Cloud Compute Instance Types\" support search to create a baseline of previously seen regions. id: fa4089e2-50e3-40f7-8469-d2cc1564ca59 investigations: @@ -76,9 +78,6 @@ investigations: - id: 33a95cf2-900c-4636-8fca-5c5f71474720 name: Investigate Cloud Compute Instance Activities type: splunk - - id: 3d6c3213-5fff-4a1e-b57d-b24c262171e7 - name: Get Notable History - type: splunk known_false_positives: It's possible that a user has unknowingly started an instance in a new region. Please verify that this activity is legitimate. maintainers: diff --git a/detections/cloud_compute_instance_created_by_previously_unseen_user.yml b/detections/cloud_compute_instance_created_by_previously_unseen_user.yml index 4616ea942f..7cfa6b8542 100644 --- a/detections/cloud_compute_instance_created_by_previously_unseen_user.yml +++ b/detections/cloud_compute_instance_created_by_previously_unseen_user.yml @@ -7,14 +7,14 @@ confidence: medium creation_date: '2019-10-03' data_metadata: data_models: - - Cloud + - Cloud_Infrastructure data_source: - Cloud Infrastructure Logs providing_technologies: - AWS - Azure - GCP -description: This search looks for cloud compute instances being created by users +description: This search looks for cloud compute instances created by users who have not created them before. detect: splunk: @@ -23,9 +23,10 @@ detect: - previously_seen_cloud_compute_creations_by_user macros: - previously_seen_cloud_compute_creations_by_user_input_filter + - previously_seen_cloud_compute_creations_by_user_search_window_begin_offset notable: drilldown_name: Show all instances created by $src_user$ - drilldown_search: '| from datamodel:Cloud_Draft_v6.Compute | action=run src_user=$src_user$' + drilldown_search: '| from datamodel:Cloud_Infrastructure.Compute | action=run src_user=$src_user$' nes_fields: src_user, dest rule_description: The compute instance $dest$ was created by $src_user$. This is the first time $src_user$ has created a compute instance. @@ -40,30 +41,30 @@ detect: earliest_time: -70m@m latest_time: -10m@m search: '| tstats earliest(_time) as firstTime, latest(_time) as lastTime values(Compute.dest) - as dest from datamodel=Cloud_Draft_v6.Compute where Compute.action=run by + as dest from datamodel=Cloud_Infrastructure.Compute where Compute.action=run by Compute.src_user | `drop_dm_object_name("Compute")` | inputlookup append=t previously_seen_cloud_compute_creations_by_user | stats min(firstTime) as firstTime max(lastTime) as lastTime, values(dest) as dest by src_user | multireport [| table src_user, firstTime, lastTime | outputlookup previously_seen_cloud_compute_creations_by_user | where fact=fiction][| eval new_user=if(firstTime >= relative_time(now(), - "-70m@m"), 1, 0) | where new_user=1 | convert ctime(firstTime) ctime(lastTime)] + `previously_seen_cloud_compute_creations_by_user_search_window_begin_offset`), 1, 0) + | where new_user=1 | convert ctime(firstTime) ctime(lastTime)] | table src_user, dest, firstTime, lastTime' suppress: suppress_fields: src_user, dest suppress_period: 14400s -eli5: The search returns the first time seen, last time seen, and the systems for - each user. It then appends the historical data and merges it into the data. The +eli5: For each user, the search returns the first time seen, last time seen, and the systems. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each user back to the lookup file and then clears out any output. The other part of the search limits the results - to when the user was seen for the first time no longer than 70 minutes previously. - It then displays the new user, the instances created by them, and the times associated. + to when the user was seen for the first time within the previous 70 minutes. + It then displays the new user, the instances created by that user, and the associated times. entities: - dest - src_user -how_to_implement: You must be ingesting the approrpiate cloud infrastructure logs - and have the Security Research cloud data model installed. Run the "Previously Seen - Cloud Compute Creations By User" support search to create of baseline of previously - seen users. +how_to_implement: You must be ingesting the appropriate cloud-infrastructure logs + and have the Security Research cloud data model (https://github.com/splunk/cloud-datamodel-security-research/) + installed. Run the "Previously Seen Cloud Compute Creations By User" support search to create of + baseline of previously seen users. id: 76988f6a-3935-48f6-a9e5-6fca8b3ed843 investigations: - id: 2ef6310f-8e79-42af-b20b-b4eeaba9608a @@ -73,8 +74,7 @@ investigations: name: Investigate Cloud Compute Instance Activities type: splunk known_false_positives: It's possible that a user will start to create compute instances - when they haven't before for any number of reasons. Verify with the user that is - launching instances that this is the intended behavior. + for the first time, for any number of reasons. Verify with the user launching instances that this is the intended behavior. maintainers: - company: Splunk email: davidd@splunk.com diff --git a/detections/cloud_compute_instance_created_with_previously_unseen_image_id.yml b/detections/cloud_compute_instance_created_with_previously_unseen_image_id.yml index 80bbcf8e22..4d66439154 100644 --- a/detections/cloud_compute_instance_created_with_previously_unseen_image_id.yml +++ b/detections/cloud_compute_instance_created_with_previously_unseen_image_id.yml @@ -7,7 +7,7 @@ confidence: medium creation_date: '2019-10-03' data_metadata: data_models: - - Cloud + - Cloud_Infrastructure data_source: - Cloud Infrastructure Logs providing_technologies: @@ -15,7 +15,7 @@ data_metadata: - Azure - GCP description: This search looks for cloud compute instances being created with previously - unseen image ids. + unseen image IDs. detect: splunk: correlation_rule: @@ -23,12 +23,13 @@ detect: - previously_seen_cloud_compute_images macros: - previously_seen_cloud_compute_image_input_filter + - previously_seen_cloud_compute_image_search_window_begin_offset notable: drilldown_name: Show all instances created with image $image_id$ - drilldown_search: '| from datamodel:Cloud_Draft_v6.Compute | image_id=$image_id$' + drilldown_search: '| from datamodel:Cloud_Infrastructure.Compute | image_id=$image_id$' nes_fields: dest rule_description: The cloud compute instance $dest$ was created with previously - unused image $image_id$ + unused image $image_id$. rule_title: Cloud Compute Instances Created With New Image risk: risk_object: dest @@ -40,31 +41,30 @@ detect: earliest_time: -70m@m latest_time: -10m@m search: '| tstats earliest(_time) as firstTime, latest(_time) as lastTime values(Compute.dest) - as dest from datamodel=Cloud_Draft_v6.Compute where Compute.action=run `previously_seen_cloud_compute_image_input_filter` + as dest from datamodel=Cloud_Infrastructure.Compute where Compute.action=run `previously_seen_cloud_compute_image_input_filter` by Compute.image_id, Compute.src_user | `drop_dm_object_name("Compute")` | inputlookup append=t previously_seen_cloud_compute_images | stats min(firstTime) as firstTime max(lastTime) as lastTime, values(dest) as dest by image_id, src_user | multireport [| table image_id, firstTime, lastTime | outputlookup previously_seen_cloud_compute_images | where fact=fiction][| eval new_image=if(firstTime - >= relative_time(now(), "-70m@m"), 1, 0) | where new_image=1 | convert ctime(firstTime) + >= relative_time(now(), `previously_seen_cloud_compute_image_search_window_begin_offset`), 1, 0) | where new_image=1 | convert ctime(firstTime) ctime(lastTime)] | table image_id, dest, src_user, firstTime, lastTime' suppress: suppress_fields: dest suppress_period: 14400s -eli5: The search returns the first time seen, last time seen, and the systems for - each image id and user. It then appends the historical data and merges it into the +eli5: For each image ID and user, the search returns the first time seen, last time seen, and the systems. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each image back to - the lookup file and then clears out any output. The other part of the search limits - the results to when the image was seen for the first time no longer than 70 minutes - previously. It then displays the new image, the instances created using it, the - user who created them, and the times associated. + the lookup file and clears out any output. The other part of the search limits + the results to when the image was seen for the first time within the previous 70 minutes. It then displays the new image, the instances created using it, the + user who created it, and the associated times. entities: - dest - src_user -how_to_implement: You must be ingesting the approrpiate cloud infrastructure logs - and have the Security Research cloud data model installed. Run the "Previously Seen - Cloud Compute Images" support search to create of baseline of previously seen images. -id: 8dbcf362-ae43-44ea-9084-77db4bed2c68 +how_to_implement: You must be ingesting the appropriate cloud-infrastructure logs + and have the Security Research cloud data model (https://github.com/splunk/cloud-datamodel-security-research/) + installed. Run the "Previously Seen Cloud Compute Images" support search to create + a baseline of previously seen images. +id: bc24922d-987c-4645-b288-f8c73ec194c4 investigations: - id: 2ef6310f-8e79-42af-b20b-b4eeaba9608a name: Investigate User Activities In All Cloud Regions @@ -84,7 +84,7 @@ mappings: - CIS 1 nist: - ID.AM -modification_date: '2018-03-12' +modification_date: '2018-10-12' name: Cloud Compute Instance Created With Previously Unseen Image original_authors: - company: Splunk diff --git a/detections/cloud_compute_instance_created_with_previously_unseen_instance_type.yml b/detections/cloud_compute_instance_created_with_previously_unseen_instance_type.yml index d7cc0bee03..06cd2ef581 100644 --- a/detections/cloud_compute_instance_created_with_previously_unseen_instance_type.yml +++ b/detections/cloud_compute_instance_created_with_previously_unseen_instance_type.yml @@ -7,14 +7,14 @@ confidence: medium creation_date: '2019-10-03' data_metadata: data_models: - - Cloud + - Cloud_Infrastructure data_source: - Cloud Infrastructure Logs providing_technologies: - AWS - Azure - GCP -description: This search looks for EC2 instances being created with previously unseen +description: Find EC2 instances being created with previously unseen instance types. detect: splunk: @@ -23,9 +23,10 @@ detect: - previously_seen_cloud_compute_instance_types macros: - previously_seen_cloud_compute_instance_types_input_filter + - previously_seen_cloud_compute_instance_types_search_window_begin_offset notable: drilldown_name: Find all compute instances of type $instance_type$ - drilldown_search: '| from datamodel:Cloud_Draft_v6.Compute | instance_type=$instance_type$' + drilldown_search: '| from datamodel:Cloud_Infrastructure.Compute | instance_type=$instance_type$' nes_fields: instance_type rule_description: The instance type $instance_type$ was used for the first time to create $dest$. @@ -40,31 +41,32 @@ detect: earliest_time: -70m@m latest_time: -10m@m search: '| tstats earliest(_time) as firstTime, latest(_time) as lastTime values(Compute.dest) - as dest from datamodel=Cloud_Draft_v6.Compute where Compute.event_name=RunInstances + as dest from datamodel=Cloud_Infrastructure.Compute where Compute.event_name=RunInstances `previously_seen_cloud_compute_instance_types_input_filter` by Compute.instance_type, Compute.src_user | `drop_dm_object_name("Compute")` | inputlookup append=t previously_seen_cloud_compute_instance_types | stats min(firstTime) as firstTime max(lastTime) as lastTime, values(dest) as dest by instance_type, src_user | multireport [| table instance_type, firstTime, lastTime | outputlookup previously_seen_cloud_compute_instance_types | where fact=fiction][| eval new_type=if(firstTime >= relative_time(now(), - "-70m@m"), 1, 0) | where new_type=1 | convert ctime(firstTime) ctime(lastTime)] + `previously_seen_cloud_compute_instance_types_search_window_begin_offset`), 1, 0) + | where new_type=1 | convert ctime(firstTime) ctime(lastTime)] | table instance_type, dest, src_user, firstTime, lastTime' suppress: suppress_fields: dest suppress_period: 14400s -eli5: The search returns the first time seen, last time seen, and the systems for - each instance type and user. It then appends the historical data and merges it into +eli5: For each instance type and user, the search returns the first time seen, last time seen, and the system. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each instance - type back to the lookup file and then clears out any output. The other part of the + type back to the lookup file and clears out any output. The other part of the search limits the results to when the instance type was seen for the first time - no longer than 70 minutes previously. It then displays the new instance type, the + within the previous 70 minutes. It then displays the new instance type, the instances created using it, the user who created them, and the times associated. entities: - dest - src_user -how_to_implement: You must be ingesting the approrpiate cloud infrastructure logs - and have the Security Research cloud data model installed. Run the "Previously Seen - Cloud Regions" support search to create of baseline of previously seen regions. +how_to_implement: You must be ingesting the appropriate cloud-infrastructure logs + and have the Security Research cloud data model (https://github.com/splunk/cloud-datamodel-security-research/) + installed. Run the " Previously Seen Cloud Compute Instance Types" support search + to create a baseline of previously seen regions. id: c6ddbf53-9715-49f3-bb4c-fb2e8a309cda investigations: - id: 2ef6310f-8e79-42af-b20b-b4eeaba9608a @@ -74,7 +76,7 @@ investigations: name: Investigate Cloud Compute Instance Activities type: splunk known_false_positives: It is possible that an admin will create a new system using - a new instance type never used before. Verify with the creator that they intended + a new instance type that has never been used before. Verify with the creator that they intended to create the system with the new instance type. maintainers: - company: Splunk diff --git a/detections/cscript_via_cmd.yml b/detections/cscript_via_cmd.yml index 772fb7fdc2..f5d4a8abf1 100644 --- a/detections/cscript_via_cmd.yml +++ b/detections/cscript_via_cmd.yml @@ -50,6 +50,8 @@ eli5: Attackers often leverage various scripting languages to execute their atta information. entities: - dest + - process_name + - user how_to_implement: To successfully implement this search, you must be ingesting data that records process activity from your hosts to populate the endpoint data model in the processes node. If you are using Sysmon, you must have at least version 6.0.4 diff --git a/detections/first_time_seen_cmd_line.yml b/detections/first_time_seen_cmd_line.yml index 987f7bba6e..2e8c7072dc 100644 --- a/detections/first_time_seen_cmd_line.yml +++ b/detections/first_time_seen_cmd_line.yml @@ -59,6 +59,8 @@ eli5: The subsearch returns all events where `cmd.exe` was used with a `/c` para user, destination, process, parent process, and value of the command-line argument. entities: - dest + - process_name + - user how_to_implement: You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must be ingesting logs with both the process name and command line from your endpoints. The complete diff --git a/detections/local_admin_account_creation.yml b/detections/local_admin_account_creation.yml index a190fdd429..7823101d52 100644 --- a/detections/local_admin_account_creation.yml +++ b/detections/local_admin_account_creation.yml @@ -27,7 +27,7 @@ detect: earliest_time: -1440m@m latest_time: -10m@m search: eventtype = wineventlog_security signature_id=4720 OR (signature_id=4732 - Group_Name= Administrators) | transaction Security_ID maxspan=180m | search + Group_Name= Administrators) | transaction Security_ID connected=false maxspan=180m | search signature_id=4720 signature_id=4732 | table _time user dest signature_id Security_ID Group_Name src_user Message suppress: diff --git a/detections/malicious_powershell_process_connect_to_internet_with_hidden_window.yml b/detections/malicious_powershell_process_connect_to_internet_with_hidden_window.yml index 733424576e..074bc2a750 100644 --- a/detections/malicious_powershell_process_connect_to_internet_with_hidden_window.yml +++ b/detections/malicious_powershell_process_connect_to_internet_with_hidden_window.yml @@ -57,6 +57,8 @@ eli5: This search looks for PowerShell processes running with specific command-l this process. entities: - dest + - process_name + - user how_to_implement: You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. diff --git a/detections/malicious_powershell_process_encoded_command.yml b/detections/malicious_powershell_process_encoded_command.yml index fc6ed10afb..9eb480c05f 100644 --- a/detections/malicious_powershell_process_encoded_command.yml +++ b/detections/malicious_powershell_process_encoded_command.yml @@ -49,6 +49,8 @@ eli5: This search looks for PowerShell processes that are passing encoded comman it saw this process. entities: - dest + - process_name + - user how_to_implement: You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. diff --git a/detections/malicious_powershell_process_multiple_suspicious_arguments.yml b/detections/malicious_powershell_process_multiple_suspicious_arguments.yml index 8ea7a7e2fa..d3dde5c623 100644 --- a/detections/malicious_powershell_process_multiple_suspicious_arguments.yml +++ b/detections/malicious_powershell_process_multiple_suspicious_arguments.yml @@ -58,6 +58,8 @@ eli5: This search looks for PowerShell processes that have a number of suspiciou this process. entities: - dest + - process_name + - user how_to_implement: You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. diff --git a/detections/prohibited_apps_spawning_cmdprompt.yml b/detections/prohibited_apps_spawning_cmdprompt.yml index d9506260d8..9a8c5939f6 100644 --- a/detections/prohibited_apps_spawning_cmdprompt.yml +++ b/detections/prohibited_apps_spawning_cmdprompt.yml @@ -39,10 +39,10 @@ detect: cron_schedule: 0 * * * * earliest_time: -70m@m latest_time: -10m@m - search: '| tstats `summariesonly` count values(Processes.user) as user values(Processes.process) + search: '| tstats `summariesonly` count values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=cmd.exe by Processes.parent_process_name Processes.process_name - Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` + Processes.dest Processes.user| `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` |search [`prohibited_apps_launching_cmd`]' suppress: suppress_fields: dest, parent_process @@ -58,6 +58,8 @@ eli5: Obtaining access to the Command-Line Interface (CLI) is typically a primar that are being watched for execution of cmd.exe. entities: - dest + - process_name + - user how_to_implement: You must be ingesting data that records process activity from your hosts and populates the Endpoint data model with the resultant dataset. This search includes a lookup file, `prohibited_apps_launching_cmd.csv`, that contains a list diff --git a/detections/remote_desktop_bruteforce.yml b/detections/remote_desktop_bruteforce.yml index 81c36ea890..e301d3ce2b 100644 --- a/detections/remote_desktop_bruteforce.yml +++ b/detections/remote_desktop_bruteforce.yml @@ -33,7 +33,7 @@ detect: search: '| tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Traffic where All_Traffic.app=rdp by All_Traffic.src All_Traffic.dest All_Traffic.dest_port | eventstats stdev(count) AS stdev - avg(count) AS avg p50(count) AS p50| where count>(stdev*2) | rename All_Traffic.src + avg(count) AS avg p50(count) AS p50 | where count>(avg + stdev*2) | rename All_Traffic.src AS src All_Traffic.dest AS dest | table firstTime lastTime src dest count avg p50 stdev' suppress: diff --git a/detections/short_lived_accounts.yml b/detections/short_lived_accounts.yml index 053458e6b6..155bea0fef 100644 --- a/detections/short_lived_accounts.yml +++ b/detections/short_lived_accounts.yml @@ -32,7 +32,7 @@ detect: where All_Changes.result_id=4720 OR All_Changes.result_id=4726 by _time span=4h All_Changes.user All_Changes.dest | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name("All_Changes")` | search result_id = 4720 result_id=4726 - | transaction user maxspan=240m | table firstTime lastTime count user dest + | transaction user connected=false maxspan=240m | table firstTime lastTime count user dest result_id' suppress: suppress_fields: user diff --git a/detections/sncd_processes.yml b/detections/sncd_processes.yml index 3d9b868b53..570dc7d88d 100644 --- a/detections/sncd_processes.yml +++ b/detections/sncd_processes.yml @@ -37,7 +37,7 @@ detect: max(_time) as lastTime from datamodel=Endpoint.Processes by Processes.dest Processes.process_name Processes.user _time | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name(Processes)` | search `system_network_configuration_discovery_tools` - | transaction dest maxpause=5m |where eventcount>=5 | table firstTime lastTime + | transaction dest connected=false maxpause=5m |where eventcount>=5 | table firstTime lastTime dest user process_name process parent_process eventcount' suppress: suppress_fields: dest,user diff --git a/detections/unusually_long_commandlines.yml b/detections/unusually_long_commandlines.yml index f2ac4bacc5..75058ee099 100644 --- a/detections/unusually_long_commandlines.yml +++ b/detections/unusually_long_commandlines.yml @@ -47,6 +47,8 @@ eli5: This search calculates the average and standard deviation for the length o command line. entities: - dest + - process_name + - user how_to_implement: You must be ingesting endpoint data that tracks process activity, including parent-child relationships, from your endpoints to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the "process" diff --git a/detections/unusually_long_commandlines_mltk.yml b/detections/unusually_long_commandlines_mltk.yml index 1477c64a65..7d267e6c87 100644 --- a/detections/unusually_long_commandlines_mltk.yml +++ b/detections/unusually_long_commandlines_mltk.yml @@ -35,15 +35,9 @@ detect: cron_schedule: 0 * * * * earliest_time: -70m@m latest_time: -10m@m - search: '| tstats `summariesonly` count min(_time) as start_time max(_time) - as end_time FROM datamodel=Endpoint.Processes by Processes.user Processes.dest - Processes.process_name Processes.process | `drop_dm_object_name(Processes)` - | `ctime(firstTime)`| `ctime(lastTime)`| eval processlen=len(process) | search - user!=unknown | apply cmdline_pdfmodel threshold=0.01 | rename "IsOutlier(processlen)" - as isOutlier | search isOutlier > 0 | table start_time end_time user dest - process_name process processlen count' + search: '| tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes by Processes.user Processes.dest Processes.process_name Processes.process | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)`| eval processlen=len(process) | search user!=unknown | apply cmdline_pdfmodel threshold=0.01 | rename "IsOutlier(processlen)" as isOutlier | search isOutlier > 0 | table firstTime lastTime user dest process_name process processlen count' suppress: - suppress_fields: dest,user,process + suppress_fields: dest,user,process_name suppress_period: 28800s eli5: This search leverages the Machine Learning Toolkit (MLTK) to identify outliers in the length of the command lines observed to be used by a specific user. The companion @@ -53,6 +47,8 @@ eli5: This search leverages the Machine Learning Toolkit (MLTK) to identify outl More information on the algorithm used can be found at `https://docs.splunk.com/Documentation/MLApp/4.2.0/User/Algorithms#DensityFunction`. entities: - dest + - process_name + - user how_to_implement: You must be ingesting endpoint data that monitors command lines and populates the Endpoint data model in the Processes node. The command-line arguments are mapped to the "process" field in the Endpoint data model. In addition, MLTK diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md new file mode 100644 index 0000000000..07b9599d70 --- /dev/null +++ b/docs/CONTRIBUTING.md @@ -0,0 +1,130 @@ +# Contributing to the Project + +This document is the single source of truth on how to contribute to this codebase. Please feel free to browse the open issues and file new ones. All feedback is welcome! + +---- + +## Topics + +* [Prerequisites](#prerequisites) + * [Contributor License Agreement](#contributor-license-agreement) + * [Code of Conduct](#code-of-conduct) + * [Setup Development Environment](#setup-development-environment) +* [Contribution Workflow](#contribution-workflow) + * [Feature Requests and Bug Reports](#feature-requests-and-bug-reports) + * [Fixing Issues](#fixing-issues) + * [Pull Requests](#pull-requests) + * [Code Review](#code-review) + * [Documentation](#documentation) +* [Maintainers](#maintainers) + +---- + +## Prerequisites +When contributing to this repository, please first discuss the change you wish to make via a GitHub issue, Slack message, email, or via other channels with the owners of this repository. + +##### Contributor License Agreement +At the moment, we can only accept pull requests submitted from either: +* Splunk employees or +* Individuals that have signed our contributors' agreement + +If you wish to be a contributing member of our community, please see the agreement [for individuals](https://www.splunk.com/goto/individualcontributions) or [for organizations](https://www.splunk.com/goto/contributions). + +##### Code of Conduct +Please make sure to read and observe our [Code of Conduct](contributing/code-of-conduct.md). Please follow it in all of your interactions involving the project. + +##### Setup Development Environment +see [Developing section](README.MD/#Developing) + +## Contribution Workflow +Help is always welcome! For example, documentation can always use improvement. There's always code that can be clarified, functionality that can be extended, and tests to be added to guarantee behavior. If you see something you think should be fixed, don't be afraid to own it. + +##### Feature Requests and Bug Reports +Have ideas on improvements? See something that needs work? While the community encourages everyone to contribute code, it is also appreciated when someone reports an issue. Please report any issues or bugs you find through [GitHub's issue tracker](https://github.com/splunk/analytic_story_execution/issues). + +If you are reporting a bug, please include: + +* Your operating system name and version +* Any details about your local setup that might be helpful in troubleshooting (ex. Python interpreter version, Splunk version, etc.) +* Detailed steps to reproduce the bug + +We'd also like to hear about your propositions and suggestions. Feel free to submit them as issues and: + +* Explain in detail how they should work +* Note that keeping the scope as narrow as possible will make the suggestion easier to implement + +##### Fixing Issues +Look through our [issue tracker](https://github.com/splunk/analytic_story_execution/issues) to find problems to fix! Feel free to comment and tag corresponding stakeholders or full-time maintainers of this project with any questions or concerns. + +##### Pull Requests +What is a "pull request"? It informs the project's core developers about the changes you want to review and merge. Once you submit a pull request, it enters a stage of code review where you and others can discuss its potential modifications and maybe even add more commits to it later on. + +If you want to learn more, please consult this [tutorial on how pull requests work](https://help.github.com/articles/using-pull-requests/) in the [GitHub Help Center](https://help.github.com/). + +Here's an overview of how you can make a pull request against this project: + +1. Fork the [analytic\_story\_execution GitHub repository](https://github.com/splunk/analytic_story_execution/issues) +2. Clone your fork using git and create a branch off of develop + + ``` + $ git clone git@github.com:YOUR_GITHUB_USERNAME/analytic_story_execution.git + $ cd analytic_story_execution + + # This project uses 'develop' for all development activity, so create your branch off that + $ git checkout -b your-bugfix-branch-name develop + ``` + +3. Make your changes, commit, and push (once your tests have passed) + + ``` + $ cd analytic_story_execution + $ git commit -m "" + $ git push + ``` + +4. Submit a pull request through the GitHub website, using the changes from your forked codebase + +##### Code Review +There are two aspects of code review: giving and receiving. + +To make it easier for your PR to receive reviews, keep in mind that the reviewers will need you to: +* Follow the project coding conventions +* Write good commit messages +* Break large changes into a logical series of smaller patches which individually make easily understandable changes, and in aggregate solve a broader issue + +Reviewers, the people providing the review, are highly encouraged to revisit the [Code of Conduct](contributing/code-of-conduct.md) and must go above and beyond to promote a collaborative, respectful community. + +When reviewing PRs from others, [The Gentle Art of Patch Review](http://sage.thesharps.us/2014/09/01/the-gentle-art-of-patch-review/) suggests an iterative series of focuses designed to lead new contributors to positive collaboration, such as: + +* Is the idea behind the contribution sound? +* Is the contribution architected correctly? +* Is the contribution polished? + +For this project, we require at least one approval. A build from our continuous integration system must also be successful off of your branch. Please note that any new changes made with your existing pull request during review will automatically unapprove and retrigger another build/round of tests. + +##### Documentation +We can always use improvements to our documentation! Anyone can contribute to these docs--whether you’re new to the project, you’ve been around a long time, or if you just can’t stand seeing typos. + +Here's what's needed? + +1. More complementary documentation. Have you something unclear? +2. More examples or generic templates that others can use. +3. Blog posts, articles, and such are all very appreciated. + +You can also edit documentation files directly in the GitHub web interface, without creating a local copy. This can be convenient for small typos or grammar fixes. + +## Maintainers + +If you need help, feel free to tag one of the active maintainers of this project in a post or comment. We'll do our best to reach out to you as quickly as we can. + +``` +# Active maintainers marked with (*) + +(*) Bhavin Patel +(*) David Dorsey +(*) Jose Hernandez +(*) Rico Valdez +(*) Patrick Bareib +(*) Brianna Blacet +``` + diff --git a/docs/baselines.spec.json b/docs/baselines.spec.json index 5082dbb2a3..ed0d1604c5 100644 --- a/docs/baselines.spec.json +++ b/docs/baselines.spec.json @@ -178,6 +178,7 @@ "Certificates", "Change_Analysis", "Change", + "Cloud_Infrastructure", "Malware", "Email", "Identity_Management", diff --git a/docs/baselines.spec.md b/docs/baselines.spec.md index f0199e5022..3ed4dbead0 100644 --- a/docs/baselines.spec.md +++ b/docs/baselines.spec.md @@ -215,6 +215,7 @@ Unknown type ``. "Certificates", "Change_Analysis", "Change", + "Cloud_Infrastructure", "Malware", "Email", "Identity_Management", @@ -234,6 +235,7 @@ Unknown type ``. "Authentication": "", "Certificates": "", "Change_Analysis": "", + "Cloud_Infrastructure": "", "Change": "", "Malware": "", "Email": "", diff --git a/docs/detections.spec.json b/docs/detections.spec.json index e181965969..4f4f9250b7 100644 --- a/docs/detections.spec.json +++ b/docs/detections.spec.json @@ -544,6 +544,7 @@ "Certificates", "Change_Analysis", "Change", + "Cloud_Infrastructure", "Malware", "Email", "Identity_Management", diff --git a/docs/detections.spec.md b/docs/detections.spec.md index a063728d96..6fdfd19620 100644 --- a/docs/detections.spec.md +++ b/docs/detections.spec.md @@ -332,6 +332,7 @@ Unknown type ``. "Certificates", "Change_Analysis", "Change", + "Cloud_Infrastructure", "Malware", "Email", "Identity_Management", @@ -352,6 +353,7 @@ Unknown type ``. "Certificates": "", "Change_Analysis": "", "Change": "", + "Cloud_Infrastructure": "", "Malware": "", "Email": "", "Identity_Management": "", diff --git a/docs/investigations.spec.json b/docs/investigations.spec.json index 92f6ffc76c..c597b8b8a1 100644 --- a/docs/investigations.spec.json +++ b/docs/investigations.spec.json @@ -117,6 +117,7 @@ "Certificates", "Change_Analysis", "Change", + "Cloud_Infrastructure", "Malware", "Email", "Identity_Management", diff --git a/docs/investigations.spec.md b/docs/investigations.spec.md index 2c75ce0953..9a3a5513d7 100644 --- a/docs/investigations.spec.md +++ b/docs/investigations.spec.md @@ -138,6 +138,7 @@ Unknown type ``. "Certificates", "Change_Analysis", "Change", + "Cloud_Infrastructure", "Malware", "Email", "Identity_Management", @@ -158,6 +159,7 @@ Unknown type ``. "Certificates": "", "Change_Analysis": "", "Change": "", + "Cloud_Infrastructure": "", "Malware": "", "Email": "", "Identity_Management": "", diff --git a/docs/splunk_docs_categories.wiki b/docs/splunk_docs_categories.wiki index e913d7cd33..c0adcfda37 100644 --- a/docs/splunk_docs_categories.wiki +++ b/docs/splunk_docs_categories.wiki @@ -12,7 +12,9 @@ Track when a user assumes an IAM role in another AWS account to obtain cross-acc
====Narrative==== -Amazon Web Services (AWS) admins manage access to AWS resources and services across the enterprise using AWS's Identity and Access Management (IAM) functionality. IAM provides the ability to create and manage AWS users, groups, and roles-each with their own unique set of privileges and defined access to specific resources (such as EC2 instances, the AWS Management Console, API, or the command-line interface). Unlike conventional (human) users, IAM roles are assumable by anyone in the organization. They provide users with dynamically created temporary security credentials that expire within a set time period.

Herein lies the rub. In between the time between when the temporary credentials are issued and when they expire is a period of opportunity, where a user could leverage the temporary credentials to wreak havoc-spin up or remove instances, create new users, elevate privileges, and other malicious activities-throughout the environment.

This Analytic Story includes searches that will help you monitor your AWS CloudTrail logs for evidence of suspicious cross-account activity. For example, while accessing multiple AWS accounts and roles may be perfectly valid behavior, it may be suspicious when an account requests privileges of an account it has not accessed in the past. After identifying suspicious activities, you can use the provided investigative searches to help you probe more deeply. +Amazon Web Services (AWS) admins manage access to AWS resources and services across the enterprise using AWS's Identity and Access Management (IAM) functionality. IAM provides the ability to create and manage AWS users, groups, and roles-each with their own unique set of privileges and defined access to specific resources (such as EC2 instances, the AWS Management Console, API, or the command-line interface). Unlike conventional (human) users, IAM roles are assumable by anyone in the organization. They provide users with dynamically created temporary security credentials that expire within a set time period.\ +Herein lies the rub. In between the time between when the temporary credentials are issued and when they expire is a period of opportunity, where a user could leverage the temporary credentials to wreak havoc-spin up or remove instances, create new users, elevate privileges, and other malicious activities-throughout the environment.\ +This Analytic Story includes searches that will help you monitor your AWS CloudTrail logs for evidence of suspicious cross-account activity. For example, while accessing multiple AWS accounts and roles may be perfectly valid behavior, it may be suspicious when an account requests privileges of an account it has not accessed in the past. After identifying suspicious activities, you can use the provided investigative searches to help you probe more deeply. ====Providing Technologies==== * AWS @@ -60,7 +62,10 @@ Monitor your AWS EC2 instances for activities related to cryptojacking/cryptomin
====Narrative==== -Cryptomining is an intentionally difficult, resource-intensive business. Its complexity was designed into the process to ensure that the number of blocks mined each day would remain steady. So, it's par for the course that ambitious, but unscrupulous, miners make amassing the computing power of large enterprises--a practice known as cryptojacking--a top priority.

Cryptojacking has attracted an increasing amount of media attention since its explosion in popularity in the fall of 2017. The attacks have moved from in-browser exploits and mobile phones to enterprise cloud services, such as Amazon Web Services (AWS). It's difficult to determine exactly how widespread the practice has become, since bad actors continually evolve their ability to escape detection, including employing unlisted endpoints, moderating their CPU usage, and hiding the mining pool's IP address behind a free CDN.

When malicious miners appropriate a cloud instance, often spinning up hundreds of new instances, the costs can become astronomical for the account holder. So, it is critically important to monitor your systems for suspicious activities that could indicate that your network has been infiltrated.

This Analytic Story is focused on detecting suspicious new instances in your EC2 environment to help prevent such a disaster. It contains detection searches that will detect when a previously unused instance type or AMI is used. It also contains support searches to build lookup files to ensure proper execution of the detection searches. +Cryptomining is an intentionally difficult, resource-intensive business. Its complexity was designed into the process to ensure that the number of blocks mined each day would remain steady. So, it's par for the course that ambitious, but unscrupulous, miners make amassing the computing power of large enterprises--a practice known as cryptojacking--a top priority. \ +Cryptojacking has attracted an increasing amount of media attention since its explosion in popularity in the fall of 2017. The attacks have moved from in-browser exploits and mobile phones to enterprise cloud services, such as Amazon Web Services (AWS). It's difficult to determine exactly how widespread the practice has become, since bad actors continually evolve their ability to escape detection, including employing unlisted endpoints, moderating their CPU usage, and hiding the mining pool's IP address behind a free CDN. \ +hen malicious miners appropriate a cloud instance, often spinning up hundreds of new instances, the costs can become astronomical for the account holder. So, it is critically important to monitor your systems for suspicious activities that could indicate that your network has been infiltrated. \ +This Analytic Story is focused on detecting suspicious new instances in your EC2 environment to help prevent such a disaster. It contains detection searches that will detect when a previously unused instance type or AMI is used. It also contains support searches to build lookup files to ensure proper execution of the detection searches. ====Providing Technologies==== * AWS @@ -157,7 +162,8 @@ Monitor your AWS provisioning activities for behaviors originating from unfamili
====Narrative==== -Because most enterprise AWS activities originate from familiar geographic locations, monitoring for activity from unknown or unusual regions is an important security measure. This indicator can be especially useful in environments where it is impossible to whitelist specific IPs (because they vary).
This Analytic Story was designed to provide you with flexibility in the precision you employ in specifying legitimate geographic regions. It can be as specific as an IP address or a city, or as broad as a region (think state) or an entire country. By determining how precise you want your geographical locations to be and monitoring for new locations that haven't previously accessed your environment, you can detect adversaries as they begin to probe your environment. Since there are legitimate reasons for activities from unfamiliar locations, this is not a standalone indicator. Nevertheless, location can be a relevant piece of information that you may wish to investigate further. +Because most enterprise AWS activities originate from familiar geographic locations, monitoring for activity from unknown or unusual regions is an important security measure. This indicator can be especially useful in environments where it is impossible to whitelist specific IPs (because they vary).\ +This Analytic Story was designed to provide you with flexibility in the precision you employ in specifying legitimate geographic regions. It can be as specific as an IP address or a city, or as broad as a region (think state) or an entire country. By determining how precise you want your geographical locations to be and monitoring for new locations that haven't previously accessed your environment, you can detect adversaries as they begin to probe your environment. Since there are legitimate reasons for activities from unfamiliar locations, this is not a standalone indicator. Nevertheless, location can be a relevant piece of information that you may wish to investigate further. ====Providing Technologies==== * AWS @@ -205,7 +211,10 @@ Detect and investigate dormant user accounts for your AWS environment that have
====Narrative==== -It seems obvious that it is critical to monitor and control the users who have access to your cloud infrastructure. Nevertheless, it's all too common for enterprises to lose track of ad-hoc accounts, leaving their servers vulnerable to attack. In fact, this was the very oversight that led to Tesla's cryptojacking attack in February, 2018.

In addition to compromising the security of your data, when bad actors leverage your compute resources, it can incur monumental costs, since you will be billed for any new EC2 instances and increased bandwidth usage.

Fortunately, you can leverage Amazon Web Services (AWS) CloudTrail--a tool that helps you enable governance, compliance, and risk auditing of your AWS account--to give you increased visibility into your user and resource activity by recording AWS Management Console actions and API calls. You can identify which users and accounts called AWS, the source IP address from which the calls were made, and when the calls occurred.

The detection searches in this Analytic Story are designed to help you uncover AWS API activities from users not listed in the identity table, as well as similar activities from disabled accounts. +It seems obvious that it is critical to monitor and control the users who have access to your cloud infrastructure. Nevertheless, it's all too common for enterprises to lose track of ad-hoc accounts, leaving their servers vulnerable to attack. In fact, this was the very oversight that led to Tesla's cryptojacking attack in February, 2018.\ +In addition to compromising the security of your data, when bad actors leverage your compute resources, it can incur monumental costs, since you will be billed for any new EC2 instances and increased bandwidth usage. \ +Fortunately, you can leverage Amazon Web Services (AWS) CloudTrail--a tool that helps you enable governance, compliance, and risk auditing of your AWS account--to give you increased visibility into your user and resource activity by recording AWS Management Console actions and API calls. You can identify which users and accounts called AWS, the source IP address from which the calls were made, and when the calls occurred.\ +The detection searches in this Analytic Story are designed to help you uncover AWS API activities from users not listed in the identity table, as well as similar activities from disabled accounts. ====Providing Technologies==== * AWS @@ -246,6 +255,60 @@ version = 1.0
+===Cloud Cryptomining=== + +Monitor your cloud compute instances for activities related to cryptojacking/cryptomining. New instances that originate from previously unseen regions, users who launch abnormally high numbers of instances, or compute instances started by previously unseen users are just a few examples of potentially malicious behavior. + +
+
+ +====Narrative==== +Cryptomining is an intentionally difficult, resource-intensive business. Its complexity was designed into the process to ensure that the number of blocks mined each day would remain steady. So, it's par for the course that ambitious, but unscrupulous, miners make amassing the computing power of large enterprises--a practice known as cryptojacking--a top priority. \ +Cryptojacking has attracted an increasing amount of media attention since its explosion in popularity in the fall of 2017. The attacks have moved from in-browser exploits and mobile phones to enterprise cloud services, such as Amazon Web Services (AWS), Google Cloud Platform (GCP), and Azure. It's difficult to determine exactly how widespread the practice has become, since bad actors continually evolve their ability to escape detection, including employing unlisted endpoints, moderating their CPU usage, and hiding the mining pool's IP address behind a free CDN. \ +When malicious miners appropriate a cloud instance, often spinning up hundreds of new instances, the costs can become astronomical for the account holder. So it is critically important to monitor your systems for suspicious activities that could indicate that your network has been infiltrated. \ +This Analytic Story is focused on detecting suspicious new instances in your cloud environment to help prevent cryptominers from gaining a foothold. It contains detection searches that will detect when a previously unused instance type or AMI is used. It also contains support searches to build lookup files to ensure proper execution of the detection searches. + +====Providing Technologies==== +* AWS +* Azure +* GCP + +====Data Models==== +* Cloud_Infrastructure + +====Mappings==== + +=====ATT&CK===== +* Command and Control +* Exfiltration + +=====Kill Chain Phases===== +* Command and Control + +=====CIS===== +* CIS 3 +* CIS 8 +* CIS 12 + +=====NIST===== +* PR.IP +* PR.PT +* PR.AC +* DE.AE +* DE.CM + +====References==== +* https://d0.awsstatic.com/whitepapers/aws-security-best-practices.pdf + +creation_date = 2019-10-02 + +modification_date = 2019-10-02 + +version = 1.0 + +
+
+ ===Suspicious AWS EC2 Activities=== Use the searches in this Analytic Story to monitor your AWS EC2 instances for evidence of anomalous activity and suspicious behaviors, such as EC2 instances that originate from unusual locations or those launched by previously unseen users (among others). Included investigative searches will help you probe more deeply, when the information warrants it. @@ -350,7 +413,9 @@ Use the searches in this Analytic Story to monitor your AWS S3 buckets for evide
====Narrative==== -As cloud computing has exploded, so has the number of creative attacks on virtual environments. And as the number-two cloud-service provider, Amazon Web Services (AWS) has certainly had its share.

Amazon's "shared responsibility" model dictates that the company has responsibility for the environment outside of the VM and the customer is responsible for the security inside of the S3 container. As such, it's important to stay vigilant for activities that may belie suspicious behavior inside of your environment.

Among things to look out for are S3 access from unfamiliar locations and by unfamiliar users. Some of the searches in this Analytic Story help you detect suspicious behavior and others help you investigate more deeply, when the situation warrants. +As cloud computing has exploded, so has the number of creative attacks on virtual environments. And as the number-two cloud-service provider, Amazon Web Services (AWS) has certainly had its share.\ +Amazon's "shared responsibility" model dictates that the company has responsibility for the environment outside of the VM and the customer is responsible for the security inside of the S3 container. As such, it's important to stay vigilant for activities that may belie suspicious behavior inside of your environment.\ +Among things to look out for are S3 access from unfamiliar locations and by unfamiliar users. Some of the searches in this Analytic Story help you detect suspicious behavior and others help you investigate more deeply, when the situation warrants. ====Providing Technologies==== * AWS @@ -399,7 +464,10 @@ Leverage these searches to monitor your AWS network traffic for evidence of anom
====Narrative==== -A virtual private cloud (VPC) is an on-demand managed cloud-computing service that isolates computing resources for each client. Inside the VPC container, the environment resembles a physical network.

Amazon's VPC service enables you to launch EC2 instances and leverage other Amazon resources. The traffic that flows in and out of this VPC can be controlled via network access-control rules and security groups. Amazon also has a feature called VPC Flow Logs that enables you to log IP traffic going to and from the network interfaces in your VPC. This data is stored using Amazon CloudWatch Logs.

Attackers may abuse the AWS infrastructure with insecure VPCs so they can co-opt AWS resources for command-and-control nodes, data exfiltration, and more. Once an EC2 instance is compromised, an attacker may initiate outbound network connections for malicious reasons. Monitoring these network traffic behaviors is crucial for understanding the type of traffic flowing in and out of your network and to alert you to suspicious activities.

The searches in this Analytic Story will monitor your AWS network traffic for evidence of anomalous activity and suspicious behaviors. +A virtual private cloud (VPC) is an on-demand managed cloud-computing service that isolates computing resources for each client. Inside the VPC container, the environment resembles a physical network. \ +Amazon's VPC service enables you to launch EC2 instances and leverage other Amazon resources. The traffic that flows in and out of this VPC can be controlled via network access-control rules and security groups. Amazon also has a feature called VPC Flow Logs that enables you to log IP traffic going to and from the network interfaces in your VPC. This data is stored using Amazon CloudWatch Logs.\ + Attackers may abuse the AWS infrastructure with insecure VPCs so they can co-opt AWS resources for command-and-control nodes, data exfiltration, and more. Once an EC2 instance is compromised, an attacker may initiate outbound network connections for malicious reasons. Monitoring these network traffic behaviors is crucial for understanding the type of traffic flowing in and out of your network and to alert you to suspicious activities.\ +The searches in this Analytic Story will monitor your AWS network traffic for evidence of anomalous activity and suspicious behaviors. ====Providing Technologies==== * AWS @@ -447,7 +515,8 @@ Identify unusual changes to your AWS EC2 instances that may indicate malicious a
====Narrative==== -A common attack technique is to infiltrate a cloud instance and make modifications. The adversary can then secure access to your infrastructure or hide their activities. So it's important to stay alert to changes that may indicate that your environment has been compromised.

Searches within this Analytic Story can help you detect the presence of a threat by monitoring for EC2 instances that have been created or changed--either by users that have never previously performed these activities or by known users who modify or create instances in a way that have not been done before. This story also provides investigative searches that help you go deeper once you detect suspicious behavior. +A common attack technique is to infiltrate a cloud instance and make modifications. The adversary can then secure access to your infrastructure or hide their activities. So it's important to stay alert to changes that may indicate that your environment has been compromised. \ + Searches within this Analytic Story can help you detect the presence of a threat by monitoring for EC2 instances that have been created or changed--either by users that have never previously performed these activities or by known users who modify or create instances in a way that have not been done before. This story also provides investigative searches that help you go deeper once you detect suspicious behavior. ====Providing Technologies==== * AWS @@ -647,7 +716,8 @@ Identify and investigate prohibited/unauthorized software or processes that may
====Narrative==== -It is critical to identify unauthorized software and processes running on enterprise endpoints and determine whether they are likely to be malicious. This Analytic Story requires the user to populate the Interesting Processes table within Enterprise Security with prohibited processes. An included support search will augment this data, adding information on processes thought to be malicious. This search requires data from endpoint detection-and-response solutions, endpoint data sources (such as Sysmon), or Windows Event Logs--assuming that the Active Directory administrator has enabled process tracking within the System Event Audit Logs.

It is important to investigate any software identified as suspicious, in order to understand how it was installed or executed. Analyzing authentication logs or any historic notable events might elicit additional investigative leads of interest. For best results, schedule the search to run every two weeks. +It is critical to identify unauthorized software and processes running on enterprise endpoints and determine whether they are likely to be malicious. This Analytic Story requires the user to populate the Interesting Processes table within Enterprise Security with prohibited processes. An included support search will augment this data, adding information on processes thought to be malicious. This search requires data from endpoint detection-and-response solutions, endpoint data sources (such as Sysmon), or Windows Event Logs--assuming that the Active Directory administrator has enabled process tracking within the System Event Audit Logs.\ +It is important to investigate any software identified as suspicious, in order to understand how it was installed or executed. Analyzing authentication logs or any historic notable events might elicit additional investigative leads of interest. For best results, schedule the search to run every two weeks. ====Providing Technologies==== * Carbon Black Response @@ -700,7 +770,9 @@ Monitor your enterprise to ensure that your endpoints are being patched and upda
====Narrative==== -It is a common best practice to ensure that endpoints are being patched and updated in a timely manner, in order to reduce the risk of compromise via a publicly disclosed vulnerability. Timely application of updates/patches is important to eliminate known vulnerabilities that may be exploited by various threat actors.

Searches in this analytic story are designed to help analysts monitor endpoints for system patches and/or updates. This helps analysts identify any systems that are not successfully updated in a timely matter.

Microsoft releases updates for Windows systems on a monthly cadence. They should be installed as soon as possible after following internal testing and validation procedures. Patches and updates for other systems or applications are typically released as needed. +It is a common best practice to ensure that endpoints are being patched and updated in a timely manner, in order to reduce the risk of compromise via a publicly disclosed vulnerability. Timely application of updates/patches is important to eliminate known vulnerabilities that may be exploited by various threat actors.\ +Searches in this analytic story are designed to help analysts monitor endpoints for system patches and/or updates. This helps analysts identify any systems that are not successfully updated in a timely matter.\ +Microsoft releases updates for Windows systems on a monthly cadence. They should be installed as soon as possible after following internal testing and validation procedures. Patches and updates for other systems or applications are typically released as needed. ====Providing Technologies==== * Microsoft Windows @@ -801,7 +873,8 @@ Validate the security configuration of network infrastructure and verify that on
====Narrative==== -Networking devices, such as routers and switches, are often overlooked as resources that attackers will leverage to subvert an enterprise. Advanced threats actors have shown a proclivity to target these critical assets as a means to siphon and redirect network traffic, flash backdoored operating systems, and implement cryptographic weakened algorithms to more easily decrypt network traffic.

This Analytic Story helps you gain a better understanding of how your network devices are interacting with your hosts. By compromising your network devices, attackers can obtain direct access to the company's internal infrastructure— effectively increasing the attack surface and accessing private services/data. +Networking devices, such as routers and switches, are often overlooked as resources that attackers will leverage to subvert an enterprise. Advanced threats actors have shown a proclivity to target these critical assets as a means to siphon and redirect network traffic, flash backdoored operating systems, and implement cryptographic weakened algorithms to more easily decrypt network traffic.\ +This Analytic Story helps you gain a better understanding of how your network devices are interacting with your hosts. By compromising your network devices, attackers can obtain direct access to the company's internal infrastructure— effectively increasing the attack surface and accessing private services/data. ====Providing Technologies==== * Active Directory @@ -899,13 +972,26 @@ version = 1.0 ===Apache Struts Vulnerability=== -Detect and investigate activities--such as unusually long Content-Type length, suspicious java classes and web servers executing suspicious processes--consistent with attempts to exploit Apache Struts vulnerabilities. +Detect and investigate activities--such as unusually long `Content-Type` length, suspicious java classes and web servers executing suspicious processes--consistent with attempts to exploit Apache Struts vulnerabilities.
====Narrative==== -In March of 2017, a remote code-execution vulnerability in the Jakarta Multipart parser in Apache Struts, a widely used open-source framework for creating Java web applications, was disclosed and assigned to CVE-2017-5638. About two months later, hackers exploited the flaw to carry out the world's 5th largest data breach. The target, credit giant Equifax, told investigators that it had become aware of the vulnerability two months before the attack.

The exploit involved manipulating the Content-Type HTTP header to execute commands embedded in the header.

This Analytic Story contains two different searches that help to identify activity that may be related to this issue. The first search looks for characteristics of the Content-Type header consistent with attempts to exploit the vulnerability. This should be a relatively pertinent indicator, as the Content-Type header is generally consistent and does not have a large degree of variation.

The second search looks for the execution of various commands typically entered on the command shell when an attacker first lands on a system. These commands are not generally executed on web servers during the course of day-to-day operation, but they may be used when the system is undergoing maintenance or troubleshooting.

First, it is helpful is to understand how often the notable event is generated, as well as the commonalities in some of these events. This may help determine whether this is a common occurrence that is of a lesser concern or a rare event that may require more extensive investigation. It can also help to understand whether the issue is restricted to a single user or system or is broader in scope.

When looking at the target of the behavior illustrated by the event, you should note the sensitivity of the user and or/system to help determine the potential impact. It is also helpful to see what other events involving the target have occurred in the recent past. This can help tie different events together and give further situational awareness regarding the target.

Various types of information for external systems should be reviewed and (potentially) collected if the incident is, indeed, judged to be malicious. Information like this can be useful in generating your own threat intelligence to create alerts in the future.

Looking at the country, responsible party, and fully qualified domain names associated with the external IP address--as well as the registration information associated with those domain names, if they are frequently visited by others--can help you answer the question of "who," in regard to the external system. Answering that can help qualify the event and may serve useful for tracking. In addition, there are various sources that can provide some reputation information on the IP address or domain name, which can assist in determining if the event is malicious in nature. Finally, determining whether or not there are other events associated with the IP address may help connect some dots or show other events that should be brought into scope.

Gathering various data elements on the system of interest can sometimes help quickly determine that something suspicious may be happening. Some of these items include determining who else may have recently logged into the system, whether any unusual scheduled tasks exist, whether the system is communicating on suspicious ports, whether there are modifications to sensitive registry keys, and whether there are any known vulnerabilities on the system. This information can often highlight other activity commonly seen in attack scenarios or give more information about how the system may have been targeted.

When a specific service or application is targeted, it is often helpful to know the associated version to help determine whether or not it is vulnerable to a specific exploit.

When it is suspected there is an attack targeting a web server, it is helpful to look at some of the behavior of the web service to see if there is evidence that the service has been compromised. Some indications of this might be network connections to external resources, the web service spawning child processes that are not associated with typical behavior, and whether the service wrote any files that might be malicious in nature.

In the event that a suspicious file is found, we can review more information about it to help determine if it is, in fact, malicious. Identifying the file type, any processes that have the file open, what processes created and/or modified the file, and the number of systems that may have this file can help to determine if the file is malicious. Also, determining the file hash and checking it against reputation sources, such as VirusTotal, can sometimes quickly help determine whether it is malicious in nature.

Often, a simple inspection of a suspect process name and path can tell you if the system has been compromised. For example, if svchost.exe is found running from a location other than C:\Windows\System32, it is likely something malicious designed to hide in plain sight when simply reviewing process names. Similarly, if the process itself seems legitimate, but the parent process is running from the temporary browser cache, there may be activity initiated via a compromised website the user visited.

It can also be very helpful to examine various behaviors of the process of interest or the parent of the process that is of interest. For example, if it turns out that the process of interest is malicious, it would be good to see if the parent to that process spawned other processes that might also be worth further scrutiny. If a process is suspect, reviewing the network connections made around the time of the event and/or if the process spawned any child processes could be helpful in determining whether it is malicious or executing a malicious script. +In March of 2017, a remote code-execution vulnerability in the Jakarta Multipart parser in Apache Struts, a widely used open-source framework for creating Java web applications, was disclosed and assigned to CVE-2017-5638. About two months later, hackers exploited the flaw to carry out the world's 5th largest data breach. The target, credit giant Equifax, told investigators that it had become aware of the vulnerability two months before the attack. \ +The exploit involved manipulating the `Content-Type HTTP` header to execute commands embedded in the header.\ +This Analytic Story contains two different searches that help to identify activity that may be related to this issue. The first search looks for characteristics of the `Content-Type` header consistent with attempts to exploit the vulnerability. This should be a relatively pertinent indicator, as the `Content-Type` header is generally consistent and does not have a large degree of variation.\ +The second search looks for the execution of various commands typically entered on the command shell when an attacker first lands on a system. These commands are not generally executed on web servers during the course of day-to-day operation, but they may be used when the system is undergoing maintenance or troubleshooting.\ +First, it is helpful is to understand how often the notable event is generated, as well as the commonalities in some of these events. This may help determine whether this is a common occurrence that is of a lesser concern or a rare event that may require more extensive investigation. It can also help to understand whether the issue is restricted to a single user or system or is broader in scope.\ +hen looking at the target of the behavior illustrated by the event, you should note the sensitivity of the user and or/system to help determine the potential impact. It is also helpful to see what other events involving the target have occurred in the recent past. This can help tie different events together and give further situational awareness regarding the target.\ +Various types of information for external systems should be reviewed and (potentially) collected if the incident is, indeed, judged to be malicious. Information like this can be useful in generating your own threat intelligence to create alerts in the future.\ +Looking at the country, responsible party, and fully qualified domain names associated with the external IP address--as well as the registration information associated with those domain names, if they are frequently visited by others--can help you answer the question of "who," in regard to the external system. Answering that can help qualify the event and may serve useful for tracking. In addition, there are various sources that can provide some reputation information on the IP address or domain name, which can assist in determining if the event is malicious in nature. Finally, determining whether or not there are other events associated with the IP address may help connect some dots or show other events that should be brought into scope.\ +Gathering various data elements on the system of interest can sometimes help quickly determine that something suspicious may be happening. Some of these items include determining who else may have recently logged into the system, whether any unusual scheduled tasks exist, whether the system is communicating on suspicious ports, whether there are modifications to sensitive registry keys, and whether there are any known vulnerabilities on the system. This information can often highlight other activity commonly seen in attack scenarios or give more information about how the system may have been targeted.\ +hen a specific service or application is targeted, it is often helpful to know the associated version to help determine whether or not it is vulnerable to a specific exploit.\ +hen it is suspected there is an attack targeting a web server, it is helpful to look at some of the behavior of the web service to see if there is evidence that the service has been compromised. Some indications of this might be network connections to external resources, the web service spawning child processes that are not associated with typical behavior, and whether the service wrote any files that might be malicious in nature.\ +In the event that a suspicious file is found, we can review more information about it to help determine if it is, in fact, malicious. Identifying the file type, any processes that have the file open, what processes created and/or modified the file, and the number of systems that may have this file can help to determine if the file is malicious. Also, determining the file hash and checking it against reputation sources, such as VirusTotal, can sometimes quickly help determine whether it is malicious in nature.\ +Often, a simple inspection of a suspect process name and path can tell you if the system has been compromised. For example, if `svchost.exe` is found running from a location other than `C:\Windows\System32`, it is likely something malicious designed to hide in plain sight when simply reviewing process names. Similarly, if the process itself seems legitimate, but the parent process is running from the temporary browser cache, there may be activity initiated via a compromised website the user visited.\ +It can also be very helpful to examine various behaviors of the process of interest or the parent of the process that is of interest. For example, if it turns out that the process of interest is malicious, it would be good to see if the parent to that process spawned other processes that might also be worth further scrutiny. If a process is suspect, reviewing the network connections made around the time of the event and/or if the process spawned any child processes could be helpful in determining whether it is malicious or executing a malicious script. ====Providing Technologies==== * Splunk Stream @@ -963,7 +1049,21 @@ In March of 2016, adversaries were seen using JexBoss--an open-source utility us
====Narrative==== -This Analytic Story looks for probing and exploitation attempts targeting JBoss application servers. While the vulnerabilities associated with this story are rather dated, they were leveraged in a spring 2016 campaign in connection with the Samsam ransomware variant. Incidents involving this ransomware are unique, in that they begin with attacks against vulnerable services, rather than the phishing or drive-by attacks more common with ransomware. In this case, vulnerable JBoss applications appear to be the target of choice.

It is helpful to understand how often a notable event generated by this story occurs, as well as the commonalities between some of these events, both of which may provide clues about whether this is a common occurrence of minimal concern or a rare event that may require more extensive investigation. It may also help to understand whether the issue is restricted to a single user/system or whether it is broader in scope.

When looking at the target of the behavior uncovered by the event, you should note the sensitivity of the user and or/system to help determine the potential impact. It is also helpful to identify other recent events involving the target. This can help tie different events together and give further situational awareness regarding the target host.

Various types of information for external systems should be reviewed and, potentially, collected if the incident is, indeed, judged to be malicious. This data may be useful for generating your own threat intelligence, so you can create future alerts.

The following factors may assist you in determining whether the event is malicious:
  • Country of origin
  • Responsible party
  • Fully qualified domain names associated with the external IP address
  • Registration of fully qualified domain names associated with external IP address
Determining whether it is a dynamic domain frequently visited by others and/or how third parties categorize it can also help you qualify and understand the event and possible motivation for the attack. In addition, there are various sources that may provide reputation information on the IP address or domain name, which can assist you in determining whether the event is malicious in nature. Finally, determining whether there are other events associated with the IP address may help connect data points or expose other historic events that might be brought back into scope.

Gathering various data on the system of interest can sometimes help quickly determine whether something suspicious is happening. Some of these items include determining who else may have logged into the system recently, whether any unusual scheduled tasks exist, whether the system is communicating on suspicious ports, whether there are modifications to sensitive registry keys, and/or whether there are any known vulnerabilities on the system. This information can often highlight other activity commonly seen in attack scenarios or give more information about how the system may have been targeted.

When a specific service or application is targeted, it is often helpful to know the associated version, to help determine whether it is vulnerable to a specific exploit.

If you suspect an attack targeting a web server, it is helpful to look at some of the behavior of the web service to see if there is evidence that the service has been compromised. Some indications of this might be network connections to external resources, the web service spawning child processes that are not associated with typical behavior, and whether the service wrote any files that might be malicious in nature.

If a suspicious file is found, we can review more information about it to help determine if it is, in fact, malicious. Identifying the file type, any processes that opened the file, the processes that may have created and/or modified the file, and how many other systems potentially have this file can you determine whether the file is malicious. Also, determining the file hash and checking it against reputation sources, such as VirusTotal, can sometimes help you quickly determine if it is malicious in nature.

Often, a simple inspection of a suspect process name and path can tell you if the system has been compromised. For example, if svchost.exe is found running from a location other than C:\Windows\System32, it is likely something malicious designed to hide in plain sight when simply reviewing process names.

It can also be helpful to examine various behaviors of and the parent of the process of interest. For example, if it turns out the process of interest is malicious, it would be good to see whether the parent process spawned other processes that might also warrant further scrutiny. If a process is suspect, a review of the network connections made around the time of the event and noting whether the process has spawned any child processes could be helpful in determining whether it is malicious or executing a malicious script. +This Analytic Story looks for probing and exploitation attempts targeting JBoss application servers. While the vulnerabilities associated with this story are rather dated, they were leveraged in a spring 2016 campaign in connection with the Samsam ransomware variant. Incidents involving this ransomware are unique, in that they begin with attacks against vulnerable services, rather than the phishing or drive-by attacks more common with ransomware. In this case, vulnerable JBoss applications appear to be the target of choice.\ +It is helpful to understand how often a notable event generated by this story occurs, as well as the commonalities between some of these events, both of which may provide clues about whether this is a common occurrence of minimal concern or a rare event that may require more extensive investigation. It may also help to understand whether the issue is restricted to a single user/system or whether it is broader in scope.\ +hen looking at the target of the behavior uncovered by the event, you should note the sensitivity of the user and or/system to help determine the potential impact. It is also helpful to identify other recent events involving the target. This can help tie different events together and give further situational awareness regarding the target host.\ +Various types of information for external systems should be reviewed and, potentially, collected if the incident is, indeed, judged to be malicious. This data may be useful for generating your own threat intelligence, so you can create future alerts.\ +The following factors may assist you in determining whether the event is malicious: \ +1. Country of origin\ +1. Responsible party\ +1. Fully qualified domain names associated with the external IP address\ +1. Registration of fully qualified domain names associated with external IP address Determining whether it is a dynamic domain frequently visited by others and/or how third parties categorize it can also help you qualify and understand the event and possible motivation for the attack. In addition, there are various sources that may provide reputation information on the IP address or domain name, which can assist you in determining whether the event is malicious in nature. Finally, determining whether there are other events associated with the IP address may help connect data points or expose other historic events that might be brought back into scope.\ +Gathering various data on the system of interest can sometimes help quickly determine whether something suspicious is happening. Some of these items include determining who else may have logged into the system recently, whether any unusual scheduled tasks exist, whether the system is communicating on suspicious ports, whether there are modifications to sensitive registry keys, and/or whether there are any known vulnerabilities on the system. This information can often highlight other activity commonly seen in attack scenarios or give more information about how the system may have been targeted.\ +hen a specific service or application is targeted, it is often helpful to know the associated version, to help determine whether it is vulnerable to a specific exploit.\ +If you suspect an attack targeting a web server, it is helpful to look at some of the behavior of the web service to see if there is evidence that the service has been compromised. Some indications of this might be network connections to external resources, the web service spawning child processes that are not associated with typical behavior, and whether the service wrote any files that might be malicious in nature.\ +If a suspicious file is found, we can review more information about it to help determine if it is, in fact, malicious. Identifying the file type, any processes that opened the file, the processes that may have created and/or modified the file, and how many other systems potentially have this file can you determine whether the file is malicious. Also, determining the file hash and checking it against reputation sources, such as VirusTotal, can sometimes help you quickly determine if it is malicious in nature.\ +Often, a simple inspection of a suspect process name and path can tell you if the system has been compromised. For example, if svchost.exe is found running from a location other than `C:\Windows\System32`, it is likely something malicious designed to hide in plain sight when simply reviewing process names. \ +It can also be helpful to examine various behaviors of and the parent of the process of interest. For example, if it turns out the process of interest is malicious, it would be good to see whether the parent process spawned other processes that might also warrant further scrutiny. If a process is suspect, a review of the network connections made around the time of the event and noting whether the process has spawned any child processes could be helpful in determining whether it is malicious or executing a malicious script. ====Providing Technologies==== * Splunk Stream @@ -1065,7 +1165,16 @@ Keeping your Splunk deployment up to date is critical and may help you reduce th
====Narrative==== -This Analytic Story is associated with CVE-2016-4859, an open-redirect vulnerability in the following versions of Splunk Enterprise:

  • Splunk Enterprise 6.4.x, prior to 6.4.3
  • Splunk Enterprise 6.3.x, prior to 6.3.6
  • Splunk Enterprise 6.2.x, prior to 6.2.10
  • Splunk Enterprise 6.1.x, prior to 6.1.11
  • Splunk Enterprise 6.0.x, prior to 6.0.12
  • Splunk Enterprise 5.0.x, prior to 5.0.16
  • Splunk Light, prior to 6.4.3
CVE-2016-4859 allows attackers to redirect users to arbitrary web sites and conduct phishing attacks via unspecified vectors. (Credit: Noriaki Iwasaki, Cyber Defense Institute, Inc.).

It is important to ensure that your Splunk deployment is being kept up to date and is properly configured. This detection search allows analysts to monitor internal logs to ensure users are properly authenticated and cannot be redirected to any malicious third-party websites. +This Analytic Story is associated with CVE-2016-4859, an open-redirect vulnerability in the following versions of Splunk Enterprise:\ +\ +1. Splunk Enterprise 6.4.x, prior to 6.4.3\ +1. Splunk Enterprise 6.3.x, prior to 6.3.6\ +1. Splunk Enterprise 6.2.x, prior to 6.2.10\ +1. Splunk Enterprise 6.1.x, prior to 6.1.11\ +1. Splunk Enterprise 6.0.x, prior to 6.0.12\ +1. Splunk Enterprise 5.0.x, prior to 5.0.16\ +1. Splunk Light, prior to 6.4.3CVE-2016-4859 allows attackers to redirect users to arbitrary web sites and conduct phishing attacks via unspecified vectors. (Credit: Noriaki Iwasaki, Cyber Defense Institute, Inc.).\ +It is important to ensure that your Splunk deployment is being kept up to date and is properly configured. This detection search allows analysts to monitor internal logs to ensure users are properly authenticated and cannot be redirected to any malicious third-party websites. ====Providing Technologies==== * Splunk Enterprise @@ -1114,7 +1223,10 @@ Reduce the risk of CVE-2018-11409, an information disclosure vulnerability withi
====Narrative==== -Although there have been no reports of it being exploited, Splunk Enterprise versions through 7.0.1 reportedly have a vulnerability that may expose information through a REST endpoint (read more here: https://www.splunk.com/view/SP-CAAAP5E#VulnerabilityDescriptionsandRatings). NIST has included it in its vulnerability database (read more here: https://nvd.nist.gov/vuln/detail/CVE-2018-11409). The REST endpoint that exposes system information is also necessary for the proper operation of Splunk clustering and instrumentation. Customers should upgrade to the latest version to reduce the risk of this vulnerability.

Splunk Enterprise exposes partial information about the host operating system, hardware, and Splunk license. Splunk Enterprise before 6.6.0 exposes this information without authentication. Splunk Enterprise 6.6.0 and later exposes this information only to authenticated Splunk users. Based on the information exposure, Splunk characterizes this issue as a low severity impact.

Read more in Splunk's official response: https://www.splunk.com/view/SP-CAAAP5E#VulnerabilityDescriptionsandRatings.

A detection search within this Analytic Story looks for vulnerabilities described in CVE-2018-11409: Information Exposure (https://nvd.nist.gov/vuln/detail/CVE-2018-11409). If it turns up activities that may be specific, you can use the included investigative searches to return information regarding web activity and network traffic by src_ip. +Although there have been no reports of it being exploited, Splunk Enterprise versions through 7.0.1 reportedly have a vulnerability that may expose information through a REST endpoint (read more here: https://www.splunk.com/view/SP-CAAAP5E#VulnerabilityDescriptionsandRatings). NIST has included it in its vulnerability database (read more here: https://nvd.nist.gov/vuln/detail/CVE-2018-11409). The REST endpoint that exposes system information is also necessary for the proper operation of Splunk clustering and instrumentation. Customers should upgrade to the latest version to reduce the risk of this vulnerability.\ +Splunk Enterprise exposes partial information about the host operating system, hardware, and Splunk license. Splunk Enterprise before 6.6.0 exposes this information without authentication. Splunk Enterprise 6.6.0 and later exposes this information only to authenticated Splunk users. Based on the information exposure, Splunk characterizes this issue as a low severity impact.\ +Read more in Splunk's official response: https://www.splunk.com/view/SP-CAAAP5E#VulnerabilityDescriptionsandRatings.\ +A detection search within this Analytic Story looks for vulnerabilities described in CVE-2018-11409: Information Exposure (https://nvd.nist.gov/vuln/detail/CVE-2018-11409). If it turns up activities that may be specific, you can use the included investigative searches to return information regarding web activity and network traffic by src_ip. ====Providing Technologies==== * Splunk Enterprise @@ -1167,7 +1279,9 @@ Detect and investigate activity that may indicate that an adversary is using fau
====Narrative==== -While you can educate your users and customers about the risks and threats posed by typosquatting, phishing, and corporate espionage, human error is a persistent fact of life. Of course, your adversaries are all too aware of this reality and will happily leverage it for nefarious purposes whenever possible3phishing with lookalike addresses, embedding faux command-and-control domains in malware, and hosting malicious content on domains that closely mimic your corporate servers. This is where brand monitoring comes in.
You can use our adaptation of DNSTwist, together with the support searches in this Analytic Story, to generate permutations of specified brands and external domains. Splunk can monitor email, DNS requests, and web traffic for these permutations and provide you with early warnings and situational awareness--powerful elements of an effective defense.
Notable events will include IP addresses, URLs, and user data. Drilling down can provide you with even more actionable intelligence, including likely geographic information, contextual searches to help you scope the problem, and investigative searches. +While you can educate your users and customers about the risks and threats posed by typosquatting, phishing, and corporate espionage, human error is a persistent fact of life. Of course, your adversaries are all too aware of this reality and will happily leverage it for nefarious purposes whenever possible3phishing with lookalike addresses, embedding faux command-and-control domains in malware, and hosting malicious content on domains that closely mimic your corporate servers. This is where brand monitoring comes in.\ +You can use our adaptation of `DNSTwist`, together with the support searches in this Analytic Story, to generate permutations of specified brands and external domains. Splunk can monitor email, DNS requests, and web traffic for these permutations and provide you with early warnings and situational awareness--powerful elements of an effective defense.\ +Notable events will include IP addresses, URLs, and user data. Drilling down can provide you with even more actionable intelligence, including likely geographic information, contextual searches to help you scope the problem, and investigative searches. ====Providing Technologies==== * Splunk Stream @@ -1218,13 +1332,14 @@ version = 1.0 ===DNS Amplification Attacks=== -DNS poses a serious threat as a Denial of Service (DOS) amplifier, if it responds to ANY queries. This Analytic Story can help you detect attackers who may be abusing your company's DNS infrastructure to launch amplification attacks, causing Denial of Service to other victims. +DNS poses a serious threat as a Denial of Service (DOS) amplifier, if it responds to `ANY` queries. This Analytic Story can help you detect attackers who may be abusing your company's DNS infrastructure to launch amplification attacks, causing Denial of Service to other victims.
====Narrative==== -The Domain Name System (DNS) is the protocol used to map domain names to IP addresses. It has been proven to work very well for its intended function. However if DNS is misconfigured, servers can be abused by attackers to levy amplification or redirection attacks against victims. Because DNS responses to ANY queries are so much larger than the queries themselves--and can be made with a UDP packet, which does not require a handshake--attackers can spoof the source address of the packet and cause much more data to be sent to the victim than if they sent the traffic themselves. The ANY requests are will be larger than normal DNS server requests, due to the fact that the server provides significant details, such as MX records and associated IP addresses. A large volume of this traffic can result in a DOS on the victim's machine. This misconfiguration leads to two possible victims, the first being the DNS servers participating in an attack and the other being the hosts that are the targets of the DOS attack.

The search in this story can help you to detect if attackers are abusing your company's DNS infrastructure to launch DNS amplification attacks causing Denial of Service to other victims. +The Domain Name System (DNS) is the protocol used to map domain names to IP addresses. It has been proven to work very well for its intended function. However if DNS is misconfigured, servers can be abused by attackers to levy amplification or redirection attacks against victims. Because DNS responses to `ANY` queries are so much larger than the queries themselves--and can be made with a UDP packet, which does not require a handshake--attackers can spoof the source address of the packet and cause much more data to be sent to the victim than if they sent the traffic themselves. The `ANY` requests are will be larger than normal DNS server requests, due to the fact that the server provides significant details, such as MX records and associated IP addresses. A large volume of this traffic can result in a DOS on the victim's machine. This misconfiguration leads to two possible victims, the first being the DNS servers participating in an attack and the other being the hosts that are the targets of the DOS attack.\ +The search in this story can help you to detect if attackers are abusing your company's DNS infrastructure to launch DNS amplification attacks causing Denial of Service to other victims. ====Providing Technologies==== * Splunk Stream @@ -1377,13 +1492,14 @@ version = 1.0 ===Netsh Abuse=== -Detect activities and various techniques associated with the abuse of netsh.exe, which can disable local firewall settings or set up a remote connection to a host from an infected system. +Detect activities and various techniques associated with the abuse of `netsh.exe`, which can disable local firewall settings or set up a remote connection to a host from an infected system.
====Narrative==== -It is a common practice for attackers of all types to leverage native Windows tools and functionality to execute commands for malicious reasons. One such tool on Windows OS is netsh.exe,a command-line scripting utility that allows you to--either locally or remotely--display or modify the network configuration of a computer that is currently running. Netsh.exe can be used to discover and disable local firewall settings. It can also be used to set up a remote connection to a host from an infected system.

To get started, run the detection search to identify parent processes of netsh.exe. +It is a common practice for attackers of all types to leverage native Windows tools and functionality to execute commands for malicious reasons. One such tool on Windows OS is `netsh.exe`,a command-line scripting utility that allows you to--either locally or remotely--display or modify the network configuration of a computer that is currently running. `Netsh.exe` can be used to discover and disable local firewall settings. It can also be used to set up a remote connection to a host from an infected system.\ +To get started, run the detection search to identify parent processes of `netsh.exe`. ====Providing Technologies==== * Carbon Black Response @@ -1438,7 +1554,12 @@ Monitor your environment for activity consistent with common attack techniques b
====Narrative==== -The Federal Bureau of Investigations (FBI) defines Internet fraud as the use of Internet services or software with Internet access to defraud victims or to otherwise take advantage of them. According to the Bureau, Internet crime schemes are used to steal millions of dollars each year from victims and continue to plague the Internet through various methods. The agency includes phishing scams, data breaches, Denial of Service (DOS) attacks, email account compromise, malware, spoofing, and ransomware in this category.

These crimes are not the fraud itself, but rather the attack techniques commonly employed by fraudsters in their pursuit of data that enables them to commit malicious actssuch as obtaining and using stolen credit cards. They represent a serious problem that is steadily increasing and not likely to go away anytime soon.

When developing a strategy for preventing fraud in your environment, its important to look across all of your web services for evidence that attackers are abusing enterprise resources to enumerate systems, harvest data for secondary fraudulent activity, or abuse terms of service.This Analytic Story looks for evidence of common Internet attack techniques that could be indicative of web fraud in your environmentincluding account harvesting, anomalous user clickspeed, and password sharing across accounts, to name just a few.

The account-harvesting search focuses on web pages used for user-account registration. It detects the creation of a large number of user accounts using the same email domain name, a type of activity frequently seen in advance of a fraud campaign.

The anomalous clickspeed search looks for users who are moving through your website at a faster-than-normal speed or with a perfect click cadence (high periodicity or low standard deviation), which could indicate that the user is a script, not an actual human.

Another search detects incidents wherein a single password is used across multiple accounts, which may indicate that a fraudster has infiltrated your environment and embedded a common password within a script. +The Federal Bureau of Investigations (FBI) defines Internet fraud as the use of Internet services or software with Internet access to defraud victims or to otherwise take advantage of them. According to the Bureau, Internet crime schemes are used to steal millions of dollars each year from victims and continue to plague the Internet through various methods. The agency includes phishing scams, data breaches, Denial of Service (DOS) attacks, email account compromise, malware, spoofing, and ransomware in this category.\ +These crimes are not the fraud itself, but rather the attack techniques commonly employed by fraudsters in their pursuit of data that enables them to commit malicious actssuch as obtaining and using stolen credit cards. They represent a serious problem that is steadily increasing and not likely to go away anytime soon.\ +hen developing a strategy for preventing fraud in your environment, its important to look across all of your web services for evidence that attackers are abusing enterprise resources to enumerate systems, harvest data for secondary fraudulent activity, or abuse terms of service.This Analytic Story looks for evidence of common Internet attack techniques that could be indicative of web fraud in your environmentincluding account harvesting, anomalous user clickspeed, and password sharing across accounts, to name just a few.\ +The account-harvesting search focuses on web pages used for user-account registration. It detects the creation of a large number of user accounts using the same email domain name, a type of activity frequently seen in advance of a fraud campaign.\ +The anomalous clickspeed search looks for users who are moving through your website at a faster-than-normal speed or with a perfect click cadence (high periodicity or low standard deviation), which could indicate that the user is a script, not an actual human.\ +Another search detects incidents wherein a single password is used across multiple accounts, which may indicate that a fraudster has infiltrated your environment and embedded a common password within a script. ====Providing Technologies==== * Splunk Stream @@ -1493,7 +1614,9 @@ Leverage searches that allow you to detect and investigate unusual activities th
====Narrative==== -Conventional wisdom holds that Apple's MacOS operating system is significantly less vulnerable to attack than Windows machines. While that point is debatable, it is true that attacks against MacOS systems are much less common. However, this fact does not mean that Macs are impervious to breaches. To the contrary, research has shown that that Mac malware is increasing at an alarming rate. According to AV-test, in 2018, there were 86,865 new MacOS malware variants, up from 27,338 the year before—a 31% increase. In contrast, the independent research firm found that new Windows malware had increased from 65.17M to 76.86M during that same period, less than half the rate of growth. The bottom line is that while the numbers look a lot smaller than Windows, it's definitely time to take Mac security more seriously.

This Analytic Story addresses the ColdRoot remote access trojan (RAT), which was uploaded to Github in 2016, but was still escaping detection by the first quarter of 2018, when a new, more feature-rich variant was discovered masquerading as an Apple audio driver. Among other capabilities, the Pascal-based ColdRoot can heist passwords from users' keychains and remotely control infected machines without detection. In the initial report of his findings, Patrick Wardle, Chief Research Officer for Digita Security, explained that the new ColdRoot RAT could start and kill processes on the breached system, spawn new remote-desktop sessions, take screen captures and assemble them into a live stream of the victim's desktop, and more.

Searches in this Analytic Story leverage the capabilities of OSquery to address ColdRoot detection from several different angles, such as looking for the existence of associated files and processes, and monitoring for signs of an installed keylogger. +Conventional wisdom holds that Apple's MacOS operating system is significantly less vulnerable to attack than Windows machines. While that point is debatable, it is true that attacks against MacOS systems are much less common. However, this fact does not mean that Macs are impervious to breaches. To the contrary, research has shown that that Mac malware is increasing at an alarming rate. According to AV-test, in 2018, there were 86,865 new MacOS malware variants, up from 27,338 the year before—a 31% increase. In contrast, the independent research firm found that new Windows malware had increased from 65.17M to 76.86M during that same period, less than half the rate of growth. The bottom line is that while the numbers look a lot smaller than Windows, it's definitely time to take Mac security more seriously.\ +This Analytic Story addresses the ColdRoot remote access trojan (RAT), which was uploaded to Github in 2016, but was still escaping detection by the first quarter of 2018, when a new, more feature-rich variant was discovered masquerading as an Apple audio driver. Among other capabilities, the Pascal-based ColdRoot can heist passwords from users' keychains and remotely control infected machines without detection. In the initial report of his findings, Patrick Wardle, Chief Research Officer for Digita Security, explained that the new ColdRoot RAT could start and kill processes on the breached system, spawn new remote-desktop sessions, take screen captures and assemble them into a live stream of the victim's desktop, and more.\ +Searches in this Analytic Story leverage the capabilities of OSquery to address ColdRoot detection from several different angles, such as looking for the existence of associated files and processes, and monitoring for signs of an installed keylogger. ====Providing Technologies==== * OSquery @@ -1544,7 +1667,10 @@ Monitor for suspicious activities associated with DHS Technical Alert US-CERT TA
====Narrative==== -The frequency of nation-state cyber attacks has increased significantly over the last decade. Employing numerous tactics and techniques, these attacks continue to escalate in complexity.

There is a wide range of motivations for these state-sponsored hacks, including stealing valuable corporate, military, or diplomatic dataѿall of which could confer advantages in various arenas. They may also target critical infrastructure.

One joint Technical Alert (TA) issued by the Department of Homeland and the FBI in mid-March of 2018 attributed some cyber activity targeting utility infrastructure to operatives sponsored by the Russian government. The hackers executed spearfishing attacks, installed malware, employed watering-hole domains, and more. While they caused no physical damage, the attacks provoked fears that a nation-state could turn off water, redirect power, or compromise a nuclear power plant.

Suspicious activities--spikes in SMB traffic, processes that launch netsh (to modify the network configuration), suspicious registry modifications, and many more--may all be events you may wish to investigate further. While the use of these technique may be an indication that a nation-state actor is attempting to compromise your environment, it is important to note that these techniques are often employed by other groups, as well. +The frequency of nation-state cyber attacks has increased significantly over the last decade. Employing numerous tactics and techniques, these attacks continue to escalate in complexity. \ +There is a wide range of motivations for these state-sponsored hacks, including stealing valuable corporate, military, or diplomatic dataѿall of which could confer advantages in various arenas. They may also target critical infrastructure. \ +One joint Technical Alert (TA) issued by the Department of Homeland and the FBI in mid-March of 2018 attributed some cyber activity targeting utility infrastructure to operatives sponsored by the Russian government. The hackers executed spearfishing attacks, installed malware, employed watering-hole domains, and more. While they caused no physical damage, the attacks provoked fears that a nation-state could turn off water, redirect power, or compromise a nuclear power plant.\ +Suspicious activities--spikes in SMB traffic, processes that launch netsh (to modify the network configuration), suspicious registry modifications, and many more--may all be events you may wish to investigate further. While the use of these technique may be an indication that a nation-state actor is attempting to compromise your environment, it is important to note that these techniques are often employed by other groups, as well. ====Providing Technologies==== * Carbon Black Response @@ -1657,7 +1783,9 @@ Detect rarely used executables, specific registry paths that may confer malware
====Narrative==== -The trojan downloader known as Emotet first surfaced in 2014, when it was discovered targeting the banking industry to steal credentials. However, according to a joint technical alert (TA) issued by three government agencies (https://www.us-cert.gov/ncas/alerts/TA18-201A), Emotet has evolved far beyond those beginnings to become what a ThreatPost article called a threat-delivery service(see https://threatpost.com/emotet-malware-evolves-beyond-banking-to-threat-delivery-service/134342/). For example, in early 2018, Emotet was found to be using its loader function to spread the Quakbot and Ransomware variants.

According to the TA, the the malware continues to be among the most costly and destructive malware affecting the private and public sectors. Researchers have linked it to the threat group Mealybug, which has also been on the security communitys radar since 2014.

The searches in this Analytic Story will help you find executables that are rarely used in your environment, specific registry paths that malware often uses to ensure survivability and persistence, instances where cmd.exe is used to launch script interpreters, and other indicators that Emotet or other malware has compromised your environment. +The trojan downloader known as Emotet first surfaced in 2014, when it was discovered targeting the banking industry to steal credentials. However, according to a joint technical alert (TA) issued by three government agencies (https://www.us-cert.gov/ncas/alerts/TA18-201A), Emotet has evolved far beyond those beginnings to become what a ThreatPost article called a threat-delivery service(see https://threatpost.com/emotet-malware-evolves-beyond-banking-to-threat-delivery-service/134342/). For example, in early 2018, Emotet was found to be using its loader function to spread the Quakbot and Ransomware variants. \ +According to the TA, the the malware continues to be among the most costly and destructive malware affecting the private and public sectors. Researchers have linked it to the threat group Mealybug, which has also been on the security communitys radar since 2014.\ +The searches in this Analytic Story will help you find executables that are rarely used in your environment, specific registry paths that malware often uses to ensure survivability and persistence, instances where cmd.exe is used to launch script interpreters, and other indicators that Emotet or other malware has compromised your environment. ====Providing Technologies==== * Carbon Black Response @@ -1717,7 +1845,10 @@ Monitor for and investigate activities, including the creation or deletion of hi
====Narrative==== -North Korea's government-sponsored "cyber army" has been slowly building momentum and gaining sophistication over the last 15 years or so. As a result, the group's activity, which the US government refers to as "Hidden Cobra," has surreptitiously crept onto the collective radar as a preeminent global threat.

These state-sponsored actors are thought to be responsible for everything from a hack on a South Korean nuclear plant to an attack on Sony in anticipation of its release of the movie "The Interview" at the end of 2014. They're also notorious for cyberespionage. In recent years, the group seems to be focused on financial crimes, such as cryptojacking.

In June of 2018, The Department of Homeland Security, together with the FBI and other U.S. government partners, issued Technical Alert (TA-18-149A) to advise the public about two variants of North Korean malware. One variant, dubbed "Joanap," is a multi-stage peer-to-peer botnet that allows North Korean state actors to exfiltrate data, download and execute secondary payloads, and initialize proxy communications. The other variant, "Brambul," is a Windows32 SMB worm that is dropped into a victim network. When executed, the malware attempts to spread laterally within a victim's local subnet, connecting via the SMB protocol and initiating brute-force password attacks. It reports details to the Hidden Cobra actors via email, so they can use the information for secondary remote operations.

Among other searches in this Analytic Story is a detection search that looks for the creation or deletion of hidden shares, such as, "adnim$," which the Hidden Cobra malware creates on the target system. Another looks for the creation of three malicious files associated with the malware. You can also use a search in this story to investigate activity that indicates that malware is sending email back to the attackers. +North Korea's government-sponsored "cyber army" has been slowly building momentum and gaining sophistication over the last 15 years or so. As a result, the group's activity, which the US government refers to as "Hidden Cobra," has surreptitiously crept onto the collective radar as a preeminent global threat.\ +These state-sponsored actors are thought to be responsible for everything from a hack on a South Korean nuclear plant to an attack on Sony in anticipation of its release of the movie "The Interview" at the end of 2014. They're also notorious for cyberespionage. In recent years, the group seems to be focused on financial crimes, such as cryptojacking.\ +In June of 2018, The Department of Homeland Security, together with the FBI and other U.S. government partners, issued Technical Alert (TA-18-149A) to advise the public about two variants of North Korean malware. One variant, dubbed "Joanap," is a multi-stage peer-to-peer botnet that allows North Korean state actors to exfiltrate data, download and execute secondary payloads, and initialize proxy communications. The other variant, "Brambul," is a Windows32 SMB worm that is dropped into a victim network. When executed, the malware attempts to spread laterally within a victim's local subnet, connecting via the SMB protocol and initiating brute-force password attacks. It reports details to the Hidden Cobra actors via email, so they can use the information for secondary remote operations.\ +Among other searches in this Analytic Story is a detection search that looks for the creation or deletion of hidden shares, such as, "adnim$," which the Hidden Cobra malware creates on the target system. Another looks for the creation of three malicious files associated with the malware. You can also use a search in this story to investigate activity that indicates that malware is sending email back to the attackers. ====Providing Technologies==== * Carbon Black Response @@ -1775,7 +1906,11 @@ Detect activities and various techniques associated with the Orangeworm Attack G
====Narrative==== -In May of 2018, the attack group Orangeworm was implicated for installing a custom backdoor called Trojan.Kwampirs within large international healthcare corporations in the United States, Europe, and Asia. This malware provides the attackers with remote access to the target system, decrypting and extracting a copy of its main DLL payload from its resource section. Before writing the payload to disk, it inserts a randomly generated string into the middle of the decrypted payload in an attempt to evade hash-based detections.

Awareness of the Orangeworm group first surfaced in January, 2015. It has conducted targeted attacks against related industries, as well, such as pharmaceuticals and healthcare IT solution providers.

Although the group's motivation is unknown, its goal may be stealing patient information to sell on the black market. Another possible explanation is corporate espionage.

Healthcare may be a promising target, because it is notoriously behind in technology, often using older operating systems and neglecting to patch computers. Even so, the group was able to evade detection for a full three years. Sources say that the malware spread quickly within the target networks, infecting computers used to control medical devices, such as MRI and X-ray machines.

This Analytic Story is designed to help you detect and investigate suspicious activities that may be indicative of an Orangeworm attack. One detection search looks for command-line arguments. Another monitors for uses of sc.exe, a non-essential Windows file that can manipulate Windows services. One of the investigative searches helps you get more information on web hosts that you suspect have been compromised. +In May of 2018, the attack group Orangeworm was implicated for installing a custom backdoor called Trojan.Kwampirs within large international healthcare corporations in the United States, Europe, and Asia. This malware provides the attackers with remote access to the target system, decrypting and extracting a copy of its main DLL payload from its resource section. Before writing the payload to disk, it inserts a randomly generated string into the middle of the decrypted payload in an attempt to evade hash-based detections.\ +Awareness of the Orangeworm group first surfaced in January, 2015. It has conducted targeted attacks against related industries, as well, such as pharmaceuticals and healthcare IT solution providers.\ +Although the group's motivation is unknown, its goal may be stealing patient information to sell on the black market. Another possible explanation is corporate espionage. \ +Healthcare may be a promising target, because it is notoriously behind in technology, often using older operating systems and neglecting to patch computers. Even so, the group was able to evade detection for a full three years. Sources say that the malware spread quickly within the target networks, infecting computers used to control medical devices, such as MRI and X-ray machines.\ +This Analytic Story is designed to help you detect and investigate suspicious activities that may be indicative of an Orangeworm attack. One detection search looks for command-line arguments. Another monitors for uses of sc.exe, a non-essential Windows file that can manipulate Windows services. One of the investigative searches helps you get more information on web hosts that you suspect have been compromised. ====Providing Technologies==== * Microsoft Windows @@ -1890,7 +2025,12 @@ Leverage searches that allow you to detect and investigate unusual activities th
====Narrative==== -The first version of the SamSam ransomware (a.k.a. Samas or SamsamCrypt) was launched in 2015 by a group of Iranian threat actors. The malicious software has affected and continues to affect thousands of victims and has raised almost $6M in ransom.

Although categorized under the heading of ransomware, SamSam campaigns have some importance distinguishing characteristics. Most notable is the fact that conventional ransomware is a numbers game. Perpetrators use a "spray-and-pray" approach with phishing campaigns or other mechanisms, charging a small ransom (typically under $1,000). The goal is to find a large number of victims willing to pay these mini-ransoms, adding up to a lucrative payday. They use relatively simple methods for infecting systems.

SamSam attacks are different beasts. They have become progressively more targeted and skillful than typical ransomware attacks. First, malicious actors break into a victim's network, surveil it, then run the malware manually. The attacks are tailored to cause maximum damage and the threat actors usually demand amounts in the tens of thousands of dollars.

In a typical attack on one large healthcare organization in 2018, the company ended up paying a ransom of four Bitcoins, then worth $56,707. Reports showed that access to the company's files was restored within two hours of paying the sum.

According to Sophos, SamSam previously leveraged RDP to gain access to targeted networks via brute force. SamSam is not spread automatically, like other malware. It requires skill because it forces the attacker to adapt their tactics to the individual environment. Next, the actors escalate their privileges to admin level. They scan the networks for worthy targets, using conventional tools, such as PsExec or PaExec, to deploy/execute, quickly encrypting files.

This Analytic Story includes searches designed to help detect and investigate signs of the SamSam ransomware, such as the creation of fileswrites to system32, writes with tell-tale extensions, batch files written to system32, and evidence of brute-force attacks via RDP. +The first version of the SamSam ransomware (a.k.a. Samas or SamsamCrypt) was launched in 2015 by a group of Iranian threat actors. The malicious software has affected and continues to affect thousands of victims and has raised almost $6M in ransom.\ +Although categorized under the heading of ransomware, SamSam campaigns have some importance distinguishing characteristics. Most notable is the fact that conventional ransomware is a numbers game. Perpetrators use a "spray-and-pray" approach with phishing campaigns or other mechanisms, charging a small ransom (typically under $1,000). The goal is to find a large number of victims willing to pay these mini-ransoms, adding up to a lucrative payday. They use relatively simple methods for infecting systems.\ +SamSam attacks are different beasts. They have become progressively more targeted and skillful than typical ransomware attacks. First, malicious actors break into a victim's network, surveil it, then run the malware manually. The attacks are tailored to cause maximum damage and the threat actors usually demand amounts in the tens of thousands of dollars.\ +In a typical attack on one large healthcare organization in 2018, the company ended up paying a ransom of four Bitcoins, then worth $56,707. Reports showed that access to the company's files was restored within two hours of paying the sum.\ +According to Sophos, SamSam previously leveraged RDP to gain access to targeted networks via brute force. SamSam is not spread automatically, like other malware. It requires skill because it forces the attacker to adapt their tactics to the individual environment. Next, the actors escalate their privileges to admin level. They scan the networks for worthy targets, using conventional tools, such as PsExec or PaExec, to deploy/execute, quickly encrypting files.\ +This Analytic Story includes searches designed to help detect and investigate signs of the SamSam ransomware, such as the creation of fileswrites to system32, writes with tell-tale extensions, batch files written to system32, and evidence of brute-force attacks via RDP. ====Providing Technologies==== * Carbon Black Response @@ -1951,7 +2091,9 @@ Quickly identify systems running new or unusual processes in your environment th
====Narrative==== -Being able to profile a host's processes within your environment can help you more quickly identify processes that seem out of place when compared to the rest of the population of hosts or asset types.

This Analytic Story lets you identify processes that are either a) not typically seen running or b) have some sort of suspicious command-line arguments associated with them. This Analytic Story will also help you identify the user running these processes and the associated process activity on the host.

In the event an unusual process is identified, it is imperative to better understand how that process was able to execute on the host, when it first executed, and whether other hosts are affected. This extra information may provide clues that can help the analyst further investigate any suspicious activity. +Being able to profile a host's processes within your environment can help you more quickly identify processes that seem out of place when compared to the rest of the population of hosts or asset types.\ +This Analytic Story lets you identify processes that are either a) not typically seen running or b) have some sort of suspicious command-line arguments associated with them. This Analytic Story will also help you identify the user running these processes and the associated process activity on the host.\ +In the event an unusual process is identified, it is imperative to better understand how that process was able to execute on the host, when it first executed, and whether other hosts are affected. This extra information may provide clues that can help the analyst further investigate any suspicious activity. ====Providing Technologies==== * Carbon Black Response @@ -2006,7 +2148,11 @@ Detect and investigate suspected abuse of file extensions and Windows file assoc
====Narrative==== -Attackers use a variety of techniques to entice users to run malicious code or to persist on an endpoint. One way to accomplish these goals is to leverage file extensions and the mechanism Windows uses to associate files with specific applications.

Since its earliest days, Windows has used extensions to identify file types. Users have become familiar with these extensions and their application associations. For example, if users see that a file ends in .doc or .docx, they will assume that it is a Microsoft Word document and expect that double-clicking will open it using winword.exe. The user will typically also presume that the .docx file is safe.

Attackers take advantage of this expectation by obfuscating the true file extension. They can accomplish this in a couple of ways. One technique involves inserting multiple spaces in the file name before the extension to hide the extension from the GUI, obscuring the true nature of the file. Another approach involves prepending the real extension with a different one. This is especially effective when Windows is configured to "hide extensions for known file types." In this case, the real extension is not displayed, but the prepended one is, leading end users to believe the file is a different type than it actually is.

Changing the association between a file extension and an application can allow an attacker to execute arbitrary code. The technique typically involves changing the association for an often-launched file type to associate instead with a malicious program the attacker has dropped on the endpoint. When the end user launches a file that has been manipulated in this way, it will execute the attacker's malware. It will also execute the application the end user expected to run, cleverly obscuring the fact that something suspicious has occurred.

Run the searches in this story to detect and investigate suspicious behavior that may indicate abuse or manipulation of Windows file extensions and/or associations. +Attackers use a variety of techniques to entice users to run malicious code or to persist on an endpoint. One way to accomplish these goals is to leverage file extensions and the mechanism Windows uses to associate files with specific applications. \ + Since its earliest days, Windows has used extensions to identify file types. Users have become familiar with these extensions and their application associations. For example, if users see that a file ends in `.doc` or `.docx`, they will assume that it is a Microsoft Word document and expect that double-clicking will open it using `winword.exe`. The user will typically also presume that the `.docx` file is safe. \ + Attackers take advantage of this expectation by obfuscating the true file extension. They can accomplish this in a couple of ways. One technique involves inserting multiple spaces in the file name before the extension to hide the extension from the GUI, obscuring the true nature of the file. Another approach involves prepending the real extension with a different one. This is especially effective when Windows is configured to "hide extensions for known file types." In this case, the real extension is not displayed, but the prepended one is, leading end users to believe the file is a different type than it actually is.\ +Changing the association between a file extension and an application can allow an attacker to execute arbitrary code. The technique typically involves changing the association for an often-launched file type to associate instead with a malicious program the attacker has dropped on the endpoint. When the end user launches a file that has been manipulated in this way, it will execute the attacker's malware. It will also execute the application the end user expected to run, cleverly obscuring the fact that something suspicious has occurred.\ +Run the searches in this story to detect and investigate suspicious behavior that may indicate abuse or manipulation of Windows file extensions and/or associations. ====Providing Technologies==== * Carbon Black Response @@ -2118,7 +2264,9 @@ Monitor for and investigate activities--such as suspicious writes to the Windows
====Narrative==== -A common adversary goal is to identify and exfiltrate data of value from a target organization. This data may include email conversations and addresses, confidential company information, links to network design/infrastructure, important dates, and so on.

Attacks are composed of three activities: identification, collection, and staging data for exfiltration. Identification typically involves scanning systems and observing user activity. Collection can involve the transfer of large amounts of data from various repositories. Staging/preparation includes moving data to a central location and compressing (and optionally encoding and/or encrypting) it. All of these activities provide opportunities for defenders to identify their presence.

Use the searches to detect and monitor suspicious behavior related to these activities. +A common adversary goal is to identify and exfiltrate data of value from a target organization. This data may include email conversations and addresses, confidential company information, links to network design/infrastructure, important dates, and so on.\ + Attacks are composed of three activities: identification, collection, and staging data for exfiltration. Identification typically involves scanning systems and observing user activity. Collection can involve the transfer of large amounts of data from various repositories. Staging/preparation includes moving data to a central location and compressing (and optionally encoding and/or encrypting) it. All of these activities provide opportunities for defenders to identify their presence. \ +Use the searches to detect and monitor suspicious behavior related to these activities. ====Providing Technologies==== * Carbon Black Response @@ -2175,7 +2323,8 @@ Detect and investigate tactics, techniques, and procedures leveraged by attacker
====Narrative==== -Threat actors typically architect and implement an infrastructure to use in various ways during the course of their attack campaigns. In some cases, they leverage this infrastructure for scanning and performing reconnaissance activities. In others, they may use this infrastructure to launch actual attacks. One of the most important functions of this infrastructure is to establish servers that will communicate with implants on compromised endpoints. These servers establish a command and control channel that is used to proxy data between the compromised endpoint and the attacker. These channels relay commands from the attacker to the compromised endpoint and the output of those commands back to the attacker.

Because this communication is so critical for an adversary, they often use techniques designed to hide the true nature of the communications. There are many different techniques used to establish and communicate over these channels. This Analytic Story provides searches that look for a variety of the techniques used for these channels, as well as indications that these channels are active, by examining logs associated with border control devices and network-access control lists. +Threat actors typically architect and implement an infrastructure to use in various ways during the course of their attack campaigns. In some cases, they leverage this infrastructure for scanning and performing reconnaissance activities. In others, they may use this infrastructure to launch actual attacks. One of the most important functions of this infrastructure is to establish servers that will communicate with implants on compromised endpoints. These servers establish a command and control channel that is used to proxy data between the compromised endpoint and the attacker. These channels relay commands from the attacker to the compromised endpoint and the output of those commands back to the attacker.\ +Because this communication is so critical for an adversary, they often use techniques designed to hide the true nature of the communications. There are many different techniques used to establish and communicate over these channels. This Analytic Story provides searches that look for a variety of the techniques used for these channels, as well as indications that these channels are active, by examining logs associated with border control devices and network-access control lists. ====Providing Technologies==== * Splunk Stream @@ -2229,7 +2378,8 @@ Detect DNS and web requests to fake websites generated by the EvilGinx2 toolkit.
====Narrative==== -As most people know, these emails use fraudulent domains, [email scraping](https://www.cyberscoop.com/emotet-trojan-phishing-scraping-templates-cofense-geodo/), familiar contact names inserted as senders, and other tactics to lure targets into clicking a malicious link, opening an attachment with a [nefarious payload](https://www.cyberscoop.com/emotet-trojan-phishing-scraping-templates-cofense-geodo/), or entering sensitive personal information that perpetrators may intercept. This attack technique requires a relatively low level of skill and allows adversaries to easily cast a wide net. Because phishing is a technique that relies on human psychology, you will never be able to eliminate this vulnerability 100%. But you can use automated detection to significantly reduce the risks.

This Analytic Story focuses on detecting signs of MiTM attacks enabled by [EvilGinx2](https://github.com/kgretzky/evilginx2), a toolkit that sets up a transparent proxy between the targeted site and the user. In this way, the attacker is able to intercept credentials and two-factor identification tokens. It employs a proxy template to allow a registered domain to impersonate targeted sites, such as Linkedin, Amazon, Okta, Github, Twitter, Instagram, Reddit, Office 365, and others. It can even register SSL certificates and camouflage them via a URL shortener, making them difficult to detect. Searches in this story look for signs of MiTM attacks enabled by EvilGinx2. +As most people know, these emails use fraudulent domains, [email scraping](https://www.cyberscoop.com/emotet-trojan-phishing-scraping-templates-cofense-geodo/), familiar contact names inserted as senders, and other tactics to lure targets into clicking a malicious link, opening an attachment with a [nefarious payload](https://www.cyberscoop.com/emotet-trojan-phishing-scraping-templates-cofense-geodo/), or entering sensitive personal information that perpetrators may intercept. This attack technique requires a relatively low level of skill and allows adversaries to easily cast a wide net. Because phishing is a technique that relies on human psychology, you will never be able to eliminate this vulnerability 100%. But you can use automated detection to significantly reduce the risks.\ +This Analytic Story focuses on detecting signs of MiTM attacks enabled by [EvilGinx2](https://github.com/kgretzky/evilginx2), a toolkit that sets up a transparent proxy between the targeted site and the user. In this way, the attacker is able to intercept credentials and two-factor identification tokens. It employs a proxy template to allow a registered domain to impersonate targeted sites, such as Linkedin, Amazon, Okta, Github, Twitter, Instagram, Reddit, Office 365, and others. It can even register SSL certificates and camouflage them via a URL shortener, making them difficult to detect. Searches in this story look for signs of MiTM attacks enabled by EvilGinx2. ====Providing Technologies==== * Splunk Stream @@ -2282,7 +2432,9 @@ Uncover activity consistent with credential dumping, a technique wherein attacke
====Narrative==== -Credential dumping—gathering credentials from a target system, often hashed or encrypted—is a common attack technique. Even though the credentials may not be in plain text, an attacker can still exfiltrate the data and set to cracking it offline, on their own systems. The threat actors target a variety of sources to extract them, including the Security Accounts Manager (SAM), Local Security Authority (LSA), NTDS from Domain Controllers, or the Group Policy Preference (GPP) files.

Once attackers obtain valid credentials, they use them to move throughout a target network with ease, discovering new systems and identifying assets of interest. Credentials obtained in this manner typically include those of privileged users, which may provide access to more sensitive information and system operations.

The detection searches in this Analytic Story monitor for the process reg.exe with the "save" parameter, as well as for a target registry path that specifies a binary export of credentials from the registry. In addition, the analytics flag Windows events and activities associated with the use of Mimikatz functionality in Powershell Empire. +Credential dumping—gathering credentials from a target system, often hashed or encrypted—is a common attack technique. Even though the credentials may not be in plain text, an attacker can still exfiltrate the data and set to cracking it offline, on their own systems. The threat actors target a variety of sources to extract them, including the Security Accounts Manager (SAM), Local Security Authority (LSA), NTDS from Domain Controllers, or the Group Policy Preference (GPP) files.\ +Once attackers obtain valid credentials, they use them to move throughout a target network with ease, discovering new systems and identifying assets of interest. Credentials obtained in this manner typically include those of privileged users, which may provide access to more sensitive information and system operations.\ +The detection searches in this Analytic Story monitor for the process **reg.exe** with the "save" parameter, as well as for a target registry path that specifies a binary export of credentials from the registry. In addition, the analytics flag Windows events and activities associated with the use of Mimikatz functionality in Powershell Empire. ====Providing Technologies==== * Carbon Black Response @@ -2338,7 +2490,15 @@ Secure your environment against DNS hijacks with searches that help you detect a
====Narrative==== -Dubbed the Achilles heel of the Internet (see https://www.f5.com/labs/articles/threat-intelligence/dns-is-still-the-achilles-heel-of-the-internet-25613), DNS plays a critical role in routing web traffic but is notoriously vulnerable to attack. One reason is its distributed nature. It relies on unstructured connections between millions of clients and servers over inherently insecure protocols.

The gravity and extent of the importance of securing DNS from attacks is undeniable. The fallout of compromised DNS can be disastrous. Not only can hackers bring down an entire business, they can intercept confidential information, emails, and login credentials, as well.

On January 22, 2019, the US Department of Homeland Security 2019's Cybersecurity and Infrastructure Security Agency (CISA) raised awareness of some high-profile DNS hijacking attacks against infrastructure, both in the United States and abroad. It issued Emergency Directive 19-01 (see https://cyber.dhs.gov/ed/19-01/), which summarized the activity and required government agencies to take the following four actions, all within 10 days:
  1. For all .gov or other agency-managed domains, audit public DNS records on all authoritative and secondary DNS servers, verify that they resolve to the intended location or report them to CISA.
  2. Update the passwords for all accounts on systems that can make changes to each agency 2019's DNS records.
  3. Implement multi-factor authentication (MFA) for all accounts on systems that can make changes to each agency's 2019 DNS records or, if impossible, provide CISA with the names of systems, the reasons why MFA cannot be enabled within the required timeline, and an ETA for when it can be enabled.
  4. CISA will begin regular delivery of newly added certificates to Certificate Transparency (CT) logs for agency domains via the Cyber Hygiene service. Upon receipt, agencies must immediately begin monitoring CT log data for certificates issued that they did not request. If an agency confirms that a certificate was unauthorized, it must report the certificate to the issuing certificate authority and to CISA.
Of course, it makes sense to put equivalent actions in place within your environment, as well.

In DNS hijacking, the attacker assumes control over an account or makes use of a DNS service exploit to make changes to DNS records. Once they gain access, attackers can substitute their own MX records, name-server records, and addresses, redirecting emails and traffic through their infrastructure, where they can read, copy, or modify information seen. They can also generate valid encryption certificates to help them avoid browser-certificate checks. In one notable attack on the Internet service provider, GoDaddy, the hackers altered Sender Policy Framework (SPF) records a relatively minor change that did not inflict excessive damage but allowed for more effective spam campaigns.

The searches in this Analytic Story help you detect and investigate activities that may indicate that DNS hijacking has taken place within your environment. +Dubbed the Achilles heel of the Internet (see https://www.f5.com/labs/articles/threat-intelligence/dns-is-still-the-achilles-heel-of-the-internet-25613), DNS plays a critical role in routing web traffic but is notoriously vulnerable to attack. One reason is its distributed nature. It relies on unstructured connections between millions of clients and servers over inherently insecure protocols.\ +The gravity and extent of the importance of securing DNS from attacks is undeniable. The fallout of compromised DNS can be disastrous. Not only can hackers bring down an entire business, they can intercept confidential information, emails, and login credentials, as well. \ +On January 22, 2019, the US Department of Homeland Security 2019's Cybersecurity and Infrastructure Security Agency (CISA) raised awareness of some high-profile DNS hijacking attacks against infrastructure, both in the United States and abroad. It issued Emergency Directive 19-01 (see https://cyber.dhs.gov/ed/19-01/), which summarized the activity and required government agencies to take the following four actions, all within 10 days: \ +1. For all .gov or other agency-managed domains, audit public DNS records on all authoritative and secondary DNS servers, verify that they resolve to the intended location or report them to CISA.\ +1. Update the passwords for all accounts on systems that can make changes to each agency 2019's DNS records.\ +1. Implement multi-factor authentication (MFA) for all accounts on systems that can make changes to each agency's 2019 DNS records or, if impossible, provide CISA with the names of systems, the reasons why MFA cannot be enabled within the required timeline, and an ETA for when it can be enabled.\ +1. CISA will begin regular delivery of newly added certificates to Certificate Transparency (CT) logs for agency domains via the Cyber Hygiene service. Upon receipt, agencies must immediately begin monitoring CT log data for certificates issued that they did not request. If an agency confirms that a certificate was unauthorized, it must report the certificate to the issuing certificate authority and to CISA. Of course, it makes sense to put equivalent actions in place within your environment, as well. \ +In DNS hijacking, the attacker assumes control over an account or makes use of a DNS service exploit to make changes to DNS records. Once they gain access, attackers can substitute their own MX records, name-server records, and addresses, redirecting emails and traffic through their infrastructure, where they can read, copy, or modify information seen. They can also generate valid encryption certificates to help them avoid browser-certificate checks. In one notable attack on the Internet service provider, GoDaddy, the hackers altered Sender Policy Framework (SPF) records a relatively minor change that did not inflict excessive damage but allowed for more effective spam campaigns.\ +The searches in this Analytic Story help you detect and investigate activities that may indicate that DNS hijacking has taken place within your environment. ====Providing Technologies==== * Splunk Stream @@ -2385,7 +2545,7 @@ version = 1.0 ===Disabling Security Tools=== -Looks for activities and techniques associated with the disabling of security tools on a Windows system, such as suspicious reg.exe processes, processes launching netsh, and many others. +Looks for activities and techniques associated with the disabling of security tools on a Windows system, such as suspicious `reg.exe` processes, processes launching netsh, and many others.
@@ -2446,7 +2606,11 @@ Detect and investigate tactics, techniques, and procedures around how attackers
====Narrative==== -Once attackers gain a foothold within an enterprise, they will seek to expand their accesses and leverage techniques that facilitate lateral movement. Attackers will often spend quite a bit of time and effort moving laterally. Because lateral movement renders an attacker the most vulnerable to detection, it's an excellent focus for detection and investigation.

Indications of lateral movement can include the abuse of system utilities (such as psexec.exe), unauthorized use of remote desktop services, file/admin$ shares, WMI, PowerShell, pass-the-hash, or the abuse of scheduled tasks. Organizations must be extra vigilant in detecting lateral movement techniques and look for suspicious activity in and around high-value strategic network assets, such as Active Directory, which are often considered the primary target or "crown jewels" to a persistent threat actor.

An adversary can use lateral movement for multiple purposes, including remote execution of tools, pivoting to additional systems, obtaining access to specific information or files, access to additional credentials, exfiltrating data, or delivering a secondary effect. Adversaries may use legitimate credentials alongside inherent network and operating-system functionality to remotely connect to other systems and remain under the radar of network defenders.

If there is evidence of lateral movement, it is imperative for analysts to collect evidence of the associated offending hosts. For example, an attacker might leverage host A to gain access to host B. From there, the attacker may try to move laterally to host C. In this example, the analyst should gather as much information as possible from all three hosts.

It is also important to collect authentication logs for each host, to ensure that the offending accounts are well-documented. Analysts should account for all processes to ensure that the attackers did not install unauthorized software. +Once attackers gain a foothold within an enterprise, they will seek to expand their accesses and leverage techniques that facilitate lateral movement. Attackers will often spend quite a bit of time and effort moving laterally. Because lateral movement renders an attacker the most vulnerable to detection, it's an excellent focus for detection and investigation.\ +Indications of lateral movement can include the abuse of system utilities (such as `psexec.exe`), unauthorized use of remote desktop services, `file/admin$` shares, WMI, PowerShell, pass-the-hash, or the abuse of scheduled tasks. Organizations must be extra vigilant in detecting lateral movement techniques and look for suspicious activity in and around high-value strategic network assets, such as Active Directory, which are often considered the primary target or "crown jewels" to a persistent threat actor.\ +An adversary can use lateral movement for multiple purposes, including remote execution of tools, pivoting to additional systems, obtaining access to specific information or files, access to additional credentials, exfiltrating data, or delivering a secondary effect. Adversaries may use legitimate credentials alongside inherent network and operating-system functionality to remotely connect to other systems and remain under the radar of network defenders.\ +If there is evidence of lateral movement, it is imperative for analysts to collect evidence of the associated offending hosts. For example, an attacker might leverage host A to gain access to host B. From there, the attacker may try to move laterally to host C. In this example, the analyst should gather as much information as possible from all three hosts. \ + It is also important to collect authentication logs for each host, to ensure that the offending accounts are well-documented. Analysts should account for all processes to ensure that the attackers did not install unauthorized software. ====Providing Technologies==== * Microsoft Windows @@ -2504,7 +2668,16 @@ Attackers are finding stealthy ways "live off the land," leveraging utilities an
====Narrative==== -The searches in this Analytic Story monitor for parameters often used for malicious purposes. It is helpful to understand how often the notable events generated by this story occur, as well as the commonalities between some of these events. These factors may provide clues about whether this is a common occurrence of minimal concern or a rare event that may require more extensive investigation. Likewise, it is important to determine whether the issue is restricted to a single user/system or is broader in scope.

The following factors may assist you in determining whether the event is malicious:
  • Country of origin
  • Responsible party
  • Fully qualified domain names associated with the external IP address
  • Registration of fully qualified domain names associated with external IP address
Determining whether it is a dynamic domain frequently visited by others and/or how third parties categorize it can also help you answer some questions surrounding the attacker and details related to the external system. In addition, there are various sources--such as VirusTotal— that can provide some reputation information on the IP address or domain name, which can assist in determining whether the event is malicious. Finally, determining whether there are other events associated with the IP address may help connect data points or show other events that should be brought into scope.

Gathering data on the system of interest can sometimes help you quickly determine whether something suspicious is happening. Some of these items include finding out who else may have recently logged into the system, whether any unusual scheduled tasks exist, whether the system is communicating on suspicious ports, whether there are modifications to sensitive registry keys, and whether there are any known vulnerabilities on the system. This information can often highlight other activity commonly seen in attack scenarios or give more information about how the system may have been targeted.

Often, a simple inspection of the process name and path can tell you if the system has been compromised. For example, if svchost.exe is found running from a location other than C:\Windows\System32, it is likely something malicious designed to hide in plain sight when cursorily reviewing process names. Similarly, if the process itself seems legitimate, but the parent process is running from the temporary browser cache, that could be indicative of activity initiated via a compromised website a user visited.

It can also be very helpful to examine various behaviors of the process of interest or the parent of the process of interest. For example, if it turns out the process of interest is malicious, it would be good to see if the parent to that process spawned other processes that might be worth further scrutiny. If a process is suspect, a review of the network connections made in and around the time of the event and/or whether the process spawned any child processes could be helpful, as well.

In the event a system is suspected of having been compromised via a malicious website, we suggest reviewing the browsing activity from that system around the time of the event. If categories are given for the URLs visited, that can help you zero in on possible malicious sites. +The searches in this Analytic Story monitor for parameters often used for malicious purposes. It is helpful to understand how often the notable events generated by this story occur, as well as the commonalities between some of these events. These factors may provide clues about whether this is a common occurrence of minimal concern or a rare event that may require more extensive investigation. Likewise, it is important to determine whether the issue is restricted to a single user/system or is broader in scope.\ +The following factors may assist you in determining whether the event is malicious: \ +1. Country of origin\ +1. Responsible party\ +1. Fully qualified domain names associated with the external IP address\ +1. Registration of fully qualified domain names associated with external IP addressDetermining whether it is a dynamic domain frequently visited by others and/or how third parties categorize it can also help you answer some questions surrounding the attacker and details related to the external system. In addition, there are various sources--such as VirusTotal— that can provide some reputation information on the IP address or domain name, which can assist in determining whether the event is malicious. Finally, determining whether there are other events associated with the IP address may help connect data points or show other events that should be brought into scope.\ +Gathering data on the system of interest can sometimes help you quickly determine whether something suspicious is happening. Some of these items include finding out who else may have recently logged into the system, whether any unusual scheduled tasks exist, whether the system is communicating on suspicious ports, whether there are modifications to sensitive registry keys, and whether there are any known vulnerabilities on the system. This information can often highlight other activity commonly seen in attack scenarios or give more information about how the system may have been targeted.\ +Often, a simple inspection of the process name and path can tell you if the system has been compromised. For example, if `svchost.exe` is found running from a location other than `C:\Windows\System32`, it is likely something malicious designed to hide in plain sight when cursorily reviewing process names. Similarly, if the process itself seems legitimate, but the parent process is running from the temporary browser cache, that could be indicative of activity initiated via a compromised website a user visited.\ +It can also be very helpful to examine various behaviors of the process of interest or the parent of the process of interest. For example, if it turns out the process of interest is malicious, it would be good to see if the parent to that process spawned other processes that might be worth further scrutiny. If a process is suspect, a review of the network connections made in and around the time of the event and/or whether the process spawned any child processes could be helpful, as well.\ +In the event a system is suspected of having been compromised via a malicious website, we suggest reviewing the browsing activity from that system around the time of the event. If categories are given for the URLs visited, that can help you zero in on possible malicious sites. ====Providing Technologies==== * Carbon Black Response @@ -2558,7 +2731,14 @@ Detect signs of malicious payloads that may indicate that your environment has b
====Narrative==== -Despite its simplicity, phishing remains the most pervasive and dangerous cyberthreat. In fact, research shows that as many as [91% of all successful attacks](https://digitalguardian.com/blog/91-percent-cyber-attacks-start-phishing-email-heres-how-protect-against-phishing) are initiated via a phishing email.

As most people know, these emails use fraudulent domains, [email scraping](https://www.cyberscoop.com/emotet-trojan-phishing-scraping-templates-cofense-geodo/), familiar contact names inserted as senders, and other tactics to lure targets into clicking a malicious link, opening an attachment with a [nefarious payload](https://www.cyberscoop.com/emotet-trojan-phishing-scraping-templates-cofense-geodo/), or entering sensitive personal information that perpetrators may intercept. This attack technique requires a relatively low level of skill and allows adversaries to easily cast a wide net. Worse, because its success relies on the gullibility of humans, it's impossible to completely "automate" it out of your environment. However, you can use ES and ESCU to detect and investigate potentially malicious payloads injected into your environment subsequent to a phishing attack.

While any kind of file may contain a malicious payload, some are more likely to be perceived as benign (and thus more often escape notice) by the average victim—especially when the attacker sends an email that seems to be from one of their contacts. An example is Microsoft Office files. Most corporate users are familiar with documents with the following suffixes: .doc/.docx (MS Word), .xls/.xlsx (MS Excel), and .ppt/.pptx (MS PowerPoint), so they may click without a second thought, slashing a hole in their organizations' security.

Following is a typical series of events, according to an [article by Trend Micro](https://blog.trendmicro.com/trendlabs-security-intelligence/rising-trend-attackers-using-lnk-files-download-malware/):
  1. Attacker sends a phishing email. Recipient downloads the attached file, which is typically a .docx or .zip file with an embedded .lnk file
  2. The .lnk file executes a PowerShell script
  3. Powershell executes a reverse shell, rendering the exploit successful
As a side note, adversaries are likely to use a tool like Empire to craft and obfuscate payloads and their post-injection activities, such as [exfiltration, lateral movement, and persistence](https://github.com/EmpireProject/Empire).

This Analytic Story focuses on detecting signs that a malicious payload has been injected into your environment. For example, one search detects outlook.exe writing a .zip file. Another looks for suspicious .lnk files launching processes. +Despite its simplicity, phishing remains the most pervasive and dangerous cyberthreat. In fact, research shows that as many as [91% of all successful attacks](https://digitalguardian.com/blog/91-percent-cyber-attacks-start-phishing-email-heres-how-protect-against-phishing) are initiated via a phishing email. \ +As most people know, these emails use fraudulent domains, [email scraping](https://www.cyberscoop.com/emotet-trojan-phishing-scraping-templates-cofense-geodo/), familiar contact names inserted as senders, and other tactics to lure targets into clicking a malicious link, opening an attachment with a [nefarious payload](https://www.cyberscoop.com/emotet-trojan-phishing-scraping-templates-cofense-geodo/), or entering sensitive personal information that perpetrators may intercept. This attack technique requires a relatively low level of skill and allows adversaries to easily cast a wide net. Worse, because its success relies on the gullibility of humans, it's impossible to completely "automate" it out of your environment. However, you can use ES and ESCU to detect and investigate potentially malicious payloads injected into your environment subsequent to a phishing attack. \ +hile any kind of file may contain a malicious payload, some are more likely to be perceived as benign (and thus more often escape notice) by the average victim—especially when the attacker sends an email that seems to be from one of their contacts. An example is Microsoft Office files. Most corporate users are familiar with documents with the following suffixes: .doc/.docx (MS Word), .xls/.xlsx (MS Excel), and .ppt/.pptx (MS PowerPoint), so they may click without a second thought, slashing a hole in their organizations' security. \ +Following is a typical series of events, according to an [article by Trend Micro](https://blog.trendmicro.com/trendlabs-security-intelligence/rising-trend-attackers-using-lnk-files-download-malware/):\ +1. Attacker sends a phishing email. Recipient downloads the attached file, which is typically a .docx or .zip file with an embedded .lnk file\ +1. The .lnk file executes a PowerShell script\ +1. Powershell executes a reverse shell, rendering the exploit successful As a side note, adversaries are likely to use a tool like Empire to craft and obfuscate payloads and their post-injection activities, such as [exfiltration, lateral movement, and persistence](https://github.com/EmpireProject/Empire).\ +This Analytic Story focuses on detecting signs that a malicious payload has been injected into your environment. For example, one search detects outlook.exe writing a .zip file. Another looks for suspicious .lnk files launching processes. ====Providing Technologies==== * Carbon Black Response @@ -2611,7 +2791,34 @@ Monitor your environment for suspicious behaviors that resemble the techniques e
====Narrative==== -This story was created as a joint effort between iDefense and Splunk.

iDefense analysts have recently discovered a Windows executable file that, upon execution, spoofs a decryption tool and then drops a file that appears to be the custom-built javascript backdoor, "Orz," which is associated with the threat actors known as MUDCARP (as well as "temp.Periscope" and "Leviathan"). The file is executed using Wscript.

The MUDCARP techniques include the use of the compressed-folders module from Microsoft, zipfldr.dll, with RouteTheCall export to run the malicious process or command. After a successful reboot, the malware is made persistent by a manipulating [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]'help'='c:\\windows\\system32\\rundll32.exe c:\\windows\\system32\\zipfldr.dll,RouteTheCall c:\\programdata\\winapp.exe'. Though this technique is not exclusive to MUDCARP, it has been spotted in the group's arsenal of advanced techniques seen in the wild.

This Analytic Story searches for evidence of tactics, techniques, and procedures (TTPs) that allow for the use of a endpoint detection-and-response (EDR) bypass technique to mask the true parent of a malicious process. It can also be set as a registry key for further sandbox evasion and to allow the malware to launch only after reboot.

If behavioral searches included in this story yield positive hits, iDefense recommends conducting IOC searches for the following:

  • www.chemscalere[.]com
  • chemscalere[.]com
  • about.chemscalere[.]com
  • autoconfig.chemscalere[.]com
  • autodiscover.chemscalere[.]com
  • catalog.chemscalere[.]com
  • cpanel.chemscalere[.]com
  • db.chemscalere[.]com
  • ftp.chemscalere[.]com
  • mail.chemscalere[.]com
  • news.chemscalere[.]com
  • update.chemscalere[.]com
  • webmail.chemscalere[.]com
  • www.candlelightparty[.]org
  • candlelightparty[.]org
  • newapp.freshasianews[.]com
In addition, iDefense also recommends that organizations review their environments for activity related to the following hashes:

  • cd195ee448a3657b5c2c2d13e9c7a2e2
  • b43ad826fe6928245d3c02b648296b43
  • 889a9b52566448231f112a5ce9b5dfaf
  • b8ec65dab97cdef3cd256cc4753f0c54
  • 04d83cd3813698de28cfbba326d7647c
+This story was created as a joint effort between iDefense and Splunk.\ +iDefense analysts have recently discovered a Windows executable file that, upon execution, spoofs a decryption tool and then drops a file that appears to be the custom-built javascript backdoor, "Orz," which is associated with the threat actors known as MUDCARP (as well as "temp.Periscope" and "Leviathan"). The file is executed using Wscript.\ +The MUDCARP techniques include the use of the compressed-folders module from Microsoft, zipfldr.dll, with RouteTheCall export to run the malicious process or command. After a successful reboot, the malware is made persistent by a manipulating `[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]'help'='c:\\windows\\system32\\rundll32.exe c:\\windows\\system32\\zipfldr.dll,RouteTheCall c:\\programdata\\winapp.exe'`. Though this technique is not exclusive to MUDCARP, it has been spotted in the group's arsenal of advanced techniques seen in the wild.\ +This Analytic Story searches for evidence of tactics, techniques, and procedures (TTPs) that allow for the use of a endpoint detection-and-response (EDR) bypass technique to mask the true parent of a malicious process. It can also be set as a registry key for further sandbox evasion and to allow the malware to launch only after reboot.\ +If behavioral searches included in this story yield positive hits, iDefense recommends conducting IOC searches for the following:\ +\ +1. www.chemscalere[.]com\ +1. chemscalere[.]com\ +1. about.chemscalere[.]com\ +1. autoconfig.chemscalere[.]com\ +1. autodiscover.chemscalere[.]com\ +1. catalog.chemscalere[.]com\ +1. cpanel.chemscalere[.]com\ +1. db.chemscalere[.]com\ +1. ftp.chemscalere[.]com\ +1. mail.chemscalere[.]com\ +1. news.chemscalere[.]com\ +1. update.chemscalere[.]com\ +1. webmail.chemscalere[.]com\ +1. www.candlelightparty[.]org\ +1. candlelightparty[.]org\ +1. newapp.freshasianews[.]comIn addition, iDefense also recommends that organizations review their environments for activity related to the following hashes:\ +\ +1. cd195ee448a3657b5c2c2d13e9c7a2e2\ +1. b43ad826fe6928245d3c02b648296b43\ +1. 889a9b52566448231f112a5ce9b5dfaf\ +1. b8ec65dab97cdef3cd256cc4753f0c54\ +1. 04d83cd3813698de28cfbba326d7647c ====Providing Technologies==== * Carbon Black Response @@ -2666,7 +2873,8 @@ Use the searches in this Analytic Story to help you detect structured query lang
====Narrative==== -It is very common for attackers to inject SQL parameters into vulnerable web applications, which then interpret the malicious SQL statements.

This Analytic Story contains a search designed to identify attempts by attackers to leverage this technique to compromise a host and gain a foothold in the target environment. +It is very common for attackers to inject SQL parameters into vulnerable web applications, which then interpret the malicious SQL statements.\ +This Analytic Story contains a search designed to identify attempts by attackers to leverage this technique to compromise a host and gain a foothold in the target environment. ====Providing Technologies==== * Splunk Stream @@ -2825,7 +3033,11 @@ Email remains one of the primary means for attackers to gain an initial foothold
====Narrative==== -It is a common practice for attackers of all types to leverage targeted spearphishing campaigns and mass mailers to deliver weaponized email messages and attachments. Fortunately, there are a number of ways to monitor email data in Splunk to detect suspicious content.

Once a phishing message has been detected, the next steps are to answer the following questions:
  • Which users have received this or a similar message in the past?
  • When did the targeted campaign begin?
  • Have any users interacted with the content of the messages (by downloading an attachment or clicking on a malicious URL)?
This Analytic Story provides detection searches to identify suspicious emails, as well as contextual and investigative searches to help answer some of these questions. +It is a common practice for attackers of all types to leverage targeted spearphishing campaigns and mass mailers to deliver weaponized email messages and attachments. Fortunately, there are a number of ways to monitor email data in Splunk to detect suspicious content.\ +Once a phishing message has been detected, the next steps are to answer the following questions: \ +1. Which users have received this or a similar message in the past?\ +1. When did the targeted campaign begin?\ +1. Have any users interacted with the content of the messages (by downloading an attachment or clicking on a malicious URL)?This Analytic Story provides detection searches to identify suspicious emails, as well as contextual and investigative searches to help answer some of these questions. ====Providing Technologies==== * Microsoft Exchange @@ -2875,7 +3087,9 @@ Monitor and detect techniques used by attackers who leverage the mshta.exe proce
====Narrative==== -One common adversary tactic is to bypass application white-listing solutions via the mshta.exe process, which executes Microsoft HTML applications with the .hta suffix. In these cases, attackers use the trusted Windows utility to eproxy execution of malicious files, whether an .hta application, javascript, or VBScript.

One example of a notable mshta.exe attack was the Kovter malware (https://medium.com/@mbromileyDFIR/malware-monday-aebb456356c5) that was implicated in ransomware and click-fraud attacks. Kovter utilized .hta to execute a series of javascript commands, each progressively more dangerous. According to the Mitre Parternship Network (https://attack.mitre.org/wiki/Technique/T1170), FIN7 has leveraged mshta.exe, as has the MuddyWater group, who used it to execute its POWERSTATS payload (which then used the utility to execute additional payloads).

The searches in this story help you detect and investigate suspicious activity that may indicate that an attacker is leveraging mshta.exe to execute malicious code. +One common adversary tactic is to bypass application white-listing solutions via the mshta.exe process, which executes Microsoft HTML applications with the .hta suffix. In these cases, attackers use the trusted Windows utility to eproxy execution of malicious files, whether an .hta application, javascript, or VBScript.\ +One example of a notable mshta.exe attack was the Kovter malware (https://medium.com/@mbromileyDFIR/malware-monday-aebb456356c5) that was implicated in ransomware and click-fraud attacks. Kovter utilized .hta to execute a series of javascript commands, each progressively more dangerous. According to the Mitre Parternship Network (https://attack.mitre.org/wiki/Technique/T1170), FIN7 has leveraged mshta.exe, as has the MuddyWater group, who used it to execute its POWERSTATS payload (which then used the utility to execute additional payloads).\ +The searches in this story help you detect and investigate suspicious activity that may indicate that an attacker is leveraging mshta.exe to execute malicious code. ====Providing Technologies==== * Carbon Black Response @@ -2930,7 +3144,9 @@ Attackers are increasingly abusing Windows Management Instrumentation (WMI), a f
====Narrative==== -WMI is a Microsoft infrastructure for management data and operations on Windows operating systems. It includes of a set of utilities that can be leveraged to manage both local and remote Windows systems. Attackers are increasingly turning to WMI abuse in their efforts to conduct nefarious tasks, such as reconnaissance, detection of antivirus and virtual machines, code execution, lateral movement, persistence, and data exfiltration.

The detection searches included in this Analytic Story are used to look for suspicious use of WMI commands that attackers may leverage to interact with remote systems. The searches specifically look for the use of WMI to run processes on remote systems.

In the event that unauthorized WMI execution occurs, it will be important for analysts and investigators to determine the context of the event. These details may provide insights related to how WMI was used and to what end. +WMI is a Microsoft infrastructure for management data and operations on Windows operating systems. It includes of a set of utilities that can be leveraged to manage both local and remote Windows systems. Attackers are increasingly turning to WMI abuse in their efforts to conduct nefarious tasks, such as reconnaissance, detection of antivirus and virtual machines, code execution, lateral movement, persistence, and data exfiltration. \ +The detection searches included in this Analytic Story are used to look for suspicious use of WMI commands that attackers may leverage to interact with remote systems. The searches specifically look for the use of WMI to run processes on remote systems.\ +In the event that unauthorized WMI execution occurs, it will be important for analysts and investigators to determine the context of the event. These details may provide insights related to how WMI was used and to what end. ====Providing Technologies==== * Carbon Black Response @@ -2985,7 +3201,9 @@ Monitor and detect registry changes initiated from remote locations, which can b
====Narrative==== -Attackers are developing increasingly sophisticated techniques for hijacking target servers, while evading detection. One such technique that has become progressively more common is registry modification.

The registry is a key component of the Windows operating system. It has a hierarchical database called "registry" that contains settings, options, and values for executables. Once the threat actor gains access to a machine, they can use reg.exe to modify their account to obtain administrator-level privileges, maintain persistence, and move laterally within the environment.

The searches in this story are designed to help you detect behaviors associated with manipulation of the Windows registry. +Attackers are developing increasingly sophisticated techniques for hijacking target servers, while evading detection. One such technique that has become progressively more common is registry modification.\ + The registry is a key component of the Windows operating system. It has a hierarchical database called "registry" that contains settings, options, and values for executables. Once the threat actor gains access to a machine, they can use reg.exe to modify their account to obtain administrator-level privileges, maintain persistence, and move laterally within the environment.\ + The searches in this story are designed to help you detect behaviors associated with manipulation of the Windows registry. ====Providing Technologies==== * Carbon Black Response @@ -3034,7 +3252,7 @@ version = 1.0 ===Windows Defense Evasion Tactics=== -Detect tactics used by malware to evade defenses on Windows endpoints. A few of these include suspicious reg.exe processes, files hidden with attrib.exe and disabling user-account control, among many others +Detect tactics used by malware to evade defenses on Windows endpoints. A few of these include suspicious `reg.exe` processes, files hidden with `attrib.exe` and disabling user-account control, among many others
@@ -3093,7 +3311,8 @@ Adversaries often try to cover their tracks by manipulating Windows logs. Use th
====Narrative==== -Because attackers often modify system logs to cover their tracks and/or to thwart the investigative process, log monitoring is an industry-recognized best practice. While there are legitimate reasons to manipulate system logs, it is still worthwhile to keep track of who manipulated the logs, when they manipulated them, and in what way they manipulated them (determining which accesses, tools, or utilities were employed). Even if no malicious activity is detected, the knowledge of an attempt to manipulate system logs may be indicative of a broader security risk that should be thoroughly investigated.

The Analytic Story gives users two different ways to detect manipulation of Windows Event Logs and one way to detect deletion of the Update Sequence Number (USN) Change Journal. The story helps determine the history of the host and the users who have accessed it. Finally, the story aides in investigation by retrieving all the information on the process that caused these events (if the process has been identified). +Because attackers often modify system logs to cover their tracks and/or to thwart the investigative process, log monitoring is an industry-recognized best practice. While there are legitimate reasons to manipulate system logs, it is still worthwhile to keep track of who manipulated the logs, when they manipulated them, and in what way they manipulated them (determining which accesses, tools, or utilities were employed). Even if no malicious activity is detected, the knowledge of an attempt to manipulate system logs may be indicative of a broader security risk that should be thoroughly investigated.\ +The Analytic Story gives users two different ways to detect manipulation of Windows Event Logs and one way to detect deletion of the Update Sequence Number (USN) Change Journal. The story helps determine the history of the host and the users who have accessed it. Finally, the story aides in investigation by retrieving all the information on the process that caused these events (if the process has been identified). ====Providing Technologies==== * Carbon Black Response diff --git a/docs/stories_categories.md b/docs/stories_categories.md index ff25ee9a28..1ba815f0ec 100644 --- a/docs/stories_categories.md +++ b/docs/stories_categories.md @@ -26,6 +26,8 @@ Analytics stories organized by categories * [AWS User Monitoring](#aws-user-monitoring) +* [Cloud Cryptomining](#cloud-cryptomining) + * [Suspicious AWS EC2 Activities](#suspicious-aws-ec2-activities) * [Suspicious AWS Login Activities](#suspicious-aws-login-activities) @@ -48,9 +50,7 @@ Track when a user assumes an IAM role in another AWS account to obtain cross-acc ##### Narrative Amazon Web Services (AWS) admins manage access to AWS resources and services across the enterprise using AWS's Identity and Access Management (IAM) functionality. IAM provides the ability to create and manage AWS users, groups, and roles-each with their own unique set of privileges and defined access to specific resources (such as EC2 instances, the AWS Management Console, API, or the command-line interface). Unlike conventional (human) users, IAM roles are assumable by anyone in the organization. They provide users with dynamically created temporary security credentials that expire within a set time period.\ -\ Herein lies the rub. In between the time between when the temporary credentials are issued and when they expire is a period of opportunity, where a user could leverage the temporary credentials to wreak havoc-spin up or remove instances, create new users, elevate privileges, and other malicious activities-throughout the environment.\ -\ This Analytic Story includes searches that will help you monitor your AWS CloudTrail logs for evidence of suspicious cross-account activity. For example, while accessing multiple AWS accounts and roles may be perfectly valid behavior, it may be suspicious when an account requests privileges of an account it has not accessed in the past. After identifying suspicious activities, you can use the provided investigative searches to help you probe more deeply. ##### Detections @@ -102,11 +102,8 @@ Monitor your AWS EC2 instances for activities related to cryptojacking/cryptomin ##### Narrative Cryptomining is an intentionally difficult, resource-intensive business. Its complexity was designed into the process to ensure that the number of blocks mined each day would remain steady. So, it's par for the course that ambitious, but unscrupulous, miners make amassing the computing power of large enterprises--a practice known as cryptojacking--a top priority. \ -\ Cryptojacking has attracted an increasing amount of media attention since its explosion in popularity in the fall of 2017. The attacks have moved from in-browser exploits and mobile phones to enterprise cloud services, such as Amazon Web Services (AWS). It's difficult to determine exactly how widespread the practice has become, since bad actors continually evolve their ability to escape detection, including employing unlisted endpoints, moderating their CPU usage, and hiding the mining pool's IP address behind a free CDN. \ -\ -When malicious miners appropriate a cloud instance, often spinning up hundreds of new instances, the costs can become astronomical for the account holder. So, it is critically important to monitor your systems for suspicious activities that could indicate that your network has been infiltrated. \ -\ +hen malicious miners appropriate a cloud instance, often spinning up hundreds of new instances, the costs can become astronomical for the account holder. So, it is critically important to monitor your systems for suspicious activities that could indicate that your network has been infiltrated. \ This Analytic Story is focused on detecting suspicious new instances in your EC2 environment to help prevent such a disaster. It contains detection searches that will detect when a previously unused instance type or AMI is used. It also contains support searches to build lookup files to ensure proper execution of the detection searches. ##### Detections @@ -216,7 +213,6 @@ Monitor your AWS provisioning activities for behaviors originating from unfamili ##### Narrative Because most enterprise AWS activities originate from familiar geographic locations, monitoring for activity from unknown or unusual regions is an important security measure. This indicator can be especially useful in environments where it is impossible to whitelist specific IPs (because they vary).\ -\ This Analytic Story was designed to provide you with flexibility in the precision you employ in specifying legitimate geographic regions. It can be as specific as an IP address or a city, or as broad as a region (think state) or an entire country. By determining how precise you want your geographical locations to be and monitoring for new locations that haven't previously accessed your environment, you can detect adversaries as they begin to probe your environment. Since there are legitimate reasons for activities from unfamiliar locations, this is not a standalone indicator. Nevertheless, location can be a relevant piece of information that you may wish to investigate further. ##### Detections @@ -271,11 +267,8 @@ Detect and investigate dormant user accounts for your AWS environment that have ##### Narrative It seems obvious that it is critical to monitor and control the users who have access to your cloud infrastructure. Nevertheless, it's all too common for enterprises to lose track of ad-hoc accounts, leaving their servers vulnerable to attack. In fact, this was the very oversight that led to Tesla's cryptojacking attack in February, 2018.\ -\ In addition to compromising the security of your data, when bad actors leverage your compute resources, it can incur monumental costs, since you will be billed for any new EC2 instances and increased bandwidth usage. \ -\ Fortunately, you can leverage Amazon Web Services (AWS) CloudTrail--a tool that helps you enable governance, compliance, and risk auditing of your AWS account--to give you increased visibility into your user and resource activity by recording AWS Management Console actions and API calls. You can identify which users and accounts called AWS, the source IP address from which the calls were made, and when the calls occurred.\ -\ The detection searches in this Analytic Story are designed to help you uncover AWS API activities from users not listed in the identity table, as well as similar activities from disabled accounts. ##### Detections @@ -320,6 +313,65 @@ The detection searches in this Analytic Story are designed to help you uncover A * https://d0.awsstatic.com/whitepapers/aws-security-best-practices.pdf * https://blog.redlock.io/cryptojacking-tesla +### Cloud Cryptomining +* id = `3b96d13c-fdc7-45dd-b3ad-c132b31cdd2a` +* creation_date = 2019-10-02 +* modification_date = 2019-10-02 +* version = 1.0 +* spec_version = 2 + +##### Description +Monitor your cloud compute instances for activities related to cryptojacking/cryptomining. New instances that originate from previously unseen regions, users who launch abnormally high numbers of instances, or compute instances started by previously unseen users are just a few examples of potentially malicious behavior. + +##### Narrative +Cryptomining is an intentionally difficult, resource-intensive business. Its complexity was designed into the process to ensure that the number of blocks mined each day would remain steady. So, it's par for the course that ambitious, but unscrupulous, miners make amassing the computing power of large enterprises--a practice known as cryptojacking--a top priority. \ +Cryptojacking has attracted an increasing amount of media attention since its explosion in popularity in the fall of 2017. The attacks have moved from in-browser exploits and mobile phones to enterprise cloud services, such as Amazon Web Services (AWS), Google Cloud Platform (GCP), and Azure. It's difficult to determine exactly how widespread the practice has become, since bad actors continually evolve their ability to escape detection, including employing unlisted endpoints, moderating their CPU usage, and hiding the mining pool's IP address behind a free CDN. \ +When malicious miners appropriate a cloud instance, often spinning up hundreds of new instances, the costs can become astronomical for the account holder. So it is critically important to monitor your systems for suspicious activities that could indicate that your network has been infiltrated. \ +This Analytic Story is focused on detecting suspicious new instances in your cloud environment to help prevent cryptominers from gaining a foothold. It contains detection searches that will detect when a previously unused instance type or AMI is used. It also contains support searches to build lookup files to ensure proper execution of the detection searches. + +##### Detections +* Cloud Compute Instance Started In Previously Unused Region +* Cloud Compute Instance Created With Previously Unseen Instance Type +* Cloud Compute Instance Created With Previously Unseen Image +* Cloud Compute Instance Created By Previously Unseen User + +##### Providing Technologies +* AWS +* Azure +* GCP + +##### Data Models +Cloud_Infrastructure + +##### Mappings + +###### ATT&CK +* Command and Control +* Exfiltration + +###### Kill Chain Phases +* Command and Control + +###### CIS +* CIS 3 +* CIS 8 +* CIS 12 + +###### NIST +* PR.IP +* PR.PT +* PR.AC +* DE.AE +* DE.CM + +##### Maintainers +* name = David Dorsey +* email = Splunk +* company = davidd@splunk.com + +##### References +* https://d0.awsstatic.com/whitepapers/aws-security-best-practices.pdf + ### Suspicious AWS EC2 Activities * id = `2e8948a5-5239-406b-b56b-6c50f1268af3` * creation_date = 2018-02-09 @@ -441,9 +493,7 @@ Use the searches in this Analytic Story to monitor your AWS S3 buckets for evide ##### Narrative As cloud computing has exploded, so has the number of creative attacks on virtual environments. And as the number-two cloud-service provider, Amazon Web Services (AWS) has certainly had its share.\ -\ Amazon's "shared responsibility" model dictates that the company has responsibility for the environment outside of the VM and the customer is responsible for the security inside of the S3 container. As such, it's important to stay vigilant for activities that may belie suspicious behavior inside of your environment.\ -\ Among things to look out for are S3 access from unfamiliar locations and by unfamiliar users. Some of the searches in this Analytic Story help you detect suspicious behavior and others help you investigate more deeply, when the situation warrants. ##### Detections @@ -498,11 +548,8 @@ Leverage these searches to monitor your AWS network traffic for evidence of anom ##### Narrative A virtual private cloud (VPC) is an on-demand managed cloud-computing service that isolates computing resources for each client. Inside the VPC container, the environment resembles a physical network. \ -\ Amazon's VPC service enables you to launch EC2 instances and leverage other Amazon resources. The traffic that flows in and out of this VPC can be controlled via network access-control rules and security groups. Amazon also has a feature called VPC Flow Logs that enables you to log IP traffic going to and from the network interfaces in your VPC. This data is stored using Amazon CloudWatch Logs.\ -\ Attackers may abuse the AWS infrastructure with insecure VPCs so they can co-opt AWS resources for command-and-control nodes, data exfiltration, and more. Once an EC2 instance is compromised, an attacker may initiate outbound network connections for malicious reasons. Monitoring these network traffic behaviors is crucial for understanding the type of traffic flowing in and out of your network and to alert you to suspicious activities.\ -\ The searches in this Analytic Story will monitor your AWS network traffic for evidence of anomalous activity and suspicious behaviors. ##### Detections @@ -554,7 +601,6 @@ Identify unusual changes to your AWS EC2 instances that may indicate malicious a ##### Narrative A common attack technique is to infiltrate a cloud instance and make modifications. The adversary can then secure access to your infrastructure or hide their activities. So it's important to stay alert to changes that may indicate that your environment has been compromised. \ -\ Searches within this Analytic Story can help you detect the presence of a threat by monitoring for EC2 instances that have been created or changed--either by users that have never previously performed these activities or by known users who modify or create instances in a way that have not been done before. This story also provides investigative searches that help you go deeper once you detect suspicious behavior. ##### Detections @@ -787,7 +833,6 @@ Identify and investigate prohibited/unauthorized software or processes that may ##### Narrative It is critical to identify unauthorized software and processes running on enterprise endpoints and determine whether they are likely to be malicious. This Analytic Story requires the user to populate the Interesting Processes table within Enterprise Security with prohibited processes. An included support search will augment this data, adding information on processes thought to be malicious. This search requires data from endpoint detection-and-response solutions, endpoint data sources (such as Sysmon), or Windows Event Logs--assuming that the Active Directory administrator has enabled process tracking within the System Event Audit Logs.\ -\ It is important to investigate any software identified as suspicious, in order to understand how it was installed or executed. Analyzing authentication logs or any historic notable events might elicit additional investigative leads of interest. For best results, schedule the search to run every two weeks. ##### Detections @@ -844,9 +889,7 @@ Monitor your enterprise to ensure that your endpoints are being patched and upda ##### Narrative It is a common best practice to ensure that endpoints are being patched and updated in a timely manner, in order to reduce the risk of compromise via a publicly disclosed vulnerability. Timely application of updates/patches is important to eliminate known vulnerabilities that may be exploited by various threat actors.\ -\ Searches in this analytic story are designed to help analysts monitor endpoints for system patches and/or updates. This helps analysts identify any systems that are not successfully updated in a timely matter.\ -\ Microsoft releases updates for Windows systems on a monthly cadence. They should be installed as soon as possible after following internal testing and validation procedures. Patches and updates for other systems or applications are typically released as needed. ##### Detections @@ -956,7 +999,6 @@ Validate the security configuration of network infrastructure and verify that on ##### Narrative Networking devices, such as routers and switches, are often overlooked as resources that attackers will leverage to subvert an enterprise. Advanced threats actors have shown a proclivity to target these critical assets as a means to siphon and redirect network traffic, flash backdoored operating systems, and implement cryptographic weakened algorithms to more easily decrypt network traffic.\ -\ This Analytic Story helps you gain a better understanding of how your network devices are interacting with your hosts. By compromising your network devices, attackers can obtain direct access to the company's internal infrastructure— effectively increasing the attack surface and accessing private services/data. ##### Detections @@ -1076,31 +1118,18 @@ Detect and investigate activities--such as unusually long `Content-Type` length, ##### Narrative In March of 2017, a remote code-execution vulnerability in the Jakarta Multipart parser in Apache Struts, a widely used open-source framework for creating Java web applications, was disclosed and assigned to CVE-2017-5638. About two months later, hackers exploited the flaw to carry out the world's 5th largest data breach. The target, credit giant Equifax, told investigators that it had become aware of the vulnerability two months before the attack. \ -\ The exploit involved manipulating the `Content-Type HTTP` header to execute commands embedded in the header.\ -\ This Analytic Story contains two different searches that help to identify activity that may be related to this issue. The first search looks for characteristics of the `Content-Type` header consistent with attempts to exploit the vulnerability. This should be a relatively pertinent indicator, as the `Content-Type` header is generally consistent and does not have a large degree of variation.\ -\ The second search looks for the execution of various commands typically entered on the command shell when an attacker first lands on a system. These commands are not generally executed on web servers during the course of day-to-day operation, but they may be used when the system is undergoing maintenance or troubleshooting.\ -\ First, it is helpful is to understand how often the notable event is generated, as well as the commonalities in some of these events. This may help determine whether this is a common occurrence that is of a lesser concern or a rare event that may require more extensive investigation. It can also help to understand whether the issue is restricted to a single user or system or is broader in scope.\ -\ -When looking at the target of the behavior illustrated by the event, you should note the sensitivity of the user and or/system to help determine the potential impact. It is also helpful to see what other events involving the target have occurred in the recent past. This can help tie different events together and give further situational awareness regarding the target.\ -\ +hen looking at the target of the behavior illustrated by the event, you should note the sensitivity of the user and or/system to help determine the potential impact. It is also helpful to see what other events involving the target have occurred in the recent past. This can help tie different events together and give further situational awareness regarding the target.\ Various types of information for external systems should be reviewed and (potentially) collected if the incident is, indeed, judged to be malicious. Information like this can be useful in generating your own threat intelligence to create alerts in the future.\ -\ Looking at the country, responsible party, and fully qualified domain names associated with the external IP address--as well as the registration information associated with those domain names, if they are frequently visited by others--can help you answer the question of "who," in regard to the external system. Answering that can help qualify the event and may serve useful for tracking. In addition, there are various sources that can provide some reputation information on the IP address or domain name, which can assist in determining if the event is malicious in nature. Finally, determining whether or not there are other events associated with the IP address may help connect some dots or show other events that should be brought into scope.\ -\ Gathering various data elements on the system of interest can sometimes help quickly determine that something suspicious may be happening. Some of these items include determining who else may have recently logged into the system, whether any unusual scheduled tasks exist, whether the system is communicating on suspicious ports, whether there are modifications to sensitive registry keys, and whether there are any known vulnerabilities on the system. This information can often highlight other activity commonly seen in attack scenarios or give more information about how the system may have been targeted.\ -\ -When a specific service or application is targeted, it is often helpful to know the associated version to help determine whether or not it is vulnerable to a specific exploit.\ -\ -When it is suspected there is an attack targeting a web server, it is helpful to look at some of the behavior of the web service to see if there is evidence that the service has been compromised. Some indications of this might be network connections to external resources, the web service spawning child processes that are not associated with typical behavior, and whether the service wrote any files that might be malicious in nature.\ -\ +hen a specific service or application is targeted, it is often helpful to know the associated version to help determine whether or not it is vulnerable to a specific exploit.\ +hen it is suspected there is an attack targeting a web server, it is helpful to look at some of the behavior of the web service to see if there is evidence that the service has been compromised. Some indications of this might be network connections to external resources, the web service spawning child processes that are not associated with typical behavior, and whether the service wrote any files that might be malicious in nature.\ In the event that a suspicious file is found, we can review more information about it to help determine if it is, in fact, malicious. Identifying the file type, any processes that have the file open, what processes created and/or modified the file, and the number of systems that may have this file can help to determine if the file is malicious. Also, determining the file hash and checking it against reputation sources, such as VirusTotal, can sometimes quickly help determine whether it is malicious in nature.\ -\ Often, a simple inspection of a suspect process name and path can tell you if the system has been compromised. For example, if `svchost.exe` is found running from a location other than `C:\Windows\System32`, it is likely something malicious designed to hide in plain sight when simply reviewing process names. Similarly, if the process itself seems legitimate, but the parent process is running from the temporary browser cache, there may be activity initiated via a compromised website the user visited.\ -\ It can also be very helpful to examine various behaviors of the process of interest or the parent of the process that is of interest. For example, if it turns out that the process of interest is malicious, it would be good to see if the parent to that process spawned other processes that might also be worth further scrutiny. If a process is suspect, reviewing the network connections made around the time of the event and/or if the process spawned any child processes could be helpful in determining whether it is malicious or executing a malicious script. ##### Detections @@ -1164,33 +1193,19 @@ In March of 2016, adversaries were seen using JexBoss--an open-source utility us ##### Narrative This Analytic Story looks for probing and exploitation attempts targeting JBoss application servers. While the vulnerabilities associated with this story are rather dated, they were leveraged in a spring 2016 campaign in connection with the Samsam ransomware variant. Incidents involving this ransomware are unique, in that they begin with attacks against vulnerable services, rather than the phishing or drive-by attacks more common with ransomware. In this case, vulnerable JBoss applications appear to be the target of choice.\ -\ It is helpful to understand how often a notable event generated by this story occurs, as well as the commonalities between some of these events, both of which may provide clues about whether this is a common occurrence of minimal concern or a rare event that may require more extensive investigation. It may also help to understand whether the issue is restricted to a single user/system or whether it is broader in scope.\ -\ -When looking at the target of the behavior uncovered by the event, you should note the sensitivity of the user and or/system to help determine the potential impact. It is also helpful to identify other recent events involving the target. This can help tie different events together and give further situational awareness regarding the target host.\ -\ +hen looking at the target of the behavior uncovered by the event, you should note the sensitivity of the user and or/system to help determine the potential impact. It is also helpful to identify other recent events involving the target. This can help tie different events together and give further situational awareness regarding the target host.\ Various types of information for external systems should be reviewed and, potentially, collected if the incident is, indeed, judged to be malicious. This data may be useful for generating your own threat intelligence, so you can create future alerts.\ -\ The following factors may assist you in determining whether the event is malicious: \ -\ 1. Country of origin\ -\ 1. Responsible party\ -\ 1. Fully qualified domain names associated with the external IP address\ -\ 1. Registration of fully qualified domain names associated with external IP address Determining whether it is a dynamic domain frequently visited by others and/or how third parties categorize it can also help you qualify and understand the event and possible motivation for the attack. In addition, there are various sources that may provide reputation information on the IP address or domain name, which can assist you in determining whether the event is malicious in nature. Finally, determining whether there are other events associated with the IP address may help connect data points or expose other historic events that might be brought back into scope.\ -\ Gathering various data on the system of interest can sometimes help quickly determine whether something suspicious is happening. Some of these items include determining who else may have logged into the system recently, whether any unusual scheduled tasks exist, whether the system is communicating on suspicious ports, whether there are modifications to sensitive registry keys, and/or whether there are any known vulnerabilities on the system. This information can often highlight other activity commonly seen in attack scenarios or give more information about how the system may have been targeted.\ -\ -When a specific service or application is targeted, it is often helpful to know the associated version, to help determine whether it is vulnerable to a specific exploit.\ -\ +hen a specific service or application is targeted, it is often helpful to know the associated version, to help determine whether it is vulnerable to a specific exploit.\ If you suspect an attack targeting a web server, it is helpful to look at some of the behavior of the web service to see if there is evidence that the service has been compromised. Some indications of this might be network connections to external resources, the web service spawning child processes that are not associated with typical behavior, and whether the service wrote any files that might be malicious in nature.\ -\ If a suspicious file is found, we can review more information about it to help determine if it is, in fact, malicious. Identifying the file type, any processes that opened the file, the processes that may have created and/or modified the file, and how many other systems potentially have this file can you determine whether the file is malicious. Also, determining the file hash and checking it against reputation sources, such as VirusTotal, can sometimes help you quickly determine if it is malicious in nature.\ -\ Often, a simple inspection of a suspect process name and path can tell you if the system has been compromised. For example, if svchost.exe is found running from a location other than `C:\Windows\System32`, it is likely something malicious designed to hide in plain sight when simply reviewing process names. \ -\ It can also be helpful to examine various behaviors of and the parent of the process of interest. For example, if it turns out the process of interest is malicious, it would be good to see whether the parent process spawned other processes that might also warrant further scrutiny. If a process is suspect, a review of the network connections made around the time of the event and noting whether the process has spawned any child processes could be helpful in determining whether it is malicious or executing a malicious script. ##### Detections @@ -1300,22 +1315,13 @@ Keeping your Splunk deployment up to date is critical and may help you reduce th ##### Narrative This Analytic Story is associated with CVE-2016-4859, an open-redirect vulnerability in the following versions of Splunk Enterprise:\ \ -\ -\ 1. Splunk Enterprise 6.4.x, prior to 6.4.3\ -\ 1. Splunk Enterprise 6.3.x, prior to 6.3.6\ -\ 1. Splunk Enterprise 6.2.x, prior to 6.2.10\ -\ 1. Splunk Enterprise 6.1.x, prior to 6.1.11\ -\ 1. Splunk Enterprise 6.0.x, prior to 6.0.12\ -\ 1. Splunk Enterprise 5.0.x, prior to 5.0.16\ -\ 1. Splunk Light, prior to 6.4.3CVE-2016-4859 allows attackers to redirect users to arbitrary web sites and conduct phishing attacks via unspecified vectors. (Credit: Noriaki Iwasaki, Cyber Defense Institute, Inc.).\ -\ It is important to ensure that your Splunk deployment is being kept up to date and is properly configured. This detection search allows analysts to monitor internal logs to ensure users are properly authenticated and cannot be redirected to any malicious third-party websites. ##### Detections @@ -1368,11 +1374,8 @@ Reduce the risk of CVE-2018-11409, an information disclosure vulnerability withi ##### Narrative Although there have been no reports of it being exploited, Splunk Enterprise versions through 7.0.1 reportedly have a vulnerability that may expose information through a REST endpoint (read more here: https://www.splunk.com/view/SP-CAAAP5E#VulnerabilityDescriptionsandRatings). NIST has included it in its vulnerability database (read more here: https://nvd.nist.gov/vuln/detail/CVE-2018-11409). The REST endpoint that exposes system information is also necessary for the proper operation of Splunk clustering and instrumentation. Customers should upgrade to the latest version to reduce the risk of this vulnerability.\ -\ Splunk Enterprise exposes partial information about the host operating system, hardware, and Splunk license. Splunk Enterprise before 6.6.0 exposes this information without authentication. Splunk Enterprise 6.6.0 and later exposes this information only to authenticated Splunk users. Based on the information exposure, Splunk characterizes this issue as a low severity impact.\ -\ Read more in Splunk's official response: https://www.splunk.com/view/SP-CAAAP5E#VulnerabilityDescriptionsandRatings.\ -\ A detection search within this Analytic Story looks for vulnerabilities described in CVE-2018-11409: Information Exposure (https://nvd.nist.gov/vuln/detail/CVE-2018-11409). If it turns up activities that may be specific, you can use the included investigative searches to return information regarding web activity and network traffic by src_ip. ##### Detections @@ -1441,9 +1444,7 @@ Detect and investigate activity that may indicate that an adversary is using fau ##### Narrative While you can educate your users and customers about the risks and threats posed by typosquatting, phishing, and corporate espionage, human error is a persistent fact of life. Of course, your adversaries are all too aware of this reality and will happily leverage it for nefarious purposes whenever possible3phishing with lookalike addresses, embedding faux command-and-control domains in malware, and hosting malicious content on domains that closely mimic your corporate servers. This is where brand monitoring comes in.\ -\ You can use our adaptation of `DNSTwist`, together with the support searches in this Analytic Story, to generate permutations of specified brands and external domains. Splunk can monitor email, DNS requests, and web traffic for these permutations and provide you with early warnings and situational awareness--powerful elements of an effective defense.\ -\ Notable events will include IP addresses, URLs, and user data. Drilling down can provide you with even more actionable intelligence, including likely geographic information, contextual searches to help you scope the problem, and investigative searches. ##### Detections @@ -1506,7 +1507,6 @@ DNS poses a serious threat as a Denial of Service (DOS) amplifier, if it respond ##### Narrative The Domain Name System (DNS) is the protocol used to map domain names to IP addresses. It has been proven to work very well for its intended function. However if DNS is misconfigured, servers can be abused by attackers to levy amplification or redirection attacks against victims. Because DNS responses to `ANY` queries are so much larger than the queries themselves--and can be made with a UDP packet, which does not require a handshake--attackers can spoof the source address of the packet and cause much more data to be sent to the victim than if they sent the traffic themselves. The `ANY` requests are will be larger than normal DNS server requests, due to the fact that the server provides significant details, such as MX records and associated IP addresses. A large volume of this traffic can result in a DOS on the victim's machine. This misconfiguration leads to two possible victims, the first being the DNS servers participating in an attack and the other being the hosts that are the targets of the DOS attack.\ -\ The search in this story can help you to detect if attackers are abusing your company's DNS infrastructure to launch DNS amplification attacks causing Denial of Service to other victims. ##### Detections @@ -1677,7 +1677,6 @@ Detect activities and various techniques associated with the abuse of `netsh.exe ##### Narrative It is a common practice for attackers of all types to leverage native Windows tools and functionality to execute commands for malicious reasons. One such tool on Windows OS is `netsh.exe`,a command-line scripting utility that allows you to--either locally or remotely--display or modify the network configuration of a computer that is currently running. `Netsh.exe` can be used to discover and disable local firewall settings. It can also be used to set up a remote connection to a host from an infected system.\ -\ To get started, run the detection search to identify parent processes of `netsh.exe`. ##### Detections @@ -1737,15 +1736,10 @@ Monitor your environment for activity consistent with common attack techniques b ##### Narrative The Federal Bureau of Investigations (FBI) defines Internet fraud as the use of Internet services or software with Internet access to defraud victims or to otherwise take advantage of them. According to the Bureau, Internet crime schemes are used to steal millions of dollars each year from victims and continue to plague the Internet through various methods. The agency includes phishing scams, data breaches, Denial of Service (DOS) attacks, email account compromise, malware, spoofing, and ransomware in this category.\ -\ These crimes are not the fraud itself, but rather the attack techniques commonly employed by fraudsters in their pursuit of data that enables them to commit malicious actssuch as obtaining and using stolen credit cards. They represent a serious problem that is steadily increasing and not likely to go away anytime soon.\ -\ -When developing a strategy for preventing fraud in your environment, its important to look across all of your web services for evidence that attackers are abusing enterprise resources to enumerate systems, harvest data for secondary fraudulent activity, or abuse terms of service.This Analytic Story looks for evidence of common Internet attack techniques that could be indicative of web fraud in your environmentincluding account harvesting, anomalous user clickspeed, and password sharing across accounts, to name just a few.\ -\ +hen developing a strategy for preventing fraud in your environment, its important to look across all of your web services for evidence that attackers are abusing enterprise resources to enumerate systems, harvest data for secondary fraudulent activity, or abuse terms of service.This Analytic Story looks for evidence of common Internet attack techniques that could be indicative of web fraud in your environmentincluding account harvesting, anomalous user clickspeed, and password sharing across accounts, to name just a few.\ The account-harvesting search focuses on web pages used for user-account registration. It detects the creation of a large number of user accounts using the same email domain name, a type of activity frequently seen in advance of a fraud campaign.\ -\ The anomalous clickspeed search looks for users who are moving through your website at a faster-than-normal speed or with a perfect click cadence (high periodicity or low standard deviation), which could indicate that the user is a script, not an actual human.\ -\ Another search detects incidents wherein a single password is used across multiple accounts, which may indicate that a fraudster has infiltrated your environment and embedded a common password within a script. ##### Detections @@ -1828,9 +1822,7 @@ Leverage searches that allow you to detect and investigate unusual activities th ##### Narrative Conventional wisdom holds that Apple's MacOS operating system is significantly less vulnerable to attack than Windows machines. While that point is debatable, it is true that attacks against MacOS systems are much less common. However, this fact does not mean that Macs are impervious to breaches. To the contrary, research has shown that that Mac malware is increasing at an alarming rate. According to AV-test, in 2018, there were 86,865 new MacOS malware variants, up from 27,338 the year before—a 31% increase. In contrast, the independent research firm found that new Windows malware had increased from 65.17M to 76.86M during that same period, less than half the rate of growth. The bottom line is that while the numbers look a lot smaller than Windows, it's definitely time to take Mac security more seriously.\ -\ This Analytic Story addresses the ColdRoot remote access trojan (RAT), which was uploaded to Github in 2016, but was still escaping detection by the first quarter of 2018, when a new, more feature-rich variant was discovered masquerading as an Apple audio driver. Among other capabilities, the Pascal-based ColdRoot can heist passwords from users' keychains and remotely control infected machines without detection. In the initial report of his findings, Patrick Wardle, Chief Research Officer for Digita Security, explained that the new ColdRoot RAT could start and kill processes on the breached system, spawn new remote-desktop sessions, take screen captures and assemble them into a live stream of the victim's desktop, and more.\ -\ Searches in this Analytic Story leverage the capabilities of OSquery to address ColdRoot detection from several different angles, such as looking for the existence of associated files and processes, and monitoring for signs of an installed keylogger. ##### Detections @@ -1886,11 +1878,8 @@ Monitor for suspicious activities associated with DHS Technical Alert US-CERT TA ##### Narrative The frequency of nation-state cyber attacks has increased significantly over the last decade. Employing numerous tactics and techniques, these attacks continue to escalate in complexity. \ -\ There is a wide range of motivations for these state-sponsored hacks, including stealing valuable corporate, military, or diplomatic dataѿall of which could confer advantages in various arenas. They may also target critical infrastructure. \ -\ One joint Technical Alert (TA) issued by the Department of Homeland and the FBI in mid-March of 2018 attributed some cyber activity targeting utility infrastructure to operatives sponsored by the Russian government. The hackers executed spearfishing attacks, installed malware, employed watering-hole domains, and more. While they caused no physical damage, the attacks provoked fears that a nation-state could turn off water, redirect power, or compromise a nuclear power plant.\ -\ Suspicious activities--spikes in SMB traffic, processes that launch netsh (to modify the network configuration), suspicious registry modifications, and many more--may all be events you may wish to investigate further. While the use of these technique may be an indication that a nation-state actor is attempting to compromise your environment, it is important to note that these techniques are often employed by other groups, as well. ##### Detections @@ -2023,9 +2012,7 @@ Detect rarely used executables, specific registry paths that may confer malware ##### Narrative The trojan downloader known as Emotet first surfaced in 2014, when it was discovered targeting the banking industry to steal credentials. However, according to a joint technical alert (TA) issued by three government agencies (https://www.us-cert.gov/ncas/alerts/TA18-201A), Emotet has evolved far beyond those beginnings to become what a ThreatPost article called a threat-delivery service(see https://threatpost.com/emotet-malware-evolves-beyond-banking-to-threat-delivery-service/134342/). For example, in early 2018, Emotet was found to be using its loader function to spread the Quakbot and Ransomware variants. \ -\ According to the TA, the the malware continues to be among the most costly and destructive malware affecting the private and public sectors. Researchers have linked it to the threat group Mealybug, which has also been on the security communitys radar since 2014.\ -\ The searches in this Analytic Story will help you find executables that are rarely used in your environment, specific registry paths that malware often uses to ensure survivability and persistence, instances where cmd.exe is used to launch script interpreters, and other indicators that Emotet or other malware has compromised your environment. ##### Detections @@ -2097,11 +2084,8 @@ Monitor for and investigate activities, including the creation or deletion of hi ##### Narrative North Korea's government-sponsored "cyber army" has been slowly building momentum and gaining sophistication over the last 15 years or so. As a result, the group's activity, which the US government refers to as "Hidden Cobra," has surreptitiously crept onto the collective radar as a preeminent global threat.\ -\ These state-sponsored actors are thought to be responsible for everything from a hack on a South Korean nuclear plant to an attack on Sony in anticipation of its release of the movie "The Interview" at the end of 2014. They're also notorious for cyberespionage. In recent years, the group seems to be focused on financial crimes, such as cryptojacking.\ -\ In June of 2018, The Department of Homeland Security, together with the FBI and other U.S. government partners, issued Technical Alert (TA-18-149A) to advise the public about two variants of North Korean malware. One variant, dubbed "Joanap," is a multi-stage peer-to-peer botnet that allows North Korean state actors to exfiltrate data, download and execute secondary payloads, and initialize proxy communications. The other variant, "Brambul," is a Windows32 SMB worm that is dropped into a victim network. When executed, the malware attempts to spread laterally within a victim's local subnet, connecting via the SMB protocol and initiating brute-force password attacks. It reports details to the Hidden Cobra actors via email, so they can use the information for secondary remote operations.\ -\ Among other searches in this Analytic Story is a detection search that looks for the creation or deletion of hidden shares, such as, "adnim$," which the Hidden Cobra malware creates on the target system. Another looks for the creation of three malicious files associated with the malware. You can also use a search in this story to investigate activity that indicates that malware is sending email back to the attackers. ##### Detections @@ -2172,13 +2156,9 @@ Detect activities and various techniques associated with the Orangeworm Attack G ##### Narrative In May of 2018, the attack group Orangeworm was implicated for installing a custom backdoor called Trojan.Kwampirs within large international healthcare corporations in the United States, Europe, and Asia. This malware provides the attackers with remote access to the target system, decrypting and extracting a copy of its main DLL payload from its resource section. Before writing the payload to disk, it inserts a randomly generated string into the middle of the decrypted payload in an attempt to evade hash-based detections.\ -\ Awareness of the Orangeworm group first surfaced in January, 2015. It has conducted targeted attacks against related industries, as well, such as pharmaceuticals and healthcare IT solution providers.\ -\ Although the group's motivation is unknown, its goal may be stealing patient information to sell on the black market. Another possible explanation is corporate espionage. \ -\ Healthcare may be a promising target, because it is notoriously behind in technology, often using older operating systems and neglecting to patch computers. Even so, the group was able to evade detection for a full three years. Sources say that the malware spread quickly within the target networks, infecting computers used to control medical devices, such as MRI and X-ray machines.\ -\ This Analytic Story is designed to help you detect and investigate suspicious activities that may be indicative of an Orangeworm attack. One detection search looks for command-line arguments. Another monitors for uses of sc.exe, a non-essential Windows file that can manipulate Windows services. One of the investigative searches helps you get more information on web hosts that you suspect have been compromised. ##### Detections @@ -2318,15 +2298,10 @@ Leverage searches that allow you to detect and investigate unusual activities th ##### Narrative The first version of the SamSam ransomware (a.k.a. Samas or SamsamCrypt) was launched in 2015 by a group of Iranian threat actors. The malicious software has affected and continues to affect thousands of victims and has raised almost $6M in ransom.\ -\ Although categorized under the heading of ransomware, SamSam campaigns have some importance distinguishing characteristics. Most notable is the fact that conventional ransomware is a numbers game. Perpetrators use a "spray-and-pray" approach with phishing campaigns or other mechanisms, charging a small ransom (typically under $1,000). The goal is to find a large number of victims willing to pay these mini-ransoms, adding up to a lucrative payday. They use relatively simple methods for infecting systems.\ -\ SamSam attacks are different beasts. They have become progressively more targeted and skillful than typical ransomware attacks. First, malicious actors break into a victim's network, surveil it, then run the malware manually. The attacks are tailored to cause maximum damage and the threat actors usually demand amounts in the tens of thousands of dollars.\ -\ In a typical attack on one large healthcare organization in 2018, the company ended up paying a ransom of four Bitcoins, then worth $56,707. Reports showed that access to the company's files was restored within two hours of paying the sum.\ -\ According to Sophos, SamSam previously leveraged RDP to gain access to targeted networks via brute force. SamSam is not spread automatically, like other malware. It requires skill because it forces the attacker to adapt their tactics to the individual environment. Next, the actors escalate their privileges to admin level. They scan the networks for worthy targets, using conventional tools, such as PsExec or PaExec, to deploy/execute, quickly encrypting files.\ -\ This Analytic Story includes searches designed to help detect and investigate signs of the SamSam ransomware, such as the creation of fileswrites to system32, writes with tell-tale extensions, batch files written to system32, and evidence of brute-force attacks via RDP. ##### Detections @@ -2403,9 +2378,7 @@ Quickly identify systems running new or unusual processes in your environment th ##### Narrative Being able to profile a host's processes within your environment can help you more quickly identify processes that seem out of place when compared to the rest of the population of hosts or asset types.\ -\ This Analytic Story lets you identify processes that are either a) not typically seen running or b) have some sort of suspicious command-line arguments associated with them. This Analytic Story will also help you identify the user running these processes and the associated process activity on the host.\ -\ In the event an unusual process is identified, it is imperative to better understand how that process was able to execute on the host, when it first executed, and whether other hosts are affected. This extra information may provide clues that can help the analyst further investigate any suspicious activity. ##### Detections @@ -2470,13 +2443,9 @@ Detect and investigate suspected abuse of file extensions and Windows file assoc ##### Narrative Attackers use a variety of techniques to entice users to run malicious code or to persist on an endpoint. One way to accomplish these goals is to leverage file extensions and the mechanism Windows uses to associate files with specific applications. \ -\ Since its earliest days, Windows has used extensions to identify file types. Users have become familiar with these extensions and their application associations. For example, if users see that a file ends in `.doc` or `.docx`, they will assume that it is a Microsoft Word document and expect that double-clicking will open it using `winword.exe`. The user will typically also presume that the `.docx` file is safe. \ -\ Attackers take advantage of this expectation by obfuscating the true file extension. They can accomplish this in a couple of ways. One technique involves inserting multiple spaces in the file name before the extension to hide the extension from the GUI, obscuring the true nature of the file. Another approach involves prepending the real extension with a different one. This is especially effective when Windows is configured to "hide extensions for known file types." In this case, the real extension is not displayed, but the prepended one is, leading end users to believe the file is a different type than it actually is.\ -\ Changing the association between a file extension and an application can allow an attacker to execute arbitrary code. The technique typically involves changing the association for an often-launched file type to associate instead with a malicious program the attacker has dropped on the endpoint. When the end user launches a file that has been manipulated in this way, it will execute the attacker's malware. It will also execute the application the end user expected to run, cleverly obscuring the fact that something suspicious has occurred.\ -\ Run the searches in this story to detect and investigate suspicious behavior that may indicate abuse or manipulation of Windows file extensions and/or associations. ##### Detections @@ -2640,9 +2609,7 @@ Monitor for and investigate activities--such as suspicious writes to the Windows ##### Narrative A common adversary goal is to identify and exfiltrate data of value from a target organization. This data may include email conversations and addresses, confidential company information, links to network design/infrastructure, important dates, and so on.\ -\ Attacks are composed of three activities: identification, collection, and staging data for exfiltration. Identification typically involves scanning systems and observing user activity. Collection can involve the transfer of large amounts of data from various repositories. Staging/preparation includes moving data to a central location and compressing (and optionally encoding and/or encrypting) it. All of these activities provide opportunities for defenders to identify their presence. \ -\ Use the searches to detect and monitor suspicious behavior related to these activities. ##### Detections @@ -2707,7 +2674,6 @@ Detect and investigate tactics, techniques, and procedures leveraged by attacker ##### Narrative Threat actors typically architect and implement an infrastructure to use in various ways during the course of their attack campaigns. In some cases, they leverage this infrastructure for scanning and performing reconnaissance activities. In others, they may use this infrastructure to launch actual attacks. One of the most important functions of this infrastructure is to establish servers that will communicate with implants on compromised endpoints. These servers establish a command and control channel that is used to proxy data between the compromised endpoint and the attacker. These channels relay commands from the attacker to the compromised endpoint and the output of those commands back to the attacker.\ -\ Because this communication is so critical for an adversary, they often use techniques designed to hide the true nature of the communications. There are many different techniques used to establish and communicate over these channels. This Analytic Story provides searches that look for a variety of the techniques used for these channels, as well as indications that these channels are active, by examining logs associated with border control devices and network-access control lists. ##### Detections @@ -2777,7 +2743,6 @@ Detect DNS and web requests to fake websites generated by the EvilGinx2 toolkit. ##### Narrative As most people know, these emails use fraudulent domains, [email scraping](https://www.cyberscoop.com/emotet-trojan-phishing-scraping-templates-cofense-geodo/), familiar contact names inserted as senders, and other tactics to lure targets into clicking a malicious link, opening an attachment with a [nefarious payload](https://www.cyberscoop.com/emotet-trojan-phishing-scraping-templates-cofense-geodo/), or entering sensitive personal information that perpetrators may intercept. This attack technique requires a relatively low level of skill and allows adversaries to easily cast a wide net. Because phishing is a technique that relies on human psychology, you will never be able to eliminate this vulnerability 100%. But you can use automated detection to significantly reduce the risks.\ -\ This Analytic Story focuses on detecting signs of MiTM attacks enabled by [EvilGinx2](https://github.com/kgretzky/evilginx2), a toolkit that sets up a transparent proxy between the targeted site and the user. In this way, the attacker is able to intercept credentials and two-factor identification tokens. It employs a proxy template to allow a registered domain to impersonate targeted sites, such as Linkedin, Amazon, Okta, Github, Twitter, Instagram, Reddit, Office 365, and others. It can even register SSL certificates and camouflage them via a URL shortener, making them difficult to detect. Searches in this story look for signs of MiTM attacks enabled by EvilGinx2. ##### Detections @@ -2834,9 +2799,7 @@ Uncover activity consistent with credential dumping, a technique wherein attacke ##### Narrative Credential dumping—gathering credentials from a target system, often hashed or encrypted—is a common attack technique. Even though the credentials may not be in plain text, an attacker can still exfiltrate the data and set to cracking it offline, on their own systems. The threat actors target a variety of sources to extract them, including the Security Accounts Manager (SAM), Local Security Authority (LSA), NTDS from Domain Controllers, or the Group Policy Preference (GPP) files.\ -\ Once attackers obtain valid credentials, they use them to move throughout a target network with ease, discovering new systems and identifying assets of interest. Credentials obtained in this manner typically include those of privileged users, which may provide access to more sensitive information and system operations.\ -\ The detection searches in this Analytic Story monitor for the process **reg.exe** with the "save" parameter, as well as for a target registry path that specifies a binary export of credentials from the registry. In addition, the analytics flag Windows events and activities associated with the use of Mimikatz functionality in Powershell Empire. ##### Detections @@ -2899,21 +2862,13 @@ Secure your environment against DNS hijacks with searches that help you detect a ##### Narrative Dubbed the Achilles heel of the Internet (see https://www.f5.com/labs/articles/threat-intelligence/dns-is-still-the-achilles-heel-of-the-internet-25613), DNS plays a critical role in routing web traffic but is notoriously vulnerable to attack. One reason is its distributed nature. It relies on unstructured connections between millions of clients and servers over inherently insecure protocols.\ -\ The gravity and extent of the importance of securing DNS from attacks is undeniable. The fallout of compromised DNS can be disastrous. Not only can hackers bring down an entire business, they can intercept confidential information, emails, and login credentials, as well. \ -\ On January 22, 2019, the US Department of Homeland Security 2019's Cybersecurity and Infrastructure Security Agency (CISA) raised awareness of some high-profile DNS hijacking attacks against infrastructure, both in the United States and abroad. It issued Emergency Directive 19-01 (see https://cyber.dhs.gov/ed/19-01/), which summarized the activity and required government agencies to take the following four actions, all within 10 days: \ -\ 1. For all .gov or other agency-managed domains, audit public DNS records on all authoritative and secondary DNS servers, verify that they resolve to the intended location or report them to CISA.\ -\ 1. Update the passwords for all accounts on systems that can make changes to each agency 2019's DNS records.\ -\ 1. Implement multi-factor authentication (MFA) for all accounts on systems that can make changes to each agency's 2019 DNS records or, if impossible, provide CISA with the names of systems, the reasons why MFA cannot be enabled within the required timeline, and an ETA for when it can be enabled.\ -\ -1. CISA will begin regular delivery of newly added certificates to Certificate Transparency (CT) logs for agency domains via the Cyber Hygiene service. Upon receipt, agencies must immediately begin monitoring CT log data for certificates issued that they did not request. If an agency confirms that a certificate was unauthorized, it must report the certificate to the issuing certificate authority and to CISA.Of course, it makes sense to put equivalent actions in place within your environment, as well. \ -\ +1. CISA will begin regular delivery of newly added certificates to Certificate Transparency (CT) logs for agency domains via the Cyber Hygiene service. Upon receipt, agencies must immediately begin monitoring CT log data for certificates issued that they did not request. If an agency confirms that a certificate was unauthorized, it must report the certificate to the issuing certificate authority and to CISA. Of course, it makes sense to put equivalent actions in place within your environment, as well. \ In DNS hijacking, the attacker assumes control over an account or makes use of a DNS service exploit to make changes to DNS records. Once they gain access, attackers can substitute their own MX records, name-server records, and addresses, redirecting emails and traffic through their infrastructure, where they can read, copy, or modify information seen. They can also generate valid encryption certificates to help them avoid browser-certificate checks. In one notable attack on the Internet service provider, GoDaddy, the hackers altered Sender Policy Framework (SPF) records a relatively minor change that did not inflict excessive damage but allowed for more effective spam campaigns.\ -\ The searches in this Analytic Story help you detect and investigate activities that may indicate that DNS hijacking has taken place within your environment. ##### Detections @@ -3034,13 +2989,9 @@ Detect and investigate tactics, techniques, and procedures around how attackers ##### Narrative Once attackers gain a foothold within an enterprise, they will seek to expand their accesses and leverage techniques that facilitate lateral movement. Attackers will often spend quite a bit of time and effort moving laterally. Because lateral movement renders an attacker the most vulnerable to detection, it's an excellent focus for detection and investigation.\ -\ Indications of lateral movement can include the abuse of system utilities (such as `psexec.exe`), unauthorized use of remote desktop services, `file/admin$` shares, WMI, PowerShell, pass-the-hash, or the abuse of scheduled tasks. Organizations must be extra vigilant in detecting lateral movement techniques and look for suspicious activity in and around high-value strategic network assets, such as Active Directory, which are often considered the primary target or "crown jewels" to a persistent threat actor.\ -\ An adversary can use lateral movement for multiple purposes, including remote execution of tools, pivoting to additional systems, obtaining access to specific information or files, access to additional credentials, exfiltrating data, or delivering a secondary effect. Adversaries may use legitimate credentials alongside inherent network and operating-system functionality to remotely connect to other systems and remain under the radar of network defenders.\ -\ If there is evidence of lateral movement, it is imperative for analysts to collect evidence of the associated offending hosts. For example, an attacker might leverage host A to gain access to host B. From there, the attacker may try to move laterally to host C. In this example, the analyst should gather as much information as possible from all three hosts. \ -\ It is also important to collect authentication logs for each host, to ensure that the offending accounts are well-documented. Analysts should account for all processes to ensure that the attackers did not install unauthorized software. ##### Detections @@ -3106,23 +3057,14 @@ Attackers are finding stealthy ways "live off the land," leveraging utilities an ##### Narrative The searches in this Analytic Story monitor for parameters often used for malicious purposes. It is helpful to understand how often the notable events generated by this story occur, as well as the commonalities between some of these events. These factors may provide clues about whether this is a common occurrence of minimal concern or a rare event that may require more extensive investigation. Likewise, it is important to determine whether the issue is restricted to a single user/system or is broader in scope.\ -\ The following factors may assist you in determining whether the event is malicious: \ -\ 1. Country of origin\ -\ 1. Responsible party\ -\ 1. Fully qualified domain names associated with the external IP address\ -\ 1. Registration of fully qualified domain names associated with external IP addressDetermining whether it is a dynamic domain frequently visited by others and/or how third parties categorize it can also help you answer some questions surrounding the attacker and details related to the external system. In addition, there are various sources--such as VirusTotal— that can provide some reputation information on the IP address or domain name, which can assist in determining whether the event is malicious. Finally, determining whether there are other events associated with the IP address may help connect data points or show other events that should be brought into scope.\ -\ Gathering data on the system of interest can sometimes help you quickly determine whether something suspicious is happening. Some of these items include finding out who else may have recently logged into the system, whether any unusual scheduled tasks exist, whether the system is communicating on suspicious ports, whether there are modifications to sensitive registry keys, and whether there are any known vulnerabilities on the system. This information can often highlight other activity commonly seen in attack scenarios or give more information about how the system may have been targeted.\ -\ Often, a simple inspection of the process name and path can tell you if the system has been compromised. For example, if `svchost.exe` is found running from a location other than `C:\Windows\System32`, it is likely something malicious designed to hide in plain sight when cursorily reviewing process names. Similarly, if the process itself seems legitimate, but the parent process is running from the temporary browser cache, that could be indicative of activity initiated via a compromised website a user visited.\ -\ It can also be very helpful to examine various behaviors of the process of interest or the parent of the process of interest. For example, if it turns out the process of interest is malicious, it would be good to see if the parent to that process spawned other processes that might be worth further scrutiny. If a process is suspect, a review of the network connections made in and around the time of the event and/or whether the process spawned any child processes could be helpful, as well.\ -\ In the event a system is suspected of having been compromised via a malicious website, we suggest reviewing the browsing activity from that system around the time of the event. If categories are given for the URLs visited, that can help you zero in on possible malicious sites. ##### Detections @@ -3184,19 +3126,12 @@ Detect signs of malicious payloads that may indicate that your environment has b ##### Narrative Despite its simplicity, phishing remains the most pervasive and dangerous cyberthreat. In fact, research shows that as many as [91% of all successful attacks](https://digitalguardian.com/blog/91-percent-cyber-attacks-start-phishing-email-heres-how-protect-against-phishing) are initiated via a phishing email. \ -\ As most people know, these emails use fraudulent domains, [email scraping](https://www.cyberscoop.com/emotet-trojan-phishing-scraping-templates-cofense-geodo/), familiar contact names inserted as senders, and other tactics to lure targets into clicking a malicious link, opening an attachment with a [nefarious payload](https://www.cyberscoop.com/emotet-trojan-phishing-scraping-templates-cofense-geodo/), or entering sensitive personal information that perpetrators may intercept. This attack technique requires a relatively low level of skill and allows adversaries to easily cast a wide net. Worse, because its success relies on the gullibility of humans, it's impossible to completely "automate" it out of your environment. However, you can use ES and ESCU to detect and investigate potentially malicious payloads injected into your environment subsequent to a phishing attack. \ -\ -While any kind of file may contain a malicious payload, some are more likely to be perceived as benign (and thus more often escape notice) by the average victim—especially when the attacker sends an email that seems to be from one of their contacts. An example is Microsoft Office files. Most corporate users are familiar with documents with the following suffixes: .doc/.docx (MS Word), .xls/.xlsx (MS Excel), and .ppt/.pptx (MS PowerPoint), so they may click without a second thought, slashing a hole in their organizations' security. \ -\ +hile any kind of file may contain a malicious payload, some are more likely to be perceived as benign (and thus more often escape notice) by the average victim—especially when the attacker sends an email that seems to be from one of their contacts. An example is Microsoft Office files. Most corporate users are familiar with documents with the following suffixes: .doc/.docx (MS Word), .xls/.xlsx (MS Excel), and .ppt/.pptx (MS PowerPoint), so they may click without a second thought, slashing a hole in their organizations' security. \ Following is a typical series of events, according to an [article by Trend Micro](https://blog.trendmicro.com/trendlabs-security-intelligence/rising-trend-attackers-using-lnk-files-download-malware/):\ -\ 1. Attacker sends a phishing email. Recipient downloads the attached file, which is typically a .docx or .zip file with an embedded .lnk file\ -\ 1. The .lnk file executes a PowerShell script\ -\ 1. Powershell executes a reverse shell, rendering the exploit successful As a side note, adversaries are likely to use a tool like Empire to craft and obfuscate payloads and their post-injection activities, such as [exfiltration, lateral movement, and persistence](https://github.com/EmpireProject/Empire).\ -\ This Analytic Story focuses on detecting signs that a malicious payload has been injected into your environment. For example, one search detects outlook.exe writing a .zip file. Another looks for suspicious .lnk files launching processes. ##### Detections @@ -3254,59 +3189,32 @@ Monitor your environment for suspicious behaviors that resemble the techniques e ##### Narrative This story was created as a joint effort between iDefense and Splunk.\ -\ iDefense analysts have recently discovered a Windows executable file that, upon execution, spoofs a decryption tool and then drops a file that appears to be the custom-built javascript backdoor, "Orz," which is associated with the threat actors known as MUDCARP (as well as "temp.Periscope" and "Leviathan"). The file is executed using Wscript.\ -\ The MUDCARP techniques include the use of the compressed-folders module from Microsoft, zipfldr.dll, with RouteTheCall export to run the malicious process or command. After a successful reboot, the malware is made persistent by a manipulating `[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]'help'='c:\\windows\\system32\\rundll32.exe c:\\windows\\system32\\zipfldr.dll,RouteTheCall c:\\programdata\\winapp.exe'`. Though this technique is not exclusive to MUDCARP, it has been spotted in the group's arsenal of advanced techniques seen in the wild.\ -\ This Analytic Story searches for evidence of tactics, techniques, and procedures (TTPs) that allow for the use of a endpoint detection-and-response (EDR) bypass technique to mask the true parent of a malicious process. It can also be set as a registry key for further sandbox evasion and to allow the malware to launch only after reboot.\ -\ If behavioral searches included in this story yield positive hits, iDefense recommends conducting IOC searches for the following:\ \ -\ -\ 1. www.chemscalere[.]com\ -\ 1. chemscalere[.]com\ -\ 1. about.chemscalere[.]com\ -\ 1. autoconfig.chemscalere[.]com\ -\ 1. autodiscover.chemscalere[.]com\ -\ 1. catalog.chemscalere[.]com\ -\ 1. cpanel.chemscalere[.]com\ -\ 1. db.chemscalere[.]com\ -\ 1. ftp.chemscalere[.]com\ -\ 1. mail.chemscalere[.]com\ -\ 1. news.chemscalere[.]com\ -\ 1. update.chemscalere[.]com\ -\ 1. webmail.chemscalere[.]com\ -\ 1. www.candlelightparty[.]org\ -\ 1. candlelightparty[.]org\ -\ 1. newapp.freshasianews[.]comIn addition, iDefense also recommends that organizations review their environments for activity related to the following hashes:\ \ -\ -\ 1. cd195ee448a3657b5c2c2d13e9c7a2e2\ -\ 1. b43ad826fe6928245d3c02b648296b43\ -\ 1. 889a9b52566448231f112a5ce9b5dfaf\ -\ 1. b8ec65dab97cdef3cd256cc4753f0c54\ -\ 1. 04d83cd3813698de28cfbba326d7647c ##### Detections @@ -3369,7 +3277,6 @@ Use the searches in this Analytic Story to help you detect structured query lang ##### Narrative It is very common for attackers to inject SQL parameters into vulnerable web applications, which then interpret the malicious SQL statements.\ -\ This Analytic Story contains a search designed to identify attempts by attackers to leverage this technique to compromise a host and gain a foothold in the target environment. ##### Detections @@ -3548,13 +3455,9 @@ Email remains one of the primary means for attackers to gain an initial foothold ##### Narrative It is a common practice for attackers of all types to leverage targeted spearphishing campaigns and mass mailers to deliver weaponized email messages and attachments. Fortunately, there are a number of ways to monitor email data in Splunk to detect suspicious content.\ -\ Once a phishing message has been detected, the next steps are to answer the following questions: \ -\ 1. Which users have received this or a similar message in the past?\ -\ 1. When did the targeted campaign begin?\ -\ 1. Have any users interacted with the content of the messages (by downloading an attachment or clicking on a malicious URL)?This Analytic Story provides detection searches to identify suspicious emails, as well as contextual and investigative searches to help answer some of these questions. ##### Detections @@ -3610,9 +3513,7 @@ Monitor and detect techniques used by attackers who leverage the mshta.exe proce ##### Narrative One common adversary tactic is to bypass application white-listing solutions via the mshta.exe process, which executes Microsoft HTML applications with the .hta suffix. In these cases, attackers use the trusted Windows utility to eproxy execution of malicious files, whether an .hta application, javascript, or VBScript.\ -\ One example of a notable mshta.exe attack was the Kovter malware (https://medium.com/@mbromileyDFIR/malware-monday-aebb456356c5) that was implicated in ransomware and click-fraud attacks. Kovter utilized .hta to execute a series of javascript commands, each progressively more dangerous. According to the Mitre Parternship Network (https://attack.mitre.org/wiki/Technique/T1170), FIN7 has leveraged mshta.exe, as has the MuddyWater group, who used it to execute its POWERSTATS payload (which then used the utility to execute additional payloads).\ -\ The searches in this story help you detect and investigate suspicious activity that may indicate that an attacker is leveraging mshta.exe to execute malicious code. ##### Detections @@ -3673,9 +3574,7 @@ Attackers are increasingly abusing Windows Management Instrumentation (WMI), a f ##### Narrative WMI is a Microsoft infrastructure for management data and operations on Windows operating systems. It includes of a set of utilities that can be leveraged to manage both local and remote Windows systems. Attackers are increasingly turning to WMI abuse in their efforts to conduct nefarious tasks, such as reconnaissance, detection of antivirus and virtual machines, code execution, lateral movement, persistence, and data exfiltration. \ -\ The detection searches included in this Analytic Story are used to look for suspicious use of WMI commands that attackers may leverage to interact with remote systems. The searches specifically look for the use of WMI to run processes on remote systems.\ -\ In the event that unauthorized WMI execution occurs, it will be important for analysts and investigators to determine the context of the event. These details may provide insights related to how WMI was used and to what end. ##### Detections @@ -3740,9 +3639,7 @@ Monitor and detect registry changes initiated from remote locations, which can b ##### Narrative Attackers are developing increasingly sophisticated techniques for hijacking target servers, while evading detection. One such technique that has become progressively more common is registry modification.\ -\ The registry is a key component of the Windows operating system. It has a hierarchical database called "registry" that contains settings, options, and values for executables. Once the threat actor gains access to a machine, they can use reg.exe to modify their account to obtain administrator-level privileges, maintain persistence, and move laterally within the environment.\ -\ The searches in this story are designed to help you detect behaviors associated with manipulation of the Windows registry. ##### Detections @@ -3867,7 +3764,6 @@ Adversaries often try to cover their tracks by manipulating Windows logs. Use th ##### Narrative Because attackers often modify system logs to cover their tracks and/or to thwart the investigative process, log monitoring is an industry-recognized best practice. While there are legitimate reasons to manipulate system logs, it is still worthwhile to keep track of who manipulated the logs, when they manipulated them, and in what way they manipulated them (determining which accesses, tools, or utilities were employed). Even if no malicious activity is detected, the knowledge of an attempt to manipulate system logs may be indicative of a broader security risk that should be thoroughly investigated.\ -\ The Analytic Story gives users two different ways to detect manipulation of Windows Event Logs and one way to detect deletion of the Update Sequence Number (USN) Change Journal. The story helps determine the history of the host and the users who have accessed it. Finally, the story aides in investigation by retrieving all the information on the process that caused these events (if the process has been identified). ##### Detections diff --git a/investigations/investigate_cloud_compute_instance_activities.yml b/investigations/investigate_cloud_compute_instance_activities.yml index ddc69091c2..406ae8225b 100644 --- a/investigations/investigate_cloud_compute_instance_activities.yml +++ b/investigations/investigate_cloud_compute_instance_activities.yml @@ -1,7 +1,7 @@ creation_date: '2019-10-02' data_metadata: data_models: - - Cloud + - Cloud_Infrastructure data_source: - Cloud Infrastructure Logs providing_technologies: @@ -24,7 +24,7 @@ investigate: cron_schedule: '' earliest_time: '7200' latest_time: '0' - search: '| from datamodel:Cloud_Draft_v4.Cloud_Compute | search dest={dest} `investigate_cloud_compute_instance_activities_output_filter`' + search: '| from datamodel:Cloud_Infrastructure.Compute | search dest={dest} | fields - _* | `investigate_cloud_compute_instance_activities_output_filter`' maintainers: - company: Splunk email: davidd@splunk.com diff --git a/investigations/investigate_user_activities_in_all_cloud_regions.yml b/investigations/investigate_user_activities_in_all_cloud_regions.yml index 5fcb37c39f..418d104684 100644 --- a/investigations/investigate_user_activities_in_all_cloud_regions.yml +++ b/investigations/investigate_user_activities_in_all_cloud_regions.yml @@ -1,7 +1,7 @@ creation_date: '2019-10-02' data_metadata: data_models: - - Cloud + - Cloud_Infrastructure data_source: - Cloud Infrastructure Logs providing_technologies: @@ -10,6 +10,9 @@ data_metadata: - GCP description: This search lists all the logged cloud infrastructure activities by a specific cloud user +entities: + - region + - src_user how_to_implement: You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. id: 2ef6310f-8e79-42af-b20b-b4eeaba9608a @@ -24,7 +27,7 @@ investigate: cron_schedule: 0 * * * * earliest_time: -70m@m latest_time: -10m@m - search: '| from datamodel:Cloud_Draft_v6.Compute | search user={src_user} `investigate_user_activities_in_all_cloud_region_output_filter`' + search: '| from datamodel:Cloud_Infrastructure.Compute | search user={src_user} | fields - _* | `investigate_user_activities_in_all_cloud_region_output_filter`' maintainers: - company: Splunk email: davidd@splunk.com diff --git a/investigations/investigate_user_activities_in_single_cloud_region.yml b/investigations/investigate_user_activities_in_single_cloud_region.yml index 84e8df2e94..17e5dfd656 100644 --- a/investigations/investigate_user_activities_in_single_cloud_region.yml +++ b/investigations/investigate_user_activities_in_single_cloud_region.yml @@ -1,7 +1,7 @@ creation_date: '2019-10-02' data_metadata: data_models: - - Cloud + - Cloud_Infrastructure data_source: - Cloud Infrastructure Logs providing_technologies: @@ -10,6 +10,9 @@ data_metadata: - GCP description: This search lists all the logged cloud infrastructure activities by a specific cloud user in a specific cloud region +entities: + - region + - src_user how_to_implement: You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. id: 3dc3a8e7-394b-44ae-8262-4ef8e90b723d @@ -24,8 +27,7 @@ investigate: cron_schedule: 0 * * * * earliest_time: -70m@m latest_time: -10m@m - search: '| from datamodel:Cloud_Draft_v4.Compute | search region={region} user={src_user} - `investigate_user_activities_in_single_cloud_region_output_filter`' + search: '| from datamodel:Cloud_Infrastructure.Compute | search region={region} user={src_user} | fields - _* | `investigate_user_activities_in_single_cloud_region_output_filter`' maintainers: - company: Splunk email: davidd@splunk.com diff --git a/macros/previously_seen_cloud_compute_creations_by_user_search_window_begin_offset.yml b/macros/previously_seen_cloud_compute_creations_by_user_search_window_begin_offset.yml new file mode 100644 index 0000000000..dfc8bf3bc7 --- /dev/null +++ b/macros/previously_seen_cloud_compute_creations_by_user_search_window_begin_offset.yml @@ -0,0 +1,3 @@ +description: Use this macro to determine how far into the past the window should be to determine if the user is new or not +definition: "-70m@m" +name: previously_seen_cloud_compute_creations_by_user_search_window_begin_offset diff --git a/macros/previously_seen_cloud_compute_image_search_window_begin_offset.yml b/macros/previously_seen_cloud_compute_image_search_window_begin_offset.yml new file mode 100644 index 0000000000..7b422be438 --- /dev/null +++ b/macros/previously_seen_cloud_compute_image_search_window_begin_offset.yml @@ -0,0 +1,3 @@ +description: Use this macro to determine how far into the past the window should be to determine if the image is new or not +definition: "-70m@m" +name: previously_seen_cloud_compute_image_search_window_begin_offset diff --git a/macros/previously_seen_cloud_compute_instance_types_search_window_begin_offset.yml b/macros/previously_seen_cloud_compute_instance_types_search_window_begin_offset.yml new file mode 100644 index 0000000000..92648e94ed --- /dev/null +++ b/macros/previously_seen_cloud_compute_instance_types_search_window_begin_offset.yml @@ -0,0 +1,4 @@ +description: Use this macro to determine how far into the past the window + should be to determine if the instance type is new or not +definition: "-70m@m" +name: previously_seen_cloud_compute_instance_types_search_window_begin_offset diff --git a/macros/previously_seen_cloud_regions_search_window_begin_offset.yml b/macros/previously_seen_cloud_regions_search_window_begin_offset.yml new file mode 100644 index 0000000000..8403027283 --- /dev/null +++ b/macros/previously_seen_cloud_regions_search_window_begin_offset.yml @@ -0,0 +1,3 @@ +description: Use this macro to determine how far into the past the window should be to determine if the region is new or not +definition: "-70m@m" +name: previously_seen_cloud_regions_search_window_begin_offset diff --git a/package/app.manifest b/package/app.manifest index 1bc5ab4630..ab552e84bd 100644 --- a/package/app.manifest +++ b/package/app.manifest @@ -5,7 +5,7 @@ "id": { "group": null, "name": "DA-ESS-ContentUpdate", - "version": "1.0.42" + "version": "1.0.43" }, "author": [ { diff --git a/package/bin/detect.py b/package/bin/detect.py deleted file mode 100644 index 21c50f4c55..0000000000 --- a/package/bin/detect.py +++ /dev/null @@ -1,238 +0,0 @@ -import sys -import json -import splunk -import splunklib.client -import splunklib.results -from splunklib.searchcommands import dispatch, GeneratingCommand, Configuration, Option -from splunklib.searchcommands.validators import Boolean -import splunk.mining.dcutils -import time -from datetime import datetime, timedelta - - -@Configuration(streaming=True,local=True) -class DetectCommand(GeneratingCommand): - - logger = splunk.mining.dcutils.getLogger() - story = Option(require=True) - risk = Option(validate=Boolean(), default=True) - - # global variables - detection_searches_to_run = [] - investigative_searches_to_run = [] - support_searches_to_run = [] - runstory_results = {} - collection_names = [] - - def _support_searches(self, content): - support_data = {} - support_data['search_name'] = content['action.escu.full_search_name'] - support_data['search_description'] = content['description'] - support_data['search'] = content['search'] - self.support_searches_to_run.append(support_data) - #self.logger.info("detect.py - prepping to run support search: {0}".format(support_data['search_name'])) - return self.support_searches_to_run - - def _investigative_searches(self, content): - investigative_data = {} - investigative_data['search_name'] = content['action.escu.full_search_name'] - investigative_data['search_description'] = content['description'] - investigative_data['search'] = content['search'] - self.investigative_searches_to_run.append(investigative_data) - self.logger.info("invest.py - prepping to collect investigative_data: {0}".format(investigative_data['search_name'])) - return self.investigative_searches_to_run - - def _detection_searches(self, content): - detection_data = {} - detection_data['search_name'] = content['action.escu.full_search_name'] - detection_data['search_description'] = content['description'] - detection_data['search'] = content['search'] - detection_data['risk_object_type'] = content['action.risk.param._risk_object_type'] - detection_data['risk_score'] = content['action.risk.param._risk_score'] - detection_data['risk_object'] = content['action.risk.param._risk_object'] - detection_data['mappings'] = json.loads(content['action.escu.mappings']) - self.detection_searches_to_run.append(detection_data) - #self.logger.info("detect.py - prepping to run detection search: {0}".format(detection_data['search_name'])) - return self.detection_searches_to_run - - def _run_support(self, support_searches_to_run, service, earliest_time, latest_time): - # Run all Support searches - support_search_name = [] - for search in support_searches_to_run: - # setup service job - latest_support_time = earliest_time - - earliest_utc = datetime.utcfromtimestamp(earliest_time).strftime('%Y-%m-%d %H:%M:%S.%f') - support_earliest_time = datetime.strptime(earliest_utc, '%Y-%m-%d %H:%M:%S.%f') - timedelta(days=30) - support_earliest_time = support_earliest_time.strftime('%s') - kwargs = {"exec_mode": "normal", "earliest_time": support_earliest_time, "latest_time": latest_support_time} - spl = search['search'] - if spl[0] != "|": - spl = "| search %s" % spl - self.logger.info("detect.py - running support search: {0}".format(search['search_name'])) - job = service.jobs.create(spl, **kwargs) - while True: - job.refresh() - if job['isDone'] == "1": - self.logger.info("detect.py - completed support search: {0}".format(search['search_name'])) - break - # append each completed support search - support_search_name.append(search['search_name']) - - return support_search_name - - def generate(self): - story = self.story - risk = self.risk - search_results = self.search_results_info - port = splunk.getDefault('port') - service = splunklib.client.connect(token=self._metadata.searchinfo.session_key, port=port, owner = "nobody") - self.logger.info("detect.pytime - starting run story") - - if hasattr(search_results, 'search_et') and hasattr(search_results, 'search_lt'): - earliest_time = search_results.search_et - latest_time = search_results.search_lt - - savedsearches = service.saved_searches - collection_name = [] - - # for collection in service.kvstore: - # collection_name.append(collection.name) - - collection_name = "story_results" - if collection_name in service.kvstore: - service.kvstore.delete(collection_name) - - # Let's create it and then make sure it exists - service.kvstore.create(collection_name) - collection = service.kvstore[collection_name] - - - for savedsearch in savedsearches: - content = savedsearch.content - - if 'action.escu.analytic_story' in content and story in content['action.escu.analytic_story']: - if content['action.escu.search_type'] == 'support': - support_searches_to_run = self._support_searches(content) - self.runstory_results['support_search_name'] = self._run_support(support_searches_to_run, service,earliest_time,latest_time) - # else: - - # self.runstory_results['support_search_name'] = "No Support searches in this story" - if content['action.escu.search_type'] == 'investigative': - investigative_searches_to_run = self._investigative_searches(content) - investigative_searches = [] - - for search in investigative_searches_to_run: - - investigative_searches.append(search['search_name']) - self.runstory_results['investigative_searches'] = investigative_searches - - if content['action.escu.search_type'] == 'detection': - detection_searches_to_run = self._detection_searches(content) - - # run all support searches and store its name to display later - self.logger.info("detect.py - start support search:") - - self.logger.info("detect.py - start detection search:") - - #Running detections without a function in order to yield proper results back in splunk. Havent found a good way around this yet. - for search in detection_searches_to_run: - - self.runstory_results['detection_results'] = [] - kwargs = {"exec_mode": "normal", "earliest_time": earliest_time, "latest_time": latest_time} - spl = search['search'] - self.logger.info("detect.py - running detection search: {0}".format(search['search_name'])) - if spl[0] != "|": - spl = "| search %s" % spl - job = service.jobs.create(spl, **kwargs) - - - time.sleep(2) - while True: - job.refresh() - if job['isDone'] == "1": - self.logger.info("detect.py - Finished Detection search: {0}".format(search['search_name'])) - break - - - job_results = splunklib.results.ResultsReader(job.results()) - - - if job['resultCount'] > "0": - detection_results = [] - entities = [] - self.runstory_results['entities'] = [] - - for result in job_results: - detection_results.append(dict(result)) - for key, value in result.items(): - if type(value) == list and key in search['risk_object']: - for i in value: - if i not in entities: - entities.append(i) - - if type(value) == str and key in search['risk_object'] and value not in entities: - entities.append(value) - - if risk == True: - for i in entities: - create_risk_score = "|makeresults" + "| eval story=\"" + \ - story + "\"" + "| eval search_name=\"" + \ - search['search_name'] + "\"" + "| eval risk_object = \"" + \ - str(i) + "\"" + "| eval risk_score = \"" + search['risk_score'] + \ - "\"" + "| eval risk_object_type = \"" + search['risk_object_type'] + \ - "\"" + "| sendalert risk" - - kwargs = {"exec_mode": "normal"} - job = service.jobs.create(create_risk_score, **kwargs) - while True: - job.refresh() - if job['isDone'] == "1": - break - - collection.data.insert(json.dumps({"detection_search_name": search['search_name'], "detection_results": detection_results})) - - - self.logger.info("detect.py - Results: {0}".format(detection_results)) - - self.runstory_results['entities'] = entities - self.runstory_results['detection_results'] = detection_results - self.runstory_results['detection_result_count'] = job['resultCount'] - self.runstory_results['detection_search_name'] = search['search_name'] - self.runstory_results['mappings'] = search['mappings'] - self.runstory_results['risk_object_type'] = search['risk_object_type'] - self.runstory_results['risk_score'] = search['risk_score'] - self.runstory_results['risk_object'] = search['risk_object'] - self.runstory_results['collection_name'] = collection_name - #self.run_story_results['investigative_searches'] = - #self.runstory_results['support_search_name'] = support_search_name - yield { - '_time': time.time(), - '_raw': self.runstory_results, - 'sourcetype': "_json", - 'story': story, - 'support_search_name': self.runstory_results['support_search_name'], - 'entities': self.runstory_results['entities'], - 'mappings': self.runstory_results['mappings'], - 'detection_results': self.runstory_results['detection_results'], - 'detection_search_name': self.runstory_results['detection_search_name'], - 'detection_result_count': self.runstory_results['detection_result_count'], - 'risk_score': self.runstory_results['risk_score'], - 'risk_object_type': self.runstory_results['risk_object_type'], - 'risk_object': self.runstory_results['risk_object'], - 'investigative_search_name' : self.runstory_results['investigative_searches'], - 'collection_name' : self.runstory_results['collection_name'] - } - - - - self.logger.info("detect.py - FINSIHED detection search:") - - - #self.logger.info("detect.py - FINAL object: {0}".format(self.runstory_results)) - - - def __init__(self): - super(DetectCommand, self).__init__() - -dispatch(DetectCommand, sys.argv, sys.stdin, sys.stdout, __name__) \ No newline at end of file diff --git a/package/bin/investigate.py b/package/bin/investigate.py deleted file mode 100644 index 3b728422e7..0000000000 --- a/package/bin/investigate.py +++ /dev/null @@ -1,49 +0,0 @@ - -from splunklib.searchcommands import dispatch, StreamingCommand, Configuration -import sys -import json -import splunk -import splunklib.client -import splunklib.results -from splunklib.searchcommands.validators import Boolean -import splunk.mining.dcutils -# import time -# from datetime import datetime, timedelta - -@Configuration() -class Investigate(StreamingCommand): - - logger = splunk.mining.dcutils.getLogger() - def stream(self, records): - for record in records: - - search_results = self.search_results_info - port = splunk.getDefault('port') - service = splunklib.client.connect(token=self._metadata.searchinfo.session_key, port=port) - self.logger.info("investigate.py") - - savedsearches = service.saved_searches - investigative_search_name = [] - investigative_search_fields_required = [] - investigative_search = [] - detection_results = [] - - - for savedsearch in savedsearches: - content = savedsearch.content - - if 'action.escu.analytic_story' in content: - - if content['action.escu.search_type'] == 'investigative': - - if content['action.escu.full_search_name'] in record['investigative_search_name']: - investigative_search.append(content['search']) - record['investigative_search'] = investigative_search - detection_results.append(record['detection_results']) - record['detection_resultsssssss'] = detection_results - - - yield record - -if __name__ == "__main__": - dispatch(Investigate, sys.argv, sys.stdin, sys.stdout, __name__) diff --git a/package/default/analytic_stories.conf b/package/default/analytic_stories.conf index d163e9248a..5fcb4d98bf 100644 --- a/package/default/analytic_stories.conf +++ b/package/default/analytic_stories.conf @@ -1,6 +1,6 @@ ############# # Automatically generated by generator.py in splunk/security-content -# On Date: 2019-10-31T20:21:15 UTC +# On Date: 2019-11-05T20:06:23 UTC # Author: Splunk Security Research # Contact: research@splunk.com ############# @@ -182,17 +182,17 @@ modification_date = 2019-10-02 id = 3b96d13c-fdc7-45dd-b3ad-c132b31cdd2a version = 1.0 reference = ["https://d0.awsstatic.com/whitepapers/aws-security-best-practices.pdf"] -detection_searches = ["ESCU - Cloud Compute Instance Created By Previously Unseen User - Rule", "ESCU - Cloud Compute Instance Created With Previously Unseen Image - Rule", "ESCU - Cloud Compute Instance Created With Previously Unseen Instance Type - Rule", "ESCU - Cloud Compute Instance Started In Previously Unused Region - Rule"] +detection_searches = ["ESCU - Cloud Compute Instance Created By Previously Unseen User - Rule", "ESCU - Cloud Compute Instance Created With Previously Unseen Instance Type - Rule", "ESCU - Cloud Compute Instance Started In Previously Unused Region - Rule"] mappings = {"cis20": ["CIS 1", "CIS 12"], "kill_chain_phases": ["Actions on Objectives"], "mitre_attack": ["Defense Evasion"], "nist": ["DE.AE", "DE.DP", "ID.AM"]} -investigative_searches = ["ESCU - Get Notable History", "ESCU - Investigate Cloud Compute Instance Activities", "ESCU - Investigate User Activities In All Cloud Regions", "ESCU - Investigate User Activities In Single Cloud Region"] -support_searches = ["ESCU - Previously Seen Cloud Compute Creations By User", "ESCU - Previously Seen Cloud Compute Images", "ESCU - Previously Seen Cloud Compute Instance Types", "ESCU - Previously Seen Cloud Regions"] -data_models = ["Cloud"] -providing_technologies = ["AWS", "Azure", "GCP", "Splunk Enterprise Security"] +investigative_searches = ["ESCU - Investigate Cloud Compute Instance Activities", "ESCU - Investigate User Activities In All Cloud Regions", "ESCU - Investigate User Activities In Single Cloud Region"] +support_searches = ["ESCU - Previously Seen Cloud Compute Creations By User", "ESCU - Previously Seen Cloud Compute Instance Types", "ESCU - Previously Seen Cloud Regions"] +data_models = ["Cloud_Infrastructure"] +providing_technologies = ["AWS", "Azure", "GCP"] description = Monitor your cloud compute instances for activities related to cryptojacking/cryptomining. New instances that originate from previously unseen regions, users who launch abnormally high numbers of instances, or compute instances started by previously unseen users are just a few examples of potentially malicious behavior. narrative = Cryptomining is an intentionally difficult, resource-intensive business. Its complexity was designed into the process to ensure that the number of blocks mined each day would remain steady. So, it's par for the course that ambitious, but unscrupulous, miners make amassing the computing power of large enterprises--a practice known as cryptojacking--a top priority. \ -Cryptojacking has attracted an increasing amount of media attention since its explosion in popularity in the fall of 2017. The attacks have moved from in-browser exploits and mobile phones to enterprise cloud services, such as Amazon Web Services (AWS), Google Cloud Platform (GCP), or Azure. It's difficult to determine exactly how widespread the practice has become, since bad actors continually evolve their ability to escape detection, including employing unlisted endpoints, moderating their CPU usage, and hiding the mining pool's IP address behind a free CDN. \ -hen malicious miners appropriate a cloud instance, often spinning up hundreds of new instances, the costs can become astronomical for the account holder. So, it is critically important to monitor your systems for suspicious activities that could indicate that your network has been infiltrated. \ -This Analytic Story is focused on detecting suspicious new instances in your cloud environment to help prevent such a disaster. It contains detection searches that will detect when a previously unused instance type or AMI is used. It also contains support searches to build lookup files to ensure proper execution of the detection searches. +Cryptojacking has attracted an increasing amount of media attention since its explosion in popularity in the fall of 2017. The attacks have moved from in-browser exploits and mobile phones to enterprise cloud services, such as Amazon Web Services (AWS), Google Cloud Platform (GCP), and Azure. It's difficult to determine exactly how widespread the practice has become, since bad actors continually evolve their ability to escape detection, including employing unlisted endpoints, moderating their CPU usage, and hiding the mining pool's IP address behind a free CDN. \ +When malicious miners appropriate a cloud instance, often spinning up hundreds of new instances, the costs can become astronomical for the account holder. So it is critically important to monitor your systems for suspicious activities that could indicate that your network has been infiltrated. \ +This Analytic Story is focused on detecting suspicious new instances in your cloud environment to help prevent cryptominers from gaining a foothold. It contains detection searches that will detect when a previously unused instance type or AMI is used. It also contains support searches to build lookup files to ensure proper execution of the detection searches. [ColdRoot MacOS RAT] category = Malware diff --git a/package/default/analyticstories.conf b/package/default/analyticstories.conf index 7ef141f404..4d03b2e7eb 100644 --- a/package/default/analyticstories.conf +++ b/package/default/analyticstories.conf @@ -1,6 +1,6 @@ ############# # Automatically generated by generator.py in splunk/security-content -# On Date: 2019-08-27T22:41:51 UTC +# On Date: 2019-10-31T22:22:25 UTC # Author: Splunk Security Research # Contact: research@splunk.com ############# @@ -17,9 +17,7 @@ spec_version = 2 searches = ["ESCU - AWS Cross Account Activity From Previously Unseen Account - Rule", "ESCU - AWS Investigate User Activities By AccessKeyId", "ESCU - AWS Investigate User Activities By Source User", "ESCU - Get Notable History", "ESCU - Previously Seen AWS Cross Account Activity"] description = Track when a user assumes an IAM role in another AWS account to obtain cross-account access to services and resources in that account. Accessing new roles could be an indication of malicious activity. narrative = Amazon Web Services (AWS) admins manage access to AWS resources and services across the enterprise using AWS's Identity and Access Management (IAM) functionality. IAM provides the ability to create and manage AWS users, groups, and roles-each with their own unique set of privileges and defined access to specific resources (such as EC2 instances, the AWS Management Console, API, or the command-line interface). Unlike conventional (human) users, IAM roles are assumable by anyone in the organization. They provide users with dynamically created temporary security credentials that expire within a set time period.\ -\ Herein lies the rub. In between the time between when the temporary credentials are issued and when they expire is a period of opportunity, where a user could leverage the temporary credentials to wreak havoc-spin up or remove instances, create new users, elevate privileges, and other malicious activities-throughout the environment.\ -\ This Analytic Story includes searches that will help you monitor your AWS CloudTrail logs for evidence of suspicious cross-account activity. For example, while accessing multiple AWS accounts and roles may be perfectly valid behavior, it may be suspicious when an account requests privileges of an account it has not accessed in the past. After identifying suspicious activities, you can use the provided investigative searches to help you probe more deeply. [analytic_story://AWS Cryptomining] @@ -32,11 +30,8 @@ spec_version = 2 searches = ["ESCU - EC2 Instance Started In Previously Unseen Region - Rule", "ESCU - Abnormally High AWS Instances Launched by User - Rule", "ESCU - EC2 Instance Started With Previously Unseen Instance Type - Rule", "ESCU - EC2 Instance Started With Previously Unseen AMI - Rule", "ESCU - EC2 Instance Started With Previously Unseen User - Rule", "ESCU - AWS Investigate User Activities By ARN", "ESCU - Get EC2 Instance Details by instanceId", "ESCU - Get EC2 Launch Details", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get User Information from Identity Table", "ESCU - Investigate AWS activities via region name", "ESCU - Previously Seen AWS Regions", "ESCU - Previously Seen EC2 AMIs", "ESCU - Previously Seen EC2 Instance Types", "ESCU - Previously Seen EC2 Launches By User"] description = Monitor your AWS EC2 instances for activities related to cryptojacking/cryptomining. New instances that originate from previously unseen regions, users who launch abnormally high numbers of instances, or EC2 instances started by previously unseen users are just a few examples of potentially malicious behavior. narrative = Cryptomining is an intentionally difficult, resource-intensive business. Its complexity was designed into the process to ensure that the number of blocks mined each day would remain steady. So, it's par for the course that ambitious, but unscrupulous, miners make amassing the computing power of large enterprises--a practice known as cryptojacking--a top priority. \ -\ Cryptojacking has attracted an increasing amount of media attention since its explosion in popularity in the fall of 2017. The attacks have moved from in-browser exploits and mobile phones to enterprise cloud services, such as Amazon Web Services (AWS). It's difficult to determine exactly how widespread the practice has become, since bad actors continually evolve their ability to escape detection, including employing unlisted endpoints, moderating their CPU usage, and hiding the mining pool's IP address behind a free CDN. \ -\ -When malicious miners appropriate a cloud instance, often spinning up hundreds of new instances, the costs can become astronomical for the account holder. So, it is critically important to monitor your systems for suspicious activities that could indicate that your network has been infiltrated. \ -\ +hen malicious miners appropriate a cloud instance, often spinning up hundreds of new instances, the costs can become astronomical for the account holder. So, it is critically important to monitor your systems for suspicious activities that could indicate that your network has been infiltrated. \ This Analytic Story is focused on detecting suspicious new instances in your EC2 environment to help prevent such a disaster. It contains detection searches that will detect when a previously unused instance type or AMI is used. It also contains support searches to build lookup files to ensure proper execution of the detection searches. [analytic_story://AWS Network ACL Activity] @@ -60,7 +55,6 @@ spec_version = 2 searches = ["ESCU - AWS Cloud Provisioning From Previously Unseen Country - Rule", "ESCU - AWS Cloud Provisioning From Previously Unseen Region - Rule", "ESCU - AWS Cloud Provisioning From Previously Unseen City - Rule", "ESCU - AWS Cloud Provisioning From Previously Unseen IP Address - Rule", "ESCU - Get All AWS Activity From City", "ESCU - Get All AWS Activity From Country", "ESCU - Get All AWS Activity From IP Address", "ESCU - Get All AWS Activity From Region", "ESCU - Previously Seen AWS Provisioning Activity Sources"] description = Monitor your AWS provisioning activities for behaviors originating from unfamiliar or unusual locations. These behaviors may indicate that malicious activities are occurring somewhere within your network. narrative = Because most enterprise AWS activities originate from familiar geographic locations, monitoring for activity from unknown or unusual regions is an important security measure. This indicator can be especially useful in environments where it is impossible to whitelist specific IPs (because they vary).\ -\ This Analytic Story was designed to provide you with flexibility in the precision you employ in specifying legitimate geographic regions. It can be as specific as an IP address or a city, or as broad as a region (think state) or an entire country. By determining how precise you want your geographical locations to be and monitoring for new locations that haven't previously accessed your environment, you can detect adversaries as they begin to probe your environment. Since there are legitimate reasons for activities from unfamiliar locations, this is not a standalone indicator. Nevertheless, location can be a relevant piece of information that you may wish to investigate further. [analytic_story://AWS User Monitoring] @@ -73,11 +67,8 @@ spec_version = 2 searches = ["ESCU - Detect AWS API Activities From Unapproved Accounts - Rule", "ESCU - Detect Spike in AWS API Activity - Rule", "ESCU - Detect new API calls from user roles - Rule", "ESCU - Detect Spike in Security Group Activity - Rule", "ESCU - Detect API activity from users without MFA - Rule", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Investigate AWS User Activities by user field", "ESCU - Baseline of API Calls per User ARN", "ESCU - Baseline of Security Group Activity by ARN", "ESCU - Create a list of approved AWS service accounts", "ESCU - Previously seen API call per user roles in CloudTrail"] description = Detect and investigate dormant user accounts for your AWS environment that have become active again. Because inactive and ad-hoc accounts are common attack targets, it's critical to enable governance within your environment. narrative = It seems obvious that it is critical to monitor and control the users who have access to your cloud infrastructure. Nevertheless, it's all too common for enterprises to lose track of ad-hoc accounts, leaving their servers vulnerable to attack. In fact, this was the very oversight that led to Tesla's cryptojacking attack in February, 2018.\ -\ In addition to compromising the security of your data, when bad actors leverage your compute resources, it can incur monumental costs, since you will be billed for any new EC2 instances and increased bandwidth usage. \ -\ Fortunately, you can leverage Amazon Web Services (AWS) CloudTrail--a tool that helps you enable governance, compliance, and risk auditing of your AWS account--to give you increased visibility into your user and resource activity by recording AWS Management Console actions and API calls. You can identify which users and accounts called AWS, the source IP address from which the calls were made, and when the calls occurred.\ -\ The detection searches in this Analytic Story are designed to help you uncover AWS API activities from users not listed in the identity table, as well as similar activities from disabled accounts. [analytic_story://Account Monitoring and Controls] @@ -101,31 +92,18 @@ spec_version = 2 searches = ["ESCU - Unusually Long Content-Type Length - Rule", "ESCU - Web Servers Executing Suspicious Processes - Rule", "ESCU - Suspicious Java Classes - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table", "ESCU - Investigate Suspicious Strings in HTTP Header", "ESCU - Investigate Web POSTs From src"] description = Detect and investigate activities--such as unusually long `Content-Type` length, suspicious java classes and web servers executing suspicious processes--consistent with attempts to exploit Apache Struts vulnerabilities. narrative = In March of 2017, a remote code-execution vulnerability in the Jakarta Multipart parser in Apache Struts, a widely used open-source framework for creating Java web applications, was disclosed and assigned to CVE-2017-5638. About two months later, hackers exploited the flaw to carry out the world's 5th largest data breach. The target, credit giant Equifax, told investigators that it had become aware of the vulnerability two months before the attack. \ -\ The exploit involved manipulating the `Content-Type HTTP` header to execute commands embedded in the header.\ -\ This Analytic Story contains two different searches that help to identify activity that may be related to this issue. The first search looks for characteristics of the `Content-Type` header consistent with attempts to exploit the vulnerability. This should be a relatively pertinent indicator, as the `Content-Type` header is generally consistent and does not have a large degree of variation.\ -\ The second search looks for the execution of various commands typically entered on the command shell when an attacker first lands on a system. These commands are not generally executed on web servers during the course of day-to-day operation, but they may be used when the system is undergoing maintenance or troubleshooting.\ -\ First, it is helpful is to understand how often the notable event is generated, as well as the commonalities in some of these events. This may help determine whether this is a common occurrence that is of a lesser concern or a rare event that may require more extensive investigation. It can also help to understand whether the issue is restricted to a single user or system or is broader in scope.\ -\ -When looking at the target of the behavior illustrated by the event, you should note the sensitivity of the user and or/system to help determine the potential impact. It is also helpful to see what other events involving the target have occurred in the recent past. This can help tie different events together and give further situational awareness regarding the target.\ -\ +hen looking at the target of the behavior illustrated by the event, you should note the sensitivity of the user and or/system to help determine the potential impact. It is also helpful to see what other events involving the target have occurred in the recent past. This can help tie different events together and give further situational awareness regarding the target.\ Various types of information for external systems should be reviewed and (potentially) collected if the incident is, indeed, judged to be malicious. Information like this can be useful in generating your own threat intelligence to create alerts in the future.\ -\ Looking at the country, responsible party, and fully qualified domain names associated with the external IP address--as well as the registration information associated with those domain names, if they are frequently visited by others--can help you answer the question of "who," in regard to the external system. Answering that can help qualify the event and may serve useful for tracking. In addition, there are various sources that can provide some reputation information on the IP address or domain name, which can assist in determining if the event is malicious in nature. Finally, determining whether or not there are other events associated with the IP address may help connect some dots or show other events that should be brought into scope.\ -\ Gathering various data elements on the system of interest can sometimes help quickly determine that something suspicious may be happening. Some of these items include determining who else may have recently logged into the system, whether any unusual scheduled tasks exist, whether the system is communicating on suspicious ports, whether there are modifications to sensitive registry keys, and whether there are any known vulnerabilities on the system. This information can often highlight other activity commonly seen in attack scenarios or give more information about how the system may have been targeted.\ -\ -When a specific service or application is targeted, it is often helpful to know the associated version to help determine whether or not it is vulnerable to a specific exploit.\ -\ -When it is suspected there is an attack targeting a web server, it is helpful to look at some of the behavior of the web service to see if there is evidence that the service has been compromised. Some indications of this might be network connections to external resources, the web service spawning child processes that are not associated with typical behavior, and whether the service wrote any files that might be malicious in nature.\ -\ +hen a specific service or application is targeted, it is often helpful to know the associated version to help determine whether or not it is vulnerable to a specific exploit.\ +hen it is suspected there is an attack targeting a web server, it is helpful to look at some of the behavior of the web service to see if there is evidence that the service has been compromised. Some indications of this might be network connections to external resources, the web service spawning child processes that are not associated with typical behavior, and whether the service wrote any files that might be malicious in nature.\ In the event that a suspicious file is found, we can review more information about it to help determine if it is, in fact, malicious. Identifying the file type, any processes that have the file open, what processes created and/or modified the file, and the number of systems that may have this file can help to determine if the file is malicious. Also, determining the file hash and checking it against reputation sources, such as VirusTotal, can sometimes quickly help determine whether it is malicious in nature.\ -\ Often, a simple inspection of a suspect process name and path can tell you if the system has been compromised. For example, if `svchost.exe` is found running from a location other than `C:\Windows\System32`, it is likely something malicious designed to hide in plain sight when simply reviewing process names. Similarly, if the process itself seems legitimate, but the parent process is running from the temporary browser cache, there may be activity initiated via a compromised website the user visited.\ -\ It can also be very helpful to examine various behaviors of the process of interest or the parent of the process that is of interest. For example, if it turns out that the process of interest is malicious, it would be good to see if the parent to that process spawned other processes that might also be worth further scrutiny. If a process is suspect, reviewing the network connections made around the time of the event and/or if the process spawned any child processes could be helpful in determining whether it is malicious or executing a malicious script. [analytic_story://Asset Tracking] @@ -149,11 +127,23 @@ spec_version = 2 searches = ["ESCU - Monitor DNS For Brand Abuse - Rule", "ESCU - Monitor Email For Brand Abuse - Rule", "ESCU - Monitor Web Traffic For Brand Abuse - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Email Info", "ESCU - Get Emails From Specific Sender", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Process Responsible For The DNS Traffic", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table", "ESCU - Investigate Web Activity From Host", "ESCU - DNSTwist Domain Names"] description = Detect and investigate activity that may indicate that an adversary is using faux domains to mislead users into interacting with malicious infrastructure. Monitor DNS, email, and web traffic for permutations of your brand name. narrative = While you can educate your users and customers about the risks and threats posed by typosquatting, phishing, and corporate espionage, human error is a persistent fact of life. Of course, your adversaries are all too aware of this reality and will happily leverage it for nefarious purposes whenever possible3phishing with lookalike addresses, embedding faux command-and-control domains in malware, and hosting malicious content on domains that closely mimic your corporate servers. This is where brand monitoring comes in.\ -\ You can use our adaptation of `DNSTwist`, together with the support searches in this Analytic Story, to generate permutations of specified brands and external domains. Splunk can monitor email, DNS requests, and web traffic for these permutations and provide you with early warnings and situational awareness--powerful elements of an effective defense.\ -\ Notable events will include IP addresses, URLs, and user data. Drilling down can provide you with even more actionable intelligence, including likely geographic information, contextual searches to help you scope the problem, and investigative searches. +[analytic_story://Cloud Cryptomining] +category = Cloud Security +last_updated = 2019-10-02 +version = 1.0 +references = ["https://d0.awsstatic.com/whitepapers/aws-security-best-practices.pdf"] +maintainers = [{"company": "Splunk", "email": "davidd@splunk.com", "name": "David Dorsey"}] +spec_version = 2 +searches = ["ESCU - Cloud Compute Instance Started In Previously Unused Region - Rule", "ESCU - Cloud Compute Instance Created With Previously Unseen Instance Type - Rule", "ESCU - Cloud Compute Instance Created With Previously Unseen Image - Rule", "ESCU - Cloud Compute Instance Created By Previously Unseen User - Rule", "ESCU - Investigate Cloud Compute Instance Activities", "ESCU - Investigate User Activities In All Cloud Regions", "ESCU - Investigate User Activities In Single Cloud Region", "ESCU - Previously Seen Cloud Compute Creations By User", "ESCU - Previously Seen Cloud Compute Images", "ESCU - Previously Seen Cloud Compute Instance Types", "ESCU - Previously Seen Cloud Regions"] +description = Monitor your cloud compute instances for activities related to cryptojacking/cryptomining. New instances that originate from previously unseen regions, users who launch abnormally high numbers of instances, or compute instances started by previously unseen users are just a few examples of potentially malicious behavior. +narrative = Cryptomining is an intentionally difficult, resource-intensive business. Its complexity was designed into the process to ensure that the number of blocks mined each day would remain steady. So, it's par for the course that ambitious, but unscrupulous, miners make amassing the computing power of large enterprises--a practice known as cryptojacking--a top priority. \ +Cryptojacking has attracted an increasing amount of media attention since its explosion in popularity in the fall of 2017. The attacks have moved from in-browser exploits and mobile phones to enterprise cloud services, such as Amazon Web Services (AWS), Google Cloud Platform (GCP), and Azure. It's difficult to determine exactly how widespread the practice has become, since bad actors continually evolve their ability to escape detection, including employing unlisted endpoints, moderating their CPU usage, and hiding the mining pool's IP address behind a free CDN. \ +When malicious miners appropriate a cloud instance, often spinning up hundreds of new instances, the costs can become astronomical for the account holder. So it is critically important to monitor your systems for suspicious activities that could indicate that your network has been infiltrated. \ +This Analytic Story is focused on detecting suspicious new instances in your cloud environment to help prevent cryptominers from gaining a foothold. It contains detection searches that will detect when a previously unused instance type or AMI is used. It also contains support searches to build lookup files to ensure proper execution of the detection searches. + [analytic_story://ColdRoot MacOS RAT] category = Malware last_updated = 2019-01-09 @@ -164,9 +154,7 @@ spec_version = 2 searches = ["ESCU - Processes Tapping Keyboard Events - Rule", "ESCU - Osquery pack - ColdRoot detection - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table", "ESCU - Get Vulnerability Logs For Endpoint", "ESCU - Investigate Network Traffic From src_ip", "ESCU - Investigate Web Activity From src_ip"] description = Leverage searches that allow you to detect and investigate unusual activities that relate to the ColdRoot Remote Access Trojan that affects MacOS. An example of some of these activities are changing sensative binaries in the MacOS sub-system, detecting process names and executables associated with the RAT, detecting when a keyboard tab is installed on a MacOS machine and more. narrative = Conventional wisdom holds that Apple's MacOS operating system is significantly less vulnerable to attack than Windows machines. While that point is debatable, it is true that attacks against MacOS systems are much less common. However, this fact does not mean that Macs are impervious to breaches. To the contrary, research has shown that that Mac malware is increasing at an alarming rate. According to AV-test, in 2018, there were 86,865 new MacOS malware variants, up from 27,338 the year before—a 31% increase. In contrast, the independent research firm found that new Windows malware had increased from 65.17M to 76.86M during that same period, less than half the rate of growth. The bottom line is that while the numbers look a lot smaller than Windows, it's definitely time to take Mac security more seriously.\ -\ This Analytic Story addresses the ColdRoot remote access trojan (RAT), which was uploaded to Github in 2016, but was still escaping detection by the first quarter of 2018, when a new, more feature-rich variant was discovered masquerading as an Apple audio driver. Among other capabilities, the Pascal-based ColdRoot can heist passwords from users' keychains and remotely control infected machines without detection. In the initial report of his findings, Patrick Wardle, Chief Research Officer for Digita Security, explained that the new ColdRoot RAT could start and kill processes on the breached system, spawn new remote-desktop sessions, take screen captures and assemble them into a live stream of the victim's desktop, and more.\ -\ Searches in this Analytic Story leverage the capabilities of OSquery to address ColdRoot detection from several different angles, such as looking for the existence of associated files and processes, and monitoring for signs of an installed keylogger. [analytic_story://Collection and Staging] @@ -179,9 +167,7 @@ spec_version = 2 searches = ["ESCU - Suspicious writes to windows Recycle Bin - Rule", "ESCU - Suspicious writes to System Volume Information - Rule", "ESCU - Email files written outside of the Outlook directory - Rule", "ESCU - Hosts receiving high volume of network traffic from email server - Rule", "ESCU - Email servers sending high volume traffic to hosts - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table"] description = Monitor for and investigate activities--such as suspicious writes to the Windows Recycling Bin or email servers sending high amounts of traffic to specific hosts, for example--that may indicate that an adversary is harvesting and exfiltrating sensitive data. narrative = A common adversary goal is to identify and exfiltrate data of value from a target organization. This data may include email conversations and addresses, confidential company information, links to network design/infrastructure, important dates, and so on.\ -\ Attacks are composed of three activities: identification, collection, and staging data for exfiltration. Identification typically involves scanning systems and observing user activity. Collection can involve the transfer of large amounts of data from various repositories. Staging/preparation includes moving data to a central location and compressing (and optionally encoding and/or encrypting) it. All of these activities provide opportunities for defenders to identify their presence. \ -\ Use the searches to detect and monitor suspicious behavior related to these activities. [analytic_story://Command and Control] @@ -194,7 +180,6 @@ spec_version = 2 searches = ["ESCU - Detect Large Outbound ICMP Packets - Rule", "ESCU - Protocol or Port Mismatch - Rule", "ESCU - Detection of DNS Tunnels - Rule", "ESCU - TOR Traffic - Rule", "ESCU - Prohibited Network Traffic Allowed - Rule", "ESCU - Clients Connecting to Multiple DNS Servers - Rule", "ESCU - DNS Query Length With High Standard Deviation - Rule", "ESCU - Detect hosts connecting to dynamic domain providers - Rule", "ESCU - Excessive DNS Failures - Rule", "ESCU - Detect Long DNS TXT Record Response - Rule", "ESCU - DNS Query Requests Resolved by Unauthorized DNS Servers - Rule", "ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule", "ESCU - DNS Query Length Outliers - MLTK - Rule", "ESCU - AWS Investigate User Activities By ARN", "ESCU - AWS Network ACL Details from ID", "ESCU - AWS Network Interface details via resourceId", "ESCU - Get All AWS Activity From IP Address", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get DNS Server History for a host", "ESCU - Get DNS traffic ratio", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Process Information For Port Activity", "ESCU - Get Process Responsible For The DNS Traffic", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table", "ESCU - Baseline of DNS Query Length - MLTK", "ESCU - Baseline of blocked outbound traffic from AWS"] description = Detect and investigate tactics, techniques, and procedures leveraged by attackers to establish and operate command and control channels. Implants installed by attackers on compromised endpoints use these channels to receive instructions and send data back to the malicious operators. narrative = Threat actors typically architect and implement an infrastructure to use in various ways during the course of their attack campaigns. In some cases, they leverage this infrastructure for scanning and performing reconnaissance activities. In others, they may use this infrastructure to launch actual attacks. One of the most important functions of this infrastructure is to establish servers that will communicate with implants on compromised endpoints. These servers establish a command and control channel that is used to proxy data between the compromised endpoint and the attacker. These channels relay commands from the attacker to the compromised endpoint and the output of those commands back to the attacker.\ -\ Because this communication is so critical for an adversary, they often use techniques designed to hide the true nature of the communications. There are many different techniques used to establish and communicate over these channels. This Analytic Story provides searches that look for a variety of the techniques used for these channels, as well as indications that these channels are active, by examining logs associated with border control devices and network-access control lists. [analytic_story://Common Phishing Frameworks] @@ -207,7 +192,6 @@ spec_version = 2 searches = ["ESCU - Detect DNS requests to Phishing Sites leveraging EvilGinx2 - Rule", "ESCU - Get Certificate logs for a domain"] description = Detect DNS and web requests to fake websites generated by the EvilGinx2 toolkit. These websites are designed to fool unwitting users who have clicked on a malicious link in a phishing email. narrative = As most people know, these emails use fraudulent domains, [email scraping](https://www.cyberscoop.com/emotet-trojan-phishing-scraping-templates-cofense-geodo/), familiar contact names inserted as senders, and other tactics to lure targets into clicking a malicious link, opening an attachment with a [nefarious payload](https://www.cyberscoop.com/emotet-trojan-phishing-scraping-templates-cofense-geodo/), or entering sensitive personal information that perpetrators may intercept. This attack technique requires a relatively low level of skill and allows adversaries to easily cast a wide net. Because phishing is a technique that relies on human psychology, you will never be able to eliminate this vulnerability 100%. But you can use automated detection to significantly reduce the risks.\ -\ This Analytic Story focuses on detecting signs of MiTM attacks enabled by [EvilGinx2](https://github.com/kgretzky/evilginx2), a toolkit that sets up a transparent proxy between the targeted site and the user. In this way, the attacker is able to intercept credentials and two-factor identification tokens. It employs a proxy template to allow a registered domain to impersonate targeted sites, such as Linkedin, Amazon, Okta, Github, Twitter, Instagram, Reddit, Office 365, and others. It can even register SSL certificates and camouflage them via a URL shortener, making them difficult to detect. Searches in this story look for signs of MiTM attacks enabled by EvilGinx2. [analytic_story://Credential Dumping] @@ -220,9 +204,7 @@ spec_version = 2 searches = ["ESCU - Attempt To Set Default PowerShell Execution Policy To Unrestricted - Rule", "ESCU - Attempted Credential Dump From Registry Via Reg.exe - Rule", "ESCU - Detect Mimikatz Via PowerShell And EventCode 4703 - Rule", "ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table"] description = Uncover activity consistent with credential dumping, a technique wherein attackers compromise systems and attempt to obtain and exfiltrate passwords. The threat actors use these pilfered credentials to further escalate privileges and spread throughout a target environment. The included searches in this Analytic Story are designed to identify attmpts to dump credentials. narrative = Credential dumping—gathering credentials from a target system, often hashed or encrypted—is a common attack technique. Even though the credentials may not be in plain text, an attacker can still exfiltrate the data and set to cracking it offline, on their own systems. The threat actors target a variety of sources to extract them, including the Security Accounts Manager (SAM), Local Security Authority (LSA), NTDS from Domain Controllers, or the Group Policy Preference (GPP) files.\ -\ Once attackers obtain valid credentials, they use them to move throughout a target network with ease, discovering new systems and identifying assets of interest. Credentials obtained in this manner typically include those of privileged users, which may provide access to more sensitive information and system operations.\ -\ The detection searches in this Analytic Story monitor for the process **reg.exe** with the "save" parameter, as well as for a target registry path that specifies a binary export of credentials from the registry. In addition, the analytics flag Windows events and activities associated with the use of Mimikatz functionality in Powershell Empire. [analytic_story://DHS Report TA18-074A] @@ -235,11 +217,8 @@ spec_version = 2 searches = ["ESCU - SMB Traffic Spike - Rule", "ESCU - SMB Traffic Spike - MLTK - Rule", "ESCU - Processes launching netsh - Rule", "ESCU - Suspicious Reg.exe Process - Rule", "ESCU - Sc.exe Manipulating Windows Services - Rule", "ESCU - Registry Keys Used For Persistence - Rule", "ESCU - Create local admin accounts using net.exe - Rule", "ESCU - Single Letter Process On Endpoint - Rule", "ESCU - Scheduled Task Name Used by Dragonfly Threat Actors - Rule", "ESCU - Malicious PowerShell Process - Execution Policy Bypass - Rule", "ESCU - Detect Outbound SMB Traffic - Rule", "ESCU - Detect New Local Admin account - Rule", "ESCU - Detect PsExec With accepteula Flag - Rule", "ESCU - First time seen command line argument - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Process Information For Port Activity", "ESCU - Get Registry Activities", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table", "ESCU - Get Vulnerability Logs For Endpoint", "ESCU - Investigate Web Activity From Host", "ESCU - Baseline of SMB Traffic - MLTK", "ESCU - Previously seen command line arguments"] description = Monitor for suspicious activities associated with DHS Technical Alert US-CERT TA18-074A. Some of the activities that adversaries used in these compromises included spearfishing attacks, malware, watering-hole domains, many and more. narrative = The frequency of nation-state cyber attacks has increased significantly over the last decade. Employing numerous tactics and techniques, these attacks continue to escalate in complexity. \ -\ There is a wide range of motivations for these state-sponsored hacks, including stealing valuable corporate, military, or diplomatic dataѿall of which could confer advantages in various arenas. They may also target critical infrastructure. \ -\ One joint Technical Alert (TA) issued by the Department of Homeland and the FBI in mid-March of 2018 attributed some cyber activity targeting utility infrastructure to operatives sponsored by the Russian government. The hackers executed spearfishing attacks, installed malware, employed watering-hole domains, and more. While they caused no physical damage, the attacks provoked fears that a nation-state could turn off water, redirect power, or compromise a nuclear power plant.\ -\ Suspicious activities--spikes in SMB traffic, processes that launch netsh (to modify the network configuration), suspicious registry modifications, and many more--may all be events you may wish to investigate further. While the use of these technique may be an indication that a nation-state actor is attempting to compromise your environment, it is important to note that these techniques are often employed by other groups, as well. [analytic_story://DNS Amplification Attacks] @@ -252,7 +231,6 @@ spec_version = 2 searches = ["ESCU - Large Volume of DNS ANY Queries - Rule", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User"] description = DNS poses a serious threat as a Denial of Service (DOS) amplifier, if it responds to `ANY` queries. This Analytic Story can help you detect attackers who may be abusing your company's DNS infrastructure to launch amplification attacks, causing Denial of Service to other victims. narrative = The Domain Name System (DNS) is the protocol used to map domain names to IP addresses. It has been proven to work very well for its intended function. However if DNS is misconfigured, servers can be abused by attackers to levy amplification or redirection attacks against victims. Because DNS responses to `ANY` queries are so much larger than the queries themselves--and can be made with a UDP packet, which does not require a handshake--attackers can spoof the source address of the packet and cause much more data to be sent to the victim than if they sent the traffic themselves. The `ANY` requests are will be larger than normal DNS server requests, due to the fact that the server provides significant details, such as MX records and associated IP addresses. A large volume of this traffic can result in a DOS on the victim's machine. This misconfiguration leads to two possible victims, the first being the DNS servers participating in an attack and the other being the hosts that are the targets of the DOS attack.\ -\ The search in this story can help you to detect if attackers are abusing your company's DNS infrastructure to launch DNS amplification attacks causing Denial of Service to other victims. [analytic_story://DNS Hijacking] @@ -265,21 +243,13 @@ spec_version = 2 searches = ["ESCU - DNS record changed - Rule", "ESCU - Clients Connecting to Multiple DNS Servers - Rule", "ESCU - Detect hosts connecting to dynamic domain providers - Rule", "ESCU - DNS Query Requests Resolved by Unauthorized DNS Servers - Rule", "ESCU - Get DNS Server History for a host", "ESCU - Discover DNS records"] description = Secure your environment against DNS hijacks with searches that help you detect and investigate unauthorized changes to DNS records. narrative = Dubbed the Achilles heel of the Internet (see https://www.f5.com/labs/articles/threat-intelligence/dns-is-still-the-achilles-heel-of-the-internet-25613), DNS plays a critical role in routing web traffic but is notoriously vulnerable to attack. One reason is its distributed nature. It relies on unstructured connections between millions of clients and servers over inherently insecure protocols.\ -\ The gravity and extent of the importance of securing DNS from attacks is undeniable. The fallout of compromised DNS can be disastrous. Not only can hackers bring down an entire business, they can intercept confidential information, emails, and login credentials, as well. \ -\ On January 22, 2019, the US Department of Homeland Security 2019's Cybersecurity and Infrastructure Security Agency (CISA) raised awareness of some high-profile DNS hijacking attacks against infrastructure, both in the United States and abroad. It issued Emergency Directive 19-01 (see https://cyber.dhs.gov/ed/19-01/), which summarized the activity and required government agencies to take the following four actions, all within 10 days: \ -\ 1. For all .gov or other agency-managed domains, audit public DNS records on all authoritative and secondary DNS servers, verify that they resolve to the intended location or report them to CISA.\ -\ 1. Update the passwords for all accounts on systems that can make changes to each agency 2019's DNS records.\ -\ 1. Implement multi-factor authentication (MFA) for all accounts on systems that can make changes to each agency's 2019 DNS records or, if impossible, provide CISA with the names of systems, the reasons why MFA cannot be enabled within the required timeline, and an ETA for when it can be enabled.\ -\ -1. CISA will begin regular delivery of newly added certificates to Certificate Transparency (CT) logs for agency domains via the Cyber Hygiene service. Upon receipt, agencies must immediately begin monitoring CT log data for certificates issued that they did not request. If an agency confirms that a certificate was unauthorized, it must report the certificate to the issuing certificate authority and to CISA.Of course, it makes sense to put equivalent actions in place within your environment, as well. \ -\ +1. CISA will begin regular delivery of newly added certificates to Certificate Transparency (CT) logs for agency domains via the Cyber Hygiene service. Upon receipt, agencies must immediately begin monitoring CT log data for certificates issued that they did not request. If an agency confirms that a certificate was unauthorized, it must report the certificate to the issuing certificate authority and to CISA. Of course, it makes sense to put equivalent actions in place within your environment, as well. \ In DNS hijacking, the attacker assumes control over an account or makes use of a DNS service exploit to make changes to DNS records. Once they gain access, attackers can substitute their own MX records, name-server records, and addresses, redirecting emails and traffic through their infrastructure, where they can read, copy, or modify information seen. They can also generate valid encryption certificates to help them avoid browser-certificate checks. In one notable attack on the Internet service provider, GoDaddy, the hackers altered Sender Policy Framework (SPF) records a relatively minor change that did not inflict excessive damage but allowed for more effective spam campaigns.\ -\ The searches in this Analytic Story help you detect and investigate activities that may indicate that DNS hijacking has taken place within your environment. [analytic_story://Data Protection] @@ -325,9 +295,7 @@ spec_version = 2 searches = ["ESCU - Detect Rare Executables - Rule", "ESCU - Registry Keys Used For Persistence - Rule", "ESCU - Detect Use of cmd.exe to Launch Script Interpreters - Rule", "ESCU - Prohibited Software On Endpoint - Rule", "ESCU - SMB Traffic Spike - Rule", "ESCU - SMB Traffic Spike - MLTK - Rule", "ESCU - Suspicious Email Attachment Extensions - Rule", "ESCU - Email Attachments With Lots Of Spaces - Rule", "ESCU - Detection of tools built by NirSoft - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Process Information For Port Activity", "ESCU - Get Registry Activities", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get Update Logs For Endpoint", "ESCU - Get User Information from Identity Table", "ESCU - Get Vulnerability Logs For Endpoint", "ESCU - Investigate Web Activity From Host", "ESCU - Add Prohibited Processes to Enterprise Security", "ESCU - Baseline of SMB Traffic - MLTK"] description = Detect rarely used executables, specific registry paths that may confer malware survivability and persistence, instances where cmd.exe is used to launch script interpreters, and other indicators that the Emotet financial malware has compromised your environment. narrative = The trojan downloader known as Emotet first surfaced in 2014, when it was discovered targeting the banking industry to steal credentials. However, according to a joint technical alert (TA) issued by three government agencies (https://www.us-cert.gov/ncas/alerts/TA18-201A), Emotet has evolved far beyond those beginnings to become what a ThreatPost article called a threat-delivery service(see https://threatpost.com/emotet-malware-evolves-beyond-banking-to-threat-delivery-service/134342/). For example, in early 2018, Emotet was found to be using its loader function to spread the Quakbot and Ransomware variants. \ -\ According to the TA, the the malware continues to be among the most costly and destructive malware affecting the private and public sectors. Researchers have linked it to the threat group Mealybug, which has also been on the security communitys radar since 2014.\ -\ The searches in this Analytic Story will help you find executables that are rarely used in your environment, specific registry paths that malware often uses to ensure survivability and persistence, instances where cmd.exe is used to launch script interpreters, and other indicators that Emotet or other malware has compromised your environment. [analytic_story://Hidden Cobra Malware] @@ -340,11 +308,8 @@ spec_version = 2 searches = ["ESCU - SMB Traffic Spike - Rule", "ESCU - SMB Traffic Spike - MLTK - Rule", "ESCU - First time seen command line argument - Rule", "ESCU - Detect Outbound SMB Traffic - Rule", "ESCU - Remote Desktop Network Traffic - Rule", "ESCU - Remote Desktop Process Running On System - Rule", "ESCU - DNS Query Length With High Standard Deviation - Rule", "ESCU - Create or delete hidden shares using net.exe - Rule", "ESCU - Suspicious File Write - Rule", "ESCU - DNS Query Length Outliers - MLTK - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get DNS Server History for a host", "ESCU - Get DNS traffic ratio", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Process Information For Port Activity", "ESCU - Get Process Responsible For The DNS Traffic", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table", "ESCU - Get Vulnerability Logs For Endpoint", "ESCU - Investigate Successful Remote Desktop Authentications", "ESCU - Investigate Web Activity From Host", "ESCU - Baseline of DNS Query Length - MLTK", "ESCU - Baseline of SMB Traffic - MLTK", "ESCU - Identify Systems Creating Remote Desktop Traffic", "ESCU - Identify Systems Receiving Remote Desktop Traffic", "ESCU - Identify Systems Using Remote Desktop", "ESCU - Previously seen command line arguments"] description = Monitor for and investigate activities, including the creation or deletion of hidden shares and file writes, that may be evidence of infiltration by North Korean government-sponsored cybercriminals. Details of this activity were reported in DHS Report TA-18-149A. narrative = North Korea's government-sponsored "cyber army" has been slowly building momentum and gaining sophistication over the last 15 years or so. As a result, the group's activity, which the US government refers to as "Hidden Cobra," has surreptitiously crept onto the collective radar as a preeminent global threat.\ -\ These state-sponsored actors are thought to be responsible for everything from a hack on a South Korean nuclear plant to an attack on Sony in anticipation of its release of the movie "The Interview" at the end of 2014. They're also notorious for cyberespionage. In recent years, the group seems to be focused on financial crimes, such as cryptojacking.\ -\ In June of 2018, The Department of Homeland Security, together with the FBI and other U.S. government partners, issued Technical Alert (TA-18-149A) to advise the public about two variants of North Korean malware. One variant, dubbed "Joanap," is a multi-stage peer-to-peer botnet that allows North Korean state actors to exfiltrate data, download and execute secondary payloads, and initialize proxy communications. The other variant, "Brambul," is a Windows32 SMB worm that is dropped into a victim network. When executed, the malware attempts to spread laterally within a victim's local subnet, connecting via the SMB protocol and initiating brute-force password attacks. It reports details to the Hidden Cobra actors via email, so they can use the information for secondary remote operations.\ -\ Among other searches in this Analytic Story is a detection search that looks for the creation or deletion of hidden shares, such as, "adnim$," which the Hidden Cobra malware creates on the target system. Another looks for the creation of three malicious files associated with the malware. You can also use a search in this story to investigate activity that indicates that malware is sending email back to the attackers. [analytic_story://Host Redirection] @@ -368,33 +333,19 @@ spec_version = 2 searches = ["ESCU - Detect malicious requests to exploit JBoss servers - Rule", "ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Vulnerability Logs For Endpoint", "ESCU - Investigate Web Activity From Host"] description = In March of 2016, adversaries were seen using JexBoss--an open-source utility used for testing and exploiting JBoss application servers. These searches help detect evidence of these attacks, such as network connections to external resources or web services spawning atypical child processes, among others. narrative = This Analytic Story looks for probing and exploitation attempts targeting JBoss application servers. While the vulnerabilities associated with this story are rather dated, they were leveraged in a spring 2016 campaign in connection with the Samsam ransomware variant. Incidents involving this ransomware are unique, in that they begin with attacks against vulnerable services, rather than the phishing or drive-by attacks more common with ransomware. In this case, vulnerable JBoss applications appear to be the target of choice.\ -\ It is helpful to understand how often a notable event generated by this story occurs, as well as the commonalities between some of these events, both of which may provide clues about whether this is a common occurrence of minimal concern or a rare event that may require more extensive investigation. It may also help to understand whether the issue is restricted to a single user/system or whether it is broader in scope.\ -\ -When looking at the target of the behavior uncovered by the event, you should note the sensitivity of the user and or/system to help determine the potential impact. It is also helpful to identify other recent events involving the target. This can help tie different events together and give further situational awareness regarding the target host.\ -\ +hen looking at the target of the behavior uncovered by the event, you should note the sensitivity of the user and or/system to help determine the potential impact. It is also helpful to identify other recent events involving the target. This can help tie different events together and give further situational awareness regarding the target host.\ Various types of information for external systems should be reviewed and, potentially, collected if the incident is, indeed, judged to be malicious. This data may be useful for generating your own threat intelligence, so you can create future alerts.\ -\ The following factors may assist you in determining whether the event is malicious: \ -\ 1. Country of origin\ -\ 1. Responsible party\ -\ 1. Fully qualified domain names associated with the external IP address\ -\ 1. Registration of fully qualified domain names associated with external IP address Determining whether it is a dynamic domain frequently visited by others and/or how third parties categorize it can also help you qualify and understand the event and possible motivation for the attack. In addition, there are various sources that may provide reputation information on the IP address or domain name, which can assist you in determining whether the event is malicious in nature. Finally, determining whether there are other events associated with the IP address may help connect data points or expose other historic events that might be brought back into scope.\ -\ Gathering various data on the system of interest can sometimes help quickly determine whether something suspicious is happening. Some of these items include determining who else may have logged into the system recently, whether any unusual scheduled tasks exist, whether the system is communicating on suspicious ports, whether there are modifications to sensitive registry keys, and/or whether there are any known vulnerabilities on the system. This information can often highlight other activity commonly seen in attack scenarios or give more information about how the system may have been targeted.\ -\ -When a specific service or application is targeted, it is often helpful to know the associated version, to help determine whether it is vulnerable to a specific exploit.\ -\ +hen a specific service or application is targeted, it is often helpful to know the associated version, to help determine whether it is vulnerable to a specific exploit.\ If you suspect an attack targeting a web server, it is helpful to look at some of the behavior of the web service to see if there is evidence that the service has been compromised. Some indications of this might be network connections to external resources, the web service spawning child processes that are not associated with typical behavior, and whether the service wrote any files that might be malicious in nature.\ -\ If a suspicious file is found, we can review more information about it to help determine if it is, in fact, malicious. Identifying the file type, any processes that opened the file, the processes that may have created and/or modified the file, and how many other systems potentially have this file can you determine whether the file is malicious. Also, determining the file hash and checking it against reputation sources, such as VirusTotal, can sometimes help you quickly determine if it is malicious in nature.\ -\ Often, a simple inspection of a suspect process name and path can tell you if the system has been compromised. For example, if svchost.exe is found running from a location other than `C:\Windows\System32`, it is likely something malicious designed to hide in plain sight when simply reviewing process names. \ -\ It can also be helpful to examine various behaviors of and the parent of the process of interest. For example, if it turns out the process of interest is malicious, it would be good to see whether the parent process spawned other processes that might also warrant further scrutiny. If a process is suspect, a review of the network connections made around the time of the event and noting whether the process has spawned any child processes could be helpful in determining whether it is malicious or executing a malicious script. [analytic_story://Lateral Movement] @@ -407,13 +358,9 @@ spec_version = 2 searches = ["ESCU - Schtasks scheduling job on remote system - Rule", "ESCU - Remote Desktop Process Running On System - Rule", "ESCU - Remote Desktop Network Traffic - Rule", "ESCU - Detect Activity Related to Pass the Hash Attacks - Rule", "ESCU - Remote Registry Key modifications - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Process Information For Port Activity", "ESCU - Get Registry Activities", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table", "ESCU - Investigate Successful Remote Desktop Authentications", "ESCU - Identify Systems Creating Remote Desktop Traffic", "ESCU - Identify Systems Receiving Remote Desktop Traffic", "ESCU - Identify Systems Using Remote Desktop"] description = Detect and investigate tactics, techniques, and procedures around how attackers move laterally within the enterprise. Because lateral movement can expose the adversary to detection, it should be an important focus for security analysts. narrative = Once attackers gain a foothold within an enterprise, they will seek to expand their accesses and leverage techniques that facilitate lateral movement. Attackers will often spend quite a bit of time and effort moving laterally. Because lateral movement renders an attacker the most vulnerable to detection, it's an excellent focus for detection and investigation.\ -\ Indications of lateral movement can include the abuse of system utilities (such as `psexec.exe`), unauthorized use of remote desktop services, `file/admin$` shares, WMI, PowerShell, pass-the-hash, or the abuse of scheduled tasks. Organizations must be extra vigilant in detecting lateral movement techniques and look for suspicious activity in and around high-value strategic network assets, such as Active Directory, which are often considered the primary target or "crown jewels" to a persistent threat actor.\ -\ An adversary can use lateral movement for multiple purposes, including remote execution of tools, pivoting to additional systems, obtaining access to specific information or files, access to additional credentials, exfiltrating data, or delivering a secondary effect. Adversaries may use legitimate credentials alongside inherent network and operating-system functionality to remotely connect to other systems and remain under the radar of network defenders.\ -\ If there is evidence of lateral movement, it is imperative for analysts to collect evidence of the associated offending hosts. For example, an attacker might leverage host A to gain access to host B. From there, the attacker may try to move laterally to host C. In this example, the analyst should gather as much information as possible from all three hosts. \ -\ It is also important to collect authentication logs for each host, to ensure that the offending accounts are well-documented. Analysts should account for all processes to ensure that the attackers did not install unauthorized software. [analytic_story://Malicious PowerShell] @@ -426,23 +373,14 @@ spec_version = 2 searches = ["ESCU - Malicious PowerShell Process - Connect To Internet With Hidden Window - Rule", "ESCU - Malicious PowerShell Process - Encoded Command - Rule", "ESCU - Malicious PowerShell Process - Multiple Suspicious Command-Line Arguments - Rule", "ESCU - Malicious PowerShell Process With Obfuscation Techniques - Rule", "ESCU - Attempt To Set Default PowerShell Execution Policy To Unrestricted - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table"] description = Attackers are finding stealthy ways "live off the land," leveraging utilities and tools that come standard on the endpoint--such as PowerShell--to achieve their goals without downloading binary files. These searches can help you detect and investigate PowerShell command-line options that may be indicative of malicious intent. narrative = The searches in this Analytic Story monitor for parameters often used for malicious purposes. It is helpful to understand how often the notable events generated by this story occur, as well as the commonalities between some of these events. These factors may provide clues about whether this is a common occurrence of minimal concern or a rare event that may require more extensive investigation. Likewise, it is important to determine whether the issue is restricted to a single user/system or is broader in scope.\ -\ The following factors may assist you in determining whether the event is malicious: \ -\ 1. Country of origin\ -\ 1. Responsible party\ -\ 1. Fully qualified domain names associated with the external IP address\ -\ 1. Registration of fully qualified domain names associated with external IP addressDetermining whether it is a dynamic domain frequently visited by others and/or how third parties categorize it can also help you answer some questions surrounding the attacker and details related to the external system. In addition, there are various sources--such as VirusTotal— that can provide some reputation information on the IP address or domain name, which can assist in determining whether the event is malicious. Finally, determining whether there are other events associated with the IP address may help connect data points or show other events that should be brought into scope.\ -\ Gathering data on the system of interest can sometimes help you quickly determine whether something suspicious is happening. Some of these items include finding out who else may have recently logged into the system, whether any unusual scheduled tasks exist, whether the system is communicating on suspicious ports, whether there are modifications to sensitive registry keys, and whether there are any known vulnerabilities on the system. This information can often highlight other activity commonly seen in attack scenarios or give more information about how the system may have been targeted.\ -\ Often, a simple inspection of the process name and path can tell you if the system has been compromised. For example, if `svchost.exe` is found running from a location other than `C:\Windows\System32`, it is likely something malicious designed to hide in plain sight when cursorily reviewing process names. Similarly, if the process itself seems legitimate, but the parent process is running from the temporary browser cache, that could be indicative of activity initiated via a compromised website a user visited.\ -\ It can also be very helpful to examine various behaviors of the process of interest or the parent of the process of interest. For example, if it turns out the process of interest is malicious, it would be good to see if the parent to that process spawned other processes that might be worth further scrutiny. If a process is suspect, a review of the network connections made in and around the time of the event and/or whether the process spawned any child processes could be helpful, as well.\ -\ In the event a system is suspected of having been compromised via a malicious website, we suggest reviewing the browsing activity from that system around the time of the event. If categories are given for the URLs visited, that can help you zero in on possible malicious sites. [analytic_story://Monitor Backup Solution] @@ -466,7 +404,6 @@ spec_version = 2 searches = ["ESCU - Prohibited Software On Endpoint - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get Update Logs For Endpoint", "ESCU - Get User Information from Identity Table", "ESCU - Get Vulnerability Logs For Endpoint", "ESCU - Investigate Web Activity From Host", "ESCU - Add Prohibited Processes to Enterprise Security"] description = Identify and investigate prohibited/unauthorized software or processes that may be concealing malicious behavior within your environment. narrative = It is critical to identify unauthorized software and processes running on enterprise endpoints and determine whether they are likely to be malicious. This Analytic Story requires the user to populate the Interesting Processes table within Enterprise Security with prohibited processes. An included support search will augment this data, adding information on processes thought to be malicious. This search requires data from endpoint detection-and-response solutions, endpoint data sources (such as Sysmon), or Windows Event Logs--assuming that the Active Directory administrator has enabled process tracking within the System Event Audit Logs.\ -\ It is important to investigate any software identified as suspicious, in order to understand how it was installed or executed. Analyzing authentication logs or any historic notable events might elicit additional investigative leads of interest. For best results, schedule the search to run every two weeks. [analytic_story://Monitor for Updates] @@ -479,9 +416,7 @@ spec_version = 2 searches = ["ESCU - No Windows Updates in a time frame - Rule", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Risk Modifiers For Endpoint"] description = Monitor your enterprise to ensure that your endpoints are being patched and updated. Adversaries notoriously exploit known vulnerabilities that could be mitigated by applying routine security patches. narrative = It is a common best practice to ensure that endpoints are being patched and updated in a timely manner, in order to reduce the risk of compromise via a publicly disclosed vulnerability. Timely application of updates/patches is important to eliminate known vulnerabilities that may be exploited by various threat actors.\ -\ Searches in this analytic story are designed to help analysts monitor endpoints for system patches and/or updates. This helps analysts identify any systems that are not successfully updated in a timely matter.\ -\ Microsoft releases updates for Windows systems on a monthly cadence. They should be installed as soon as possible after following internal testing and validation procedures. Patches and updates for other systems or applications are typically released as needed. [analytic_story://Netsh Abuse] @@ -494,7 +429,6 @@ spec_version = 2 searches = ["ESCU - Processes created by netsh - Rule", "ESCU - Processes launching netsh - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table", "ESCU - Investigate Web Activity From Host", "ESCU - Baseline of SMB Traffic - MLTK", "ESCU - Previously seen command line arguments"] description = Detect activities and various techniques associated with the abuse of `netsh.exe`, which can disable local firewall settings or set up a remote connection to a host from an infected system. narrative = It is a common practice for attackers of all types to leverage native Windows tools and functionality to execute commands for malicious reasons. One such tool on Windows OS is `netsh.exe`,a command-line scripting utility that allows you to--either locally or remotely--display or modify the network configuration of a computer that is currently running. `Netsh.exe` can be used to discover and disable local firewall settings. It can also be used to set up a remote connection to a host from an infected system.\ -\ To get started, run the detection search to identify parent processes of `netsh.exe`. [analytic_story://Orangeworm Attack Group] @@ -507,13 +441,9 @@ spec_version = 2 searches = ["ESCU - First time seen command line argument - Rule", "ESCU - Sc.exe Manipulating Windows Services - Rule", "ESCU - First Time Seen Running Windows Service - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table", "ESCU - Investigate Web Activity From Host", "ESCU - Previously Seen Running Windows Services", "ESCU - Previously seen command line arguments"] description = Detect activities and various techniques associated with the Orangeworm Attack Group, a group that frequently targets the healthcare industry. narrative = In May of 2018, the attack group Orangeworm was implicated for installing a custom backdoor called Trojan.Kwampirs within large international healthcare corporations in the United States, Europe, and Asia. This malware provides the attackers with remote access to the target system, decrypting and extracting a copy of its main DLL payload from its resource section. Before writing the payload to disk, it inserts a randomly generated string into the middle of the decrypted payload in an attempt to evade hash-based detections.\ -\ Awareness of the Orangeworm group first surfaced in January, 2015. It has conducted targeted attacks against related industries, as well, such as pharmaceuticals and healthcare IT solution providers.\ -\ Although the group's motivation is unknown, its goal may be stealing patient information to sell on the black market. Another possible explanation is corporate espionage. \ -\ Healthcare may be a promising target, because it is notoriously behind in technology, often using older operating systems and neglecting to patch computers. Even so, the group was able to evade detection for a full three years. Sources say that the malware spread quickly within the target networks, infecting computers used to control medical devices, such as MRI and X-ray machines.\ -\ This Analytic Story is designed to help you detect and investigate suspicious activities that may be indicative of an Orangeworm attack. One detection search looks for command-line arguments. Another monitors for uses of sc.exe, a non-essential Windows file that can manipulate Windows services. One of the investigative searches helps you get more information on web hosts that you suspect have been compromised. [analytic_story://Phishing Payloads] @@ -526,19 +456,12 @@ spec_version = 2 searches = ["ESCU - Detect Oulook.exe writing a .zip file - Rule", "ESCU - Suspicious LNK file launching a process - Rule", "ESCU - Get Parent Process Info"] description = Detect signs of malicious payloads that may indicate that your environment has been breached via a phishing attack. narrative = Despite its simplicity, phishing remains the most pervasive and dangerous cyberthreat. In fact, research shows that as many as [91% of all successful attacks](https://digitalguardian.com/blog/91-percent-cyber-attacks-start-phishing-email-heres-how-protect-against-phishing) are initiated via a phishing email. \ -\ As most people know, these emails use fraudulent domains, [email scraping](https://www.cyberscoop.com/emotet-trojan-phishing-scraping-templates-cofense-geodo/), familiar contact names inserted as senders, and other tactics to lure targets into clicking a malicious link, opening an attachment with a [nefarious payload](https://www.cyberscoop.com/emotet-trojan-phishing-scraping-templates-cofense-geodo/), or entering sensitive personal information that perpetrators may intercept. This attack technique requires a relatively low level of skill and allows adversaries to easily cast a wide net. Worse, because its success relies on the gullibility of humans, it's impossible to completely "automate" it out of your environment. However, you can use ES and ESCU to detect and investigate potentially malicious payloads injected into your environment subsequent to a phishing attack. \ -\ -While any kind of file may contain a malicious payload, some are more likely to be perceived as benign (and thus more often escape notice) by the average victim—especially when the attacker sends an email that seems to be from one of their contacts. An example is Microsoft Office files. Most corporate users are familiar with documents with the following suffixes: .doc/.docx (MS Word), .xls/.xlsx (MS Excel), and .ppt/.pptx (MS PowerPoint), so they may click without a second thought, slashing a hole in their organizations' security. \ -\ +hile any kind of file may contain a malicious payload, some are more likely to be perceived as benign (and thus more often escape notice) by the average victim—especially when the attacker sends an email that seems to be from one of their contacts. An example is Microsoft Office files. Most corporate users are familiar with documents with the following suffixes: .doc/.docx (MS Word), .xls/.xlsx (MS Excel), and .ppt/.pptx (MS PowerPoint), so they may click without a second thought, slashing a hole in their organizations' security. \ Following is a typical series of events, according to an [article by Trend Micro](https://blog.trendmicro.com/trendlabs-security-intelligence/rising-trend-attackers-using-lnk-files-download-malware/):\ -\ 1. Attacker sends a phishing email. Recipient downloads the attached file, which is typically a .docx or .zip file with an embedded .lnk file\ -\ 1. The .lnk file executes a PowerShell script\ -\ 1. Powershell executes a reverse shell, rendering the exploit successful As a side note, adversaries are likely to use a tool like Empire to craft and obfuscate payloads and their post-injection activities, such as [exfiltration, lateral movement, and persistence](https://github.com/EmpireProject/Empire).\ -\ This Analytic Story focuses on detecting signs that a malicious payload has been injected into your environment. For example, one search detects outlook.exe writing a .zip file. Another looks for suspicious .lnk files launching processes. [analytic_story://Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns] @@ -551,59 +474,32 @@ spec_version = 2 searches = ["ESCU - First time seen command line argument - Rule", "ESCU - Registry Keys Used For Persistence - Rule", "ESCU - Malicious PowerShell Process - Connect To Internet With Hidden Window - Rule", "ESCU - Unusually Long Command Line - Rule", "ESCU - Unusually Long Command Line - MLTK - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Registry Activities", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table", "ESCU - Investigate Web Activity From Host", "ESCU - Baseline of Command Line Length - MLTK", "ESCU - Previously seen command line arguments"] description = Monitor your environment for suspicious behaviors that resemble the techniques employed by the MUDCARP threat group. narrative = This story was created as a joint effort between iDefense and Splunk.\ -\ iDefense analysts have recently discovered a Windows executable file that, upon execution, spoofs a decryption tool and then drops a file that appears to be the custom-built javascript backdoor, "Orz," which is associated with the threat actors known as MUDCARP (as well as "temp.Periscope" and "Leviathan"). The file is executed using Wscript.\ -\ The MUDCARP techniques include the use of the compressed-folders module from Microsoft, zipfldr.dll, with RouteTheCall export to run the malicious process or command. After a successful reboot, the malware is made persistent by a manipulating `[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]'help'='c:\\windows\\system32\\rundll32.exe c:\\windows\\system32\\zipfldr.dll,RouteTheCall c:\\programdata\\winapp.exe'`. Though this technique is not exclusive to MUDCARP, it has been spotted in the group's arsenal of advanced techniques seen in the wild.\ -\ This Analytic Story searches for evidence of tactics, techniques, and procedures (TTPs) that allow for the use of a endpoint detection-and-response (EDR) bypass technique to mask the true parent of a malicious process. It can also be set as a registry key for further sandbox evasion and to allow the malware to launch only after reboot.\ -\ If behavioral searches included in this story yield positive hits, iDefense recommends conducting IOC searches for the following:\ \ -\ -\ 1. www.chemscalere[.]com\ -\ 1. chemscalere[.]com\ -\ 1. about.chemscalere[.]com\ -\ 1. autoconfig.chemscalere[.]com\ -\ 1. autodiscover.chemscalere[.]com\ -\ 1. catalog.chemscalere[.]com\ -\ 1. cpanel.chemscalere[.]com\ -\ 1. db.chemscalere[.]com\ -\ 1. ftp.chemscalere[.]com\ -\ 1. mail.chemscalere[.]com\ -\ 1. news.chemscalere[.]com\ -\ 1. update.chemscalere[.]com\ -\ 1. webmail.chemscalere[.]com\ -\ 1. www.candlelightparty[.]org\ -\ 1. candlelightparty[.]org\ -\ 1. newapp.freshasianews[.]comIn addition, iDefense also recommends that organizations review their environments for activity related to the following hashes:\ \ -\ -\ 1. cd195ee448a3657b5c2c2d13e9c7a2e2\ -\ 1. b43ad826fe6928245d3c02b648296b43\ -\ 1. 889a9b52566448231f112a5ce9b5dfaf\ -\ 1. b8ec65dab97cdef3cd256cc4753f0c54\ -\ 1. 04d83cd3813698de28cfbba326d7647c [analytic_story://Prohibited Traffic Allowed or Protocol Mismatch] @@ -638,7 +534,6 @@ spec_version = 2 searches = ["ESCU - Detect New Login Attempts to Routers - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table"] description = Validate the security configuration of network infrastructure and verify that only authorized users and systems are accessing critical assets. Core routing and switching infrastructure are common strategic targets for attackers. narrative = Networking devices, such as routers and switches, are often overlooked as resources that attackers will leverage to subvert an enterprise. Advanced threats actors have shown a proclivity to target these critical assets as a means to siphon and redirect network traffic, flash backdoored operating systems, and implement cryptographic weakened algorithms to more easily decrypt network traffic.\ -\ This Analytic Story helps you gain a better understanding of how your network devices are interacting with your hosts. By compromising your network devices, attackers can obtain direct access to the company's internal infrastructure— effectively increasing the attack surface and accessing private services/data. [analytic_story://SQL Injection] @@ -651,7 +546,6 @@ spec_version = 2 searches = ["ESCU - SQL Injection with Long URLs - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Risk Modifiers For Endpoint"] description = Use the searches in this Analytic Story to help you detect structured query language (SQL) injection attempts characterized by long URLs that contain malicious parameters. narrative = It is very common for attackers to inject SQL parameters into vulnerable web applications, which then interpret the malicious SQL statements.\ -\ This Analytic Story contains a search designed to identify attempts by attackers to leverage this technique to compromise a host and gain a foothold in the target environment. [analytic_story://SamSam Ransomware] @@ -664,15 +558,10 @@ spec_version = 2 searches = ["ESCU - Deleting Shadow Copies - Rule", "ESCU - Spike in File Writes - Rule", "ESCU - Common Ransomware Extensions - Rule", "ESCU - Common Ransomware Notes - Rule", "ESCU - Prohibited Software On Endpoint - Rule", "ESCU - Detect PsExec With accepteula Flag - Rule", "ESCU - Remote Desktop Network Traffic - Rule", "ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule", "ESCU - Detect malicious requests to exploit JBoss servers - Rule", "ESCU - Remote Desktop Network Bruteforce - Rule", "ESCU - File with Samsam Extension - Rule", "ESCU - Samsam Test File Write - Rule", "ESCU - Batch File Write to System32 - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Backup Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Process Information For Port Activity", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get Update Logs For Endpoint", "ESCU - Get User Information from Identity Table", "ESCU - Get Vulnerability Logs For Endpoint", "ESCU - Investigate Successful Remote Desktop Authentications", "ESCU - Investigate Web Activity From Host", "ESCU - Add Prohibited Processes to Enterprise Security", "ESCU - Identify Systems Creating Remote Desktop Traffic", "ESCU - Identify Systems Receiving Remote Desktop Traffic", "ESCU - Identify Systems Using Remote Desktop"] description = Leverage searches that allow you to detect and investigate unusual activities that might relate to the SamSam ransomware, including looking for file writes associated with SamSam, RDP brute force attacks, the presence of files with SamSam ransomware extensions, suspicious psexec use, and more. narrative = The first version of the SamSam ransomware (a.k.a. Samas or SamsamCrypt) was launched in 2015 by a group of Iranian threat actors. The malicious software has affected and continues to affect thousands of victims and has raised almost $6M in ransom.\ -\ Although categorized under the heading of ransomware, SamSam campaigns have some importance distinguishing characteristics. Most notable is the fact that conventional ransomware is a numbers game. Perpetrators use a "spray-and-pray" approach with phishing campaigns or other mechanisms, charging a small ransom (typically under $1,000). The goal is to find a large number of victims willing to pay these mini-ransoms, adding up to a lucrative payday. They use relatively simple methods for infecting systems.\ -\ SamSam attacks are different beasts. They have become progressively more targeted and skillful than typical ransomware attacks. First, malicious actors break into a victim's network, surveil it, then run the malware manually. The attacks are tailored to cause maximum damage and the threat actors usually demand amounts in the tens of thousands of dollars.\ -\ In a typical attack on one large healthcare organization in 2018, the company ended up paying a ransom of four Bitcoins, then worth $56,707. Reports showed that access to the company's files was restored within two hours of paying the sum.\ -\ According to Sophos, SamSam previously leveraged RDP to gain access to targeted networks via brute force. SamSam is not spread automatically, like other malware. It requires skill because it forces the attacker to adapt their tactics to the individual environment. Next, the actors escalate their privileges to admin level. They scan the networks for worthy targets, using conventional tools, such as PsExec or PaExec, to deploy/execute, quickly encrypting files.\ -\ This Analytic Story includes searches designed to help detect and investigate signs of the SamSam ransomware, such as the creation of fileswrites to system32, writes with tell-tale extensions, batch files written to system32, and evidence of brute-force attacks via RDP. [analytic_story://Spectre And Meltdown Vulnerabilities] @@ -697,22 +586,13 @@ searches = ["ESCU - Open Redirect in Splunk Web - Rule", "ESCU - Get Notable His description = Keeping your Splunk deployment up to date is critical and may help you reduce the risk of CVE-2016-4859, an open-redirection vulnerability within some older versions of Splunk Enterprise. The detection search will help ensure that users are being properly authenticated and not being redirected to malicious domains. narrative = This Analytic Story is associated with CVE-2016-4859, an open-redirect vulnerability in the following versions of Splunk Enterprise:\ \ -\ -\ 1. Splunk Enterprise 6.4.x, prior to 6.4.3\ -\ 1. Splunk Enterprise 6.3.x, prior to 6.3.6\ -\ 1. Splunk Enterprise 6.2.x, prior to 6.2.10\ -\ 1. Splunk Enterprise 6.1.x, prior to 6.1.11\ -\ 1. Splunk Enterprise 6.0.x, prior to 6.0.12\ -\ 1. Splunk Enterprise 5.0.x, prior to 5.0.16\ -\ 1. Splunk Light, prior to 6.4.3CVE-2016-4859 allows attackers to redirect users to arbitrary web sites and conduct phishing attacks via unspecified vectors. (Credit: Noriaki Iwasaki, Cyber Defense Institute, Inc.).\ -\ It is important to ensure that your Splunk deployment is being kept up to date and is properly configured. This detection search allows analysts to monitor internal logs to ensure users are properly authenticated and cannot be redirected to any malicious third-party websites. [analytic_story://Splunk Enterprise Vulnerability CVE-2018-11409] @@ -725,11 +605,8 @@ spec_version = 2 searches = ["ESCU - Splunk Enterprise Information Disclosure - Rule", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Investigate Network Traffic From src_ip", "ESCU - Investigate Web Activity From src_ip"] description = Reduce the risk of CVE-2018-11409, an information disclosure vulnerability within some older versions of Splunk Enterprise, with searches designed to help ensure that your Splunk system does not leak information to authenticated users. narrative = Although there have been no reports of it being exploited, Splunk Enterprise versions through 7.0.1 reportedly have a vulnerability that may expose information through a REST endpoint (read more here: https://www.splunk.com/view/SP-CAAAP5E#VulnerabilityDescriptionsandRatings). NIST has included it in its vulnerability database (read more here: https://nvd.nist.gov/vuln/detail/CVE-2018-11409). The REST endpoint that exposes system information is also necessary for the proper operation of Splunk clustering and instrumentation. Customers should upgrade to the latest version to reduce the risk of this vulnerability.\ -\ Splunk Enterprise exposes partial information about the host operating system, hardware, and Splunk license. Splunk Enterprise before 6.6.0 exposes this information without authentication. Splunk Enterprise 6.6.0 and later exposes this information only to authenticated Splunk users. Based on the information exposure, Splunk characterizes this issue as a low severity impact.\ -\ Read more in Splunk's official response: https://www.splunk.com/view/SP-CAAAP5E#VulnerabilityDescriptionsandRatings.\ -\ A detection search within this Analytic Story looks for vulnerabilities described in CVE-2018-11409: Information Exposure (https://nvd.nist.gov/vuln/detail/CVE-2018-11409). If it turns up activities that may be specific, you can use the included investigative searches to return information regarding web activity and network traffic by src_ip. [analytic_story://Suspicious AWS EC2 Activities] @@ -764,9 +641,7 @@ spec_version = 2 searches = ["ESCU - Detect New Open S3 buckets - Rule", "ESCU - Detect S3 access from a new IP - Rule", "ESCU - Detect Spike in S3 Bucket deletion - Rule", "ESCU - AWS Investigate User Activities By ARN", "ESCU - AWS S3 Bucket details via bucketName", "ESCU - Get All AWS Activity From IP Address", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get User Information from Identity Table", "ESCU - Investigate AWS activities via region name", "ESCU - Baseline of S3 Bucket deletion activity by ARN", "ESCU - Previously seen S3 bucket access by remote IP"] description = Use the searches in this Analytic Story to monitor your AWS S3 buckets for evidence of anomalous activity and suspicious behaviors, such as detecting open S3 buckets and buckets being accessed from a new IP. The contextual and investigative searches will give you more information, when required. narrative = As cloud computing has exploded, so has the number of creative attacks on virtual environments. And as the number-two cloud-service provider, Amazon Web Services (AWS) has certainly had its share.\ -\ Amazon's "shared responsibility" model dictates that the company has responsibility for the environment outside of the VM and the customer is responsible for the security inside of the S3 container. As such, it's important to stay vigilant for activities that may belie suspicious behavior inside of your environment.\ -\ Among things to look out for are S3 access from unfamiliar locations and by unfamiliar users. Some of the searches in this Analytic Story help you detect suspicious behavior and others help you investigate more deeply, when the situation warrants. [analytic_story://Suspicious AWS Traffic] @@ -779,11 +654,8 @@ spec_version = 2 searches = ["ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule", "ESCU - AWS Investigate User Activities By ARN", "ESCU - AWS Network ACL Details from ID", "ESCU - AWS Network Interface details via resourceId", "ESCU - Get All AWS Activity From IP Address", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get DNS Server History for a host", "ESCU - Get DNS traffic ratio", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Process Info", "ESCU - Get Process Information For Port Activity", "ESCU - Get Process Responsible For The DNS Traffic", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table", "ESCU - Baseline of blocked outbound traffic from AWS"] description = Leverage these searches to monitor your AWS network traffic for evidence of anomalous activity and suspicious behaviors, such as a spike in blocked outbound traffic in your virtual private cloud (VPC). narrative = A virtual private cloud (VPC) is an on-demand managed cloud-computing service that isolates computing resources for each client. Inside the VPC container, the environment resembles a physical network. \ -\ Amazon's VPC service enables you to launch EC2 instances and leverage other Amazon resources. The traffic that flows in and out of this VPC can be controlled via network access-control rules and security groups. Amazon also has a feature called VPC Flow Logs that enables you to log IP traffic going to and from the network interfaces in your VPC. This data is stored using Amazon CloudWatch Logs.\ -\ Attackers may abuse the AWS infrastructure with insecure VPCs so they can co-opt AWS resources for command-and-control nodes, data exfiltration, and more. Once an EC2 instance is compromised, an attacker may initiate outbound network connections for malicious reasons. Monitoring these network traffic behaviors is crucial for understanding the type of traffic flowing in and out of your network and to alert you to suspicious activities.\ -\ The searches in this Analytic Story will monitor your AWS network traffic for evidence of anomalous activity and suspicious behaviors. [analytic_story://Suspicious Command-Line Executions] @@ -818,13 +690,9 @@ spec_version = 2 searches = ["ESCU - Suspicious Email Attachment Extensions - Rule", "ESCU - Email Attachments With Lots Of Spaces - Rule"] description = Email remains one of the primary means for attackers to gain an initial foothold within the modern enterprise. Detect and investigate suspicious emails in your environment with the help of the searches in this Analytic Story. narrative = It is a common practice for attackers of all types to leverage targeted spearphishing campaigns and mass mailers to deliver weaponized email messages and attachments. Fortunately, there are a number of ways to monitor email data in Splunk to detect suspicious content.\ -\ Once a phishing message has been detected, the next steps are to answer the following questions: \ -\ 1. Which users have received this or a similar message in the past?\ -\ 1. When did the targeted campaign begin?\ -\ 1. Have any users interacted with the content of the messages (by downloading an attachment or clicking on a malicious URL)?This Analytic Story provides detection searches to identify suspicious emails, as well as contextual and investigative searches to help answer some of these questions. [analytic_story://Suspicious MSHTA Activity] @@ -837,9 +705,7 @@ spec_version = 2 searches = ["ESCU - Detect mshta.exe running scripts in command-line arguments - Rule", "ESCU - Registry Keys Used For Persistence - Rule", "ESCU - Detect Prohibited Applications Spawning cmd.exe - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Registry Activities", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table", "ESCU - Investigate Web Activity From Host", "ESCU - Baseline of Command Line Length - MLTK", "ESCU - Previously seen command line arguments"] description = Monitor and detect techniques used by attackers who leverage the mshta.exe process to execute malicious code. narrative = One common adversary tactic is to bypass application white-listing solutions via the mshta.exe process, which executes Microsoft HTML applications with the .hta suffix. In these cases, attackers use the trusted Windows utility to eproxy execution of malicious files, whether an .hta application, javascript, or VBScript.\ -\ One example of a notable mshta.exe attack was the Kovter malware (https://medium.com/@mbromileyDFIR/malware-monday-aebb456356c5) that was implicated in ransomware and click-fraud attacks. Kovter utilized .hta to execute a series of javascript commands, each progressively more dangerous. According to the Mitre Parternship Network (https://attack.mitre.org/wiki/Technique/T1170), FIN7 has leveraged mshta.exe, as has the MuddyWater group, who used it to execute its POWERSTATS payload (which then used the utility to execute additional payloads).\ -\ The searches in this story help you detect and investigate suspicious activity that may indicate that an attacker is leveraging mshta.exe to execute malicious code. [analytic_story://Suspicious WMI Use] @@ -852,9 +718,7 @@ spec_version = 2 searches = ["ESCU - Remote WMI Command Attempt - Rule", "ESCU - Remote Process Instantiation via WMI - Rule", "ESCU - WMI Permanent Event Subscription - Rule", "ESCU - WMI Permanent Event Subscription - Sysmon - Rule", "ESCU - WMI Temporary Event Subscription - Rule", "ESCU - Process Execution via WMI - Rule", "ESCU - Script Execution via WMI - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get Sysmon WMI Activity for Host", "ESCU - Get User Information from Identity Table"] description = Attackers are increasingly abusing Windows Management Instrumentation (WMI), a framework and associated utilities available on all modern Windows operating systems. Because WMI can be leveraged to manage both local and remote systems, it is important to identify the processes executed and the user context within which the activity occurred. narrative = WMI is a Microsoft infrastructure for management data and operations on Windows operating systems. It includes of a set of utilities that can be leveraged to manage both local and remote Windows systems. Attackers are increasingly turning to WMI abuse in their efforts to conduct nefarious tasks, such as reconnaissance, detection of antivirus and virtual machines, code execution, lateral movement, persistence, and data exfiltration. \ -\ The detection searches included in this Analytic Story are used to look for suspicious use of WMI commands that attackers may leverage to interact with remote systems. The searches specifically look for the use of WMI to run processes on remote systems.\ -\ In the event that unauthorized WMI execution occurs, it will be important for analysts and investigators to determine the context of the event. These details may provide insights related to how WMI was used and to what end. [analytic_story://Suspicious Windows Registry Activities] @@ -867,9 +731,7 @@ spec_version = 2 searches = ["ESCU - Remote Registry Key modifications - Rule", "ESCU - Suspicious Changes to File Associations - Rule", "ESCU - Disabling Remote User Account Control - Rule", "ESCU - Registry Keys for Creating SHIM Databases - Rule", "ESCU - Monitor Registry Keys for Print Monitors - Rule", "ESCU - Reg.exe used to hide files/directories via registry keys - Rule", "ESCU - Registry Keys Used For Persistence - Rule", "ESCU - Registry Keys Used For Privilege Escalation - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Registry Activities", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table", "ESCU - Investigate Web Activity From Host"] description = Monitor and detect registry changes initiated from remote locations, which can be a sign that an attacker has infiltrated your system. narrative = Attackers are developing increasingly sophisticated techniques for hijacking target servers, while evading detection. One such technique that has become progressively more common is registry modification.\ -\ The registry is a key component of the Windows operating system. It has a hierarchical database called "registry" that contains settings, options, and values for executables. Once the threat actor gains access to a machine, they can use reg.exe to modify their account to obtain administrator-level privileges, maintain persistence, and move laterally within the environment.\ -\ The searches in this story are designed to help you detect behaviors associated with manipulation of the Windows registry. [analytic_story://Unusual AWS EC2 Modifications] @@ -882,7 +744,6 @@ spec_version = 2 searches = ["ESCU - EC2 Instance Modified With Previously Unseen User - Rule", "ESCU - AWS Investigate User Activities By ARN", "ESCU - Get EC2 Instance Details by instanceId", "ESCU - Get Notable History", "ESCU - Previously Seen EC2 Modifications By User"] description = Identify unusual changes to your AWS EC2 instances that may indicate malicious activity. Modifications to your EC2 instances by previously unseen users is an example of an activity that may warrant further investigation. narrative = A common attack technique is to infiltrate a cloud instance and make modifications. The adversary can then secure access to your infrastructure or hide their activities. So it's important to stay alert to changes that may indicate that your environment has been compromised. \ -\ Searches within this Analytic Story can help you detect the presence of a threat by monitoring for EC2 instances that have been created or changed--either by users that have never previously performed these activities or by known users who modify or create instances in a way that have not been done before. This story also provides investigative searches that help you go deeper once you detect suspicious behavior. [analytic_story://Unusual Processes] @@ -895,9 +756,7 @@ spec_version = 2 searches = ["ESCU - Uncommon Processes On Endpoint - Rule", "ESCU - Unusually Long Command Line - Rule", "ESCU - Unusually Long Command Line - MLTK - Rule", "ESCU - Detect Rare Executables - Rule", "ESCU - System Processes Run From Unexpected Locations - Rule", "ESCU - RunDLL Loading DLL By Ordinal - Rule", "ESCU - Detect processes used for System Network Configuration Discovery - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table", "ESCU - Investigate Web Activity From Host", "ESCU - Baseline of Command Line Length - MLTK"] description = Quickly identify systems running new or unusual processes in your environment that could be indicators of suspicious activity. Processes run from unusual locations, those with conspicuously long command lines, and rare executables are all examples of activities that may warrant deeper investigation. narrative = Being able to profile a host's processes within your environment can help you more quickly identify processes that seem out of place when compared to the rest of the population of hosts or asset types.\ -\ This Analytic Story lets you identify processes that are either a) not typically seen running or b) have some sort of suspicious command-line arguments associated with them. This Analytic Story will also help you identify the user running these processes and the associated process activity on the host.\ -\ In the event an unusual process is identified, it is imperative to better understand how that process was able to execute on the host, when it first executed, and whether other hosts are affected. This extra information may provide clues that can help the analyst further investigate any suspicious activity. [analytic_story://Use of Cleartext Protocols] @@ -921,15 +780,10 @@ spec_version = 2 searches = ["ESCU - Web Fraud - Account Harvesting - Rule", "ESCU - Web Fraud - Anomalous User Clickspeed - Rule", "ESCU - Web Fraud - Password Sharing Across Accounts - Rule", "ESCU - Get Emails From Specific Sender", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Web Session Information via session_id"] description = Monitor your environment for activity consistent with common attack techniques bad actors use when attempting to compromise web servers or other web-related assets. narrative = The Federal Bureau of Investigations (FBI) defines Internet fraud as the use of Internet services or software with Internet access to defraud victims or to otherwise take advantage of them. According to the Bureau, Internet crime schemes are used to steal millions of dollars each year from victims and continue to plague the Internet through various methods. The agency includes phishing scams, data breaches, Denial of Service (DOS) attacks, email account compromise, malware, spoofing, and ransomware in this category.\ -\ These crimes are not the fraud itself, but rather the attack techniques commonly employed by fraudsters in their pursuit of data that enables them to commit malicious actssuch as obtaining and using stolen credit cards. They represent a serious problem that is steadily increasing and not likely to go away anytime soon.\ -\ -When developing a strategy for preventing fraud in your environment, its important to look across all of your web services for evidence that attackers are abusing enterprise resources to enumerate systems, harvest data for secondary fraudulent activity, or abuse terms of service.This Analytic Story looks for evidence of common Internet attack techniques that could be indicative of web fraud in your environmentincluding account harvesting, anomalous user clickspeed, and password sharing across accounts, to name just a few.\ -\ +hen developing a strategy for preventing fraud in your environment, its important to look across all of your web services for evidence that attackers are abusing enterprise resources to enumerate systems, harvest data for secondary fraudulent activity, or abuse terms of service.This Analytic Story looks for evidence of common Internet attack techniques that could be indicative of web fraud in your environmentincluding account harvesting, anomalous user clickspeed, and password sharing across accounts, to name just a few.\ The account-harvesting search focuses on web pages used for user-account registration. It detects the creation of a large number of user accounts using the same email domain name, a type of activity frequently seen in advance of a fraud campaign.\ -\ The anomalous clickspeed search looks for users who are moving through your website at a faster-than-normal speed or with a perfect click cadence (high periodicity or low standard deviation), which could indicate that the user is a script, not an actual human.\ -\ Another search detects incidents wherein a single password is used across multiple accounts, which may indicate that a fraudster has infiltrated your environment and embedded a common password within a script. [analytic_story://Windows Defense Evasion Tactics] @@ -953,13 +807,9 @@ spec_version = 2 searches = ["ESCU - Execution of File with Multiple Extensions - Rule", "ESCU - Execution of File With Spaces Before Extension - Rule", "ESCU - Suspicious Changes to File Associations - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Registry Activities", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table"] description = Detect and investigate suspected abuse of file extensions and Windows file associations. Some of the malicious behaviors involved may include inserting spaces before file extensions or prepending the file extension with a different one, among other techniques. narrative = Attackers use a variety of techniques to entice users to run malicious code or to persist on an endpoint. One way to accomplish these goals is to leverage file extensions and the mechanism Windows uses to associate files with specific applications. \ -\ Since its earliest days, Windows has used extensions to identify file types. Users have become familiar with these extensions and their application associations. For example, if users see that a file ends in `.doc` or `.docx`, they will assume that it is a Microsoft Word document and expect that double-clicking will open it using `winword.exe`. The user will typically also presume that the `.docx` file is safe. \ -\ Attackers take advantage of this expectation by obfuscating the true file extension. They can accomplish this in a couple of ways. One technique involves inserting multiple spaces in the file name before the extension to hide the extension from the GUI, obscuring the true nature of the file. Another approach involves prepending the real extension with a different one. This is especially effective when Windows is configured to "hide extensions for known file types." In this case, the real extension is not displayed, but the prepended one is, leading end users to believe the file is a different type than it actually is.\ -\ Changing the association between a file extension and an application can allow an attacker to execute arbitrary code. The technique typically involves changing the association for an often-launched file type to associate instead with a malicious program the attacker has dropped on the endpoint. When the end user launches a file that has been manipulated in this way, it will execute the attacker's malware. It will also execute the application the end user expected to run, cleverly obscuring the fact that something suspicious has occurred.\ -\ Run the searches in this story to detect and investigate suspicious behavior that may indicate abuse or manipulation of Windows file extensions and/or associations. [analytic_story://Windows Log Manipulation] @@ -972,7 +822,6 @@ spec_version = 2 searches = ["ESCU - Deleting Shadow Copies - Rule", "ESCU - Windows Event Log Cleared - Rule", "ESCU - Suspicious wevtutil Usage - Rule", "ESCU - USN Journal Deletion - Rule", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get Notable Info", "ESCU - Get Parent Process Info", "ESCU - Get Process Info", "ESCU - Get Risk Modifiers For Endpoint", "ESCU - Get Risk Modifiers For User", "ESCU - Get User Information from Identity Table", "ESCU - Get Vulnerability Logs For Endpoint", "ESCU - Investigate Web Activity From Host"] description = Adversaries often try to cover their tracks by manipulating Windows logs. Use these searches to help you monitor for suspicious activity surrounding log files--an essential component of an effective defense. narrative = Because attackers often modify system logs to cover their tracks and/or to thwart the investigative process, log monitoring is an industry-recognized best practice. While there are legitimate reasons to manipulate system logs, it is still worthwhile to keep track of who manipulated the logs, when they manipulated them, and in what way they manipulated them (determining which accesses, tools, or utilities were employed). Even if no malicious activity is detected, the knowledge of an attempt to manipulate system logs may be indicative of a broader security risk that should be thoroughly investigated.\ -\ The Analytic Story gives users two different ways to detect manipulation of Windows Event Logs and one way to detect deletion of the Update Sequence Number (USN) Change Journal. The story helps determine the history of the host and the users who have accessed it. Finally, the story aides in investigation by retrieving all the information on the process that caused these events (if the process has been identified). [analytic_story://Windows Persistence Techniques] @@ -1020,7 +869,6 @@ explanation = The subsearch returns all events with event names that start with how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously Seen AWS Provisioning Activity Sources" support search once to create a history of previously seen locations that have provisioned AWS resources. annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} known_false_positives = This is a strictly behavioral search, so we define "false positive" slightly differently. Every time this fires, it will accurately reflect the first occurrence in the time period you're searching within, plus what is stored in the cache feature. But while there are really no "false positives" in a traditional sense, there is definitely lots of noise.\ -\ This search will fire any time a new city is seen in the **GeoIP** database for any kind of provisioning activity. If you typically do all provisioning from tools inside of your city, there should be few false positives. If you are located in countries where the free version of **MaxMind GeoIP** that ships by default with Splunk has weak resolution (particularly small countries in less economically powerful regions), this may be much less valuable to you. providing_technologies = ["AWS"] @@ -1032,7 +880,6 @@ explanation = The subsearch returns all events with event names that start with how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously Seen AWS Provisioning Activity Sources" support search once to create a history of previously seen locations that have provisioned AWS resources. annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} known_false_positives = This is a strictly behavioral search, so we define "false positive" slightly differently. Every time this fires, it will accurately reflect the first occurrence in the time period you're searching over plus what is stored in the cache feature. But while there are really no "false positives" in a traditional sense, there is definitely lots of noise.\ -\ This search will fire any time a new country is seen in the **GeoIP** database for any kind of provisioning activity. If you typically do all provisioning from tools inside of your country, there should be few false positives. If you are located in countries where the free version of **MaxMind GeoIP** that ships by default with Splunk has weak resolution (particularly small countries in less economically powerful regions), this may be much less valuable to you. providing_technologies = ["AWS"] @@ -1044,7 +891,6 @@ explanation = The subsearch returns all events with event names that start with how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously Seen AWS Provisioning Activity Sources" support search once to create a history of previously seen locations that have provisioned AWS resources. annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} known_false_positives = This is a strictly behavioral search, so we define "false positive" slightly differently. Every time this fires, it will accurately reflect the first occurrence in the time period you're searching within, plus what is stored in the cache feature. But while there are really no "false positives" in a traditional sense, there is definitely lots of noise.\ -\ This search will fire any time a new IP address is seen in the **GeoIP** database for any kind of provisioning activity. If you typically do all provisioning from tools inside of your country, there should be few false positives. If you are located in countries where the free version of **MaxMind GeoIP** that ships by default with Splunk has weak resolution (particularly small countries in less economically powerful regions), this may be much less valuable to you. providing_technologies = ["AWS"] @@ -1056,7 +902,6 @@ explanation = The subsearch returns all events with event names that start with how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously Seen AWS Provisioning Activity Sources" support search once to create a history of previously seen locations that have provisioned AWS resources. annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} known_false_positives = This is a strictly behavioral search, so we define "false positive" slightly differently. Every time this fires, it will accurately reflect the first occurrence in the time period you're searching within, plus what is stored in the cache feature. But while there are really no "false positives" in a traditional sense, there is definitely lots of noise.\ -\ This search will fire any time a new region is seen in the **GeoIP** database for any kind of provisioning activity. If you typically do all provisioning from tools inside of your region, there should be few false positives. If you are located in regions where the free version of **MaxMind GeoIP** that ships by default with Splunk has weak resolution (particularly small countries in less economically powerful regions), this may be much less valuable to you. providing_technologies = ["AWS"] @@ -1065,26 +910,17 @@ type = detection asset_type = AWS Instance confidence = medium explanation = This search\ -\ 1. Retrieves the **AssumeRole** event\ -\ 1. Verifies that the log entry contains a value for the account ID of the requesting account\ -\ 1. Ensures that the requesting account ID does not match the account ID of the requested account\ -\ 1. Pulls in the previously seen requesting and requested account IDs\ -\ 1. Splits up and executes multiple search paths at the same.\ -\ 1. The first path determines the **firstTime** and **lastTime** entries for the cache file\ -\ 1. Outputs the data to the cache file.\ -\ 1. Creates a conditional statement that is always false (both because we don't want these values to exit the search pipeline and because we think we're clever).The second pipeline adds the **firstTime** and **lastTime** entries to search results. Next, it filters out any account pairs that haven't been seen for the first time within the last hour. The `isnotnull(_time)` will remove the entries from the cache file.\ -\ The search finishes by gathering the data that it will display to the user. how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Run the `Previously Seen AWS Cross Account Activity` support search only once to create the baseline of previously seen cross account activity. Thanks to Pablo Vega at Recurly for suggesting improvements to the search. -annotations = {"mitre_attack": ["Credential Access"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["PR.AC", "PR.DS", "DE.AE"]} +annotations = {"mitre_attack": ["Credential Access"], "cis20": ["CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.AC", "PR.DS", "DE.AE"]} known_false_positives = Using multiple AWS accounts and roles is perfectly valid behavior. It's suspicious when an account requests privileges of an account it hasn't before. You should validate with the account owner that this is a legitimate request. providing_technologies = ["AWS"] @@ -1094,7 +930,7 @@ asset_type = AWS Instance confidence = medium explanation = A network access control list (ACL) is a layer of security for your VPC that acts as a firewall for controlling traffic in and out of one or more subnets. Network ACLs with all open ports have a larger attack surface. This search looks for events within your CloudTrail logs to check if there were any Network ACLs created with ports ranging from 1024 to 65525. This search will create a table comprised of AWS account id, src, user and all parameters of the request made by the user and the server response. how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS, version 4.4.0 or later, and configure your CloudTrail inputs. -annotations = {"mitre_attack": ["Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 11"], "nist": ["DE.DP", "DE.AE"]} +annotations = {"mitre_attack": ["Persistence"], "cis20": ["CIS 11"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.AE"]} known_false_positives = It's possible that an admin has created this ACL with all ports open for some legitimate purpose however, this should be scoped and not allowed in production environment. providing_technologies = ["AWS"] @@ -1104,7 +940,7 @@ asset_type = AWS Instance confidence = medium explanation = The search looks for CloudTrail events to detect whether any network ACLs have been deleted and gives you values of error messages and error codes (if any), user details, user source IP, the user who initiated this request, and the name of the event. how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. -annotations = {"mitre_attack": ["Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 11"], "nist": ["DE.DP", "DE.AE"]} +annotations = {"mitre_attack": ["Persistence"], "cis20": ["CIS 11"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.AE"]} known_false_positives = It's possible that a user has legitimately deleted a network ACL. providing_technologies = ["AWS"] @@ -1114,7 +950,7 @@ asset_type = AWS Instance confidence = medium explanation = In this search, we query CloudTrail logs to look for events where an instance is successfully launched by a particular user. Since we want to detect a high number of instances launched within a short period, we create event buckets for 10-minute windows. We then calculate the total number of instances launched by a particular user, as well as the average and standard deviation values. Assign a `threshold_value` in the search. Start with 3 (but it will likely need to be tweaked for your environment). The `eval` function will set the outlier 1 if the number of instances is greater than the average number of instances terminated, added to the multiplied value of threshold and standard deviation. For your reference, we then keep only the outliers and calculate the number of standard deviations away the value is from the average. how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. The threshold value should be tuned to your environment. -annotations = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["DE.DP", "DE.AE"]} +annotations = {"mitre_attack": ["Execution"], "cis20": ["CIS 13"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.AE"]} known_false_positives = Many service accounts configured within an AWS infrastructure are known to exhibit this behavior. Please adjust the threshold values and filter out service accounts from the output. Always verify if this search alerted on a human user. providing_technologies = ["AWS"] @@ -1124,7 +960,7 @@ asset_type = AWS Instance confidence = medium explanation = In this search, we query CloudTrail logs to look for events where an instance is successfully terminated by a particular user. Since we want to detect a high number of instances terminated within a short period, we create event buckets for 10-minute windows. We then calculate the total number of instances terminated by a particular user, as well as the average- and standard-deviation values. Assign a `threshold_value` in the search. Try starting with 3 (but it will likely need to be tweaked for your environment). The `eval` function will set the outlier to 1 if the number of instances is greater than the average number of instances terminated, added to the multiplied value of threshold and standard deviation. We then filter out outliers with a value of 1 and show only those instance-termination events that happened within the previous 10 minutes. how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. -annotations = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["DE.DP", "DE.AE"]} +annotations = {"mitre_attack": ["Execution"], "cis20": ["CIS 13"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.AE"]} known_false_positives = Many service accounts configured with your AWS infrastructure are known to exhibit this behavior. Please adjust the threshold values and filter out service accounts from the output. Always verify whether this search alerted on a human user. providing_technologies = ["AWS"] @@ -1134,7 +970,7 @@ asset_type = Endpoint confidence = high explanation = Attackers will often attempt to disable security tools in order to evade detection. It is also possible for end users to attempt to disable anti-virus or other security tools to circumvent restrictions they encounter while trying to execute other programs. One way malware may accomplish this is by adding the legitimate certificate used to sign the security software to the untrusted certificate store. This will cause the system to no longer trust the software signed with this certificate and disallow it from executing. This search simply looks for the execution of **certutil.exe** with the parameters `-addcert` and `disallowed`, which add a certification to the "untrusted" certificate store. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Defense Evasion", "Disabling Security Tools"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +annotations = {"mitre_attack": ["Defense Evasion", "Disabling Security Tools"], "cis20": ["CIS 3", "CIS 5", "CIS 8"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} known_false_positives = There may be legitimate reasons for administrators to add a certificate to the untrusted certificate store. In such cases, this will typically be done on a large number of systems. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -1144,7 +980,7 @@ asset_type = Endpoint confidence = high explanation = This search looks for the process reg.exe with the "add" parameter, which indicates the creation of a new value or modification of an existing value in the registry. In addition, it looks for parameters that specify the registry key to be added or modified, as well as the value of "Unrestricted". The appearance of "ExecutionPolicy" at the beginning of the search is there to optimize the search performance by first looking for that keyword, and then further searching through the matching events for further details. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +annotations = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "cis20": ["CIS 3", "CIS 8"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} known_false_positives = Administrators may attempt to change the default execution policy on a system for a variety of reasons. However, setting the policy to "Unrestricted" as this search is designed to identify would be unusual. Hits should be reviewed and investigated as appropriate. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -1154,7 +990,7 @@ asset_type = Endpoint confidence = high explanation = This search looks for the processes **net.exe** and **sc.exe** with a parameter of `"stop"`. It then searches a list of security-related services included in a lookup file for matches on the command line. Results are subsequently returned in table format. The included lookup file can be modified to update the services to monitor. how_to_implement = You must be ingesting data that records the file-system activity from your hosts to populate the Endpoint file-system data-model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data. The search is shipped with a lookup file, `security_services.csv`, that can be edited to update the list of services to monitor. This lookup file can be edited directly where it lives in `$SPLUNK_HOME/etc/apps/DA-ESS-ContentUpdate/lookups`, or via the Splunk console. You should add the names of services an attacker might use on the command line and surround with asterisks (*****), so that they work properly when searching the command line. The file should be updated with the names of any services you would like to monitor for attempts to stop the service., -annotations = {"mitre_attack": ["Defense Evasion", "Disabling Security Tools"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +annotations = {"mitre_attack": ["Defense Evasion", "Disabling Security Tools"], "cis20": ["CIS 3", "CIS 5", "CIS 8"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} known_false_positives = None identified. Attempts to disable security-related services should be identified and understood. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -1164,7 +1000,7 @@ asset_type = Endpoint confidence = high explanation = This search looks for the process reg.exe with the "save" parameter, which specifies a binary export from the registry. In addition, it looks for the keys that contain the hashed credentials, which attackers may retrieve and use for brute-force attacks in order to harvest legitimate credentials. how_to_implement = You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Credential Access", "Credential Dumping"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.IP", "PR.AC", "DE.CM"]} +annotations = {"mitre_attack": ["Credential Access", "Credential Dumping"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.IP", "PR.AC", "DE.CM"]} known_false_positives = None identified. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -1174,7 +1010,7 @@ asset_type = Endpoint confidence = high explanation = This search looks at file modifications across your hosts, as well as for evidence of batch files being written to paths that include "system32." This activity is consistent with some SamSam attacks and is, in general, suspicious. how_to_implement = You must be ingesting data that records the file-system activity from your hosts to populate the Endpoint file-system data-model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": [], "cis20": ["CIS 8"], "kill_chain_phases": ["Delivery"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = It is possible for this search to generate a notable event for a batch file write to a path that includes the string "system32", but is not the actual Windows system directory. As such, you should confirm the path of the batch file identified by the search. In addition, a false positive may be generated by an administrator copying a legitimate batch file in this directory tree. You should confirm that the activity is legitimate and modify the search to add exclusions, as necessary. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] @@ -1184,7 +1020,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for child processes of spoolsv.exe, which is associated with the Print Spooler service on Windows. Children of this process typically run under the SYSTEM context. This search should address the POC developed for the Windows local-privilege-escalation exploit announced in September of 2018. The associated vulnerability was assigned CVE-2018-8440. More information is available at https://doublepulsar.com/task-scheduler-alpc-exploit-high-level-analysis-ff08cda6ad4f. how_to_implement = You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Privilege Escalation", "Exploitation for Privilege Escalation"], "kill_chain_phases": ["Exploitation"], "cis20": ["CIS 5", "CIS 8"], "nist": ["PR.AC", "PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Privilege Escalation", "Exploitation for Privilege Escalation"], "cis20": ["CIS 5", "CIS 8"], "kill_chain_phases": ["Exploitation"], "nist": ["PR.AC", "PR.PT", "DE.CM"]} known_false_positives = Some legitimate printer-related processes may show up as children of spoolsv.exe. You should confirm that any activity as legitimate and may be added as exclusions in the search. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -1194,35 +1030,63 @@ asset_type = Endpoint confidence = medium explanation = DNS Queries with multiple DNS servers from a single client is unusual and may be indicative of malicious activity. This search works by performing a count by the source of the distinct destinations for the DNS traffic. The search uses the `Network_Resolution` data model. how_to_implement = This search requires that DNS data is being ingested and populating the `Network_Resolution` data model. This data can come from DNS logs or from solutions that parse network traffic for this data, such as Splunk Stream or Bro.\ -\ -This search produces fields (`dest_count`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\ -\ -\ -\ -1. **Label:** Distinct DNS Connections, **Field:** dest_count\ -\ +This search produces fields (`dest_count`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\\n1. **Label:** Distinct DNS Connections, **Field:** dest_count\ Detailed documentation on how to create a new field within Incident Review may be found here: `https://docs.splunk.com/Documentation/ES/5.3.0/Admin/Customizenotables#Add_a_field_to_the_notable_event_details` -annotations = {"mitre_attack": ["Command and Control", "Exfiltration", "Exfiltration Over Alternative Protocol", "Commonly Used Port", "Standard Application Layer Protocol"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 9", "CIS 12", "CIS 13"], "nist": ["PR.PT", "DE.AE", "PR.DS"]} +annotations = {"mitre_attack": ["Command and Control", "Exfiltration", "Exfiltration Over Alternative Protocol", "Commonly Used Port", "Standard Application Layer Protocol"], "cis20": ["CIS 9", "CIS 12", "CIS 13"], "kill_chain_phases": ["Command and Control"], "nist": ["PR.PT", "DE.AE", "PR.DS"]} known_false_positives = It's possible that an enterprise has more than five DNS servers that are configured in a round-robin rotation. Please customize the search, as appropriate. providing_technologies = ["Splunk Stream", "Bro"] +[savedsearch://ESCU - Cloud Compute Instance Created By Previously Unseen User - Rule] +type = detection +asset_type = Cloud Compute Instance +confidence = medium +explanation = For each user, the search returns the first time seen, last time seen, and the systems. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each user back to the lookup file and then clears out any output. The other part of the search limits the results to when the user was seen for the first time within the previous 70 minutes. It then displays the new user, the instances created by that user, and the associated times. +how_to_implement = You must be ingesting the appropriate cloud-infrastructure logs and have the Security Research cloud data model (https://github.com/splunk/cloud-datamodel-security-research/) installed. Run the "Previously Seen Cloud Compute Creations By User" support search to create of baseline of previously seen users. +annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +known_false_positives = It's possible that a user will start to create compute instances for the first time, for any number of reasons. Verify with the user launching instances that this is the intended behavior. +providing_technologies = ["AWS", "Azure", "GCP"] + +[savedsearch://ESCU - Cloud Compute Instance Created With Previously Unseen Image - Rule] +type = detection +asset_type = Cloud Compute Instance +confidence = medium +explanation = For each image ID and user, the search returns the first time seen, last time seen, and the systems. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each image back to the lookup file and clears out any output. The other part of the search limits the results to when the image was seen for the first time within the previous 70 minutes. It then displays the new image, the instances created using it, the user who created it, and the associated times. +how_to_implement = You must be ingesting the appropriate cloud-infrastructure logs and have the Security Research cloud data model (https://github.com/splunk/cloud-datamodel-security-research/) installed. Run the "Previously Seen Cloud Compute Images" support search to create a baseline of previously seen images. +annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +known_false_positives = After a new image is created, the first systems created with that image will cause this alert to fire. Verify that the image being used was created by a legitimate user. +providing_technologies = ["AWS", "Azure", "GCP"] + +[savedsearch://ESCU - Cloud Compute Instance Created With Previously Unseen Instance Type - Rule] +type = detection +asset_type = Cloud Compute Instance +confidence = medium +explanation = For each instance type and user, the search returns the first time seen, last time seen, and the system. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each instance type back to the lookup file and clears out any output. The other part of the search limits the results to when the instance type was seen for the first time within the previous 70 minutes. It then displays the new instance type, the instances created using it, the user who created them, and the times associated. +how_to_implement = You must be ingesting the appropriate cloud-infrastructure logs and have the Security Research cloud data model (https://github.com/splunk/cloud-datamodel-security-research/) installed. Run the " Previously Seen Cloud Compute Instance Types" support search to create a baseline of previously seen regions. +annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +known_false_positives = It is possible that an admin will create a new system using a new instance type that has never been used before. Verify with the creator that they intended to create the system with the new instance type. +providing_technologies = ["AWS", "Azure", "GCP"] + +[savedsearch://ESCU - Cloud Compute Instance Started In Previously Unused Region - Rule] +type = detection +asset_type = Cloud Compute Instance +confidence = medium +explanation = In this search, we query cloud infrastructure compute logs to look for events that indicate that an instance was started in a particular region. Using the \"previously_seen_cloud_regions\" lookup file created using the support search, we compare the region where this instance was started to all previously observed regions. The \"eval\" and \"if\" functions determine that the earliest times seen for this region and instance were within the last day. If a new region is detected, it will alert you with \"Instance Started in a New Region.\" However, this region will be added to the list in \"previously_seen_cloud_regions.\" +how_to_implement = You must be ingesting the appropriate cloud-infrastructure logs and have the Security Research cloud data model (https://github.com/splunk/cloud-datamodel-security-research/) installed. Run the \"Previously Seen Cloud Compute Instance Types\" support search to create a baseline of previously seen regions. +annotations = {"mitre_attack": ["Defense Evasion"], "cis20": ["CIS 12"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.AE"]} +known_false_positives = It's possible that a user has unknowingly started an instance in a new region. Please verify that this activity is legitimate. +providing_technologies = ["AWS", "Azure", "GCP"] + [savedsearch://ESCU - Common Ransomware Extensions - Rule] type = detection asset_type = Endpoint confidence = high explanation = This search looks at file modifications across your hosts and identifies files with extensions that are commonly associated with the encrypted files generated by ransomware. how_to_implement = You must be ingesting data that records the filesystem activity from your hosts to populate the Endpoint file-system data model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data.\ -\ -This search produces fields (`query`,`query_length`,`count`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\ -\ -\ -\ -1. **Label:** Name, **Field:** Name\ -\ +This search produces fields (`query`,`query_length`,`count`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\\n1. **Label:** Name, **Field:** Name\ +1. \ 1. **Label:** File Extension, **Field:** file_extension\ -\ Detailed documentation on how to create a new field within Incident Review may be found here: `https://docs.splunk.com/Documentation/ES/5.3.0/Admin/Customizenotables#Add_a_field_to_the_notable_event_details` -annotations = {"mitre_attack": [], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": [], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = It is possible for a legitimate file with these extensions to be created. If this is a true ransomware attack, there will be a large number of files created with these extensions. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] @@ -1232,7 +1096,7 @@ asset_type = Endpoint confidence = high explanation = This search looks at file modifications in the Change Analysis data model. It checks modified file names against an included lookup file, which contains the names of note files left behind by ransomware (to inform the victim how they can pay the ransom and retrieve their files). The search returns a list of files with matching names. how_to_implement = You must be ingesting data that records file-system activity from your hosts to populate the Endpoint Filesystem data-model node. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or via other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file-system reads and writes. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": [], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = It's possible that a legitimate file could be created with the same name used by ransomware note files. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] @@ -1242,7 +1106,7 @@ asset_type = Endpoint confidence = medium explanation = Net.exe is a built-in Windows command-line tool that can be used to add, display, or modify user accounts. While Microsoft administrators use this tool to manage user groups, threat actors often leverage it to create local admin accounts to maintain persistence. In this search, we are looking for the execution of process net.exe with command-line parameters such as `localgroup`, `add`, or `user` that may correspond to the creation of local admin accounts or setting user/group properties. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution", "Command-Line Interface", "Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Execution", "Command-Line Interface", "Persistence"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = Administrators often leverage net.exe to create admin accounts. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -1252,7 +1116,7 @@ asset_type = Endpoint confidence = medium explanation = Net.exe is a built-in command-line tool on Windows that can be used to create, delete, and manage shared resources on the computer, both locally and remotely. Though this tool is used by Microsoft administrators to manage the network shares, attackers also leverage it to create and delete hidden file shares by appending "$" after the name of the share. To look for hidden shares, use a regular expression to look for a `(name_file_share)$`. In this search, we are looking for the command-line execution of net.exe with command-line parameters such as `net`, `share`, or `delete` that may correspond to the creation of hidden shares how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution", "Command-Line Interface", "Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Execution", "Command-Line Interface", "Persistence"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = Administrators often leverage net.exe to create or delete network shares. You should verify that the activity was intentional and is legitimate. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -1262,19 +1126,13 @@ asset_type = Endpoint confidence = medium explanation = Attackers often use random, long domain names for components of their attack infrastructure. This search leverages the probability distribution function algorithm provided by the Machine Learning Toolkit (MLTK) to identify outliers in the length of the DNS query for each record type observed. The companion search "Baseline of DNS Query Length - MLTK" creates a machine-learning (ML) model built over the historical data used by this search. The determination of what is considered an outlier may be adjusted via the threshold parameter in the search. More information on the algorithm used can be found at `https://docs.splunk.com/Documentation/MLApp/4.2.0/User/Algorithms#DensityFunction`. how_to_implement = To successfully implement this search, you will need to ensure that DNS data is populating the Network_Resolution data model. In addition, the Machine Learning Toolkit (MLTK) version 4.2 or greater must be installed on your search heads, along with any required dependencies. Finally, the support search "Baseline of DNS Query Length - MLTK" must be executed before this detection search, because it builds a machine-learning (ML) model over the historical data used by this search. It is important that this search is run in the same app context as the associated support search, so that the model created by the support search is available for use. You should periodically re-run the support search to rebuild the model with the latest data available in your environment.\ -\ -This search produces fields (`query`,`query_length`,`count`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\ -\ -\ -\ -1. **Label:** DNS Query, **Field:** query\ -\ +This search produces fields (`query`,`query_length`,`count`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\\n1. **Label:** DNS Query, **Field:** query\ +1. \ 1. **Label:** DNS Query Length, **Field:** query_length\ -\ +1. \ 1. **Label:** Number of events, **Field:** count\ -\ Detailed documentation on how to create a new field within Incident Review may be found here: `https://docs.splunk.com/Documentation/ES/5.3.0/Admin/Customizenotables#Add_a_field_to_the_notable_event_details` -annotations = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 8", "CIS 12"], "nist": ["PR.PT", "DE.AE", "DE.CM"]} +annotations = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "cis20": ["CIS 8", "CIS 12"], "kill_chain_phases": ["Command and Control"], "nist": ["PR.PT", "DE.AE", "DE.CM"]} known_false_positives = If you are seeing more results than desired, you may consider reducing the value for threshold in the search. You should also periodically re-run the support search to re-build the ML model on the latest data. providing_technologies = ["Splunk Stream", "Bro"] @@ -1284,7 +1142,7 @@ asset_type = Endpoint confidence = medium explanation = Attackers often use random, long domain names for their attack infrastructure. This search looks at all the queries observed over the search time frame, and identifies any domains being resolved with names that are greater that 2 times the standard deviation. how_to_implement = To successfully implement this search, you will need to ensure that DNS data is populating the Network_Resolution data model. -annotations = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 8", "CIS 12"], "nist": ["PR.PT", "DE.AE", "DE.CM"]} +annotations = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "cis20": ["CIS 8", "CIS 12"], "kill_chain_phases": ["Command and Control"], "nist": ["PR.PT", "DE.AE", "DE.CM"]} known_false_positives = It's possible there can be long domain names that are legitimate. providing_technologies = ["Splunk Stream", "Bro"] @@ -1294,7 +1152,7 @@ asset_type = Endpoint confidence = medium explanation = Clients should be resolving their DNS requests via a trusted DNS server. This search will identify DNS queries being sent to unauthorized DNS servers by comparing the destination and source of the traffic with assets marked as DNS servers. how_to_implement = To successfully implement this search you will need to ensure that DNS data is populating the Network_Resolution data model. It also requires that your DNS servers are identified correctly in the Assets and Identity table of Enterprise Security. -annotations = {"mitre_attack": ["Exfiltration", "Command and Control", "Defense Evasion", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 1", "CIS 3", "CIS 8", "CIS 12"], "nist": ["ID.AM", "PR.DS", "PR.IP", "DE.AE", "DE.CM"]} +annotations = {"mitre_attack": ["Exfiltration", "Command and Control", "Defense Evasion", "Commonly Used Port"], "cis20": ["CIS 1", "CIS 3", "CIS 8", "CIS 12"], "kill_chain_phases": ["Command and Control"], "nist": ["ID.AM", "PR.DS", "PR.IP", "DE.AE", "DE.CM"]} known_false_positives = Legitimate DNS activity can be detected in this search. Investigate, verify and update the list of authorized DNS servers as appropriate. providing_technologies = ["Splunk Stream", "Bro"] @@ -1304,15 +1162,11 @@ asset_type = Endpoint confidence = medium explanation = Using a lookup `discover_dns_records` generated by support search "Discover DNS records" we check previous network traffic and make sure the responses have not changed. how_to_implement = To successfully implement this search you will need to ensure that DNS data is populating the `Network_Resolution` data model. It also requires that the `discover_dns_record` lookup table be populated by the included support search "Discover DNS record". \ -\ **Splunk>Phantom Playbook Integration**\ -\ If Splunk>Phantom is also configured in your environment, a Playbook called "DNS Hijack Enrichment" can be configured to run when any results are found by this detection search. The playbook takes in the DNS record changed and uses Geoip, whois, Censys and PassiveTotal to detect if DNS issuers changed. To use this integration, install the Phantom App for Splunk `https://splunkbase.splunk.com/app/3411/`, add the correct hostname to the "Phantom Instance" field in the Adaptive Response Actions when configuring this detection search, and set the corresponding Playbook to active. \ -\ (Playbook Link:`https://my.phantom.us/4.2/playbook/dns-hijack-enrichment/`).\ -\ -annotations = {"mitre_attack": ["Exfiltration", "Command and Control", "Defense Evasion", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 1", "CIS 3", "CIS 8", "CIS 12"], "nist": ["ID.AM", "PR.DS", "PR.IP", "DE.AE", "DE.CM"]} +annotations = {"mitre_attack": ["Exfiltration", "Command and Control", "Defense Evasion", "Commonly Used Port"], "cis20": ["CIS 1", "CIS 3", "CIS 8", "CIS 12"], "kill_chain_phases": ["Command and Control"], "nist": ["ID.AM", "PR.DS", "PR.IP", "DE.AE", "DE.CM"]} known_false_positives = Legitimate DNS changes can be detected in this search. Investigate, verify and update the list of provided current answers for the domains in question as appropriate. providing_technologies = ["Splunk Stream", "Bro"] @@ -1322,7 +1176,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for execution of vssadmin or wmic with both the "delete" and "shadows" parameters passed on the command-line. The two arguments are searched for separately because we can't predict the number of spaces between the words on the command-line. The search will return the number of times this activity was observed, and the times of the first and last event. how_to_implement = You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8", "CIS 10"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +annotations = {"mitre_attack": ["Execution"], "cis20": ["CIS 8", "CIS 10"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} known_false_positives = vssadmin.exe and wmic.exe are standard applications shipped with modern versions of windows. They may be used by administrators to legitimately delete old backup copies, although this is typically rare. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -1332,17 +1186,11 @@ asset_type = AWS Instance confidence = medium explanation = In this search, we query CloudTrail logs and specifically look for events where the multi factor authentication context of the user's session is false which basically means, that the user does not have MFA enabled on AWS. We then filter out all the known AWS service accounts since service accounts typically do not have MFA enabled. The search then creates a table of the first and last time a user without MFA was detected, the values and count of the API calls made, the type of user identity, ARN and the name of the user. how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Leverage the support search `Create a list of approved AWS service accounts`: run it once every 30 days to create a list of service accounts and validate them.\ -\ -This search produces fields (`eventName`,`userIdentity.type`,`userIdentity.arn`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\ -\ -\ -\ -1. **Label:** AWS Event Name, **Field:** eventName\ -\ +This search produces fields (`eventName`,`userIdentity.type`,`userIdentity.arn`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\\n1. **Label:** AWS Event Name, **Field:** eventName\ +1. \ 1. **Label:** AWS User ARN, **Field:** userIdentity.arn\ -\ +1. \ 1. **Label:** AWS User Type, **Field:** userIdentity.type\ -\ Detailed documentation on how to create a new field within Incident Review may be found here: `https://docs.splunk.com/Documentation/ES/5.3.0/Admin/Customizenotables#Add_a_field_to_the_notable_event_details` annotations = {"mitre_attack": ["Execution"], "cis20": ["CIS 16"], "nist": ["DE.DP", "PR.AC"]} known_false_positives = Many service accounts configured within an AWS infrastructure do not have multi factor authentication enabled. Please ignore the service accounts, if triggered and instead add them to the aws_service_accounts.csv file to fine tune the detection. It is also possible that the search detects users in your environment using Single Sign-On systems, since the MFA is not handled by AWS. @@ -1354,19 +1202,13 @@ asset_type = AWS Instance confidence = medium explanation = In this search, we are looking for successful API calls via CloudTrail. We filter out events triggered by known users listed in the `identity_lookup_expanded` lookup file and the service accounts. Once filtered out, we output a table with the event names and count, as well as the first and last time a specific user or service is detected. how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. You must also populate the `identity_lookup_expanded` lookup shipped with the Asset and Identity framework to be able to look up users in your identity table in Enterprise Security (ES). Leverage the support search called "Create a list of approved AWS service accounts": run it once every 30 days to create and validate a list of service accounts.\ -\ -This search produces fields (`eventName`,`firstTime`,`lastTime`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\ -\ -\ -\ -1. **Label:** AWS Event Name, **Field:** eventName\ -\ +This search produces fields (`eventName`,`firstTime`,`lastTime`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\\n1. **Label:** AWS Event Name, **Field:** eventName\ +1. \ 1. **Label:** First Time, **Field:** firstTime\ -\ +1. \ 1. **Label:** Last Time, **Field:** lastTime\ -\ Detailed documentation on how to create a new field within Incident Review may be found here: `https://docs.splunk.com/Documentation/ES/5.3.0/Admin/Customizenotables#Add_a_field_to_the_notable_event_details` -annotations = {"mitre_attack": ["Credential Access", "Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.DP", "DE.CM", "PR.AC", "ID.AM"]} +annotations = {"mitre_attack": ["Credential Access", "Execution"], "cis20": ["CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.CM", "PR.AC", "ID.AM"]} known_false_positives = It's likely that you'll find activity detected by users/service accounts that are not listed in the `identity_lookup_expanded` or ` aws_service_accounts.csv` file. If the user is a legitimate service account, update the `aws_service_accounts.csv` table with that entry. providing_technologies = ["AWS"] @@ -1376,7 +1218,7 @@ asset_type = AWS Instance confidence = medium explanation = In this search, we query CloudTrail logs to look for events that indicate that a user has attempted to log in to the AWS console from a new city and group the events using ARN value. Using the `previously_seen_users_console_logins.csv` lookup file created using the support search, we compare the ARN to all the previously seen ARN and city combinations logging into the AWS console. The `eval` and `if` functions determine whether the earliest time we see this user ARN was seen within the last hour. The alert will be fired only when a user is seen for first time in the last hour. how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Run the "Previously seen users in CloudTrail" support search only once to create a baseline of previously seen IAM users within the last 30 days. Run "Update previously seen users in CloudTrail" hourly (or more frequently depending on how often you run the detection searches) to refresh the baselines. -annotations = {"mitre_attack": ["Credential Access"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.DP", "DE.AE"]} +annotations = {"mitre_attack": ["Credential Access"], "cis20": ["CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.AE"]} known_false_positives = When a legitimate new user logins for the first time, this activity will be detected. Check how old the account is and verify that the user activity is legitimate. providing_technologies = ["AWS"] @@ -1386,7 +1228,7 @@ asset_type = AWS Instance confidence = medium explanation = In this search, we query CloudTrail logs to look for events that indicate that a user has attempted to log in to the AWS console from a new country and group the events using ARN value. Using the `previously_seen_users_console_logins.csv` lookup file created using the support search, we compare the ARN to all the previously seen ARN and country combinations logging into the AWS console. The `eval` and `if` functions determine whether the earliest time we see this user ARN was seen within the last hour. The alert will be fired only when a user is seen for first time in the last hour. how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Run the "Previously seen users in CloudTrail" support search only once to create a baseline of previously seen IAM users within the last 30 days. Run "Update previously seen users in CloudTrail" hourly (or more frequently depending on how often you run the detection searches) to refresh the baselines. -annotations = {"mitre_attack": ["Credential Access"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.DP", "DE.AE"]} +annotations = {"mitre_attack": ["Credential Access"], "cis20": ["CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.AE"]} known_false_positives = When a legitimate new user logins for the first time, this activity will be detected. Check how old the account is and verify that the user activity is legitimate. providing_technologies = ["AWS"] @@ -1396,7 +1238,7 @@ asset_type = AWS Instance confidence = medium explanation = In this search, we query CloudTrail logs to look for events that indicate that a user has attempted to log in to the AWS console from a new region and group the events using ARN value. Using the `previously_seen_users_console_logins.csv` lookup file created using the support search, we compare the ARN to all the previously seen ARN and region combinations logging into the AWS console. The `eval` and `if` functions determine whether the earliest time we see this user ARN was seen within the last hour. The alert will be fired only when a user is seen for first time in the last hour. how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Run the "Previously seen users in CloudTrail" support search only once to create a baseline of previously seen IAM users within the last 30 days. Run "Update previously seen users in CloudTrail" hourly (or more frequently depending on how often you run the detection searches) to refresh the baselines. -annotations = {"mitre_attack": ["Credential Access"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.DP", "DE.AE"]} +annotations = {"mitre_attack": ["Credential Access"], "cis20": ["CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.AE"]} known_false_positives = When a legitimate new user logins for the first time, this activity will be detected. Check how old the account is and verify that the user activity is legitimate. providing_technologies = ["AWS"] @@ -1406,7 +1248,7 @@ asset_type = Endpoint confidence = low explanation = To detect pass the hash activity, we look at all events with event code 4624 or 4625 that specify a logon type 3 (network logons). We are looking for the NtLmSsP account, with a key length set to 0. These indicate lower level protocols that are typically used through Pass the Hash (WMI, SMB, etc.). The search also filters out events with an account name of 'Anonymous' to help reduce false positives. how_to_implement = To successfully implement this search, you must ingest your Windows Security Event logs and leverage the latest TA for Windows. -annotations = {"mitre_attack": ["Lateral Movement", "Pass the Hash"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} +annotations = {"mitre_attack": ["Lateral Movement", "Pass the Hash"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} known_false_positives = Legitimate logon activity by authorized NTLM systems may be detected by this search. Please investigate as appropriate. providing_technologies = ["Microsoft Windows"] @@ -1416,15 +1258,11 @@ asset_type = Endpoint confidence = high explanation = This search gathers all the answers to each system's DNS query, then filters for queries that have subdomains extracted from the EvilGinx toolkit. It will then run a regex to extract `legit_domains` from the query and remove that from the detection if it is listed in the `legit_domains.csv` how_to_implement = You need to ingest data from your DNS logs in the Network_Resolution datamodel. Specifically you must ingest the domain that is being queried and the IP of the host originating the request. Ideally, you should also be ingesting the answer to the query and the query type. This approach allows you to also create your own localized passive DNS capability which can aid you in future investigations. You will have to add legitimate domain names to the `legit_domains.csv` file shipped with the app. \ -\ **Splunk>Phantom Playbook Integration**\ -\ If Splunk>Phantom is also configured in your environment, a Playbook called `Lets Encrypt Domain Investigate` can be configured to run when any results are found by this detection search. To use this integration, install the Phantom App for Splunk `https://splunkbase.splunk.com/app/3411/`, add the correct hostname to the "Phantom Instance" field in the Adaptive Response Actions when configuring this detection search, and set the corresponding Playbook to active. \ -\ (Playbook link:`https://my.phantom.us/4.2/playbook/lets-encrypt-domain-investigate/`).\ -\ -annotations = {"mitre_attack": ["Spearphishing Link", "Command and Control"], "kill_chain_phases": ["Delivery", "Command and Control"], "cis20": ["CIS 8", "CIS 7"], "nist": ["ID.AM", "PR.DS", "PR.IP", "DE.AE", "DE.CM"]} +annotations = {"mitre_attack": ["Spearphishing Link", "Command and Control"], "cis20": ["CIS 8", "CIS 7"], "kill_chain_phases": ["Delivery", "Command and Control"], "nist": ["ID.AM", "PR.DS", "PR.IP", "DE.AE", "DE.CM"]} known_false_positives = If a known good domain is not listed in the legit_domains.csv file, then the search could give you false postives. Please update that lookup file to filter out DNS requests to legitimate domains. providing_technologies = ["Splunk Stream", "Bro"] @@ -1434,13 +1272,9 @@ asset_type = Windows confidence = low explanation = This search queries the `Change.All_Changes` datamodel under the nodename is `Account_Management` , where the result is "lockout", which indicates that an account has been locked out. It then counts the number of times an endpoint has caused an account lockout within a four hour window and displays those hosts with a count greater than or equal to five. how_to_implement = You must ingest your Windows security event logs in the `Change` datamodel under the nodename is `Account_Management`, for this search to execute successfully. Please consider updating the cron schedule and the count of lockouts you want to monitor, according to your environment. \ -\ **Splunk>Phantom Playbook Integration**\ -\ If Splunk>Phantom is also configured in your environment, a Playbook called "Excessive Account Lockouts Enrichment and Response" can be configured to run when any results are found by this detection search. The Playbook executes the Contextual and Investigative searches in this Story, conducts additional information gathering on Windows endpoints, and takes a response action to shut down the affected endpoint. To use this integration, install the Phantom App for Splunk `https://splunkbase.splunk.com/app/3411/`, add the correct hostname to the "Phantom Instance" field in the Adaptive Response Actions when configuring this detection search, and set the corresponding Playbook to active. \ -\ (Playbook Link:`https://my.phantom.us/4.1/playbook/excessive-account-lockouts-enrichment-and-response/`).\ -\ annotations = {"mitre_attack": ["Initial Access", "Valid Accounts"], "cis20": ["CIS 16"], "nist": ["PR.IP"]} known_false_positives = It's possible that a widely used system, such as a kiosk, could cause a large number of account lockouts. @@ -1462,7 +1296,7 @@ asset_type = Endpoint confidence = medium explanation = This search works by looking at fields in the Network_Traffic data model, which is populated by various firewalls and passive networking monitoring technologies. Specifically, the search looks for ICMP packets larger than 1,000 bytes with a destination that is external to your organization. how_to_implement = In order to run this search effectively, we highly recommend that you leverage the Assets and Identity framework. It is important that you have a good understanding of how your network segments are designed and that you are able to distinguish internal from external address space. Add a category named `internal` to the CIDRs that host the company's assets in the `assets_by_cidr.csv` lookup file, which is located in `$SPLUNK_HOME/etc/apps/SA-IdentityManagement/lookups/`. More information on updating this lookup can be found here: https://docs.splunk.com/Documentation/ES/5.0.0/Admin/Addassetandidentitydata. This search also requires you to be ingesting your network traffic and populating the Network_Traffic data model -annotations = {"mitre_attack": ["Command and Control", "Standard Non-Application Layer Protocol"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 9", "CIS 12"], "nist": ["DE.AE"]} +annotations = {"mitre_attack": ["Command and Control", "Standard Non-Application Layer Protocol"], "cis20": ["CIS 9", "CIS 12"], "kill_chain_phases": ["Command and Control"], "nist": ["DE.AE"]} known_false_positives = ICMP packets are used in a variety of ways to help troubleshoot networking issues and ensure the proper flow of traffic. As such, it is possible that a large ICMP packet could be perfectly legitimate. If large ICMP packets are associated with command and control traffic, there will typically be a large number of these packets observed over time. If the search is providing a large number of false positives, you can modify the search to adjust the byte threshold or whitelist specific IP addresses, as necessary. providing_technologies = ["Bro", "Splunk Stream", "Palo Alto Firewall"] @@ -1472,7 +1306,7 @@ asset_type = Endpoint confidence = medium explanation = This search uses the Network_Resolution data model and gathers all the answers to DNS queries for TXT records. The query then looks at the answer section and calculates the length of the answer. The search will then return information for those responses that exceed 100 characters in length. how_to_implement = To successfully implement this search you need to ingest data from your DNS logs, or monitor DNS traffic using Stream, Bro or something similar. Specifically, this query requires that the DNS data model is populated with information regarding the DNS record type that is being returned as well as the data in the answer section of the protocol. -annotations = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 8", "CIS 12", "CIS 13"], "nist": ["PR.DS", "PR.PT", "DE.AE", "DE.CM"]} +annotations = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "cis20": ["CIS 8", "CIS 12", "CIS 13"], "kill_chain_phases": ["Command and Control"], "nist": ["PR.DS", "PR.PT", "DE.AE", "DE.CM"]} known_false_positives = It's possible that legitimate TXT record responses can be long enough to trigger this search. You can modify the packet threshold for this search to help mitigate false positives. providing_technologies = ["Splunk Stream", "Bro"] @@ -1482,7 +1316,7 @@ asset_type = Windows confidence = medium explanation = This search looks for Windows Event Code(signature_id) 4663 (object access), where the process performing the access is PowerShell.exe, the target process of the access is lsass.exe, and the access mask is given as 0x10. This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. -annotations = {"mitre_attack": ["Credential Access", "Credential Dumping"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.IP", "PR.AC", "DE.CM"]} +annotations = {"mitre_attack": ["Credential Access", "Credential Dumping"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.IP", "PR.AC", "DE.CM"]} known_false_positives = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. providing_technologies = ["Microsoft Windows"] @@ -1492,7 +1326,7 @@ asset_type = Windows confidence = medium explanation = This search looks for Windows Event Code(signature_id) 4703 (token right adjusted), where the process requesting the token change is PowerShell.exe and the requested privilege is "SeDebugPrivilege". This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. -annotations = {"mitre_attack": ["Credential Access", "Credential Dumping"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.IP", "PR.AC", "DE.CM"]} +annotations = {"mitre_attack": ["Credential Access", "Credential Dumping"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.IP", "PR.AC", "DE.CM"]} known_false_positives = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. providing_technologies = ["Microsoft Windows"] @@ -1502,19 +1336,13 @@ asset_type = Windows confidence = medium explanation = This search looks for Windows Event Code 4720 (account creation) and 4732 (account added to a security-enabled local group), where the group name is "Administrators", and determines whether they are generated for the same user's Security ID within three hours of each other. It will return the user account that was added, the Security ID, the group name to which the user was added, the account name of the user who initiated the action, and the subsequent message returned. how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here:http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes.\ -\ -This search produces fields (`Security_ID`,`Group_Name`,`Message`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\ -\ -\ -\ -1. **Label:** Security ID, **Field:** Security_ID\ -\ +This search produces fields (`Security_ID`,`Group_Name`,`Message`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\\n1. **Label:** Security ID, **Field:** Security_ID\ +1. \ 1. **Label:** Group Name, **Field:** Group_Name\ -\ +1. \ 1. **Label:** Message, **Field:** Message\ -\ Detailed documentation on how to create a new field within Incident Review may be found here: `https://docs.splunk.com/Documentation/ES/5.3.0/Admin/Customizenotables#Add_a_field_to_the_notable_event_details` -annotations = {"mitre_attack": ["Valid Accounts", "Defense Evasion", "Persistence"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "cis20": ["CIS 16"], "nist": ["PR.AC", "DE.CM"]} +annotations = {"mitre_attack": ["Valid Accounts", "Defense Evasion", "Persistence"], "cis20": ["CIS 16"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "nist": ["PR.AC", "DE.CM"]} known_false_positives = The activity may be legitimate. For this reason, it's best to verify the account with an administrator and ask whether there was a valid service request for the account creation. If your local administrator group name is not "Administrators", this search may generate an excessive number of false positives providing_technologies = ["Microsoft Windows"] @@ -1524,7 +1352,7 @@ asset_type = Endpoint confidence = medium explanation = Attackers will often attempt to compromise network devices such as routers for a variety of nefarious purposes, including modifying VPN settings or re-routing network traffic. Typically, only a relatively small number of user accounts log into these devices on a regular basis. This search identifies 'new' connections to your routers by checking to see if a similar login was made in the last 30 days. Routers are identified by checking the IP address against those categorized as a "router" in the ES assets and identity framework. how_to_implement = To successfully implement this search, you must ensure the network router devices are categorized as "router" in the Assets and identity table. You must also populate the Authentication data model with logs related to users authenticating to routing infrastructure. -annotations = {"kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 11"], "nist": ["PR.PT", "PR.AC", "PR.IP"]} +annotations = {"cis20": ["CIS 11"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "PR.AC", "PR.IP"]} known_false_positives = Legitimate router connections may appear as new connections providing_technologies = ["Active Directory", "Palo Alto Firewall"] @@ -1534,7 +1362,7 @@ asset_type = S3 Bucket confidence = medium explanation = This search queries CloudTrail logs for events with S3 bucket access controls given to the "All Users" group, which allows anyone in the world access to the resource. This search generates a table displaying the time when the bucket was made public, the permission of the S3 bucket, the bucket name, and the ARN of the user who created the bucket. how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), and then configure your CloudTrail inputs. The threshold value should be tuned to your environment. -annotations = {"mitre_attack": ["Execution", "Initial Access", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} +annotations = {"mitre_attack": ["Execution", "Initial Access", "Exfiltration"], "cis20": ["CIS 13"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} known_false_positives = While this search has no known false positives, it is possible that an AWS admin has legitimately created a public bucket for a specific purpose. That said, AWS strongly advises against granting full control to the "All Users" group. providing_technologies = ["AWS"] @@ -1544,7 +1372,7 @@ asset_type = Endpoint confidence = high explanation = In this search, we are essentially trying to detect if outlook.exe is writing a `.zip` file to the disk. The way this search would run is, it will execute the the subsearch first which looks for all .zip files being written to the disk and outputs a crucial field "process_id", that we use the main search to check if that process\_id belongs to a process_name of outlook.exe. The search uses a join command to essentially give you an end result of the first and last time that zip file was written by outlook.exe, the dest and user logged on the system, the hash value and the complete path to the zip file on disk how_to_implement = You must be ingesting data that records filesystem and process activity from your hosts to populate the Endpoint data model. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or endpoint data sources, such as Sysmon. -annotations = {"mitre_attack": ["Initial Access", "Spearphishing Attachment"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 7", "CIS 8"], "nist": ["ID.AM", "PR.DS"]} +annotations = {"mitre_attack": ["Initial Access", "Spearphishing Attachment"], "cis20": ["CIS 7", "CIS 8"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "nist": ["ID.AM", "PR.DS"]} known_false_positives = It is not uncommon for outlook to write legitimate zip files to the disk. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -1554,7 +1382,7 @@ asset_type = Endpoint confidence = medium explanation = In this search, we are looking for the network connections that were not blocked by the firewall and that are destined for destination port 139 or 445. We then filter out events that have Classless Inter-Domain Routing (CIDR) blocks categorized as internal in the `assets_by_cidr.csv` lookup file which is located in `$SPLUNK_HOME/etc/apps/SA-IdentityManagement/lookups/`. Since we are only looking for outbound traffic from the hosts made to the Internet, we filter out traffic whose destination IP address is private. how_to_implement = In order to run this search effectively, we highly recommend that you leverage the Assets and Identity framework. It is important that you have good understanding of how your network segments are designed, and be able to distinguish internal from external address space. Add a category named `internal` to the CIDRs that host the company's assets in `assets_by_cidr.csv` lookup file, which is located in `$SPLUNK_HOME/etc/apps/SA-IdentityManagement/lookups/`. More information on updating this lookup can be found here: https://docs.splunk.com/Documentation/ES/5.0.0/Admin/Addassetandidentitydata. This search also requires you to be ingesting your network traffic and populating the Network_Traffic data model -annotations = {"mitre_attack": ["Commonly Used Port", "Credential Access", "Lateral Movement"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "cis20": ["CIS 12"], "nist": ["DE.CM"]} +annotations = {"mitre_attack": ["Commonly Used Port", "Credential Access", "Lateral Movement"], "cis20": ["CIS 12"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "nist": ["DE.CM"]} known_false_positives = It is likely that the outbound Server Message Block (SMB) traffic is legitimate, if the company's internal networks are not well-defined in the Assets and Identity Framework. Categorize the internal CIDR blocks as `internal` in the lookup file to avoid creating notable events for traffic destined to those CIDR blocks. Any other network connection that is going out to the Internet should be investigated and blocked. Best practices suggest preventing external communications of all SMB versions and related protocols at the network boundary. providing_technologies = ["Bro", "Splunk Stream"] @@ -1564,7 +1392,7 @@ asset_type = confidence = medium explanation = This search queries the Endpoint file-system data model node to list out all the values of destination machines, as well as the values of file hashes and file paths that have the file "program.exe" in the C: drive. Path interception occurs when an executable is placed in a specific path so that it is executed by an application instead of by the intended target. In this case, applications vulnerable to path interception (because of unquoted service paths with spaces in Windows registry) allow attackers to execute maliciously crafted program.exes. how_to_implement = You must be ingesting data that records the file-system activity from your hosts to populate the Endpoint file-system data model node. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file system reads and writes. -annotations = {"mitre_attack": ["Privilege Escalation", "Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Privilege Escalation", "Persistence"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = It is unlikely that a normal user may create and place this file in the C: drive. Confirm with the user. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Tanium", "Ziften"] @@ -1574,7 +1402,7 @@ asset_type = Endpoint confidence = medium explanation = Obtaining access to the Command-Line Interface (CLI) is typically a primary attacker goal. Once an attacker has obtained the ability to execute code on a target system, they will often further manipulate the system via commands passed to the CLI. It is also unusual for many applications to spawn a command shell during normal operation, while it is often observed if an application has been compromised in some way. As such, it is often beneficial to look for cmd.exe being executed by processes that are often targeted for exploitation, or that would not spawn cmd.exe in any other circumstances. A lookup file is provided to easily modify the processes that are being watched for execution of cmd.exe. how_to_implement = You must be ingesting data that records process activity from your hosts and populates the Endpoint data model with the resultant dataset. This search includes a lookup file, `prohibited_apps_launching_cmd.csv`, that contains a list of processes that should not be spawning cmd.exe. You can modify this lookup to better suit your environment. -annotations = {"mitre_attack": ["Execution", "Command-Line Interface"], "kill_chain_phases": ["Exploitation"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Execution", "Command-Line Interface"], "cis20": ["CIS 8"], "kill_chain_phases": ["Exploitation"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = There are circumstances where an application may legitimately execute and interact with the Windows command-line interface. Investigate and modify the lookup file, as appropriate. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -1584,7 +1412,7 @@ asset_type = Endpoint confidence = medium explanation = In this search, we are looking for the PsExec process with `accepteula` on the command line. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution", "Command-Line Interface"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Execution", "Command-Line Interface"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = Administrators can leverage PsExec for accessing remote systems and might pass `accepteula` as an argument if they are running this tool for the first time. However, it is not likely that you'd see multiple occurrences of this event on a machine providing_technologies = ["Sysmon"] @@ -1594,7 +1422,7 @@ asset_type = Endpoint confidence = medium explanation = This search first executes the subsearch and counts all of your processes to determine the 10 most rare (the limit set is 10). It then filters out whitelisted processes and outputs the first and last time a rare process was encountered, the destination where the process is running, the count of occurrences, and the users who initiated the processes. how_to_implement = To successfully implement this search, you must be ingesting data that records process activity from your hosts and populating the endpoint data model with the resultant dataset. The macro `filter_rare_process_whitelist` searches two lookup files to whitelist your processes. These consist of `rare_process_whitelist_default.csv` and `rare_process_whitelist_local.csv`. To add your own processes to the whitelist, add them to `rare_process_whitelist_local.csv`. If you wish to remove an entry from the default lookup file, you will have to modify the macro itself to set the whitelist value for that process to false. You can modify the limit parameter and search scheduling to better suit your environment. -annotations = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Installation", "Command and Control", "Actions on Objectives"], "cis20": ["CIS 2", "CIS 8"], "nist": ["ID.AM", "PR.PT", "PR.DS", "DE.CM"]} +annotations = {"mitre_attack": ["Execution"], "cis20": ["CIS 2", "CIS 8"], "kill_chain_phases": ["Installation", "Command and Control", "Actions on Objectives"], "nist": ["ID.AM", "PR.PT", "PR.DS", "DE.CM"]} known_false_positives = Some legitimate processes may be only rarely executed in your environment. As these are identified, update `rare_process_whitelist_local.csv` to filter them out of your search results. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -1604,7 +1432,7 @@ asset_type = S3 Bucket confidence = low explanation = Here the subsearch executes first and returns all successful S3 bucket-access attempts (HTTP code "200") within the last hour. It groups the results by the earliest and latest times it has seen a remote IP accessing a particular bucket. It appends this information to the historical data from the lookup file and then recalculates the `firstTime` and `lastTime` field for each remote IP accessing an S3 bucket. Next, it returns only those remote IP addresses that have first been seen accessing a specific bucket within the past hour. This is combined with the main search to return the time, bucket name, source IP, city, and country operations performed, as well as the requested URI of the resource how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your S3 access logs' inputs. This search works best when you run the "Previously Seen S3 Bucket Access by Remote IP" support search once to create a history of previously seen remote IPs and bucket names. -annotations = {"mitre_attack": ["Execution", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13", "CIS 14"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} +annotations = {"mitre_attack": ["Execution", "Exfiltration"], "cis20": ["CIS 13", "CIS 14"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} known_false_positives = S3 buckets can be accessed from any IP, as long as it can make a successful connection. This will be a false postive, since the search is looking for a new IP within the past hour providing_technologies = ["AWS"] @@ -1613,42 +1441,25 @@ type = detection asset_type = AWS Instance confidence = medium explanation = This search and its corresponding subsearch run through a series of steps, as per the following: \ -\ 1. Retrieves all the AWS CloudTrail log entries that have recorded AWS API calls.\ -\ 1. Kicks off a subsearch that retrieves the same data and pulls out the ARN into a more friendly format.\ -\ 1. Counts the number of API calls per ARN.\ -\ 1. Loads the cache file that contains the number of data points, the count from the latest hour, the API call average, and the standard deviation for each ARN.\ -\ 1. Drops the count from the latest hour, since it is not necessary, and merges the rest of the data with the results of the stats command. \ -\ 1. Renames `apiCalls` as `latestCount`.\ -\ 1. Calculates the new average value for each ARN with the latest count, weighting the past much more heavily than the current hour. It does the same for the standard deviation--weighting the past more heavily than the current.\ -\ 1. Updates the cache file with the latest results.\ -\ 1. Sets the minimum threshold for the number of data points and sets the number of standard deviations away from the mean it must be to be considered a spike.\ -\ 1. Makes a determination regarding whether or not the current count is a spike by checking to see if the minimum data-point threshold has been met and the count is a sufficient number of standard deviations away from the average.\ -\ 1. Filters out anything that it determines is not a spike and returns the list of ARNs to the main search. The main search subsequently gets the names of all the API calls, the number of unique API calls, and the total number of API calls for each of these ARNs. Finally, it looks up the average and standard deviation and returns both the average and the number of standard deviations the spike is from the average. how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the minimum number of data points required to have a statistically significant amount of data to determine. The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike.\ -\ -This search produces fields (`eventName`,`numberOfApiCalls`,`uniqueApisCalled`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\ -\ -\ -\ -1. **Label:** AWS Event Name, **Field:** eventName\ -\ +This search produces fields (`eventName`,`numberOfApiCalls`,`uniqueApisCalled`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\\n1. **Label:** AWS Event Name, **Field:** eventName\ +1. \ 1. **Label:** Number of API Calls, **Field:** numberOfApiCalls\ -\ +1. \ 1. **Label:** Unique API Calls, **Field:** uniqueApisCalled\ -\ Detailed documentation on how to create a new field within Incident Review may be found here: `https://docs.splunk.com/Documentation/ES/5.3.0/Admin/Customizenotables#Add_a_field_to_the_notable_event_details` -annotations = {"mitre_attack": ["Credential Access", "Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.DP", "DE.CM", "PR.AC"]} +annotations = {"mitre_attack": ["Credential Access", "Execution"], "cis20": ["CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.CM", "PR.AC"]} known_false_positives = providing_technologies = ["AWS"] @@ -1657,30 +1468,19 @@ type = detection asset_type = AWS Instance confidence = medium explanation = This search and its corresponding subsearch run through the following series of steps: \ -\ 1. Retrieve all the AWS CloudTrail log entries that have recorded AWS API calls specifically for creating/modifying/replacing network Access Control Lists (ACLs).\ -\ 1. Kick off a subsearch that retrieves the same data and pulls out the ARN into a more friendly format.\ -\ 1. Count the number of API calls per Amazon Resource Name (ARN).\ -\ 1. Load the cache file that contains the number of data points, the count from the latest hour, the API call average, and the standard deviation for each ARN.\ -\ 1. Drop the count from the latest hour, since it is not necessary, and merge the rest of the data with the results of the stats command. \ -\ 1. Rename `apiCalls` as `latestCount`.\ -\ 1. Calculate the new average value for each ARN with the latest count, weighting the past much more heavily than the current hour. They do the same for the standard deviation--weighting the past more heavily than the current.\ -\ 1. Update the cache file with the latest results.\ -\ 1. Set the minimum threshold for the number of data points and set the number of standard deviations away from the mean it must be to be considered a spike.\ -\ 1. Make a determination regarding whether or not the current count is a spike by checking to see if the minimum data-point threshold has been met and the count is a sufficient number of standard deviations away from the average.\ -\ 1. Filter out anything that it determines is not a spike and return the list of ARNs to the main search. The main search subsequently gets the names of all the API calls, the number of unique API calls, and the total number of API calls for each of these ARNs. Finally, it looks up the average and standard deviation and returns both the average and the number of standard deviations the spike is from the average. how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the minimum number of data points required to have a statistically significant amount of data to determine. The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. This search works best when you run the "Baseline of Network ACL Activity by ARN" support search once to create a lookup file of previously seen Network ACL Activity. To add or remove API event names related to network ACLs, edit the macro `NetworkACLEvents`. -annotations = {"mitre_attack": ["Persistence", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 12", "CIS 11"], "nist": ["DE.DP", "DE.CM", "PR.AC"]} +annotations = {"mitre_attack": ["Persistence", "Exfiltration"], "cis20": ["CIS 12", "CIS 11"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.CM", "PR.AC"]} known_false_positives = The false-positive rate may vary based on the values of`dataPointThreshold` and `deviationThreshold`. Please modify this according the your environment. providing_technologies = ["AWS"] @@ -1689,30 +1489,19 @@ type = detection asset_type = S3 Bucket confidence = medium explanation = This search and its corresponding subsearch run through the following series of steps: \ -\ 1. Retrieve all the AWS CloudTrail log entries that have recorded AWS API calls specifically for deletion of S3 buckets.\ -\ 1. Kick off a subsearch that retrieves the same data and pulls out and converts the ARN into a more friendly format.\ -\ 1. Count the number of API calls per ARN.\ -\ 1. Load the cache file that contains the number of data points, the count from the latest hour, the API call average, and the standard deviation for each ARN.\ -\ 1. Drop the count from the latest hour, since it is unnecessary, and merge the rest of the data with the results of the `stats` command. \ -\ 1. Rename `apiCalls` as `latestCount`.\ -\ 1. Calculate the new average value for each ARN with the latest count, weighting the past more heavily than the current hour. It does the same for the standard deviation—weighting the past more heavily than the current.\ -\ 1. Update the cache file with the latest results.\ -\ 1. Set the minimum threshold for the number of data points and the number of standard deviations away from the mean it must be to be considered a spike.\ -\ 1. Make a determination regarding whether or not the current count is a spike by checking to see if the minimum data-point threshold has been met and if the count is a sufficient number of standard deviations away from the average.\ -\ 1. Filter out anything that it determines is not a spike and returns the list of ARNs to the main search. The main search subsequently gets the names of the deleted S3 buckets, the number of unique API calls, and the total number of API calls for each of these user ARNs. how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the minimum number of data points required to have a statistically significant amount of data to determine. The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. This search works best when you run the "Baseline of S3 Bucket deletion activity by ARN" support search once to create a baseline of previously seen S3 bucket-deletion activity. -annotations = {"mitre_attack": ["Credential Access", "Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["DE.DP", "DE.CM", "PR.AC"]} +annotations = {"mitre_attack": ["Credential Access", "Execution"], "cis20": ["CIS 13"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.CM", "PR.AC"]} known_false_positives = Based on the values of`dataPointThreshold` and `deviationThreshold`, the false positive rate may vary. Please modify this according the your environment. providing_technologies = ["AWS"] @@ -1721,30 +1510,19 @@ type = detection asset_type = AWS Instance confidence = medium explanation = This search and its corresponding subsearch run through the following series of steps: \ -\ 1. Retrieves all the AWS CloudTrail log entries that have recorded AWS API calls specifically for security groups.\ -\ 1. Kicks off a subsearch that retrieves the same data and pulls out the ARN into a more friendly format.\ -\ 1. Counts the number of API calls per ARN.\ -\ 1. Loads the cache file that contains the number of data points, the count from the latest hour, the API call average, and the standard deviation for each ARN.\ -\ 1. Drops the count from the latest hour, since it is not necessary, and merges the rest of the data with the results of the stats command. \ -\ 1. Renames `apiCalls` as `latestCount`.\ -\ 1. Calculates the new average value for each ARN with the latest count, weighting the past much more heavily than the current hour. It does the same for the standard deviation--weighting the past more heavily than the current.\ -\ 1. Updates the cache file with the latest results.\ -\ 1. Sets the minimum threshold for the number of data points and sets the number of standard deviations away from the mean it must be to be considered a spike.\ -\ 1. Makes a determination regarding whether or not the current count is a spike by checking to see if the minimum data-point threshold has been met and the count is a sufficient number of standard deviations away from the average.\ -\ 1. Filters out anything that it determines is not a spike and returns the list of ARNs to the main search. The main search subsequently gets the names of all the API calls, the number of unique API calls, and the total number of API calls for each of these ARNs. Finally, it looks up the average and standard deviation and returns both the average and the number of standard deviations the spike is from the average. how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the minimum number of data points required to have a statistically significant amount of data to determine. The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike.This search works best when you run the "Baseline of Security Group Activity by ARN" support search once to create a history of previously seen Security Group Activity. To add or remove API event names for security groups, edit the macro `securityGroupAPIs`. -annotations = {"mitre_attack": ["Credential Access", "Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.DP", "DE.CM", "PR.AC"]} +annotations = {"mitre_attack": ["Credential Access", "Execution"], "cis20": ["CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.CM", "PR.AC"]} known_false_positives = Based on the values of`dataPointThreshold` and `deviationThreshold`, the false positive rate may vary. Please modify this according the your environment. providing_technologies = ["AWS"] @@ -1753,26 +1531,17 @@ type = detection asset_type = AWS Instance confidence = medium explanation = This search retrieves all the VPC Flow log entries that have recorded a blocked outbound network connection originating from your AWS environment. Then it kicks off a subsearch, which looks at the same data and performs the following series of steps: \ -\ 1. Counts the number of blocked outbound connections by each source IP\ -\ 1. Loads the cache file that contains the number of data points, the count from the latest hour, the average blocked connections, and the standard deviation for each source IP.\ -\ 1. Drops the count from the latest hour, since it is not necessary, and merges the rest of the data with the results of the stats command. \ -\ 1. Renames `numberOfBlockedConnections` as `latestCount`.\ -\ 1. Calculates the new average value for each source IP with the latest count, weighting the past much more heavily than the current hour. It does the same for the standard deviation, weighting the past more heavily than the current.\ -\ 1. Updates the cache file with the latest results.\ -\ 1. Sets the minimum threshold for the number of data points and sets the number of standard deviations away from the mean it must be to be considered a spike.\ -\ 1. Makes a determination regarding whether or not the current count is a spike by checking to see if the minimum data-point threshold has been met and the count is a sufficient number of standard deviations away from the average.\ -\ 1. Filters out anything that it determines is not a spike and returns the list of source IPs to the main search. The main search subsequently gets the list of all destination IPs for which the traffic was blocked, the network interface ID, the number of unique destination IP, and the total number of blocked connections for each of these source IP addresses. Finally, it looks up the average and standard deviation and returns both the average and the number of standard deviations the spike is from the average. how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your VPC Flow logs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the number of data points required to meet the definition of "spike." The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. This search works best when you run the "Baseline of Blocked Outbound Connection" support search once to create a history of previously seen blocked outbound connections. -annotations = {"mitre_attack": ["Exfiltration", "Command and Control"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "cis20": ["CIS 11"], "nist": ["DE.AE", "DE.CM", "PR.AC"]} +annotations = {"mitre_attack": ["Exfiltration", "Command and Control"], "cis20": ["CIS 11"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "nist": ["DE.AE", "DE.CM", "PR.AC"]} known_false_positives = The false-positive rate may vary based on the values of`dataPointThreshold` and `deviationThreshold`. Additionally, false positives may result when AWS administrators roll out policies enforcing network blocks, causing sudden increases in the number of blocked outbound connections. providing_technologies = ["AWS"] @@ -1782,7 +1551,7 @@ asset_type = Endpoint confidence = low explanation = USB is a common attack vector for delivering or propagating malicious code, or the exfiltration of data. Your corporation may have a policy of not allowing removable media at all, or may only allow approved media to be used on specific hosts by specific users. By logging USB activity from Windows and other endpoints gathered using the Universal Forwarder, you can gain an understanding of what systems might be vulnerable to attack via removable media, or what users might need additional security training. This search is looking for event_id 4656 for failure and 4663 for successful USB read/write attempts from Windows Security Event logs, which is the event code generated when a files are read from and written to a removable storage device how_to_implement = To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663 and 4656. Ensure that the field from the event logs is being mapped to the result_id field in the Change_Analysis data model. To minimize the alert volume, this search leverages the Assets and Identity framework to filter out events from those assets not marked high priority in the Enterprise Security Assets and Identity Framework. -annotations = {"mitre_attack": ["Exfiltration"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.PT", "PR.DS"]} +annotations = {"mitre_attack": ["Exfiltration"], "cis20": ["CIS 13"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "nist": ["PR.PT", "PR.DS"]} known_false_positives = Legitimate USB activity will also be detected. Please verify and investigate as appropriate. providing_technologies = ["Microsoft Windows"] @@ -1792,7 +1561,7 @@ asset_type = Infrastructure confidence = medium explanation = This search requires you to leverage the Enterprise Security Assets and Identity framework to populate assets_by_str.csv. Once the assets_by_str.csv is populated, we then query your DHCP logs to detect unknown systems connecting to your network. More documentation is available at: http://docs.splunk.com/Documentation/ES/4.7.1/Admin/Verifyassetandidentitydata. how_to_implement = This search uses the Network_Sessions data model shipped with Enterprise Security. It leverages the Assets and Identity framework to populate the assets_by_str.csv file located in SA-IdentityManagement, which will contain a list of known authorized organizational assets including their MAC addresses. Ensure that all inventoried systems have their MAC address populated. -annotations = {"mitre_attack": ["Defense Evasion"], "kill_chain_phases": ["Reconnaissance", "Delivery", "Actions on Objectives"], "cis20": ["CIS 1"], "nist": ["ID.AM", "PR.DS"]} +annotations = {"mitre_attack": ["Defense Evasion"], "cis20": ["CIS 1"], "kill_chain_phases": ["Reconnaissance", "Delivery", "Actions on Objectives"], "nist": ["ID.AM", "PR.DS"]} known_false_positives = This search might be prone to high false positives. Please consider this when conducting analysis or investigations. Authorized devices may be detected as unauthorized. If this is the case, verify the MAC address of the system responsible for the false positive and add it to the Assets and Identity framework with the proper information. providing_technologies = ["Splunk Stream", "Bro"] @@ -1802,7 +1571,7 @@ asset_type = Endpoint confidence = medium explanation = Attackers often leverage various scripting languages to execute their attacks. In a Windows environment, the Windows Script Host is the tool that interprets the scripts and is included in all modern versions of Windows. The Windows Script Host is available as a command-line tool called "cscript.exe" or "wscript.exe." To detect this behavior, the search looks for process-creation events for cscript.exe or wscript.exe with a parent process of cmd.exe. The search will return the count, the first and last times this behavior was seen on a destination machine, and user and process information. how_to_implement = To successfully implement this search, you must be ingesting data that records process activity from your hosts to populate the endpoint data model in the processes node. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. -annotations = {"mitre_attack": ["Execution", "Command-Line Interface"], "kill_chain_phases": ["Exploitation"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Execution", "Command-Line Interface"], "cis20": ["CIS 8"], "kill_chain_phases": ["Exploitation"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = Some legitimate applications may exhibit this behavior. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -1822,19 +1591,13 @@ asset_type = Endpoint confidence = medium explanation = The search leverages an accelerated `Network_Resolution` data model to count and list the values of resolved domains for each DNS query. It checks the results against the list of Dynamic DNS providers in the lookup `dynamic_dns_providers` by each host (DNS.src). how_to_implement = First, you'll need to ingest data from your DNS operations. This can be done by ingesting logs from your server or data, collected passively by Splunk Stream or a similar solution. Specifically, data that contains the domain that is being queried and the IP of the host originating the request must be populating the `Network_Resolution` data model. This search also leverages a lookup file, `dynamic_dns_providers_default.csv`, which contains a non-exhaustive list of Dynamic DNS providers. Please consider updating the local lookup periodically by adding new domains to the list of `dynamic_dns_providers_local.csv`.\ -\ -This search produces fields (query, answer, isDynDNS) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable event. To see the additional metadata, add the following fields, if not already present, to Incident Review. Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\ -\ -\ -\ -1. **Label:** DNS Query, **Field:** query\ -\ +This search produces fields (query, answer, isDynDNS) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable event. To see the additional metadata, add the following fields, if not already present, to Incident Review. Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\\n1. **Label:** DNS Query, **Field:** query\ +1. \ 1. **Label:** DNS Answer, **Field:** answer\ -\ +1. \ 1. **Label:** IsDynamicDNS, **Field:** isDynDNS\ -\ Detailed documentation on how to create a new field within Incident Review may be found here: `https://docs.splunk.com/Documentation/ES/5.3.0/Admin/Customizenotables#Add_a_field_to_the_notable_event_details` -annotations = {"mitre_attack": ["Exfiltration", "Exfiltration Over Command and Control Channel", "Defense Evasion", "Commonly Used Port"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 8", "CIS 12", "CIS 13"], "nist": ["PR.DS", "PR.PT", "DE.AE", "DE.CM"]} +annotations = {"mitre_attack": ["Exfiltration", "Exfiltration Over Command and Control Channel", "Defense Evasion", "Commonly Used Port"], "cis20": ["CIS 8", "CIS 12", "CIS 13"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "nist": ["PR.DS", "PR.PT", "DE.AE", "DE.CM"]} known_false_positives = Some users and applications may leverage Dynamic DNS to reach out to some domains on the Internet since dynamic DNS by itself is not malicious, however this activity must be verified. providing_technologies = ["Splunk Stream", "Bro"] @@ -1844,7 +1607,7 @@ asset_type = Web Server confidence = high explanation = This search looks for HTTP requests for a URL that has been used to exploit JBoss servers. how_to_implement = You must ingest data from the web server or capture network data that contains web specific information with solutions such as Bro or Splunk Stream, and populating the Web data model -annotations = {"mitre_attack": ["Defense Evasion", "Exploitation of Vulnerability"], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 12", "CIS 4", "CIS 18"], "nist": ["ID.RA", "PR.PT", "PR.IP", "DE.AE", "PR.MA", "DE.CM"]} +annotations = {"mitre_attack": ["Defense Evasion", "Exploitation of Vulnerability"], "cis20": ["CIS 12", "CIS 4", "CIS 18"], "kill_chain_phases": ["Delivery"], "nist": ["ID.RA", "PR.PT", "PR.IP", "DE.AE", "PR.MA", "DE.CM"]} known_false_positives = No known false positives for this detection. providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Apache", "Bro"] @@ -1854,7 +1617,7 @@ asset_type = Endpoint confidence = medium explanation = Mshta.exe is a built-in Windows utility that can launch HTML files with .hta extensions (HTML applications), javascript, or VBScript. The search detects this behavior by looking for events where the process mshta.exe is executed with command-line arguments that indicate that a script is invoked how_to_implement = To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. -annotations = {"mitre_attack": ["Execution", "Command-Line Interface", "Persistence"], "kill_chain_phases": ["Exploitation"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Execution", "Command-Line Interface", "Persistence"], "cis20": ["CIS 8"], "kill_chain_phases": ["Exploitation"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = Although unlikely, some legitimate applications may exhibit this behavior, triggering a false positive. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -1874,7 +1637,7 @@ asset_type = AWS Instance confidence = medium explanation = In this search, we query CloudTrail logs to look for events that indicate that a user has attempted to log in to the AWS console and group the events using ARN value. Using the `previously_seen_users_console_logins.csv` lookup file created using the support search, we compare the ARN to all the previously seen users logging into the AWS console. The `eval` and `if` functions determine whether the earliest time we see this user ARN was seen within the last hour. The alert will be fired only when a user is seen for first time in the last hour. how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Run the "Previously seen users in CloudTrail" support search only once to create a baseline of previously seen IAM users within the last 30 days. Run "Update previously seen users in CloudTrail" hourly (or more frequently depending on how often you run the detection searches) to refresh the baselines. -annotations = {"mitre_attack": ["Credential Access"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.DP", "DE.AE"]} +annotations = {"mitre_attack": ["Credential Access"], "cis20": ["CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.AE"]} known_false_positives = When a legitimate new user logins for the first time, this activity will be detected. Check how old the account is and verify that the user activity is legitimate. providing_technologies = ["AWS"] @@ -1884,7 +1647,7 @@ asset_type = Endpoint confidence = high explanation = Attackers have a range of built-in Windows tools they leverage to ascertain the topography of a network from the point of view of a compromised machine. It is uncommon to see these commands execute quickly within short periods of time. This search returns the number of times, as well as the first time and last times, that every process has run for each endpoint. It then executes the macro `system_network_configuration_discovery_tools`, which looks for processes that are typically used for network configuration discovery. Once you have a list of suspicious process launches for each destination, you can leverage the transaction command to see what processes are fired within a five-minute span on an endpoint and detect only those events where the count of these processes is greater than five. how_to_implement = You must be ingesting data that records registry activity from your hosts to populate the Endpoint data model in the processes node. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or endpoint data sources, such as Sysmon. The data used for this search is usually generated via logs that report reads and writes to the registry or that are populated via Windows event logs, after enabling process tracking in your Windows audit settings. -annotations = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Installation", "Command and Control", "Actions on Objectives"], "cis20": ["CIS 2"], "nist": ["ID.AM", "PR.DS"]} +annotations = {"mitre_attack": ["Execution"], "cis20": ["CIS 2"], "kill_chain_phases": ["Installation", "Command and Control", "Actions on Objectives"], "nist": ["ID.AM", "PR.DS"]} known_false_positives = It is uncommon for normal users to execute a series of commands used for network discovery. System administrators often use scripts to execute these commands. These can generate false positives. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -1894,15 +1657,9 @@ asset_type = Endpoint confidence = high explanation = This search looks for hosts in your environment that may be communicating with a dynamic DNS provider. It checks each URL an endpoint is connecting to against a list of dynamic DNS providers. It returns the source and destination IP address of the web request, the URL requested, and the first time the event occurred. how_to_implement = This search requires you to be ingesting web-traffic logs. You can obtain these logs from indexing data from a web proxy or by using a network-traffic-analysis tool, such as Bro or Splunk Stream. The web data model must contain the URL being requested, the IP address of the host initiating the request, and the destination IP. This search also leverages a lookup file, `dynamic_dns_providers_default.csv`, which contains a non-exhaustive list of dynamic DNS providers. Consider periodically updating this local lookup file with new domains.\ -\ -This search produces fields (`isDynDNS`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\ -\ -\ -\ -1. **Label:** IsDynamicDNS, **Field:** isDynDNS\ -\ +This search produces fields (`isDynDNS`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\\n1. **Label:** IsDynamicDNS, **Field:** isDynDNS\ Detailed documentation on how to create a new field within Incident Review may be found here: `https://docs.splunk.com/Documentation/ES/5.3.0/Admin/Customizenotables#Add_a_field_to_the_notable_event_details` -annotations = {"mitre_attack": ["Command and Control", "Web Service", "Exfiltration Over Command and Control Channel", "Defense Evasion"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 7", "CIS 8"], "nist": ["PR.IP", "DE.DP"]} +annotations = {"mitre_attack": ["Command and Control", "Web Service", "Exfiltration Over Command and Control Channel", "Defense Evasion"], "cis20": ["CIS 7", "CIS 8"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "nist": ["PR.IP", "DE.DP"]} known_false_positives = It is possible that list of dynamic DNS providers is outdated and/or that the URL being requested is legitimate. providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] @@ -1912,7 +1669,7 @@ asset_type = Endpoint confidence = low explanation = The search will calculate the distinct count and sum of the length of DNS queries made and DNS answers received by a particular host to alert the analyst if the combined length is greater than 10000, which is not typical behavior. how_to_implement = To successfully implement this search, we must ensure that DNS data is being ingested and mapped to the appropriate fields in the Network_Resolution data model. Fields like src_category are automatically provided by the Assets and Identity Framework shipped with Splunk Enterprise Security. You will need to ensure you are using the Assets and Identity Framework and populating the src_category field. You will also need to enable the `cim_corporate_web_domain_search()` macro which will essentially filter out the DNS queries made to the corporate web domains to reduce alert fatigue. -annotations = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.PT", "PR.DS"]} +annotations = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "cis20": ["CIS 13"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "nist": ["PR.PT", "PR.DS"]} known_false_positives = It's possible that normal DNS traffic will exhibit this behavior. If an alert is generated, please investigate and validate as appropriate. The threshold can also be modified to better suit your environment. providing_technologies = ["Splunk Stream", "Bro"] @@ -1922,7 +1679,7 @@ asset_type = Endpoint confidence = medium explanation = The search looks for process-creation events accompanied by specific command-line arguments ("scomma" and "stext"). These parameters may be leveraged by a set of free, legitimate tools built by NirSoft. Attackers have been seen abusing the tools' capabilities to steal passwords, set up key loggers, recover account information from mail clients, and conduct other nefarious activities. The search will identify the count, the first and last times a process is executed, the command-line arguments, and the parent process. how_to_implement = You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Discovery", "Execution", "Lateral Movement", "Third-party Software", "Account Discovery"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} +annotations = {"mitre_attack": ["Discovery", "Execution", "Lateral Movement", "Third-party Software", "Account Discovery"], "cis20": ["CIS 3"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "nist": ["PR.IP"]} known_false_positives = While legitimate, these NirSoft tools are prone to abuse. You should verfiy that the tool was used for a legitimate purpose. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -1932,7 +1689,7 @@ asset_type = Endpoint confidence = medium explanation = This search checks to see if the registry key SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\LocalAccountTokenFilterPolicy was modified. This registry key can be used to disable remote User Account Control. The search returns the count, the first time activity was seen, last time activity was seen, the registry path that was modified, the host where the modification took place and the user that performed the modification. how_to_implement = To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or via other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report registry modifications. -annotations = {"mitre_attack": ["Defense Evasion", "Modify Registry"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Defense Evasion", "Modify Registry"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = This registry key may be modified via administrators to implement a change in system policy. This type of change should be a very rare occurrence. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -1952,7 +1709,7 @@ asset_type = AWS Instance confidence = medium explanation = In this search, we query CloudTrail logs to look for events that indicate that an instance was started in a particular region. Using the `previously_seen_aws_regions.csv` lookup file created using the support search, we compare the region where this instance was started to all previously observed regions. The `eval` and `if` functions determine that the earliest times seen for this region and instance were within the last day. If a new region is detected, it will alert you with "Instance Started in a New Region". However, this region will be added to the list of `previously_seen_aws_regions.csv`. Please maintain `previously_seen_aws_regions.csv` how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Run the "Previously seen AWS Regions" support search only once to create of baseline of previously seen regions. -annotations = {"mitre_attack": ["Defense Evasion"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 12"], "nist": ["DE.DP", "DE.AE"]} +annotations = {"mitre_attack": ["Defense Evasion"], "cis20": ["CIS 12"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.AE"]} known_false_positives = It's possible that a user has unknowingly started an instance in a new region. Please verify that this activity is legitimate. providing_technologies = ["AWS"] @@ -1992,11 +1749,9 @@ asset_type = Endpoint confidence = high explanation = This search looks at any emails with file attachment names that contain many spaces, relative to the length of the file name. Specifically, it checks to see whether spaces make up more than 10% of the number of characters in the file name. This percentage can be tuned for each environment. The search will output the message ID of the email, the count, the sender and recipient addresses, the first and last time this event was seen, and the space ratio of the file attachment name. how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. \ -\ **Splunk Phantom Playbook Integration**\ -\ If Splunk Phantom is also configured in your environment, a playbook called "Suspicious Email Attachment Investigate and Delete" can be configured to run when any results are found by this detection search. To use this integration, install the Phantom App for Splunk `https://splunkbase.splunk.com/app/3411/` and add the correct hostname to the "Phantom Instance" field in the Adaptive Response Actions when configuring this detection search. The notable event will be sent to Phantom and the playbook will gather further information about the file attachment and its network behaviors. If Phantom finds malicious behavior and an analyst approves of the results, the email will be deleted from the user's inbox. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} +annotations = {"mitre_attack": [], "cis20": ["CIS 7"], "kill_chain_phases": ["Delivery"], "nist": ["PR.IP"]} known_false_positives = None at this time providing_technologies = ["Microsoft Exchange"] @@ -2006,7 +1761,7 @@ asset_type = Endpoint confidence = medium explanation = In this search, we are looking for activities consistent with an adversary collecting email data from local machines. The search will detect email files (files with .pst or .ost extensions) created in directories other than the standard Outlook directory (c:\users\username\My Documents\Outlook Files\. how_to_implement = To successfully implement this search, you must be ingesting data that records the file-system activity from your hosts to populate the Endpoint.Filesystem data model node. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or by other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file-system reads and writes. -annotations = {"mitre_attack": ["Collection", "Email Collection"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"]} +annotations = {"mitre_attack": ["Collection", "Email Collection"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"]} known_false_positives = Administrators and users sometimes prefer backing up their email data by moving the email files into a different folder. These attempts will be detected by the search. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2016,7 +1771,7 @@ asset_type = Endpoint confidence = medium explanation = This search may look complex, but it's a neat representation of how statistics can help you understand your dataset to bubble up events that are not normal compared to its behavior. The search consists of three parts. The first part of the SPL fetches the data you want to work on. In this search, we calculate the sum of bytes sent and bytes_out from systems categorized as email_server to each host. We then calculate the average and standard deviation for the bytes sent to all the hosts combined and on a per-host basis. Then we set threshold values to deviation_threshold and minimum_data_samples using eval statements. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. We then check for byte transfers that are statistically significantly higher than normal. The search then gives IP address of the host, the time of the increased byte transfer, how much data was transferred, and the average amount of data transfer the email server normally sends to all hosts and to this specific host. Finally, it includes the number of standard deviations away the byte count was from these averages. how_to_implement = This search requires you to be ingesting your network traffic and populating the Network_Traffic data model. Your email servers must be categorized as "email_server" for the search to work, as well. You may need to adjust the deviation_threshold and minimum_data_samples values based on the network traffic in your environment. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. -annotations = {"mitre_attack": ["Collection", "Email Collection", "Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 7"], "nist": ["PR.PT", "DE.CM", "DE.AE"]} +annotations = {"mitre_attack": ["Collection", "Email Collection", "Commonly Used Port"], "cis20": ["CIS 7"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM", "DE.AE"]} known_false_positives = The false-positive rate will vary based on how you set the deviation_threshold and data_samples values. Our recommendation is to adjust these values based on your network traffic to and from your email servers. providing_technologies = ["Bro", "Splunk Stream"] @@ -2026,7 +1781,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks at DNS traffic with a reply code that is NOT indicative of a successful response. Numerous unsuccessful replies may be indicative of DNS protocol tampering or other malicious activity. If more than 50 of these unsuccessful responses are observed over the time frame of the search, a notable event will be generated. how_to_implement = To successfully implement this search you must ensure that DNS data is populating the Network_Resolution data model. -annotations = {"mitre_attack": ["Exfiltration", "Exfiltration Over Alternative Protocol", "Command and Control", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 8", "CIS 9", "CIS 12"], "nist": ["PR.PT", "DE.AE", "DE.CM"]} +annotations = {"mitre_attack": ["Exfiltration", "Exfiltration Over Alternative Protocol", "Command and Control", "Commonly Used Port"], "cis20": ["CIS 8", "CIS 9", "CIS 12"], "kill_chain_phases": ["Command and Control"], "nist": ["PR.PT", "DE.AE", "DE.CM"]} known_false_positives = It is possible legitimate traffic can trigger this rule. Please investigate as appropriate. The threshold for generating an event can also be customized to better suit your environment. providing_technologies = ["Splunk Stream", "Bro"] @@ -2036,7 +1791,7 @@ asset_type = Endpoint confidence = medium explanation = This search uses the endpoint data model to look for process names with at least five spaces between the file name and its extension. how_to_implement = To successfully implement this search, you must be ingesting data that records process activity from your hosts to populate the endpoint data model in the processes node. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. -annotations = {"mitre_attack": ["Execution", "Persistence", "Change Default File Association"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 8"], "nist": ["DE.CM", "PR.PT", "PR.IP"]} +annotations = {"mitre_attack": ["Execution", "Persistence", "Change Default File Association"], "cis20": ["CIS 3", "CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.CM", "PR.PT", "PR.IP"]} known_false_positives = None identified. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2046,7 +1801,7 @@ asset_type = Endpoint confidence = high explanation = This search uses the "Application State" data model to look for process names with specific combinations of double extensions. Relatively straightforward, the search looks for strings in the "process" field that match what you're looking for. how_to_implement = To successfully implement this search, you must be ingesting data that records process activity from your hosts to populate the endpoint data model in the processes node. -annotations = {"mitre_attack": ["Execution", "Persistence", "Change Default File Association"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 8"], "nist": ["DE.CM", "PR.PT", "PR.IP"]} +annotations = {"mitre_attack": ["Execution", "Persistence", "Change Default File Association"], "cis20": ["CIS 3", "CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.CM", "PR.PT", "PR.IP"]} known_false_positives = None identified. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2066,7 +1821,7 @@ asset_type = Endpoint confidence = high explanation = This search looks at file modifications across your hosts and creates notable events when it identifies files with extensions associated with the SamSam ransomware, including `.stubbin`, `.berkshire`, `.satoshi`, `.sophos`, or `.keyxml`. Files with these extensions have been observed in SamSam attacks consisting of payload data or keying material. how_to_implement = You must be ingesting data that records file-system activity from your hosts to populate the Endpoint file-system data-model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Installation"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": [], "cis20": ["CIS 8"], "kill_chain_phases": ["Installation"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = Because these extensions are not typically used in normal operations, you should investigate all results. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] @@ -2076,7 +1831,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for a change in the status of a Windows service and extracts the name of the service and the action taken by the service. Then the cache file of previously seen Windows services is added to the search. At this point, the search takes two different paths: the first updates the cache file with the latest information and the second searches for services that have never before been seen. It returns the time, the Windows host name, and the service name. how_to_implement = While this search does not require you to adhere to Splunk CIM, you must be ingesting your Windows security-event logs in order for this search to execute successfully. The support search, `Previously Seen Running Windows Services`, should be run before this search to create the baseline of known Windows services. -annotations = {"mitre_attack": ["Execution", "New Service"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 2", "CIS 9"], "nist": ["ID.AM", "PR.DS", "PR.AC", "DE.AE"]} +annotations = {"mitre_attack": ["Execution", "New Service"], "cis20": ["CIS 2", "CIS 9"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "nist": ["ID.AM", "PR.DS", "PR.AC", "DE.AE"]} known_false_positives = A previously unseen service is not necessarily malicious. Verify that the service is legitimate and that was installed by a legitimate process. providing_technologies = ["Microsoft Windows"] @@ -2086,7 +1841,7 @@ asset_type = Endpoint confidence = medium explanation = The subsearch returns all events where `cmd.exe` was used with a `/c` parameter in the command-line arguments to execute other commands/programs. It appends the historical data to those results in the lookup file. Next, it recalculates the `firstTime` and `lastTime` field for command-line execution and outputs this data to the lookup file to update the local cache. It returns only those events that have first been seen in the past one hour. This is combined with the main search to return the time, user, destination, process, parent process, and value of the command-line argument. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must be ingesting logs with both the process name and command line from your endpoints. The complete process name with command-line arguments are mapped to the "process" field in the Endpoint data model. Please make sure you run the support search "Previously seen command line arguments,"—which creates a lookup file called `previously_seen_cmd_line_arguments.csv`—a historical baseline of all command-line arguments. You must also validate this list. For the search to do accurate calculation, ensure the search scheduling is the same value as the `relative_time` evaluation function. -annotations = {"mitre_attack": ["Execution", "Scripting", "Persistence", "Command-Line Interface"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +annotations = {"mitre_attack": ["Execution", "Scripting", "Persistence", "Command-Line Interface"], "cis20": ["CIS 3", "CIS 8"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} known_false_positives = Legitimate programs can also use command-line arguments to execute. Please verify the command-line arguments to check what command/program is being executed. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2096,7 +1851,7 @@ asset_type = confidence = medium explanation = This search is looking to detect command-line execution with of attrib.exe binary with the +h flag set. The +h flag is used to hide a file. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Defense Evasion", "Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +annotations = {"mitre_attack": ["Defense Evasion", "Persistence"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.CM"]} known_false_positives = Some applications and users may legitimately use attrib.exe to interact with the files. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2106,7 +1861,7 @@ asset_type = Endpoint confidence = medium explanation = This search may look complex, but it's a neat representation of how statistics can help you understand your dataset to bubble up events that are not normal compared to its behavior. The search consists of three parts. The first part of the SPL fetches the data you want to work on. In this search, we calculate the sum of bytes sent and bytes_out from systems categorized as email_server to each host. We then calculate the average and standard deviation for the bytes sent to all the hosts combined and on a per-host basis. Then we set threshold values to deviation_threshold and minimum_data_samples using eval statements. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. We then check for byte transfers that are statistically significantly higher than normal. The search then gives IP address of the host, the time of the increased byte transfer, how much data was transferred, and the average amount of data transfer the email server normally sends to all hosts and to this specific host. Finally, it includes the number of standard deviations away the byte count was from these averages. how_to_implement = This search requires you to be ingesting your network traffic and populating the Network_Traffic data model. Your email servers must be categorized as "email_server" for the search to work, as well. You may need to adjust the deviation_threshold and minimum_data_samples values based on the network traffic in your environment. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. -annotations = {"mitre_attack": ["Collection", "Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 7"], "nist": ["PR.PT", "DE.CM", "DE.AE"]} +annotations = {"mitre_attack": ["Collection", "Commonly Used Port"], "cis20": ["CIS 7"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM", "DE.AE"]} known_false_positives = The false-positive rate will vary based on how you set the deviation_threshold and data_samples values. Our recommendation is to adjust these values based on your network traffic to and from your email servers. providing_technologies = ["Bro", "Splunk Stream"] @@ -2126,7 +1881,7 @@ asset_type = DNS Servers confidence = high explanation = This search counts the number of DNS ANY queries received in 5 minutes, and generates a Notable Event if the count exceeds a predefined threshold. The search returns the count, the first time, and the last time a DNS packet was observed with the ANY flag set. how_to_implement = To successfully implement this search you must ensure that DNS data is populating the Network_Resolution data model. -annotations = {"kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 11", "CIS 12"], "nist": ["PR.PT", "DE.AE", "PR.IP"]} +annotations = {"cis20": ["CIS 11", "CIS 12"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.AE", "PR.IP"]} known_false_positives = Legitimate ANY requests may trigger this search, however it is unusual to see a large volume of them under typical circumstances. You may modify the threshold in the search to better suit your environment. providing_technologies = ["Splunk Stream", "Bro"] @@ -2136,7 +1891,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for PowerShell processes running with specific command-line arguments that indicate that the process will download a file from the Internet without display anything to the user. The search for "*-Exec*" is to check and see if the default execution policy for PowerShell is being overridden on the command-line. The search for "*-WindowStyle*" and "*hidden*" are to see if the window that would normally be displayed will be hidden from the user instead. Finally, the search for "*New-Object*" and "*System.Net.WebClient*" are there to check to see if a PowerShell object that can be used to download files will be created. This search will return the host, the user the process ran under, the process and it's command-line arguments, the number of times it's seen this process, and the first and last times it saw this process. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +annotations = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} known_false_positives = Legitimate process can have this combination of command-line options, but it's not common. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2146,7 +1901,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for PowerShell processes that are passing encoded commands on the command-line. The flags "-EncodedCommand" and "-enc" are two different possible flags that can be used to pass base64 encoded commands to PowerShell. This search will return the host, the user the process ran under, the process and it's command-line arguments, the number of times it's seen this process, and the first and last times it saw this process. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +annotations = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} known_false_positives = System administrators may use this option, but it's not common. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2156,7 +1911,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for PowerShell processes that were launched using a parameter designed to bypass the local PowerShell execution policy. By default, the policy is set to "Restricted," which disables the execution of PowerShell scripts. In environments that make heavy use of PowerShell, the policy can be set to allow only scripts signed by a trusted publisher. Malicious PowerShell use almost always includes the parameter `-ExecutionPolicy bypass`. PowerShell is very liberal when it comes to interpreting command-line parameters passed to it. For example, the parameter we look for, `-ExecutionPolicy`, can be abbreviated to `-Execution`, `-Exec`, or even `-ex`. As such, we look for `* -ex*`, which should catch all variations of this parameter, followed by the keyword `bypass`. This search will return the host, the user the process ran under, the process and its command-line arguments, the number of times it has seen this process, and the first and last times it saw this process. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +annotations = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} known_false_positives = There may be legitimate reasons to bypass the PowerShell execution policy. The PowerShell script being run with this parameter should be validated to ensure that it is legitimate. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2166,7 +1921,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for PowerShell processes that have a number of suspicious flags on the command-line. It is looking for flags are passing encoded commands on the command-line. The flags `-EncodedCommand` and `-enc` are two different possible flags that can be used to pass base64 encoded commands to PowerShell. The `*-Exec*` flag looks to see it the default execution policy of PowerShell is being overridden, while the `*-NonI*` flag tells the PowerShell process that this will be a noninteractive process, so the user doesn't know about the process. This search will return the host, the user the process ran under, the process and it's command-line arguments, the number of times it's seen this process, and the first and last times it saw this process. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +annotations = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} known_false_positives = Legitimate process can have this combination of command-line options, but it's not common. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2176,7 +1931,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for PowerShell processes that are passing command-line arguments with unusual characters (backticks and carets) that are PowerShell specific escape characters. Attackers use this obfuscation technique since it does not affect the functionality of PowerShell and it will bypass standard security controls that look for straight up malicious strings and commands. The search counts the occurrence of these obfuscation characters and lists out destination IPs running these PowerShell commands. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +annotations = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} known_false_positives = These characters might be legitimately on the command-line, but it is not common. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2196,7 +1951,7 @@ asset_type = Endpoint confidence = high explanation = This search looks at the sender address in email headers, and identifies those with a sender address using a domain name that matches the list of permutations generated for the domain you want to monitor. how_to_implement = You need to ingest email header data. Specifically the sender's address (src_user) must be populated. You also need to have run the search "ESCU - DNSTwist Domain Names", which creates the permutations of the domain that will be checked for. -annotations = {"kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} +annotations = {"cis20": ["CIS 7"], "kill_chain_phases": ["Delivery"], "nist": ["PR.IP"]} known_false_positives = None at this time providing_technologies = ["Microsoft Exchange", "Bro", "Splunk Stream"] @@ -2206,7 +1961,7 @@ asset_type = Endpoint confidence = medium explanation = In this search, we look for modifications to registry keys used for adding print-monitor entries on Microsoft platforms via the `registry_path` field in the endpoint data model. It then provides the destination, command used to initiate the change, the user who conducted this activity, the resource affected (registry_key_name), and the entire path of the registry. how_to_implement = To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or via other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report registry modifications. -annotations = {"mitre_attack": ["Persistence", "Privilege Escalation", "Local Port Monitor"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8", "CIS 5"], "nist": ["PR.PT", "DE.CM", "PR.AC"]} +annotations = {"mitre_attack": ["Persistence", "Privilege Escalation", "Local Port Monitor"], "cis20": ["CIS 8", "CIS 5"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM", "PR.AC"]} known_false_positives = You will encounter noise from legitimate print-monitor registry entries. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] @@ -2216,7 +1971,7 @@ asset_type = Endpoint confidence = high explanation = This search looks at all the URLs an endpoint is connecting to and then checks the URL against a list of faux domains that could be indicative of brand abuse. how_to_implement = You need to ingest data from your web traffic. This can be accomplished by indexing data from a web proxy, or using a network traffic analysis tool, such as Bro or Splunk Stream. You also need to have run the search "ESCU - DNSTwist Domain Names", which creates the permutations of the domain that will be checked for. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} +annotations = {"mitre_attack": [], "cis20": ["CIS 7"], "kill_chain_phases": ["Delivery"], "nist": ["PR.IP"]} known_false_positives = None at this time providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] @@ -2236,7 +1991,7 @@ asset_type = Splunk Server confidence = medium explanation = This search looks within Splunk's internal logs for evidence of CVE-2016-4859 open redirect exploitation attempts. how_to_implement = No extra steps needed to implement this search. -annotations = {"mitre_attack": ["Defense Evasion", "Exploitation of Vulnerability"], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 3", "CIS 4", "CIS 18"], "nist": ["ID.RA", "RS.MI", "PR.PT", "PR.AC", "PR.IP", "DE.CM"]} +annotations = {"mitre_attack": ["Defense Evasion", "Exploitation of Vulnerability"], "cis20": ["CIS 3", "CIS 4", "CIS 18"], "kill_chain_phases": ["Delivery"], "nist": ["ID.RA", "RS.MI", "PR.PT", "PR.AC", "PR.IP", "DE.CM"]} known_false_positives = None identified providing_technologies = ["Splunk Enterprise"] @@ -2246,7 +2001,7 @@ asset_type = Endpoint confidence = medium explanation = The search looks at the Alerts data model to identify those generated from the osquery osx-attacks.conf pack, which search for the ColdRoot RAT. how_to_implement = In order to properly run this search, Splunk needs to ingest data from your osquery deployed agents with the [osx-attacks.conf](https://github.com/facebook/osquery/blob/experimental/packs/osx-attacks.conf#L599) pack enabled. Also the [TA-OSquery](https://github.com/d1vious/TA-osquery) must be deployed across your indexers and universal forwarders in order to have the osquery data populate the Alerts data model -annotations = {"mitre_attack": ["Execution", "Persistence", "Command and Control"], "kill_chain_phases": ["Installation", "Command and Control"], "cis20": ["CIS 4", "CIS 8"], "nist": ["DE.DP", "DE.CM", "PR.PT"]} +annotations = {"mitre_attack": ["Execution", "Persistence", "Command and Control"], "cis20": ["CIS 4", "CIS 8"], "kill_chain_phases": ["Installation", "Command and Control"], "nist": ["DE.DP", "DE.CM", "PR.PT"]} known_false_positives = There are no known false positives. providing_technologies = ["OSquery"] @@ -2256,7 +2011,7 @@ asset_type = Endpoint confidence = high explanation = This search returns all the different accessibility binaries that have been modified for each Windows host. how_to_implement = You must be ingesting data that records the filesystem activity from your hosts to populate the Endpoint file-system data model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data. -annotations = {"mitre_attack": ["Persistence", "Accessibility Features"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Persistence", "Accessibility Features"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = Microsoft may provide updates to these binaries. Verify that these changes do not correspond with your normal software update cycle. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] @@ -2266,7 +2021,7 @@ asset_type = Endpoint confidence = medium explanation = Attackers are increasingly abusing Windows Management Infrastructure (WMI) for stealth, persistence, lateral movement, or just to leverage its functionality. This search looks for processes launched via WMI, either remotely or locally, by looking for processes launched by WmiPrvSE.exe, which is the process WMI uses to execute new processes and commands. how_to_implement = You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution", "Windows Management Instrumentation"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} +annotations = {"mitre_attack": ["Execution", "Windows Management Instrumentation"], "cis20": ["CIS 3", "CIS 5"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} known_false_positives = Although unlikely, administrators may use wmi to execute commands for legitimate purposes. providing_technologies = ["Carbon Black Response", "Sysmon", "Tanium", "Ziften"] @@ -2276,7 +2031,7 @@ asset_type = Endpoint confidence = medium explanation = The search leverages Alerts generated from the osquery osx-attacks.conf pack search `Keyboard_Event_Taps` to detect when a process is monitoring the keystrokes of a machine, This is a common technique used by macOS remote access trojans to log keystrokes from a machine how_to_implement = In order to properly run this search, Splunk needs to ingest data from your osquery deployed agents with the [osx-attacks.conf](https://github.com/facebook/osquery/blob/experimental/packs/osx-attacks.conf#L599) pack enabled. Also the [TA-OSquery](https://github.com/d1vious/TA-osquery) must be deployed across your indexers and universal forwarders in order to have the osquery data populate the Alerts data model. -annotations = {"mitre_attack": ["Collection"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 4", "CIS 8"], "nist": ["DE.DP"]} +annotations = {"mitre_attack": ["Collection"], "cis20": ["CIS 4", "CIS 8"], "kill_chain_phases": ["Command and Control"], "nist": ["DE.DP"]} known_false_positives = There might be some false positives as keyboard event taps are used by processes like Siri and Zoom video chat, for some good examples of processes to exclude please see [this](https://github.com/facebook/osquery/pull/5345#issuecomment-454639161) comment. providing_technologies = ["OSquery"] @@ -2284,9 +2039,10 @@ providing_technologies = ["OSquery"] type = detection asset_type = Endpoint confidence = medium -explanation = This search looks for all processes with the parent process "c:\Windows\System32\netsh.exe" and returns the process, the command line used to execute it, the host name, and the user context under which it ran. +explanation = This search looks for all processes with the parent process "c:\Windows\System32\ +etsh.exe" and returns the process, the command line used to execute it, the host name, and the user context under which it ran. how_to_implement = To successfully implement this search, you must be ingesting logs with the process name, command-line arguments, and parent processes from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. -annotations = {"mitre_attack": ["Execution", "Command-Line Interface", "Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Execution", "Command-Line Interface", "Persistence"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = It is unusual for netsh.exe to have any child processes in most environments. It makes sense to investigate the child process and verify whether the process spawned is legitimate. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2296,7 +2052,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for all the parent processes of netsh.exe and returns that process, the command-line used to execute it, the host name, and the user context under which it ran. how_to_implement = To successfully implement this search, you must be ingesting data that records process activity from your hosts to populate the endpoint data model -annotations = {"mitre_attack": ["Execution", "Command-Line Interface", "Persistence", "Defense Evasion", "Disabling Security Tools"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Execution", "Command-Line Interface", "Persistence", "Defense Evasion", "Disabling Security Tools"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = Some VPN applications are known to launch netsh.exe. Outside of these instances, it is unusual for an executable to launch netsh.exe and run commands. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2306,7 +2062,7 @@ asset_type = Endpoint confidence = medium explanation = The search looks for traffic marked 'is_prohibited' in the Enterprise Security lookup table 'interesting_ports_lookup', and then determines if any network devices have an associated 'allow' action on that traffic by checking the Network_Traffic data model. how_to_implement = In order to properly run this search, Splunk needs to ingest data from firewalls or other network control devices that mediate the traffic allowed into an environment. This is necessary so that the search can identify an 'action' taken on the traffic of interest. The search requires the Network_Traffic data model be populated. -annotations = {"mitre_attack": ["Command and Control", "Commonly Used Port", "Exfiltration", "Exfiltration Over Alternative Protocol"], "kill_chain_phases": ["Delivery", "Command and Control"], "cis20": ["CIS 9", "CIS 12"], "nist": ["DE.AE", "PR.AC"]} +annotations = {"mitre_attack": ["Command and Control", "Commonly Used Port", "Exfiltration", "Exfiltration Over Alternative Protocol"], "cis20": ["CIS 9", "CIS 12"], "kill_chain_phases": ["Delivery", "Command and Control"], "nist": ["DE.AE", "PR.AC"]} known_false_positives = None identified providing_technologies = ["Palo Alto Firewall", "Bro", "Splunk Stream"] @@ -2315,8 +2071,8 @@ type = detection asset_type = Endpoint confidence = high explanation = This search returns the number of times, as well as the first and last time, every process has run for each endpoint and user. It then displays only those processes that you have marked as "prohibited" in the Enterprise Security "Interesting Processes" table. -how_to_implement = To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the processes node. This is typically populated via endpoint detection-and-response products, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is usually generated via logs that report reads and writes to the registry or populated via Windows event logs, after enabling process tracking in your Windows audit settings. In addition, you must also have processes marked as "prohibited" in the Enterprise Security `interesting processes` table. To include the processes marked as "prohibited", which is included with ES Content Updates, run the included search `Support - Add Prohibited Processes to ES`. -annotations = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Installation", "Command and Control", "Actions on Objectives"], "cis20": ["CIS 2"], "nist": ["ID.AM", "PR.DS"]} +how_to_implement = To successfully implement this search, you must be ingesting data that records process activity from your hosts to populate the endpoint data model in the processes node. This is typically populated via endpoint detection-and-response products, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is usually generated via logs that report process tracking in your Windows audit settings. In addition, you must also have only the `process_name` (not the entire process path) marked as "prohibited" in the Enterprise Security `interesting processes` table. To include the process names marked as "prohibited", which is included with ES Content Updates, run the included search Add Prohibited Processes to Enterprise Security. +annotations = {"mitre_attack": ["Execution"], "cis20": ["CIS 2"], "kill_chain_phases": ["Installation", "Command and Control", "Actions on Objectives"], "nist": ["ID.AM", "PR.DS"]} known_false_positives = None identified providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2326,7 +2082,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for instances in which the protocol observed is not consistent with the port and transport protocol typically used for that protocol. For example, looking for network traffic other than HTTP running over TCP port 80. Such behavior could indicate a misconfiguration or a custom command and control protocol that has been designed to look like ordinary web traffic. The search will also identify if HTTP traffic is observed running on unexpected ports. This can be common in many environments. how_to_implement = Running this search properly requires a technology that can inspect network traffic and identify common protocols. Technologies such as Bro and Palo Alto Networks firewalls are two examples that will identify protocols via inspection, and not just assume a specific protocol based on the transport protocol and ports. -annotations = {"mitre_attack": ["Command and Control", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 9", "CIS 12"], "nist": ["DE.AE", "PR.AC"]} +annotations = {"mitre_attack": ["Command and Control", "Commonly Used Port"], "cis20": ["CIS 9", "CIS 12"], "kill_chain_phases": ["Command and Control"], "nist": ["DE.AE", "PR.AC"]} known_false_positives = None identified providing_technologies = ["Palo Alto Firewall", "Bro", "Splunk Stream"] @@ -2336,7 +2092,7 @@ asset_type = Endpoint confidence = medium explanation = This search is checking for traffic on well-known ports that are associated with protocols that pass authentication in cleartext. how_to_implement = This search requires you to be ingesting your network traffic, and populating the Network_Traffic data model. -annotations = {"mitre_attack": ["Credential Access", "Lateral Movement", "Collection"], "kill_chain_phases": ["Reconnaissance", "Actions on Objectives"], "cis20": ["CIS 9", "CIS 14"], "nist": ["PR.PT", "DE.AE", "PR.AC", "PR.DS"]} +annotations = {"mitre_attack": ["Credential Access", "Lateral Movement", "Collection"], "cis20": ["CIS 9", "CIS 14"], "kill_chain_phases": ["Reconnaissance", "Actions on Objectives"], "nist": ["PR.PT", "DE.AE", "PR.AC", "PR.DS"]} known_false_positives = Some networks may use kerberized FTP or telnet servers, however, this is rare. providing_technologies = ["Splunk Stream", "Bro"] @@ -2346,7 +2102,7 @@ asset_type = Endpoint confidence = high explanation = This search looks for modifications to registry paths that specify the definition and configuration of Windows services by reg.exe. Reg.exe is a Windows utility that allows for manipulation of the registry via the command line. Malware often uses the Windows services architecture to persist, hide in plain sight, and gain the ability to interact with the Windows kernel. While it is common to modify the configuration of Windows services (and new services may be created with software installs), the use of reg.exe to create or modify a service configuration is unusual and a technique commonly used by attackers. The search returns the count, the first time the activity was seen, the last time activity was seen, the registry path that was modified, the host where the modification took place, and the user that performed the modification. how_to_implement = To successfully implement this search you need to be ingesting information on registry changes that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` and `Registry` nodes. -annotations = {"mitre_attack": ["Persistence", "Privilege Escalation", "New Service", "Modify Existing Service", "Defense Evasion", "Disabling Security Tools"], "kill_chain_phases": ["Installation"], "cis20": ["CIS 3", "CIS 5", "CIS 8"], "nist": ["PR.IP", "PR.PT", "PR.AC", "PR.AT", "DE.CM"]} +annotations = {"mitre_attack": ["Persistence", "Privilege Escalation", "New Service", "Modify Existing Service", "Defense Evasion", "Disabling Security Tools"], "cis20": ["CIS 3", "CIS 5", "CIS 8"], "kill_chain_phases": ["Installation"], "nist": ["PR.IP", "PR.PT", "PR.AC", "PR.AT", "DE.CM"]} known_false_positives = It is unusual for a service to be created or modified by directly manipulating the registry. However, there may be legitimate instances of this behavior. It is important to validate and investigate, as appropriate. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2356,7 +2112,7 @@ asset_type = confidence = medium explanation = Reg.exe is a binary native to Windows platform used to edit the registry hives of the system. Attackers can leverage this binary to hide files by passing in arguments that are used to hide the files. In the search, we first gather results with keywords, add, Hidden, and REG_DWORD, that will be in the raw event and filter by process and the command-line. We then leverage regular expressions on the command-line field to look for /d value as 2 which is responsible for hiding a file or directory. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Defense Evasion", "Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +annotations = {"mitre_attack": ["Defense Evasion", "Persistence"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.CM"]} known_false_positives = None at the moment providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2366,7 +2122,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for specific registry paths that malware often uses to ensure survivability and persistence on system startup. The search returns the count, the first time the activity was seen, the last time the activity was seen, the registry path that was modified, the host where the modification took place and the user that performed the modification. how_to_implement = To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response products, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry. -annotations = {"mitre_attack": ["Persistence", "Registry Run Keys / Start Folder", "AppInit DLLs", "Authentication Package"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM", "DE.AE"]} +annotations = {"mitre_attack": ["Persistence", "Registry Run Keys / Start Folder", "AppInit DLLs", "Authentication Package"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM", "DE.AE"]} known_false_positives = There are many legitimate applications that must execute on system startup and will use these registry keys to accomplish that task. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] @@ -2376,7 +2132,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for specific registry paths that malware often uses to elevate privileges. The search returns the count, the first time the activity was seen, the last time the activity was seen, the registry path that was modified, the host where the modification took place, and the user who performed the modification. how_to_implement = To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry. -annotations = {"mitre_attack": ["Privilege Escalation", "Persistence", "Accessibility Features"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Privilege Escalation", "Persistence", "Accessibility Features"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = There are many legitimate applications that must execute upon system startup and will use these registry keys to accomplish that task. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] @@ -2386,7 +2142,7 @@ asset_type = Endpoint confidence = medium explanation = In this search, we look for modifications to registry keys used for shim databases on Microsoft platforms via the object_category and object_path field in the Change_Analysis data model and give you the destination, command used to initiate the change, the user who conducted this activity, the resource affected(object), and the whole path of the object. An application compatibility shim is a small library that transparently intercepts an API (via hooking), changes the parameters passed, handles the operation itself, or redirects the operation elsewhere, such as additional code stored on a system. This capability can be also leveraged by attackers to create and store malicious files in a shim database as observed in CARBANAK backdoor. how_to_implement = To successfully implement this search, you must populate the Change_Analysis data model. This is typically populated via endpoint detection and response products, such as Carbon Black or other endpoint data sources such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry. -annotations = {"mitre_attack": ["Persistence", "Application Shimming"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Persistence", "Application Shimming"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = There are many legitimate applications that leverage shim databases for compatibility purposes for legacy applications providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] @@ -2396,7 +2152,7 @@ asset_type = Endpoint confidence = medium explanation = This search monitors for abnormal amounts of remote-desktop (RDP) traffic from a source to a destination that may be indicative of a brute-force attack. It does this by filtering out RDP traffic from the Network_Traffic.All_Traffic data model, using twice the standard deviation of all source-to-destination connections. If any tuple is within more than two standard deviations of all other usual RDP traffic flows, it is indicative of a brute-force attack. how_to_implement = You must ensure that your network traffic data is populating the Network_Traffic data model. -annotations = {"mitre_attack": ["Credential Access", "Remote Desktop Protocol", "Lateral Movement"], "kill_chain_phases": ["Reconnaissance", "Delivery"], "cis20": ["CIS 12", "CIS 9", "CIS 16"], "nist": ["DE.AE", "PR.AC", "PR.IP"]} +annotations = {"mitre_attack": ["Credential Access", "Remote Desktop Protocol", "Lateral Movement"], "cis20": ["CIS 12", "CIS 9", "CIS 16"], "kill_chain_phases": ["Reconnaissance", "Delivery"], "nist": ["DE.AE", "PR.AC", "PR.IP"]} known_false_positives = RDP gateways may have unusually high amounts of traffic from all other hosts' RDP applications in the network. providing_technologies = ["Bro", "Splunk Stream"] @@ -2406,7 +2162,7 @@ asset_type = Endpoint confidence = medium explanation = This search finds systems that do not commonly communicate use remote desktop. It does this by filtering out all systems that have the "common_rdp_source" or "common_rdp_destination" category applied to that system. Categories are applied to systems using the Assets and Identity framework. how_to_implement = To successfully implement this search you need to identify systems that commonly originate remote desktop traffic and that commonly receive remote desktop traffic. You can use the included support search "Identify Systems Creating Remote Desktop Traffic" to identify systems that originate the traffic and the search "Identify Systems Receiving Remote Desktop Traffic" to identify systems that receive a lot of remote desktop traffic. After identifying these systems, you will need to add the "common_rdp_source" or "common_rdp_destination" category to that system depending on the usage, using the Enterprise Security Assets and Identities framework. This can be done by adding an entry in the assets.csv file located in SA-IdentityManagement/lookups. -annotations = {"mitre_attack": ["Lateral Movement", "Remote Desktop Protocol", "Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 9", "CIS 16"], "nist": ["DE.AE", "PR.AC", "PR.IP"]} +annotations = {"mitre_attack": ["Lateral Movement", "Remote Desktop Protocol", "Commonly Used Port"], "cis20": ["CIS 3", "CIS 9", "CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.AE", "PR.AC", "PR.IP"]} known_false_positives = Remote Desktop may be used legitimately by users on the network. providing_technologies = ["Bro", "Splunk Stream"] @@ -2416,7 +2172,7 @@ asset_type = Endpoint confidence = medium explanation = This search finds systems that do not commonly use remote desktop, but which begin using it. It filters out all systems that have the "common_rdp_source" category applied. Categories are applied to systems using the Assets and Identity framework. how_to_implement = To successfully implement this search, you must be ingesting data that records process activity from your hosts to populate the endpoint data model in the processes node. The search requires you to identify systems that do not commonly use remote desktop. You can use the included support search "Identify Systems Using Remote Desktop" to identify these systems. After identifying them, you will need to add the "common_rdp_source" category to that system using the Enterprise Security Assets and Identities framework. This can be done by adding an entry in the assets.csv file located in `SA-IdentityManagement/lookups`. -annotations = {"mitre_attack": ["Lateral Movement", "Remote Desktop Protocol"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 9", "CIS 16"], "nist": ["DE.AE", "PR.AC", "PR.IP"]} +annotations = {"mitre_attack": ["Lateral Movement", "Remote Desktop Protocol"], "cis20": ["CIS 3", "CIS 9", "CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.AE", "PR.AC", "PR.IP"]} known_false_positives = Remote Desktop may be used legitimately by users on the network. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2426,7 +2182,7 @@ asset_type = Endpoint confidence = medium explanation = Attackers are increasingly abusing native Windows utilities such as wmic.exe as a means to "live off the land", and avoid introducing new executables to the target system. In this search, we are looking for instances of wmic.exe being run with various parameters that are not typically used by administrators. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution", "Windows Management Instrumentation"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} +annotations = {"mitre_attack": ["Execution", "Windows Management Instrumentation"], "cis20": ["CIS 3", "CIS 5"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} known_false_positives = The wmic.exe utility is a benign Windows application. It may be used legitimately by Administrators with these parameters for remote system administration, but it's relatively uncommon. providing_technologies = ["Carbon Black Response", "Sysmon", "Tanium", "Ziften"] @@ -2436,7 +2192,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for modifications made to the Windows registry from remote locations using reg.exe—a tool used to create/update/delete/modify Windows registry keys. It is accomplished through specifying the machine names in the registry path, by entering double backslashes, followed by a computer name. In this search, we look for registry changes where the registry path contains the name of a remote computer. The search returns the number of times the remote server has been accessed, the first and last times the activity occurred, the name of the modified registry path, the host on which the modification took place, and the name of the user that performed the modification. how_to_implement = To successfully implement this search, you must populate the `Change_Analysis` data model. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry. -annotations = {"mitre_attack": ["Defense Evasion", "Persistence", "Lateral Movement"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Defense Evasion", "Persistence", "Lateral Movement"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = This technique may be legitimately used by administrators to modify remote registries, so it's important to filter these events out. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] @@ -2446,7 +2202,7 @@ asset_type = Endpoint confidence = medium explanation = Many a times, attackers leverage native Windows utilities that are designed to help administrators better manage their systems, infrastructure, and auditing, but are instead leveraged for malicious purposes. In this case, we are looking for instances of wmic.exe being run with various parameters that are not typically used by administrators. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution", "Windows Management Instrumentation"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} +annotations = {"mitre_attack": ["Execution", "Windows Management Instrumentation"], "cis20": ["CIS 3", "CIS 5"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} known_false_positives = Administrators may use this legitimately to gather info from remote systems. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2456,7 +2212,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for rundll32.exe being run, loading a DLL out of a directory or subdirectory of AppData, and specifying the function at ordinal 2 be run. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution", "Rundll32"], "kill_chain_phases": ["Installation"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Execution", "Rundll32"], "cis20": ["CIS 8"], "kill_chain_phases": ["Installation"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = While not common, loading a DLL under %AppData% and calling a function by ordinal is possible by a legitimate process providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2466,7 +2222,7 @@ asset_type = Endpoint confidence = medium explanation = Server Message Block (SMB) traffic, a protocol used for Windows file sharing-activity, is often leveraged by attackers. One example of SMB abuse was the WannaCry ransomware, which leveraged a vulnerability in the SMB protocol to propagate to other systems. Attackers have also used SMB for lateral movement with a target environment and to test credentials against target systems. While SMB is highly prevalent in Windows environments, a spike in SMB traffic may still be indicative of this type of malicious activity. This search looks for a traffic spike in SMB traffic from a particular system. If such a spike is detected, you may want to investigate the source and analyze the cause of the abnormal traffic. how_to_implement = This search requires you to be ingesting your network traffic logs and populating the `Network_Traffic` data model. -annotations = {"mitre_attack": ["Lateral Movement", "Execution", "Command and Control", "Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +annotations = {"mitre_attack": ["Lateral Movement", "Execution", "Command and Control", "Commonly Used Port"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.CM"]} known_false_positives = A file server may experience high-demand loads that could cause this analytic to trigger. providing_technologies = ["Bro", "Splunk Stream"] @@ -2476,11 +2232,10 @@ asset_type = Endpoint confidence = medium explanation = Attackers often leverage Server Message Block (SMB) traffic, a protocol used for Windows file-sharing activity. A high-profile example of SMB abuse was the WannaCry ransomware, which leveraged a vulnerability in the SMB protocol to propagate to other systems. Attackers have also used SMB for lateral movement with a target environment and to test credentials against target systems. While SMB is highly prevalent in Windows environments, a spike in SMB traffic may still be indicative of this type of malicious activity. This search leverages Splunk's Machine Learning Toolkit (MLTK) to identify spikes in SMB traffic that are unusual for a given hour of day/day of week combination. If such a spike is detected, you may want to investigate the source and analyze the cause of the abnormal traffic. The determination of what is considered an outlier may be adjusted via the threshold parameter in the search. More information on the algorithm used can be found at `https://docs.splunk.com/Documentation/MLApp/4.2.0/User/Algorithms#DensityFunction`. how_to_implement = To successfully implement this search, you will need to ensure that DNS data is populating the Network_Resolution data model. In addition, the Machine Learning Toolkit (MLTK) version 4.2 or greater must be installed on your search heads, along with any required dependencies. Finally, the support search "Baseline of SMB Traffic - MLTK" must be executed before this detection search, because it builds a machine-learning (ML) model over the historical data used by this search. It is important that this search is run in the same app context as the associated support search, so that the model created by the support search is available for use. You should periodically re-run the support search to rebuild the model with the latest data available in your environment.\ -\ -This search produces a field (Number of events,count) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. This field contributes additional context to the notable. To see the additional metadata, add the following field, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry): **Label:** Number of events, **Field:** count\ -\ +This search produces a field (Number of events,count) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. This field contributes additional context to the notable. To see the additional metadata, add the following field, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry): \ +1. **Label:** Number of events, **Field:** count\ Detailed documentation on how to create a new field within Incident Review is found here: `https://docs.splunk.com/Documentation/ES/5.3.0/Admin/Customizenotables#Add_a_field_to_the_notable_event_details` -annotations = {"mitre_attack": ["Lateral Movement", "Execution", "Command and Control", "Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +annotations = {"mitre_attack": ["Lateral Movement", "Execution", "Command and Control", "Commonly Used Port"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.CM"]} known_false_positives = If you are seeing more results than desired, you may consider reducing the value of the threshold in the search. You should also periodically re-run the support search to re-build the ML model on the latest data. providing_technologies = ["Bro", "Splunk Stream"] @@ -2490,7 +2245,7 @@ asset_type = Database Server confidence = medium explanation = This search looks only at your web servers and returns the source, the web server, the URL and its length, and the user agent associated with HTTP GET requests for extremely long URLs or user agent lengths with more than three common SQL commands found within the URL. how_to_implement = To successfully implement this search, you need to be monitoring network communications to your web servers or ingesting your HTTP logs and populating the Web data model. You must also identify your web servers in the Enterprise Security assets table. -annotations = {"mitre_attack": ["Defense Evasion", "Exploitation of Vulnerability", "Execution", "Commonly Used Port"], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 4", "CIS 13", "CIS 18"], "nist": ["PR.DS", "ID.RA", "PR.PT", "PR.IP", "DE.CM"]} +annotations = {"mitre_attack": ["Defense Evasion", "Exploitation of Vulnerability", "Execution", "Commonly Used Port"], "cis20": ["CIS 4", "CIS 13", "CIS 18"], "kill_chain_phases": ["Delivery"], "nist": ["PR.DS", "ID.RA", "PR.PT", "PR.IP", "DE.CM"]} known_false_positives = It's possible that legitimate traffic will have long URLs or long user agent strings and that common SQL commands may be found within the URL. Please investigate as appropriate. providing_technologies = ["Splunk Stream", "Bro"] @@ -2500,7 +2255,7 @@ asset_type = Endpoint confidence = high explanation = This search looks at file modifications across your hosts and monitors for a file named "test.txt" written to "windows\system32". This file is copied to potential targets during SamSam ransomware attacks to test the attacker's ability to access remote systems. If the file is successfully copied to the system, the system is added to a list of targets on which to deploy ransomware. how_to_implement = You must be ingesting data that records the file-system activity from your hosts to populate the Endpoint file-system data-model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": [], "cis20": ["CIS 8"], "kill_chain_phases": ["Delivery"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = No false positives have been identified. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] @@ -2510,7 +2265,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for the execution of sc.exe with parameters that indicate the utility is being used to create a new Windows service, or modify an existing one. Attackers often create a new service to host their malicious code, or they may take a non-critical service or one that is disabled, and modify it to point to their malware and enable the service if necessary. It is unusual for a service to be created or modified using the sc.exe utility. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Persistence", "Privilege Escalation", "New Service", "Modify Existing Service", "Defense Evasion", "Disabling Security Tools"], "kill_chain_phases": ["Installation"], "cis20": ["CIS 3", "CIS 5", "CIS 8"], "nist": ["PR.IP", "PR.PT", "PR.AC", "PR.AT", "DE.CM"]} +annotations = {"mitre_attack": ["Persistence", "Privilege Escalation", "New Service", "Modify Existing Service", "Defense Evasion", "Disabling Security Tools"], "cis20": ["CIS 3", "CIS 5", "CIS 8"], "kill_chain_phases": ["Installation"], "nist": ["PR.IP", "PR.PT", "PR.AC", "PR.AT", "DE.CM"]} known_false_positives = Using sc.exe to manipulate Windows services is uncommon. However, there may be legitimate instances of this behavior. It is important to validate and investigate as appropriate. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2520,7 +2275,7 @@ asset_type = Endpoint confidence = medium explanation = The search looks for execution of schtasks.exe with parameters that indicate that a specific task "reset," whose name is associated with the Dragonfly threat actor--has been created or deleted. Schtasks.exe is a native Windows program that is used to schedule tasks on local or remote systems. Attackers often leverage this capability to schedule the execution of commands or establish persistence. how_to_implement = You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution", "Scheduled Task"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} +annotations = {"mitre_attack": ["Execution", "Scheduled Task"], "cis20": ["CIS 3"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.IP"]} known_false_positives = No known false positives providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2530,7 +2285,7 @@ asset_type = Endpoint confidence = medium explanation = The search looks for execution of schtasks.exe with parameters that indicate that specific task names related to the Bad Rabbit ransomware were created or deleted. The specific task name used are rhaegal, drogon and viserion_. Schtasks.exe is a native windows program that is used to schedule tasks on local or remote systems. Attackers often leverage this capability to schedule the execution of commands or establish persistence. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Persistence", "Lateral Movement", "Execution", "Scheduled Task"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} +annotations = {"mitre_attack": ["Persistence", "Lateral Movement", "Execution", "Scheduled Task"], "cis20": ["CIS 3"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.IP"]} known_false_positives = No known false positives providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2540,7 +2295,7 @@ asset_type = Endpoint confidence = medium explanation = The search looks for execution of schtasks.exe with parameters that indicate a task is being scheduled on a remote host. Schtasks.exe is a native windows program that is used to schedule tasks on local or remote systems. Attackers often leverage this capability to schedule the execution of commands or malicious executables on remote systems. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Persistence", "Lateral Movement", "Execution", "Scheduled Task", "Remote Services"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} +annotations = {"mitre_attack": ["Persistence", "Lateral Movement", "Execution", "Scheduled Task", "Remote Services"], "cis20": ["CIS 3"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.IP"]} known_false_positives = Administrators may create jobs on remote systems, but this activity is usually limited to a small set of hosts or users. It is important to validate and investigate as appropriate. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2550,7 +2305,7 @@ asset_type = Endpoint confidence = medium explanation = The search looks for execution of schtasks.exe with parameters that indicate a task is being scheduled that would cause a forced reboot on the host. Schtasks.exe is a native windows program that is used to schedule tasks on local or remote systems. Attackers often leverage this capability to schedule the execution of commands or establish persistence. This tactic is leveraged by the Bad Rabbit Ransomware. how_to_implement = To successfully implement this search you need to be ingesting logs with both the process name and command-line from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. -annotations = {"mitre_attack": ["Persistence", "Execution", "Scheduled Task"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} +annotations = {"mitre_attack": ["Persistence", "Execution", "Scheduled Task"], "cis20": ["CIS 3"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.IP"]} known_false_positives = Administrators may create jobs on systems forcing reboots to perform updates, maintenance, etc. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2560,7 +2315,7 @@ asset_type = Endpoint confidence = medium explanation = Attackers are increasingly abusing Windows Management Infrastructure for stealth, persistence, lateral movement, or just to leverage its functionality. This search looks for scripts launched via WMI, either remotely or locally, by looking for the execution of scrcons.exe, which is the scripting host used by WMI, similar to wscript or cscript. how_to_implement = You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution", "Windows Management Instrumentation"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} +annotations = {"mitre_attack": ["Execution", "Windows Management Instrumentation"], "cis20": ["CIS 3", "CIS 5"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} known_false_positives = Although unlikely, administrators may use wmi to launch scripts for legitimate purposes. providing_technologies = ["Carbon Black Response", "Sysmon", "Tanium", "Ziften"] @@ -2570,7 +2325,7 @@ asset_type = Endpoint confidence = high explanation = This search looks for files being created in `Windows\AppPatch\Custom and Windows\AppPatch\Custom64`, the location where shim databases are installed. It will return all the files created, as well as the time of creation for the first and last file for each endpoint. how_to_implement = You must be ingesting data that records the filesystem activity from your hosts to populate the Endpoint file-system data model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data. -annotations = {"mitre_attack": ["Persistence", "Application Shimming"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +annotations = {"mitre_attack": ["Persistence", "Application Shimming"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.CM"]} known_false_positives = Because legitimate shim files are created and used all the time, this event, in itself, is not suspicious. However, if there are other correlating events, it may warrant further investigation. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] @@ -2580,7 +2335,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for the execution of sdbinst.exe with command-line arguments of -q and -p. The -q option performs a silent installation with no visible window, status, or warning information. The -p option allows the shim database to contain patches. It will return the count, the first time, and the last time these command-line arguments were seen on each endpoint and by each user. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Persistence", "Application Shimming"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +annotations = {"mitre_attack": ["Persistence", "Application Shimming"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.CM"]} known_false_positives = None identified providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2600,7 +2355,7 @@ asset_type = Endpoint confidence = high explanation = This search returns all the processes for each endpoint and user and filters out any process that isn't 5 characters long and ends with .exe. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 2"], "nist": ["ID.AM", "PR.DS"]} +annotations = {"mitre_attack": ["Execution"], "cis20": ["CIS 2"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["ID.AM", "PR.DS"]} known_false_positives = Single-letter executables are not always malicious. Investigate this activity with your normal incident-response process. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2620,7 +2375,7 @@ asset_type = Endpoint confidence = low explanation = This search calculates counts the number of file modification events per hour per host in your environment. It then takes the average and standard deviations of those numbers and displays any hosts with more than 20 events that have over four times the standard deviation more than the average number of file modifications. how_to_implement = In order to implement this search, you must populate the Endpoint file-system data model node. This is typically populated via endpoint detection and response products, such as Carbon Black or endpoint data sources such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the file system. -annotations = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +annotations = {"mitre_attack": ["Execution"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.CM"]} known_false_positives = It is important to understand that if you happen to install any new applications on your hosts or are copying a large number of files, you can expect to see a large increase of file modifications. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2630,7 +2385,7 @@ asset_type = Splunk Server confidence = medium explanation = This search searches Splunk's internal logs for evidence of CVE-2018-11409 exploitation attempts. how_to_implement = The REST endpoint that exposes system information is also necessary for the proper operation of Splunk clustering and instrumentation. Whitelisting your Splunk systems will reduce false positives. -annotations = {"mitre_attack": ["Defense Evasion", "Exploitation of Vulnerability"], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 3", "CIS 4", "CIS 18"], "nist": ["ID.RA", "RS.MI", "PR.PT", "PR.AC", "PR.IP", "DE.CM"]} +annotations = {"mitre_attack": ["Defense Evasion", "Exploitation of Vulnerability"], "cis20": ["CIS 3", "CIS 4", "CIS 18"], "kill_chain_phases": ["Delivery"], "nist": ["ID.RA", "RS.MI", "PR.PT", "PR.AC", "PR.IP", "DE.CM"]} known_false_positives = Retrieving server information may be a legitimate API request. Verify that the attempt is a valid request for information. providing_technologies = ["Splunk Enterprise"] @@ -2640,7 +2395,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for changes made to the registry that control Windows file associations. It is typical for users to change the file association to open certain types of files with specific applications. However, when these changes are legitimately performed, they are typically done via the processes explorer.exe or openwith.exe. The search first executes the subsearch that looks at the Registry node, which specifies setting a value in the registry and creates a table of process_id and dest. It then uses those arguments to find out what process and parent process were responsible for making those registry changes. how_to_implement = To successfully implement this search you need to be ingesting information on registry changes that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` and `Registry` nodes. -annotations = {"mitre_attack": ["Persistence", "Change Default File Association"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 8"], "nist": ["DE.CM", "PR.PT", "PR.IP"]} +annotations = {"mitre_attack": ["Persistence", "Change Default File Association"], "cis20": ["CIS 3", "CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.CM", "PR.PT", "PR.IP"]} known_false_positives = There may be other processes in your environment that users may legitimately use to modify file associations. If this is the case and you are finding false positives, you can modify the search to add those processes as exceptions. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2650,7 +2405,7 @@ asset_type = Endpoint confidence = medium explanation = This detection monitors for emails that are suspicious because of their sender, domain rareness, or behavior differences, as determined by Splunk UBA. In this search, we query the "UEBA" data model to look for anomalies that are raised by the "SuspiciousEmailDetectionModel" and will output the count, description of the anomaly, signature, the type of event in UBA, the severity, and the user who received a potentially suspicious email from a newly seen domain. It will also output all the categories associated with that anomaly. how_to_implement = You must be ingesting data from email logs and have Splunk integrated with UBA. This anomaly is raised by a UBA detection model called "SuspiciousEmailDetectionModel." Ensure that this model is enabled on your UBA instance. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} +annotations = {"mitre_attack": [], "cis20": ["CIS 7"], "kill_chain_phases": ["Delivery"], "nist": ["PR.IP"]} known_false_positives = This detection model will alert on any sender domain that is seen for the first time. This could be a potential false positive. The next step is to investigate and whitelist the URL if you determine that it is a legitimate sender. providing_technologies = ["Microsoft Exchange"] @@ -2660,11 +2415,9 @@ asset_type = Endpoint confidence = high explanation = This search looks at any email messages with attachments and checks the file names of those attachments against an included lookup file to see if it has a suspicious file extension. how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. \ -\ **Splunk Phantom Playbook Integration**\ -\ If Splunk Phantom is also configured in your environment, a Playbook called "Suspicious Email Attachment Investigate and Delete" can be configured to run when any results are found by this detection search. To use this integration, install the Phantom App for Splunk `https://splunkbase.splunk.com/app/3411/`, and add the correct hostname to the "Phantom Instance" field in the Adaptive Response Actions when configuring this detection search. The notable event will be sent to Phantom and the playbook will gather further information about the file attachment and its network behaviors. If Phantom finds malicious behavior and an analyst approves of the results, the email will be deleted from the user's inbox. -annotations = {"mitre_attack": ["Execution", "Defense Evasion"], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 3", "CIS 7", "CIS 12"], "nist": ["DE.AE", "PR.IP"]} +annotations = {"mitre_attack": ["Execution", "Defense Evasion"], "cis20": ["CIS 3", "CIS 7", "CIS 12"], "kill_chain_phases": ["Delivery"], "nist": ["DE.AE", "PR.IP"]} known_false_positives = None identified providing_technologies = ["Microsoft Exchange"] @@ -2674,7 +2427,7 @@ asset_type = Endpoint confidence = high explanation = This search looks at files being created or modified in the Endpoint file-system data model. The names of those files are checked against an included lookup file, which contains the names of files associated with malware or attack activity. The search returns any files with matching names, along with a note (also specified in the lookup file) that gives or points to more information about the files. how_to_implement = You must be ingesting data that records the filesystem activity from your hosts to populate the Endpoint file-system data model node. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or via other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file system reads and writes. In addition, this search leverages an included lookup file that contains the names of the files to watch for, as well as a note to communicate why that file name is being monitored. This lookup file can be edited to add or remove file the file names you want to monitor. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": [], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = It's possible for a legitimate file to be created with the same name as one noted in the lookup file. Filenames listed in the lookup file should be unique enough that collisions are rare. Looking at the location of the file and the process responsible for the activity can help determine whether or not the activity is legitimate. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] @@ -2684,7 +2437,7 @@ asset_type = Endpoint confidence = medium explanation = The search leverages HTTP form data from typically POST events that can be captured with Splunk streams or similar wire data capture tools. The search looks for java classes like `processbuilder` and `runtime` are used to create a new process and execute commands inside java, and are synonymous with spawning a shell. There are very exceptional reasons to ever these classes in Java via an HTTP API and hence when seen are highly suspicious. Also, this is a common vectors leverage to exploit Apache Struts. how_to_implement = In order to properly run this search, Splunk needs to ingest data from your web-traffic appliances that serve or sit in the path of your Struts application servers. This can be accomplished by indexing data from a web proxy, or by using network traffic-analysis tools, such as Splunk Stream or Bro. -annotations = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Exploitation"], "cis20": ["CIS 7", "CIS 12"], "nist": ["DE.AE"]} +annotations = {"mitre_attack": ["Execution"], "cis20": ["CIS 7", "CIS 12"], "kill_chain_phases": ["Exploitation"], "nist": ["DE.AE"]} known_false_positives = There are no known false positives. providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Apache"] @@ -2694,7 +2447,7 @@ asset_type = Endpoint confidence = high explanation = In this search, we are essentially trying to detect if a LNK file created under the C:\User* or *\Local\Temp\* directory structures is launching a process with in 1 hour of its creation. LNK files or also known as Windows shortcut files are commonly associated with phishing and are a [preferred method used for exploitation](https://www.fireeye.com/blog/threat-research/2017/04/fin7-phishing-lnk.html). how_to_implement = You must be ingesting data that records filesystem and process activity from your hosts to populate the Endpoint data model. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or endpoint data sources, such as Sysmon. -annotations = {"mitre_attack": ["Initial Access", "Spearphishing Attachment"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 7", "CIS 8"], "nist": ["ID.AM", "PR.DS"]} +annotations = {"mitre_attack": ["Initial Access", "Spearphishing Attachment"], "cis20": ["CIS 7", "CIS 8"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "nist": ["ID.AM", "PR.DS"]} known_false_positives = This detection should yield little or no false positive results. It is uncommon for LNK files to execute process from temporary or user directories. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2704,7 +2457,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for the execution of reg.exe with a parent process of cmd.exe. It then executes a subsearch looking for those cmd.exe processes with a parent that is not explorer.exe. It then joins those two searches to make sure that the reg.exe process is a grandchild of the non explorer.exe process. The search will return the number of such instances and the first and last time this activity has been seen on each endpoint and user. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Defense Evasion", "Modify Registry", "Disabling Security Tools"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +annotations = {"mitre_attack": ["Defense Evasion", "Modify Registry", "Disabling Security Tools"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.CM"]} known_false_positives = It's possible for system administrators to write scripts that exhibit this behavior. If this is the case, the search will need to be modified to filter them out. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2714,7 +2467,7 @@ asset_type = confidence = medium explanation = This search looks for execution of wevtutil.exe with command-line arguments that indicate that it has been used to delete the setup, application, security, or system event logs. The search returns the number of times the behavior was observed, the first and last time it was seen, the host exhibiting the behavior and the user context of the process execution. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Defense Evasion", "Indicator Removal on Host"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 6"], "nist": ["DE.DP", "PR.IP", "PR.PT", "PR.AC", "PR.AT", "DE.AE"]} +annotations = {"mitre_attack": ["Defense Evasion", "Indicator Removal on Host"], "cis20": ["CIS 3", "CIS 5", "CIS 6"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "PR.IP", "PR.PT", "PR.AC", "PR.AT", "DE.AE"]} known_false_positives = The wevtutil.exe application is a legitimate Windows event log utility. Administrators may use it to manage Windows event logs. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2744,7 +2497,7 @@ asset_type = Endpoint confidence = medium explanation = This search returns all the processes that are not executing out of the C:\Windows\System32 or C:\Windows\SysWOW64 directories. It then uses a regular expression to extract the file name of the running process. Next, it takes the filename and looks it up in a table of files that should normally run out of the C:\Windows\System32 or C:\Windows\SysWOW64 directory. Any matches are then returned. how_to_implement = To successfully implement this search you need to ingest details about process execution from your hosts. Specifically, this search requires the process name and the full path to the process executable. -annotations = {"mitre_attack": ["Defense Evasion", "Masquerading"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Defense Evasion", "Masquerading"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = None identified providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2754,7 +2507,7 @@ asset_type = Endpoint confidence = medium explanation = The search leverages the Enterprise Security Network_Traffic data model to look for network traffic that has been identified as TOR and marked as 'allowed'. how_to_implement = In order to properly run this search, Splunk needs to ingest data from firewalls or other network control devices that mediate the traffic allowed into an environment. This is necessary so that the search can identify an 'action' taken on the traffic of interest. The search requires the Network_Traffic data model be populated. -annotations = {"mitre_attack": ["Command and Control", "Commonly Used Port", "Exfiltration"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 9", "CIS 12"], "nist": ["DE.AE"]} +annotations = {"mitre_attack": ["Command and Control", "Commonly Used Port", "Exfiltration"], "cis20": ["CIS 9", "CIS 12"], "kill_chain_phases": ["Command and Control"], "nist": ["DE.AE"]} known_false_positives = None at this time providing_technologies = ["Palo Alto Firewall", "Bro", "Splunk Stream"] @@ -2764,7 +2517,7 @@ asset_type = Endpoint confidence = medium explanation = This search looks for the execution of fsutil.exe with command-line arguments to delete the USN journal. The search returns the count of the number of times it's seen this process execution with these arguments, the first and last time it's seen this behavior, the hosts it was executed on, and the user context under which it was executed. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Defense Evasion", "Indicator Removal on Host"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 6", "CIS 8", "CIS 10"], "nist": ["DE.CM", "PR.PT", "DE.AE", "DE.DP", "PR.IP"]} +annotations = {"mitre_attack": ["Defense Evasion", "Indicator Removal on Host"], "cis20": ["CIS 6", "CIS 8", "CIS 10"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.CM", "PR.PT", "DE.AE", "DE.DP", "PR.IP"]} known_false_positives = None identified providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2774,7 +2527,7 @@ asset_type = Endpoint confidence = high explanation = This search returns the number of times, as well as the first and last time, it has seen every process run for each endpoint and user, and then displays only those processes that you have marked as uncommon in the `uncommon_processes_default.csv` table. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. This search uses a lookup file `uncommon_processes_default.csv` to track various features of process names that are usually uncommon in most environments. Please consider updating `uncommon_processes_local.csv` to hunt for processes that are uncommon in your environment. -annotations = {"mitre_attack": ["Execution", "Accessibility Features"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 2"], "nist": ["ID.AM", "PR.DS"]} +annotations = {"mitre_attack": ["Execution", "Accessibility Features"], "cis20": ["CIS 2"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["ID.AM", "PR.DS"]} known_false_positives = None identified providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2794,7 +2547,7 @@ asset_type = confidence = medium explanation = This search calculates the average and standard deviation for the length of the command lines on each of your endpoints and alerts when it detects a command line with a length over 10 times the standard deviation larger than the average command line. how_to_implement = You must be ingesting endpoint data that tracks process activity, including parent-child relationships, from your endpoints to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the "process" field in the Endpoint data model. -annotations = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Execution"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = Some legitimate applications start with long command lines. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2804,7 +2557,7 @@ asset_type = confidence = medium explanation = This search leverages the Machine Learning Toolkit (MLTK) to identify outliers in the length of the command lines observed to be used by a specific user. The companion search, "Baseline of Command Line Length - MLTK," creates a machine-learning (ML) model built over the historical data used by this search. The determination of what is considered an outlier may be adjusted via the threshold parameter in the search. More information on the algorithm used can be found at `https://docs.splunk.com/Documentation/MLApp/4.2.0/User/Algorithms#DensityFunction`. how_to_implement = You must be ingesting endpoint data that monitors command lines and populates the Endpoint data model in the Processes node. The command-line arguments are mapped to the "process" field in the Endpoint data model. In addition, MLTK version >= 4.2 must be installed on your search heads, along with any required dependencies. Finally, the support search "Baseline of Command Line Length - MLTK" must be executed before this detection search, as it builds an ML model over the historical data used by this search. It is important that this search is run in the same app context as the associated support search, so that the model created by the support search is available for use. You should periodically re-run the support search to rebuild the model with the latest data available in your environment. -annotations = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +annotations = {"mitre_attack": ["Execution"], "cis20": ["CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.CM"]} known_false_positives = Some legitimate applications use long command lines for installs or updates. You should review identified command lines for legitimacy. You may modify the first part of the search to omit legitimate command lines from consideration. If you are seeing more results than desired, you may consider changing the value of threshold in the search to a smaller value. You should also periodically re-run the support search to re-build the ML model on the latest data. You may get unexpected results if the user identified in the results is not present in the data used to build the associated model. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2814,7 +2567,7 @@ asset_type = Web Server confidence = high explanation = This detection search uses HTTP traffic data captured with Splunk Stream. The search is constructed to use "stream:http" sourcetype and counts of the number of times an HTTP request is received by a destination which the length of the Content-Type header value the client sends the server is greater than 100 characters long. We calculate this content_type_length field and output the results. how_to_implement = This particular search leverages data extracted from Stream:HTTP. You must configure the http stream using the Splunk Stream App on your Splunk Stream deployment server to extract the cs_content_type field. -annotations = {"mitre_attack": ["Defense Evasion", "Exploitation of Vulnerability"], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 3", "CIS 4", "CIS 18", "CIS 12"], "nist": ["ID.RA", "RS.MI", "PR.PT", "PR.IP", "DE.AE", "PR.MA", "DE.CM"]} +annotations = {"mitre_attack": ["Defense Evasion", "Exploitation of Vulnerability"], "cis20": ["CIS 3", "CIS 4", "CIS 18", "CIS 12"], "kill_chain_phases": ["Delivery"], "nist": ["ID.RA", "RS.MI", "PR.PT", "PR.IP", "DE.AE", "PR.MA", "DE.CM"]} known_false_positives = Very few legitimate Content-Type fields will have a length greater than 100 characters. providing_technologies = ["Splunk Stream"] @@ -2824,7 +2577,7 @@ asset_type = Endpoint confidence = medium explanation = Attackers are increasingly abusing Windows Management Infrastructure (WMI) for stealth, persistence, lateral movement, or just to leverage its functionality. This search looks for the creation of a WMI event subscription by watching for Windows event ID 5861. how_to_implement = To successfully implement this search, you must be ingesting the Windows WMI activity logs. This can be done by adding a stanza to inputs.conf on the system generating logs with a title of [WinEventLog://Microsoft-Windows-WMI-Activity/Operational]. -annotations = {"mitre_attack": ["Execution", "Windows Management Instrumentation", "Persistence", "Windows Management Instrumentation Event Subscription"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} +annotations = {"mitre_attack": ["Execution", "Windows Management Instrumentation", "Persistence", "Windows Management Instrumentation Event Subscription"], "cis20": ["CIS 3", "CIS 5"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} known_false_positives = Although unlikely, administrators may use event subscriptions for legitimate purposes. providing_technologies = ["Microsoft Windows"] @@ -2834,7 +2587,7 @@ asset_type = Endpoint confidence = medium explanation = Attackers are increasingly abusing Windows Management Infrastructure (WMI) for stealth, persistence, lateral movement, or just to leverage its functionality. This search looks for the creation of a WMI event subscription by watching for Sysmon event ID 21. how_to_implement = To successfully implement this search, you must be collecting Sysmon data using Sysmon version 6.1 or greater and have Sysmon configured to generate alerts for WMI activity. In addition, you must have at least version 6.0.4 of the Sysmon TA installed to properly parse the fields. -annotations = {"mitre_attack": ["Execution", "Windows Management Instrumentation", "Persistence", "Windows Management Instrumentation Event Subscription"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} +annotations = {"mitre_attack": ["Execution", "Windows Management Instrumentation", "Persistence", "Windows Management Instrumentation Event Subscription"], "cis20": ["CIS 3", "CIS 5"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} known_false_positives = Although unlikely, administrators may use event subscriptions for legitimate purposes. providing_technologies = ["Microsoft Windows"] @@ -2844,7 +2597,7 @@ asset_type = Endpoint confidence = medium explanation = Attackers are increasingly abusing Windows Management Infrastructure (WMI) for stealth, persistence, lateral movement, or just to leverage its functionality. This search looks for the creation of a WMI temporary event subscription by watching for Windows event ID 5860. how_to_implement = To successfully implement this search, you must be ingesting the Windows WMI activity logs. This can be done by adding a stanza to inputs.conf on the system generating logs with a title of [WinEventLog://Microsoft-Windows-WMI-Activity/Operational]. -annotations = {"mitre_attack": ["Execution", "Windows Management Instrumentation", "Persistence", "Windows Management Instrumentation Event Subscription"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} +annotations = {"mitre_attack": ["Execution", "Windows Management Instrumentation", "Persistence", "Windows Management Instrumentation Event Subscription"], "cis20": ["CIS 3", "CIS 5"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} known_false_positives = Some software may create WMI temporary event subscriptions for various purposes. The included search contains an exception for two of these that occur by default on Windows 10 systems. You may need to modify the search to create exceptions for other legitimate events. providing_technologies = ["Microsoft Windows"] @@ -2854,7 +2607,7 @@ asset_type = Account confidence = medium explanation = When a fraudster is setting the stage for a campaign, they will often create many user accounts on the website. This is a simple example of how to detect a many-account creation hosted on a Magento2 e-commerce platform, where the fraudster is using email addresses from a single email domain. how_to_implement = We start with a dataset that provides visibility into the email address used for the account creation. In this example, we are narrowing our search down to the single web page that hosts the Magento2 e-commerce platform (via URI) used for account creation, the single http content-type to grab only the user's clicks, and the http field that provides the username (form_data), for performance reasons. After we have the username and email domain, we look for numerous account creations per email domain. Common data sources used for this detection are customized Apache logs or Splunk Stream. -annotations = {"mitre_attack": ["Persistence", "Create Account"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.CM", "DE.DP"]} +annotations = {"mitre_attack": ["Persistence", "Create Account"], "cis20": ["CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.CM", "DE.DP"]} known_false_positives = As is common with many fraud-related searches, we are usually looking to attribute risk or synthesize relevant context with loosely written detections that simply detect anamolous behavior. This search will need to be customized to fit your environment—improving its fidelity by counting based on something much more specific, such as a device ID that may be present in your dataset. Consideration for whether the large number of registrations are occuring from a first-time seen domain may also be important. Extending the search window to look further back in time, or even calculating the average per hour/day for each email domain to look for an anomalous spikes, will improve this search. You can also use Shannon entropy or Levenshtein Distance (both courtesy of URL Toolbox) to consider the randomness or similarity of the email name or email domain, as the names are often machine-generated. providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] @@ -2864,7 +2617,7 @@ asset_type = account confidence = medium explanation = It's suspicious when someone or something is moving throughout your website too quickly or with a perfect click cadence. Fortunately, it's easy to detect by calculating the time between clicks for each session and highlighting the anomalous behavior. how_to_implement = Start with a dataset that allows you to see clickstream data for each user click on the website. That data must have a time stamp and must contain a reference to the session identifier being used by the website. This ties the clicks together into clickstreams. This value is usually found in the http cookie. With a bit of tuning, a version of this search could be used in high-volume scenarios, such as scraping, crawling, application DDOS, credit-card testing, account takeover, etc. Common data sources used for this detection are customized Apache logs, customized IIS, and Splunk Stream. -annotations = {"mitre_attack": ["Initial Access", "Valid Accounts"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 6"], "nist": ["DE.AE", "DE.CM"]} +annotations = {"mitre_attack": ["Initial Access", "Valid Accounts"], "cis20": ["CIS 6"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.AE", "DE.CM"]} known_false_positives = As is common with many fraud-related searches, we are usually looking to attribute risk or synthesize relevant context with loosly written detections that simply detect anamoluous behavior. providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] @@ -2884,7 +2637,7 @@ asset_type = Web Server confidence = medium explanation = This detection search uses the Enterprise Security Endpoint data model. The search uses tstats to search within an accelerated data model to find suspicious applications or processes such as whoami, ping, iptables, wget, service, or curl, running on hosts which are marked as web servers in the Assets and Identity Framework of ES. how_to_implement = You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model. In addition, web servers will need to be identified in the Assets and Identity Framework of Enterprise Security. -annotations = {"mitre_attack": ["Defense Evasion", "Exploitation of Vulnerability", "Execution", "Discovery", "System Information Discovery"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} +annotations = {"mitre_attack": ["Defense Evasion", "Exploitation of Vulnerability", "Execution", "Discovery", "System Information Discovery"], "cis20": ["CIS 3"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.IP"]} known_false_positives = Some of these processes may be used legitimately on web servers during maintenance or other administrative tasks. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2894,7 +2647,7 @@ asset_type = Endpoint confidence = high explanation = This search looks at the Windows security and system event logs. EventCode 1002 in the security log indicates that the log has been cleared, EventCode 1000 in the security log indicates the event logging service has been shut down, and EventCode 104 in the system log indicates the application log has been cleared. If any of these events are found, a notable will be generated. how_to_implement = To successfully implement this search, you need to be ingesting Windows event logs from your hosts. -annotations = {"mitre_attack": ["Defense Evasion", "Indicator Removal on Host"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 6"], "nist": ["DE.DP", "PR.IP", "PR.AC", "PR.AT", "DE.AE"]} +annotations = {"mitre_attack": ["Defense Evasion", "Indicator Removal on Host"], "cis20": ["CIS 3", "CIS 5", "CIS 6"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "PR.IP", "PR.AC", "PR.AT", "DE.AE"]} known_false_positives = It is possible that these logs may be legitimately cleared by Administrators. providing_technologies = ["Microsoft Windows"] @@ -2904,7 +2657,7 @@ asset_type = Endpoint confidence = high explanation = The hosts file is present on both Windows and Linux endpoints. The purpose of the hosts file is to provide a mapping between hostnames and IP addresses, the same way DNS is used to provide such a mapping. However, the information in the hosts file takes precedence over information received via DNS and a DNS query will not be issued if the hostname of interest is found in the hosts file. As such, attackers have been observed adding entries to the host file to override any DNS resolution. For this reason, it is useful to monitor for changes to this file, which typically do not occur very often in legitimate cases. how_to_implement = To successfully implement this search, you must be ingesting data that records the file-system activity from your hosts to populate the Endpoint.Filesystem data model node. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or by other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file-system reads and writes. -annotations = {"mitre_attack": ["Command and Control", "Exfiltration"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 3", "CIS 8", "CIS 12"], "nist": ["PR.IP", "PR.PT", "PR.AC", "DE.AE", "DE.CM"]} +annotations = {"mitre_attack": ["Command and Control", "Exfiltration"], "cis20": ["CIS 3", "CIS 8", "CIS 12"], "kill_chain_phases": ["Command and Control"], "nist": ["PR.IP", "PR.PT", "PR.AC", "DE.AE", "DE.CM"]} known_false_positives = There may be legitimate reasons for system administrators to add entries to this file. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] @@ -2972,9 +2725,7 @@ latest_time_offset = 0 type = investigation explanation = none how_to_implement = If Splunk>Phantom is also configured in your environment, a Playbook called "DNS Hijack Enrichment" can be configured to run when any results are found by this detection search. The playbook takes in the DNS record changed and uses Geoip, whois, Censys and PassiveTotal to detect if DNS issuers changed. To use this integration, install the Phantom App for Splunk `https://splunkbase.splunk.com/app/3411/`, add the correct hostname to the "Phantom Instance" field in the Adaptive Response Actions when configuring this detection search, and set the corresponding Playbook to active. \ -\ (Playbook Link:`https://my.phantom.us/4.2/playbook/dns-hijack-enrichment/`).\ -\ known_false_positives = None at this time earliest_time_offset = -70m@m @@ -3268,6 +3019,14 @@ known_false_positives = None at this time earliest_time_offset = 14400 latest_time_offset = 0 +[savedsearch://ESCU - Investigate Cloud Compute Instance Activities] +type = investigation +explanation = none +how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. +known_false_positives = None at this time +earliest_time_offset = 7200 +latest_time_offset = 0 + [savedsearch://ESCU - Investigate Network Traffic From src_ip] type = investigation explanation = none @@ -3292,6 +3051,22 @@ known_false_positives = None at this time earliest_time_offset = 3600 latest_time_offset = 3600 +[savedsearch://ESCU - Investigate User Activities In All Cloud Regions] +type = investigation +explanation = none +how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. +known_false_positives = None at this time +earliest_time_offset = -70m@m +latest_time_offset = -10m@m + +[savedsearch://ESCU - Investigate User Activities In Single Cloud Region] +type = investigation +explanation = none +how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. +known_false_positives = None at this time +earliest_time_offset = -70m@m +latest_time_offset = -10m@m + [savedsearch://ESCU - Investigate Web Activity From Host] type = investigation explanation = none @@ -3482,6 +3257,34 @@ how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or lat known_false_positives = providing_technologies = ["AWS"] +[savedsearch://ESCU - Previously Seen Cloud Compute Creations By User] +type = support +explanation = In this support search, we create a table of the earliest and latest time for each user that has created a cloud compute instance. +how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. +known_false_positives = +providing_technologies = ["AWS", "Azure", "GCP"] + +[savedsearch://ESCU - Previously Seen Cloud Compute Images] +type = support +explanation = In this support search, we create a table of the earliest and latest time for each image id that has been seen. This table is then outputted to a csv file. +how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. +known_false_positives = +providing_technologies = ["AWS", "Azure", "GCP"] + +[savedsearch://ESCU - Previously Seen Cloud Compute Instance Types] +type = support +explanation = In this support search, we create a table of the first time `firstTime` and most recent time `lastTime` that the compute type has been seen in our dataset. We only look for those events where an instance has been created. All of these entries will be added to the `previously_seen_cloud_compute_instance_types` lookup file, which will act as a baseline for detections. +how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. +known_false_positives = +providing_technologies = ["AWS", "Azure", "GCP"] + +[savedsearch://ESCU - Previously Seen Cloud Regions] +type = support +explanation = In this support search, we create a table of the first time `firstTime` and most recent time `lastTime` that this region has been seen in our dataset, grouped by the region. We only look for those events where an instance has been started. All of these entries will be added to the `previously_seen_cloud_regions` lookup file, which will act like a baseline for detections. +how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. +known_false_positives = +providing_technologies = ["AWS", "Azure", "GCP"] + [savedsearch://ESCU - Previously Seen EC2 AMIs] type = support explanation = In this support search, we create a table of the earliest and latest time that a specific AMI ID has been seen. This table is then outputted to a csv file. diff --git a/package/default/app.conf b/package/default/app.conf index 32385d8238..0484340cb1 100644 --- a/package/default/app.conf +++ b/package/default/app.conf @@ -4,7 +4,7 @@ is_configured = false state = enabled state_change_requires_restart = false -build = 1977 +build = 2744 [triggers] reload.analytic_stories = simple @@ -20,7 +20,7 @@ reload.content-version = simple [launcher] author = Splunk -version = 1.0.42 +version = 1.0.43 description = Explore the Analytic Stories included with ES Content Updates. [ui] diff --git a/package/default/commands.conf b/package/default/commands.conf index 72754f41d8..68b2c3fc5c 100644 --- a/package/default/commands.conf +++ b/package/default/commands.conf @@ -6,23 +6,3 @@ chunked = true filename = runstory.py chunked = true is_risky = true - -[detect] -filename = detect.py -run_in_preview = false -outputheader = true -enableheader = true -requires_srinfo = true -supports_getinfo = true -supports_multivalues = true -supports_rawargs = true - -[investigate] -filename = investigate.py -run_in_preview = false -outputheader = true -enableheader = true -requires_srinfo = true -supports_getinfo = true -supports_multivalues = true -supports_rawargs = true \ No newline at end of file diff --git a/package/default/content-version.conf b/package/default/content-version.conf index c7fe6fc150..340d794e05 100644 --- a/package/default/content-version.conf +++ b/package/default/content-version.conf @@ -1,2 +1,2 @@ [content-version] -version = 1.0.42 +version = 1.0.43 diff --git a/package/default/data/ui/views/run_detections.xml b/package/default/data/ui/views/run_detections.xml deleted file mode 100644 index 03135d3449..0000000000 --- a/package/default/data/ui/views/run_detections.xml +++ /dev/null @@ -1,88 +0,0 @@ -
- - - | detect story="$title$" risk="$risk$" earliest_time=$earliest$ latest_time=$latest$ - -
- - - title - title - - | rest /services/configs/conf-analytic_stories splunk_server=local count=0 | fields title | sort title - -24h@h - now - - - - - True - False - false - - - - if(isnum('earliest'),'earliest',relative_time(now(),'earliest') - if(isnum('latest'),'latest',relative_time(now(),'latest') - - - - -24h@h - now - - -
- - - Support Searches - - - | dedup support_search_name | table support_search_name - - - - -
-
-
- - - Detection search results - - REsultss - - | stats count values(story) as story values(detection_search_name) as detection_search_name values(mappings) as mappings by common_field risk_score risk_object risk_object_type - - - - - - [#53A051,#006D9C,#F8BE34,#F1813F,#DC4E41] - 0,30,70,100 - - - [#53A051,#F8BE34,#F1813F,#DC4E41] - 5,80,100 - - -
-
-
- - - Number of results per entity - - Top Entities - - | mvexpand entities | stats count values(detection_name) as detection_name by entities | table detection_name count entities| sort - count - - - - - [#53A051,#DC4E41] - 2 - -
-
-
-
\ No newline at end of file diff --git a/package/default/macros.conf b/package/default/macros.conf index 57a1df4492..06dc16424d 100644 --- a/package/default/macros.conf +++ b/package/default/macros.conf @@ -1,6 +1,6 @@ ############# # Automatically generated by generator.py in splunk/security-content -# On Date: 2019-10-31T20:21:15 UTC +# On Date: 2019-11-05T20:06:23 UTC # Author: Splunk Security Research # Contact: research@splunk.com ############# @@ -85,18 +85,34 @@ description = This macro limits the output to process names that are in the Wind definition = `comment(Use this macro to add additional filters for monitoring users that create cloud compute images)` description = Use this macro to add additional filters for monitoring users that create cloud compute images +[previously_seen_cloud_compute_creations_by_user_search_window_begin_offset] +definition = -70m@m +description = Use this macro to determine how far into the past the window should be to determine if the user is new or not + [previously_seen_cloud_compute_image_input_filter] definition = `comment(Use this macro to add additional filters for monitoring cloud compute images)` description = Use this macro to add additional filters for monitoring cloud compute images +[previously_seen_cloud_compute_image_search_window_begin_offset] +definition = -70m@m +description = Use this macro to determine how far into the past the window should be to determine if the image is new or not + [previously_seen_cloud_compute_instance_types_input_filter] definition = `comment(Use this macro to add additional filters for monitoring cloud compute instance types)` description = Use this macro to add additional filters for monitoring cloud compute instance types +[previously_seen_cloud_compute_instance_types_search_window_begin_offset] +definition = -70m@m +description = Use this macro to determine how far into the past the window should be to determine if the instance type is new or not + [previously_seen_cloud_regions_input_filter] definition = `comment(Use this macro to add additional filters for monitoring your cloud regions)` description = Use this macro to add additional filters for monitoring your cloud regions +[previously_seen_cloud_regions_search_window_begin_offset] +definition = -70m@m +description = Use this macro to determine how far into the past the window should be to determine if the region is new or not + [prohibited_apps_launching_cmd] definition = | inputlookup prohibited_apps_launching_cmd | rename prohibited_applications as parent_process_name | eval parent_process_name="*" . parent_process_name | table parent_process_name description = This macro outputs a list of process that should not be the parent process of cmd.exe diff --git a/package/default/savedsearches.conf b/package/default/savedsearches.conf index 3b4a7f41ec..64f57f2883 100644 --- a/package/default/savedsearches.conf +++ b/package/default/savedsearches.conf @@ -1,6 +1,6 @@ ############# # Automatically generated by generator.py in splunk/security-content -# On Date: 2019-10-31T20:21:14 UTC +# On Date: 2019-11-05T20:06:23 UTC # Author: Splunk Security Research # Contact: research@splunk.com ############# @@ -865,12 +865,12 @@ search = | tstats `summariesonly` count, values(DNS.dest) AS dest dc(DNS.dest) a [ESCU - Cloud Compute Instance Created By Previously Unseen User - Rule] action.escu = 0 action.escu.enabled = 1 -description = This search looks for cloud compute instances being created by users who have not created them before. +description = This search looks for cloud compute instances created by users who have not created them before. action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -action.escu.data_models = ["Cloud"] -action.escu.eli5 = The search returns the first time seen, last time seen, and the systems for each user. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each user back to the lookup file and then clears out any output. The other part of the search limits the results to when the user was seen for the first time no longer than 70 minutes previously. It then displays the new user, the instances created by them, and the times associated. -action.escu.how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. Run the "Previously Seen Cloud Compute Creations By User" support search to create of baseline of previously seen users. -action.escu.known_false_positives = It's possible that a user will start to create compute instances when they haven't before for any number of reasons. Verify with the user that is launching instances that this is the intended behavior. +action.escu.data_models = ["Cloud_Infrastructure"] +action.escu.eli5 = For each user, the search returns the first time seen, last time seen, and the systems. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each user back to the lookup file and then clears out any output. The other part of the search limits the results to when the user was seen for the first time within the previous 70 minutes. It then displays the new user, the instances created by that user, and the associated times. +action.escu.how_to_implement = You must be ingesting the appropriate cloud-infrastructure logs and have the Security Research cloud data model (https://github.com/splunk/cloud-datamodel-security-research/) installed. Run the "Previously Seen Cloud Compute Creations By User" support search to create of baseline of previously seen users. +action.escu.known_false_positives = It's possible that a user will start to create compute instances for the first time, for any number of reasons. Verify with the user launching instances that this is the intended behavior. action.escu.creation_date = 2019-10-03 action.escu.modification_date = 2018-03-12 action.escu.confidence = medium @@ -893,7 +893,7 @@ action.notable.param.rule_title = Cloud Compute Instance Created By Previously U action.notable.param.security_domain = endpoint action.notable.param.severity = medium action.notable.param.drilldown_name = Show all instances created by $src_user$ -action.notable.param.drilldown_search = | from datamodel:Cloud_Draft_v6.Compute | action=run src_user=$src_user$ +action.notable.param.drilldown_search = | from datamodel:Cloud_Infrastructure.Compute | action=run src_user=$src_user$ action.notable.param.recommended_actions = escu_investigate action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1.[[action|escu_investigate]]: Based on ESCU investigate recommendations:\nESCU - Investigate User Activities In All Cloud Regions\nESCU - Investigate Cloud Compute Instance Activities\n"} action.risk = 1 @@ -915,19 +915,19 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats earliest(_time) as firstTime, latest(_time) as lastTime values(Compute.dest) as dest from datamodel=Cloud_Draft_v6.Compute where Compute.action=run by Compute.src_user | `drop_dm_object_name("Compute")` | inputlookup append=t previously_seen_cloud_compute_creations_by_user | stats min(firstTime) as firstTime max(lastTime) as lastTime, values(dest) as dest by src_user | multireport [| table src_user, firstTime, lastTime | outputlookup previously_seen_cloud_compute_creations_by_user | where fact=fiction][| eval new_user=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where new_user=1 | convert ctime(firstTime) ctime(lastTime)] | table src_user, dest, firstTime, lastTime +search = | tstats earliest(_time) as firstTime, latest(_time) as lastTime values(Compute.dest) as dest from datamodel=Cloud_Infrastructure.Compute where Compute.action=run by Compute.src_user | `drop_dm_object_name("Compute")` | inputlookup append=t previously_seen_cloud_compute_creations_by_user | stats min(firstTime) as firstTime max(lastTime) as lastTime, values(dest) as dest by src_user | multireport [| table src_user, firstTime, lastTime | outputlookup previously_seen_cloud_compute_creations_by_user | where fact=fiction][| eval new_user=if(firstTime >= relative_time(now(), `previously_seen_cloud_compute_creations_by_user_search_window_begin_offset`), 1, 0) | where new_user=1 | convert ctime(firstTime) ctime(lastTime)] | table src_user, dest, firstTime, lastTime [ESCU - Cloud Compute Instance Created With Previously Unseen Image - Rule] action.escu = 0 action.escu.enabled = 1 -description = This search looks for cloud compute instances being created with previously unseen image ids. +description = This search looks for cloud compute instances being created with previously unseen image IDs. action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -action.escu.data_models = ["Cloud"] -action.escu.eli5 = The search returns the first time seen, last time seen, and the systems for each image id and user. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each image back to the lookup file and then clears out any output. The other part of the search limits the results to when the image was seen for the first time no longer than 70 minutes previously. It then displays the new image, the instances created using it, the user who created them, and the times associated. -action.escu.how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. Run the "Previously Seen Cloud Compute Images" support search to create of baseline of previously seen images. +action.escu.data_models = ["Cloud_Infrastructure"] +action.escu.eli5 = For each image ID and user, the search returns the first time seen, last time seen, and the systems. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each image back to the lookup file and clears out any output. The other part of the search limits the results to when the image was seen for the first time within the previous 70 minutes. It then displays the new image, the instances created using it, the user who created it, and the associated times. +action.escu.how_to_implement = You must be ingesting the appropriate cloud-infrastructure logs and have the Security Research cloud data model (https://github.com/splunk/cloud-datamodel-security-research/) installed. Run the "Previously Seen Cloud Compute Images" support search to create a baseline of previously seen images. action.escu.known_false_positives = After a new image is created, the first systems created with that image will cause this alert to fire. Verify that the image being used was created by a legitimate user. action.escu.creation_date = 2019-10-03 -action.escu.modification_date = 2018-03-12 +action.escu.modification_date = 2018-10-12 action.escu.confidence = medium action.escu.full_search_name = ESCU - Cloud Compute Instance Created With Previously Unseen Image - Rule action.escu.search_type = detection @@ -935,7 +935,7 @@ action.escu.asset_at_risk = Cloud Compute Instance action.escu.fields_required = ["dest", "src_user"] action.escu.entities = ["dest", "src_user"] action.escu.providing_technologies = ["AWS", "Azure", "GCP"] -action.escu.analytic_story = ["Cloud Cryptomining"] +action.escu.analytic_story = [] cron_schedule = 0 * * * * dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m @@ -943,12 +943,12 @@ action.correlationsearch.enabled = 1 action.correlationsearch.label = Cloud Compute Instance Created With Previously Unseen Image action.notable = 1 action.notable.param.nes_fields = dest -action.notable.param.rule_description = The cloud compute instance $dest$ was created with previously unused image $image_id$ +action.notable.param.rule_description = The cloud compute instance $dest$ was created with previously unused image $image_id$. action.notable.param.rule_title = Cloud Compute Instances Created With New Image action.notable.param.security_domain = endpoint action.notable.param.severity = medium action.notable.param.drilldown_name = Show all instances created with image $image_id$ -action.notable.param.drilldown_search = | from datamodel:Cloud_Draft_v6.Compute | image_id=$image_id$ +action.notable.param.drilldown_search = | from datamodel:Cloud_Infrastructure.Compute | image_id=$image_id$ action.notable.param.recommended_actions = escu_investigate action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1.[[action|escu_investigate]]: Based on ESCU investigate recommendations:\nESCU - Investigate User Activities In All Cloud Regions\nESCU - Investigate Cloud Compute Instance Activities\n"} action.risk = 1 @@ -970,17 +970,17 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats earliest(_time) as firstTime, latest(_time) as lastTime values(Compute.dest) as dest from datamodel=Cloud_Draft_v6.Compute where Compute.action=run `previously_seen_cloud_compute_image_input_filter` by Compute.image_id, Compute.src_user | `drop_dm_object_name("Compute")` | inputlookup append=t previously_seen_cloud_compute_images | stats min(firstTime) as firstTime max(lastTime) as lastTime, values(dest) as dest by image_id, src_user | multireport [| table image_id, firstTime, lastTime | outputlookup previously_seen_cloud_compute_images | where fact=fiction][| eval new_image=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where new_image=1 | convert ctime(firstTime) ctime(lastTime)] | table image_id, dest, src_user, firstTime, lastTime +search = | tstats earliest(_time) as firstTime, latest(_time) as lastTime values(Compute.dest) as dest from datamodel=Cloud_Infrastructure.Compute where Compute.action=run `previously_seen_cloud_compute_image_input_filter` by Compute.image_id, Compute.src_user | `drop_dm_object_name("Compute")` | inputlookup append=t previously_seen_cloud_compute_images | stats min(firstTime) as firstTime max(lastTime) as lastTime, values(dest) as dest by image_id, src_user | multireport [| table image_id, firstTime, lastTime | outputlookup previously_seen_cloud_compute_images | where fact=fiction][| eval new_image=if(firstTime >= relative_time(now(), `previously_seen_cloud_compute_image_search_window_begin_offset`), 1, 0) | where new_image=1 | convert ctime(firstTime) ctime(lastTime)] | table image_id, dest, src_user, firstTime, lastTime [ESCU - Cloud Compute Instance Created With Previously Unseen Instance Type - Rule] action.escu = 0 action.escu.enabled = 1 -description = This search looks for EC2 instances being created with previously unseen instance types. +description = Find EC2 instances being created with previously unseen instance types. action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -action.escu.data_models = ["Cloud"] -action.escu.eli5 = The search returns the first time seen, last time seen, and the systems for each instance type and user. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each instance type back to the lookup file and then clears out any output. The other part of the search limits the results to when the instance type was seen for the first time no longer than 70 minutes previously. It then displays the new instance type, the instances created using it, the user who created them, and the times associated. -action.escu.how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. Run the "Previously Seen Cloud Regions" support search to create of baseline of previously seen regions. -action.escu.known_false_positives = It is possible that an admin will create a new system using a new instance type never used before. Verify with the creator that they intended to create the system with the new instance type. +action.escu.data_models = ["Cloud_Infrastructure"] +action.escu.eli5 = For each instance type and user, the search returns the first time seen, last time seen, and the system. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each instance type back to the lookup file and clears out any output. The other part of the search limits the results to when the instance type was seen for the first time within the previous 70 minutes. It then displays the new instance type, the instances created using it, the user who created them, and the times associated. +action.escu.how_to_implement = You must be ingesting the appropriate cloud-infrastructure logs and have the Security Research cloud data model (https://github.com/splunk/cloud-datamodel-security-research/) installed. Run the " Previously Seen Cloud Compute Instance Types" support search to create a baseline of previously seen regions. +action.escu.known_false_positives = It is possible that an admin will create a new system using a new instance type that has never been used before. Verify with the creator that they intended to create the system with the new instance type. action.escu.creation_date = 2019-10-03 action.escu.modification_date = 2018-03-12 action.escu.confidence = medium @@ -1003,7 +1003,7 @@ action.notable.param.rule_title = New Cloud Compute Instance Type $instance_type action.notable.param.security_domain = endpoint action.notable.param.severity = medium action.notable.param.drilldown_name = Find all compute instances of type $instance_type$ -action.notable.param.drilldown_search = | from datamodel:Cloud_Draft_v6.Compute | instance_type=$instance_type$ +action.notable.param.drilldown_search = | from datamodel:Cloud_Infrastructure.Compute | instance_type=$instance_type$ action.notable.param.recommended_actions = escu_investigate action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1.[[action|escu_investigate]]: Based on ESCU investigate recommendations:\nESCU - Investigate User Activities In All Cloud Regions\nESCU - Investigate Cloud Compute Instance Activities\n"} action.risk = 1 @@ -1025,16 +1025,16 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats earliest(_time) as firstTime, latest(_time) as lastTime values(Compute.dest) as dest from datamodel=Cloud_Draft_v6.Compute where Compute.event_name=RunInstances `previously_seen_cloud_compute_instance_types_input_filter` by Compute.instance_type, Compute.src_user | `drop_dm_object_name("Compute")` | inputlookup append=t previously_seen_cloud_compute_instance_types | stats min(firstTime) as firstTime max(lastTime) as lastTime, values(dest) as dest by instance_type, src_user | multireport [| table instance_type, firstTime, lastTime | outputlookup previously_seen_cloud_compute_instance_types | where fact=fiction][| eval new_type=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where new_type=1 | convert ctime(firstTime) ctime(lastTime)] | table instance_type, dest, src_user, firstTime, lastTime +search = | tstats earliest(_time) as firstTime, latest(_time) as lastTime values(Compute.dest) as dest from datamodel=Cloud_Infrastructure.Compute where Compute.event_name=RunInstances `previously_seen_cloud_compute_instance_types_input_filter` by Compute.instance_type, Compute.src_user | `drop_dm_object_name("Compute")` | inputlookup append=t previously_seen_cloud_compute_instance_types | stats min(firstTime) as firstTime max(lastTime) as lastTime, values(dest) as dest by instance_type, src_user | multireport [| table instance_type, firstTime, lastTime | outputlookup previously_seen_cloud_compute_instance_types | where fact=fiction][| eval new_type=if(firstTime >= relative_time(now(), `previously_seen_cloud_compute_instance_types_search_window_begin_offset`), 1, 0) | where new_type=1 | convert ctime(firstTime) ctime(lastTime)] | table instance_type, dest, src_user, firstTime, lastTime [ESCU - Cloud Compute Instance Started In Previously Unused Region - Rule] action.escu = 0 action.escu.enabled = 1 -description = This search looks at cloud infrastructure events where an instance is created in any region in the last one hour and then compares it to a lookup file of previously seen regions where an instance was created +description = This search looks at cloud-infrastructure events where an instance is created in any region within the last hour and then compares it to a lookup file of previously seen regions where instances have been created. action.escu.mappings = {"cis20": ["CIS 12"], "kill_chain_phases": ["Actions on Objectives"], "mitre_attack": ["Defense Evasion"], "nist": ["DE.DP", "DE.AE"]} -action.escu.data_models = ["Cloud"] -action.escu.eli5 = In this search, we query cloud infrastructure compute logs to look for events that indicate that an instance was started in a particular region. Using the `previously_seen_cloud_regions` lookup file created using the support search, we compare the region where this instance was started to all previously observed regions. The `eval` and `if` functions determine that the earliest times seen for this region and instance were within the last day. If a new region is detected, it will alert you with "Instance Started in a New Region". However, this region will be added to the list in `previously_seen_cloud_regions`. -action.escu.how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. Run the "Previously Seen Cloud Compute Instance Types" support search to create of baseline of previously seen regions. +action.escu.data_models = ["Cloud_Infrastructure"] +action.escu.eli5 = In this search, we query cloud infrastructure compute logs to look for events that indicate that an instance was started in a particular region. Using the \"previously_seen_cloud_regions\" lookup file created using the support search, we compare the region where this instance was started to all previously observed regions. The \"eval\" and \"if\" functions determine that the earliest times seen for this region and instance were within the last day. If a new region is detected, it will alert you with \"Instance Started in a New Region.\" However, this region will be added to the list in \"previously_seen_cloud_regions.\" +action.escu.how_to_implement = You must be ingesting the appropriate cloud-infrastructure logs and have the Security Research cloud data model (https://github.com/splunk/cloud-datamodel-security-research/) installed. Run the \"Previously Seen Cloud Compute Instance Types\" support search to create a baseline of previously seen regions. action.escu.known_false_positives = It's possible that a user has unknowingly started an instance in a new region. Please verify that this activity is legitimate. action.escu.creation_date = 2019-10-02 action.escu.modification_date = 2019-10-02 @@ -1053,14 +1053,14 @@ action.correlationsearch.enabled = 1 action.correlationsearch.label = Cloud Compute Instance Started In Previously Unused Region action.notable = 1 action.notable.param.nes_fields = dest,region -action.notable.param.rule_description = A cloud compute instance, $dest$ is started in a new, previously unseen, region $region$ +action.notable.param.rule_description = A cloud compute instance, $dest$, is started in a new, previously unseen, region $region$ action.notable.param.rule_title = Cloud instance $dest$ started in a new region $region$ action.notable.param.security_domain = network action.notable.param.severity = medium action.notable.param.drilldown_name = See all activity in $region$ -action.notable.param.drilldown_search = | from datamodel:Cloud_Draft_v6.Compute | search region="$region$" +action.notable.param.drilldown_search = | from datamodel:Cloud_Infrastructure.Compute | search region="$region$" action.notable.param.recommended_actions = escu_investigate -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1.[[action|escu_investigate]]: Based on ESCU investigate recommendations:\nESCU - Investigate User Activities In Single Cloud Region\nESCU - Investigate Cloud Compute Instance Activities\nESCU - Get Notable History\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1.[[action|escu_investigate]]: Based on ESCU investigate recommendations:\nESCU - Investigate User Activities In Single Cloud Region\nESCU - Investigate Cloud Compute Instance Activities\n"} action.risk = 1 action.risk.param._risk_object = dest action.risk.param._risk_object_type = system @@ -1080,7 +1080,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats earliest(_time) as firstTime, latest(_time) as lastTime values(Compute.dest) as dest from datamodel=Cloud_Draft_v6.Compute where Compute.event_name=RunInstances `previously_seen_cloud_regions_input_filter` by Compute.region, Compute.src_user | `drop_dm_object_name("Compute")` | inputlookup append=t previously_seen_cloud_regions | stats min(firstTime) as firstTime max(lastTime) as lastTime, values(dest) as dest by region, src_user | multireport [| table region, firstTime, lastTime | outputlookup previously_seen_cloud_regions | where fact=fiction][| eval new_region=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where new_region=1 | convert ctime(firstTime) ctime(lastTime)] | table region, dest, src_user, firstTime, lastTime +search = | tstats earliest(_time) as firstTime, latest(_time) as lastTime values(Compute.dest) as dest from datamodel=Cloud_Infrastructure.Compute where Compute.event_name=RunInstances `previously_seen_cloud_regions_input_filter` by Compute.region, Compute.src_user | `drop_dm_object_name("Compute")` | inputlookup append=t previously_seen_cloud_regions | stats min(firstTime) as firstTime max(lastTime) as lastTime, values(dest) as dest by region, src_user | multireport [| table region, firstTime, lastTime | outputlookup previously_seen_cloud_regions | where fact=fiction][| eval new_region=if(firstTime >= relative_time(now(), `previously_seen_cloud_regions_search_window_begin_offset`), 1, 0) | where new_region=1 | convert ctime(firstTime) ctime(lastTime)] | table region, dest, src_user, firstTime, lastTime [ESCU - Common Ransomware Extensions - Rule] action.escu = 0 @@ -2330,7 +2330,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = eventtype = wineventlog_security signature_id=4720 OR (signature_id=4732 Group_Name= Administrators) | transaction Security_ID maxspan=180m | search signature_id=4720 signature_id=4732 | table _time user dest signature_id Security_ID Group_Name src_user Message +search = eventtype = wineventlog_security signature_id=4720 OR (signature_id=4732 Group_Name= Administrators) | transaction Security_ID connected=false maxspan=180m | search signature_id=4720 signature_id=4732 | table _time user dest signature_id Security_ID Group_Name src_user Message [ESCU - Detect New Login Attempts to Routers - Rule] action.escu = 0 @@ -2611,8 +2611,8 @@ action.escu.confidence = medium action.escu.full_search_name = ESCU - Detect Prohibited Applications Spawning cmd.exe - Rule action.escu.search_type = detection action.escu.asset_at_risk = Endpoint -action.escu.fields_required = ["dest"] -action.escu.entities = ["dest"] +action.escu.fields_required = ["dest", "process_name", "user"] +action.escu.entities = ["dest", "process_name", "user"] action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] action.escu.analytic_story = ["Suspicious Command-Line Executions", "Suspicious MSHTA Activity"] cron_schedule = 0 * * * * @@ -2647,7 +2647,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` count values(Processes.user) as user values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=cmd.exe by Processes.parent_process_name Processes.process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` |search [`prohibited_apps_launching_cmd`] +search = | tstats `summariesonly` count values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=cmd.exe by Processes.parent_process_name Processes.process_name Processes.dest Processes.user| `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` |search [`prohibited_apps_launching_cmd`] [ESCU - Detect PsExec With accepteula Flag - Rule] action.escu = 0 @@ -3247,8 +3247,8 @@ action.escu.confidence = medium action.escu.full_search_name = ESCU - Detect Use of cmd.exe to Launch Script Interpreters - Rule action.escu.search_type = detection action.escu.asset_at_risk = Endpoint -action.escu.fields_required = ["dest"] -action.escu.entities = ["dest"] +action.escu.fields_required = ["dest", "process_name", "user"] +action.escu.entities = ["dest", "process_name", "user"] action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] action.escu.analytic_story = ["Emotet Malware (DHS Report TA18-201A)", "Suspicious Command-Line Executions"] cron_schedule = 0 * * * * @@ -3658,7 +3658,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` count values(Processes.process) as process values(Processes.parent_process) as parent_process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes by Processes.dest Processes.process_name Processes.user _time | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name(Processes)` | search `system_network_configuration_discovery_tools` | transaction dest maxpause=5m |where eventcount>=5 | table firstTime lastTime dest user process_name process parent_process eventcount +search = | tstats `summariesonly` count values(Processes.process) as process values(Processes.parent_process) as parent_process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes by Processes.dest Processes.process_name Processes.user _time | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name(Processes)` | search `system_network_configuration_discovery_tools` | transaction dest connected=false maxpause=5m |where eventcount>=5 | table firstTime lastTime dest user process_name process parent_process eventcount [ESCU - Detect web traffic to dynamic domain providers - Rule] action.escu = 0 @@ -4626,8 +4626,8 @@ action.escu.confidence = medium action.escu.full_search_name = ESCU - First time seen command line argument - Rule action.escu.search_type = detection action.escu.asset_at_risk = Endpoint -action.escu.fields_required = ["dest"] -action.escu.entities = ["dest"] +action.escu.fields_required = ["dest", "process_name", "user"] +action.escu.entities = ["dest", "process_name", "user"] action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] action.escu.analytic_story = ["DHS Report TA18-074A", "Hidden Cobra Malware", "Orangeworm Attack Group", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions"] cron_schedule = 30 * * * * @@ -4891,8 +4891,8 @@ action.escu.confidence = medium action.escu.full_search_name = ESCU - Malicious PowerShell Process - Connect To Internet With Hidden Window - Rule action.escu.search_type = detection action.escu.asset_at_risk = Endpoint -action.escu.fields_required = ["dest"] -action.escu.entities = ["dest"] +action.escu.fields_required = ["dest", "process_name", "user"] +action.escu.entities = ["dest", "process_name", "user"] action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] action.escu.analytic_story = ["Malicious PowerShell", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] cron_schedule = 0 * * * * @@ -4944,8 +4944,8 @@ action.escu.confidence = medium action.escu.full_search_name = ESCU - Malicious PowerShell Process - Encoded Command - Rule action.escu.search_type = detection action.escu.asset_at_risk = Endpoint -action.escu.fields_required = ["dest"] -action.escu.entities = ["dest"] +action.escu.fields_required = ["dest", "process_name", "user"] +action.escu.entities = ["dest", "process_name", "user"] action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] action.escu.analytic_story = ["Malicious PowerShell"] cron_schedule = 0 * * * * @@ -5050,8 +5050,8 @@ action.escu.confidence = medium action.escu.full_search_name = ESCU - Malicious PowerShell Process - Multiple Suspicious Command-Line Arguments - Rule action.escu.search_type = detection action.escu.asset_at_risk = Endpoint -action.escu.fields_required = ["dest"] -action.escu.entities = ["dest"] +action.escu.fields_required = ["dest", "process_name", "user"] +action.escu.entities = ["dest", "process_name", "user"] action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] action.escu.analytic_story = ["Malicious PowerShell"] cron_schedule = 50 * * * * @@ -6307,7 +6307,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Traffic where All_Traffic.app=rdp by All_Traffic.src All_Traffic.dest All_Traffic.dest_port | eventstats stdev(count) AS stdev avg(count) AS avg p50(count) AS p50| where count>(stdev*2) | rename All_Traffic.src AS src All_Traffic.dest AS dest | table firstTime lastTime src dest count avg p50 stdev +search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Traffic where All_Traffic.app=rdp by All_Traffic.src All_Traffic.dest All_Traffic.dest_port | eventstats stdev(count) AS stdev avg(count) AS avg p50(count) AS p50 | where count>(avg + stdev*2) | rename All_Traffic.src AS src All_Traffic.dest AS dest | table firstTime lastTime src dest count avg p50 stdev [ESCU - Remote Desktop Network Traffic - Rule] action.escu = 0 @@ -7317,7 +7317,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` values(All_Changes.result_id) as result_id count min(_time) as firstTime max(_time) as lastTime from datamodel=Change where All_Changes.result_id=4720 OR All_Changes.result_id=4726 by _time span=4h All_Changes.user All_Changes.dest | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name("All_Changes")` | search result_id = 4720 result_id=4726 | transaction user maxspan=240m | table firstTime lastTime count user dest result_id +search = | tstats `summariesonly` values(All_Changes.result_id) as result_id count min(_time) as firstTime max(_time) as lastTime from datamodel=Change where All_Changes.result_id=4720 OR All_Changes.result_id=4726 by _time span=4h All_Changes.user All_Changes.dest | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name("All_Changes")` | search result_id = 4720 result_id=4726 | transaction user connected=false maxspan=240m | table firstTime lastTime count user dest result_id [ESCU - Single Letter Process On Endpoint - Rule] action.escu = 0 @@ -8341,8 +8341,8 @@ action.escu.confidence = medium action.escu.full_search_name = ESCU - Unusually Long Command Line - Rule action.escu.search_type = detection action.escu.asset_at_risk = -action.escu.fields_required = ["dest"] -action.escu.entities = ["dest"] +action.escu.fields_required = ["dest", "process_name", "user"] +action.escu.entities = ["dest", "process_name", "user"] action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Ransomware", "Suspicious Command-Line Executions", "Unusual Processes"] cron_schedule = 0 * * * * @@ -8394,8 +8394,8 @@ action.escu.confidence = medium action.escu.full_search_name = ESCU - Unusually Long Command Line - MLTK - Rule action.escu.search_type = detection action.escu.asset_at_risk = -action.escu.fields_required = ["dest"] -action.escu.entities = ["dest"] +action.escu.fields_required = ["dest", "process_name", "user"] +action.escu.entities = ["dest", "process_name", "user"] action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Ransomware", "Suspicious Command-Line Executions", "Unusual Processes"] cron_schedule = 0 * * * * @@ -8418,7 +8418,7 @@ action.risk.param._risk_score = 50 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest,user,process +alert.suppress.fields = dest,user,process_name alert.suppress.period = 28800s action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 86400 @@ -8430,7 +8430,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` count min(_time) as start_time max(_time) as end_time FROM datamodel=Endpoint.Processes by Processes.user Processes.dest Processes.process_name Processes.process | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)`| eval processlen=len(process) | search user!=unknown | apply cmdline_pdfmodel threshold=0.01 | rename "IsOutlier(processlen)" as isOutlier | search isOutlier > 0 | table start_time end_time user dest process_name process processlen count +search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes by Processes.user Processes.dest Processes.process_name Processes.process | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)`| eval processlen=len(process) | search user!=unknown | apply cmdline_pdfmodel threshold=0.01 | rename "IsOutlier(processlen)" as isOutlier | search isOutlier > 0 | table firstTime lastTime user dest process_name process processlen count [ESCU - Unusually Long Content-Type Length - Rule] action.escu = 0 @@ -9501,7 +9501,7 @@ action.escu.full_search_name = ESCU - Get Notable History description = This search queries the notable index and returns all the Notable Events for the particular destination host, giving the analyst an overview of the incidents that may have occurred with the host under investigation. action.escu.creation_date = 2017-03-15 action.escu.modification_date = 2017-09-20 -action.escu.analytic_story = ["AWS Cross Account Activity", "AWS Cryptomining", "AWS Network ACL Activity", "AWS User Monitoring", "Account Monitoring and Controls", "Apache Struts Vulnerability", "Asset Tracking", "Brand Monitoring", "Cloud Cryptomining", "ColdRoot MacOS RAT", "Collection and Staging", "Command and Control", "Credential Dumping", "DHS Report TA18-074A", "DNS Amplification Attacks", "Data Protection", "Disabling Security Tools", "Dynamic DNS", "Emotet Malware (DHS Report TA18-201A)", "Hidden Cobra Malware", "Host Redirection", "JBoss Vulnerability", "Lateral Movement", "Malicious PowerShell", "Monitor Backup Solution", "Monitor for Unauthorized Software", "Monitor for Updates", "Netsh Abuse", "Orangeworm Attack Group", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Prohibited Traffic Allowed or Protocol Mismatch", "Ransomware", "Router & Infrastructure Security", "SQL Injection", "SamSam Ransomware", "Spectre And Meltdown Vulnerabilities", "Splunk Enterprise Vulnerability", "Splunk Enterprise Vulnerability CVE-2018-11409", "Suspicious AWS EC2 Activities", "Suspicious AWS S3 Activities", "Suspicious AWS Traffic", "Suspicious Command-Line Executions", "Suspicious DNS Traffic", "Suspicious MSHTA Activity", "Suspicious WMI Use", "Suspicious Windows Registry Activities", "Unusual AWS EC2 Modifications", "Unusual Processes", "Use of Cleartext Protocols", "Web Fraud Detection", "Windows Defense Evasion Tactics", "Windows File Extension and Association Abuse", "Windows Log Manipulation", "Windows Persistence Techniques", "Windows Privilege Escalation", "Windows Service Abuse"] +action.escu.analytic_story = ["AWS Cross Account Activity", "AWS Cryptomining", "AWS Network ACL Activity", "AWS User Monitoring", "Account Monitoring and Controls", "Apache Struts Vulnerability", "Asset Tracking", "Brand Monitoring", "ColdRoot MacOS RAT", "Collection and Staging", "Command and Control", "Credential Dumping", "DHS Report TA18-074A", "DNS Amplification Attacks", "Data Protection", "Disabling Security Tools", "Dynamic DNS", "Emotet Malware (DHS Report TA18-201A)", "Hidden Cobra Malware", "Host Redirection", "JBoss Vulnerability", "Lateral Movement", "Malicious PowerShell", "Monitor Backup Solution", "Monitor for Unauthorized Software", "Monitor for Updates", "Netsh Abuse", "Orangeworm Attack Group", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Prohibited Traffic Allowed or Protocol Mismatch", "Ransomware", "Router & Infrastructure Security", "SQL Injection", "SamSam Ransomware", "Spectre And Meltdown Vulnerabilities", "Splunk Enterprise Vulnerability", "Splunk Enterprise Vulnerability CVE-2018-11409", "Suspicious AWS EC2 Activities", "Suspicious AWS S3 Activities", "Suspicious AWS Traffic", "Suspicious Command-Line Executions", "Suspicious DNS Traffic", "Suspicious MSHTA Activity", "Suspicious WMI Use", "Suspicious Windows Registry Activities", "Unusual AWS EC2 Modifications", "Unusual Processes", "Use of Cleartext Protocols", "Web Fraud Detection", "Windows Defense Evasion Tactics", "Windows File Extension and Association Abuse", "Windows Log Manipulation", "Windows Persistence Techniques", "Windows Privilege Escalation", "Windows Service Abuse"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 86400 action.escu.providing_technologies = ["Splunk Enterprise Security"] @@ -9888,7 +9888,7 @@ action.escu.modification_date = 2018-03-12 action.escu.analytic_story = ["Cloud Cryptomining"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 86400 -action.escu.data_models = ["Cloud"] +action.escu.data_models = ["Cloud_Infrastructure"] action.escu.providing_technologies = ["AWS", "Azure", "GCP"] action.escu.eli5 = none action.escu.how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. @@ -9898,7 +9898,7 @@ action.escu.entities = ["dest"] disabled = true schedule_window = auto is_visible = false -search = | from datamodel:Cloud_Draft_v4.Cloud_Compute | search dest={dest} `investigate_cloud_compute_instance_activities_output_filter` +search = | from datamodel:Cloud_Infrastructure.Compute | search dest={dest} | fields - _* | `investigate_cloud_compute_instance_activities_output_filter` [ESCU - Investigate Network Traffic From src_ip] action.escu = 0 @@ -9979,15 +9979,17 @@ action.escu.modification_date = 2019-04-30 action.escu.analytic_story = ["Cloud Cryptomining"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 86400 -action.escu.data_models = ["Cloud"] +action.escu.data_models = ["Cloud_Infrastructure"] action.escu.providing_technologies = ["AWS", "Azure", "GCP"] action.escu.eli5 = none action.escu.how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. action.escu.known_false_positives = None at this time +action.escu.fields_required = ["region", "src_user"] +action.escu.entities = ["region", "src_user"] disabled = true schedule_window = auto is_visible = false -search = | from datamodel:Cloud_Draft_v6.Compute | search user={src_user} `investigate_user_activities_in_all_cloud_region_output_filter` +search = | from datamodel:Cloud_Infrastructure.Compute | search user={src_user} | fields - _* | `investigate_user_activities_in_all_cloud_region_output_filter` [ESCU - Investigate User Activities In Single Cloud Region] action.escu = 0 @@ -10000,15 +10002,17 @@ action.escu.modification_date = 2019-04-30 action.escu.analytic_story = ["Cloud Cryptomining"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 86400 -action.escu.data_models = ["Cloud"] +action.escu.data_models = ["Cloud_Infrastructure"] action.escu.providing_technologies = ["AWS", "Azure", "GCP"] action.escu.eli5 = none action.escu.how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. action.escu.known_false_positives = None at this time +action.escu.fields_required = ["region", "src_user"] +action.escu.entities = ["region", "src_user"] disabled = true schedule_window = auto is_visible = false -search = | from datamodel:Cloud_Draft_v4.Compute | search region={region} user={src_user} `investigate_user_activities_in_single_cloud_region_output_filter` +search = | from datamodel:Cloud_Infrastructure.Compute | search region={region} user={src_user} | fields - _* | `investigate_user_activities_in_single_cloud_region_output_filter` [ESCU - Investigate Web Activity From Host] action.escu = 0 @@ -10546,7 +10550,7 @@ description = This search builds a table of previously seen users that have laun action.escu.creation_date = 2019-10-03 action.escu.modification_date = 2018-03-15 action.escu.analytic_story = ["Cloud Cryptomining"] -action.escu.data_models = ["Cloud"] +action.escu.data_models = ["Cloud_Infrastructure"] dispatch.earliest_time = -90d@d dispatch.latest_time = -10m@m action.escu.providing_technologies = ["AWS", "Azure", "GCP"] @@ -10556,7 +10560,7 @@ action.escu.known_false_positives = disabled = true schedule_window = auto is_visible = false -search = | tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Cloud_Draft_v6.Compute where Compute.action=run `previously_seen_cloud_compute_creations_by_user_input_filter` by Compute.src_user | `drop_dm_object_name("Compute")` | outputlookup previously_seen_cloud_compute_creations_by_user | stats count +search = | tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Cloud_Infrastructure.Compute where Compute.action=run `previously_seen_cloud_compute_creations_by_user_input_filter` by Compute.src_user | `drop_dm_object_name("Compute")` | outputlookup previously_seen_cloud_compute_creations_by_user | stats count [ESCU - Previously Seen Cloud Compute Images] action.escu = 0 @@ -10566,8 +10570,8 @@ action.escu.full_search_name = ESCU - Previously Seen Cloud Compute Images description = This search builds a table of previously seen images used to launch cloud compute instances action.escu.creation_date = 2019-10-03 action.escu.modification_date = 2018-03-12 -action.escu.analytic_story = ["Cloud Cryptomining"] -action.escu.data_models = ["Cloud"] +action.escu.analytic_story = [] +action.escu.data_models = ["Cloud_Infrastructure"] dispatch.earliest_time = -90d@d dispatch.latest_time = -10m@m action.escu.providing_technologies = ["AWS", "Azure", "GCP"] @@ -10577,7 +10581,7 @@ action.escu.known_false_positives = disabled = true schedule_window = auto is_visible = false -search = | tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Cloud.Compute where Compute.action=run `previously_seen_cloud_compute_image_input_filter` by Compute.image_id | `drop_dm_object_name("Compute")` | outputlookup previously_seen_cloud_compute_images | stats count +search = | tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Cloud_Infrastructure.Compute where Compute.action=run `previously_seen_cloud_compute_image_input_filter` by Compute.image_id | `drop_dm_object_name("Compute")` | outputlookup previously_seen_cloud_compute_images | stats count [ESCU - Previously Seen Cloud Compute Instance Types] action.escu = 0 @@ -10588,7 +10592,7 @@ description = This search builds a table of previously seen cloud compute instan action.escu.creation_date = 2019-10-03 action.escu.modification_date = 2019-10-03 action.escu.analytic_story = ["Cloud Cryptomining"] -action.escu.data_models = ["Cloud"] +action.escu.data_models = ["Cloud_Infrastructure"] dispatch.earliest_time = -90d@d dispatch.latest_time = -10m@m action.escu.providing_technologies = ["AWS", "Azure", "GCP"] @@ -10598,7 +10602,7 @@ action.escu.known_false_positives = disabled = true schedule_window = auto is_visible = false -search = | tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Cloud.Compute where Compute.action=run `previously_seen_cloud_compute_instance_types_input_filter` by Compute.instance_type | `drop_dm_object_name("Compute")` | outputlookup previously_seen_cloud_compute_instance_types | stats count +search = | tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Cloud_Infrastructure.Compute where Compute.action=run `previously_seen_cloud_compute_instance_types_input_filter` by Compute.instance_type | `drop_dm_object_name("Compute")` | outputlookup previously_seen_cloud_compute_instance_types | stats count [ESCU - Previously Seen Cloud Regions] action.escu = 0 @@ -10609,7 +10613,7 @@ description = This search looks for cloud compute events where a compute instanc action.escu.creation_date = 2019-10-02 action.escu.modification_date = 2019-10-02 action.escu.analytic_story = ["Cloud Cryptomining"] -action.escu.data_models = ["Cloud"] +action.escu.data_models = ["Cloud_Infrastructure"] dispatch.earliest_time = -30d@d dispatch.latest_time = -10m@m action.escu.providing_technologies = ["AWS", "Azure", "GCP"] @@ -10619,7 +10623,7 @@ action.escu.known_false_positives = disabled = true schedule_window = auto is_visible = false -search = | tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Cloud.Compute where Compute.action=start `previously_seen_cloud_regions_input_filter` by Compute.region | `drop_dm_object_name("Compute")` | outputlookup previously_seen_cloud_regions | stats count +search = | tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Cloud_Infrastructure.Compute where Compute.action=start `previously_seen_cloud_regions_input_filter` by Compute.region | `drop_dm_object_name("Compute")` | outputlookup previously_seen_cloud_regions | stats count [ESCU - Previously Seen EC2 AMIs] action.escu = 0 diff --git a/package/default/transforms.conf b/package/default/transforms.conf index 431a2ff048..e8ae23b243 100644 --- a/package/default/transforms.conf +++ b/package/default/transforms.conf @@ -1,6 +1,6 @@ ############# # Automatically generated by generator.py in splunk/security-content -# On Date: 2019-10-31T20:21:14 UTC +# On Date: 2019-11-05T20:06:23 UTC # Author: Splunk Security Research # Contact: research@splunk.com ############# diff --git a/package/default/use_case_library.conf b/package/default/use_case_library.conf index 57a05cc0e9..49c4195cfe 100644 --- a/package/default/use_case_library.conf +++ b/package/default/use_case_library.conf @@ -1,6 +1,6 @@ ############# # Automatically generated by generator.py in splunk/security-content -# On Date: 2019-10-31T20:21:15 UTC +# On Date: 2019-11-05T20:06:23 UTC # Author: Splunk Security Research # Contact: research@splunk.com ############# @@ -137,12 +137,12 @@ version = 1.0 references = ["https://d0.awsstatic.com/whitepapers/aws-security-best-practices.pdf"] maintainers = [{"company": "Splunk", "email": "davidd@splunk.com", "name": "David Dorsey"}] spec_version = 2 -searches = ["ESCU - Cloud Compute Instance Created By Previously Unseen User - Rule", "ESCU - Cloud Compute Instance Created With Previously Unseen Image - Rule", "ESCU - Cloud Compute Instance Created With Previously Unseen Instance Type - Rule", "ESCU - Cloud Compute Instance Started In Previously Unused Region - Rule", "ESCU - Get Notable History", "ESCU - Investigate Cloud Compute Instance Activities", "ESCU - Investigate User Activities In All Cloud Regions", "ESCU - Investigate User Activities In Single Cloud Region", "ESCU - Previously Seen Cloud Compute Creations By User", "ESCU - Previously Seen Cloud Compute Images", "ESCU - Previously Seen Cloud Compute Instance Types", "ESCU - Previously Seen Cloud Regions"] +searches = ["ESCU - Cloud Compute Instance Created By Previously Unseen User - Rule", "ESCU - Cloud Compute Instance Created With Previously Unseen Instance Type - Rule", "ESCU - Cloud Compute Instance Started In Previously Unused Region - Rule", "ESCU - Investigate Cloud Compute Instance Activities", "ESCU - Investigate User Activities In All Cloud Regions", "ESCU - Investigate User Activities In Single Cloud Region", "ESCU - Previously Seen Cloud Compute Creations By User", "ESCU - Previously Seen Cloud Compute Instance Types", "ESCU - Previously Seen Cloud Regions"] description = Monitor your cloud compute instances for activities related to cryptojacking/cryptomining. New instances that originate from previously unseen regions, users who launch abnormally high numbers of instances, or compute instances started by previously unseen users are just a few examples of potentially malicious behavior. narrative = Cryptomining is an intentionally difficult, resource-intensive business. Its complexity was designed into the process to ensure that the number of blocks mined each day would remain steady. So, it's par for the course that ambitious, but unscrupulous, miners make amassing the computing power of large enterprises--a practice known as cryptojacking--a top priority. \ -Cryptojacking has attracted an increasing amount of media attention since its explosion in popularity in the fall of 2017. The attacks have moved from in-browser exploits and mobile phones to enterprise cloud services, such as Amazon Web Services (AWS), Google Cloud Platform (GCP), or Azure. It's difficult to determine exactly how widespread the practice has become, since bad actors continually evolve their ability to escape detection, including employing unlisted endpoints, moderating their CPU usage, and hiding the mining pool's IP address behind a free CDN. \ -hen malicious miners appropriate a cloud instance, often spinning up hundreds of new instances, the costs can become astronomical for the account holder. So, it is critically important to monitor your systems for suspicious activities that could indicate that your network has been infiltrated. \ -This Analytic Story is focused on detecting suspicious new instances in your cloud environment to help prevent such a disaster. It contains detection searches that will detect when a previously unused instance type or AMI is used. It also contains support searches to build lookup files to ensure proper execution of the detection searches. +Cryptojacking has attracted an increasing amount of media attention since its explosion in popularity in the fall of 2017. The attacks have moved from in-browser exploits and mobile phones to enterprise cloud services, such as Amazon Web Services (AWS), Google Cloud Platform (GCP), and Azure. It's difficult to determine exactly how widespread the practice has become, since bad actors continually evolve their ability to escape detection, including employing unlisted endpoints, moderating their CPU usage, and hiding the mining pool's IP address behind a free CDN. \ +When malicious miners appropriate a cloud instance, often spinning up hundreds of new instances, the costs can become astronomical for the account holder. So it is critically important to monitor your systems for suspicious activities that could indicate that your network has been infiltrated. \ +This Analytic Story is focused on detecting suspicious new instances in your cloud environment to help prevent cryptominers from gaining a foothold. It contains detection searches that will detect when a previously unused instance type or AMI is used. It also contains support searches to build lookup files to ensure proper execution of the detection searches. [analytic_story://ColdRoot MacOS RAT] category = Malware @@ -1040,18 +1040,18 @@ providing_technologies = ["Splunk Stream", "Bro"] type = detection asset_type = Cloud Compute Instance confidence = medium -explanation = The search returns the first time seen, last time seen, and the systems for each user. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each user back to the lookup file and then clears out any output. The other part of the search limits the results to when the user was seen for the first time no longer than 70 minutes previously. It then displays the new user, the instances created by them, and the times associated. -how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. Run the "Previously Seen Cloud Compute Creations By User" support search to create of baseline of previously seen users. +explanation = For each user, the search returns the first time seen, last time seen, and the systems. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each user back to the lookup file and then clears out any output. The other part of the search limits the results to when the user was seen for the first time within the previous 70 minutes. It then displays the new user, the instances created by that user, and the associated times. +how_to_implement = You must be ingesting the appropriate cloud-infrastructure logs and have the Security Research cloud data model (https://github.com/splunk/cloud-datamodel-security-research/) installed. Run the "Previously Seen Cloud Compute Creations By User" support search to create of baseline of previously seen users. annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -known_false_positives = It's possible that a user will start to create compute instances when they haven't before for any number of reasons. Verify with the user that is launching instances that this is the intended behavior. +known_false_positives = It's possible that a user will start to create compute instances for the first time, for any number of reasons. Verify with the user launching instances that this is the intended behavior. providing_technologies = ["AWS", "Azure", "GCP"] [savedsearch://ESCU - Cloud Compute Instance Created With Previously Unseen Image - Rule] type = detection asset_type = Cloud Compute Instance confidence = medium -explanation = The search returns the first time seen, last time seen, and the systems for each image id and user. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each image back to the lookup file and then clears out any output. The other part of the search limits the results to when the image was seen for the first time no longer than 70 minutes previously. It then displays the new image, the instances created using it, the user who created them, and the times associated. -how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. Run the "Previously Seen Cloud Compute Images" support search to create of baseline of previously seen images. +explanation = For each image ID and user, the search returns the first time seen, last time seen, and the systems. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each image back to the lookup file and clears out any output. The other part of the search limits the results to when the image was seen for the first time within the previous 70 minutes. It then displays the new image, the instances created using it, the user who created it, and the associated times. +how_to_implement = You must be ingesting the appropriate cloud-infrastructure logs and have the Security Research cloud data model (https://github.com/splunk/cloud-datamodel-security-research/) installed. Run the "Previously Seen Cloud Compute Images" support search to create a baseline of previously seen images. annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} known_false_positives = After a new image is created, the first systems created with that image will cause this alert to fire. Verify that the image being used was created by a legitimate user. providing_technologies = ["AWS", "Azure", "GCP"] @@ -1060,18 +1060,18 @@ providing_technologies = ["AWS", "Azure", "GCP"] type = detection asset_type = Cloud Compute Instance confidence = medium -explanation = The search returns the first time seen, last time seen, and the systems for each instance type and user. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each instance type back to the lookup file and then clears out any output. The other part of the search limits the results to when the instance type was seen for the first time no longer than 70 minutes previously. It then displays the new instance type, the instances created using it, the user who created them, and the times associated. -how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. Run the "Previously Seen Cloud Regions" support search to create of baseline of previously seen regions. +explanation = For each instance type and user, the search returns the first time seen, last time seen, and the system. It then appends the historical data and merges it into the data. The search then splits and outputs the updated times for each instance type back to the lookup file and clears out any output. The other part of the search limits the results to when the instance type was seen for the first time within the previous 70 minutes. It then displays the new instance type, the instances created using it, the user who created them, and the times associated. +how_to_implement = You must be ingesting the appropriate cloud-infrastructure logs and have the Security Research cloud data model (https://github.com/splunk/cloud-datamodel-security-research/) installed. Run the " Previously Seen Cloud Compute Instance Types" support search to create a baseline of previously seen regions. annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -known_false_positives = It is possible that an admin will create a new system using a new instance type never used before. Verify with the creator that they intended to create the system with the new instance type. +known_false_positives = It is possible that an admin will create a new system using a new instance type that has never been used before. Verify with the creator that they intended to create the system with the new instance type. providing_technologies = ["AWS", "Azure", "GCP"] [savedsearch://ESCU - Cloud Compute Instance Started In Previously Unused Region - Rule] type = detection asset_type = Cloud Compute Instance confidence = medium -explanation = In this search, we query cloud infrastructure compute logs to look for events that indicate that an instance was started in a particular region. Using the `previously_seen_cloud_regions` lookup file created using the support search, we compare the region where this instance was started to all previously observed regions. The `eval` and `if` functions determine that the earliest times seen for this region and instance were within the last day. If a new region is detected, it will alert you with "Instance Started in a New Region". However, this region will be added to the list in `previously_seen_cloud_regions`. -how_to_implement = You must be ingesting the approrpiate cloud infrastructure logs and have the Security Research cloud data model installed. Run the "Previously Seen Cloud Compute Instance Types" support search to create of baseline of previously seen regions. +explanation = In this search, we query cloud infrastructure compute logs to look for events that indicate that an instance was started in a particular region. Using the \"previously_seen_cloud_regions\" lookup file created using the support search, we compare the region where this instance was started to all previously observed regions. The \"eval\" and \"if\" functions determine that the earliest times seen for this region and instance were within the last day. If a new region is detected, it will alert you with \"Instance Started in a New Region.\" However, this region will be added to the list in \"previously_seen_cloud_regions.\" +how_to_implement = You must be ingesting the appropriate cloud-infrastructure logs and have the Security Research cloud data model (https://github.com/splunk/cloud-datamodel-security-research/) installed. Run the \"Previously Seen Cloud Compute Instance Types\" support search to create a baseline of previously seen regions. annotations = {"cis20": ["CIS 12"], "kill_chain_phases": ["Actions on Objectives"], "mitre_attack": ["Defense Evasion"], "nist": ["DE.DP", "DE.AE"]} known_false_positives = It's possible that a user has unknowingly started an instance in a new region. Please verify that this activity is legitimate. providing_technologies = ["AWS", "Azure", "GCP"] diff --git a/requirements.txt b/requirements.txt index 4196313441..3c3568af2f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ aspy.yaml==1.3.0 -attrs==19.2.0 +attrs==19.3.0 cfgv==2.0.1 configparser==4.0.2 -contextlib2==0.6.0 +contextlib2==0.6.0.post1 functools32==3.2.3.post2 futures==3.2.0 identify==1.4.7 @@ -13,12 +13,12 @@ jsonschema==3.0.2 nodeenv==1.3.3 pathlib2==2.3.5 pre-commit==1.18.3 -pyrsistent==0.15.4 +pyrsistent==0.15.5 PyYAML==5.1.2 scandir==1.10.0 semantic_version==2.8.2 six==1.12.0 toml==0.10.0 typing==3.7.4.1 -virtualenv==16.7.5 +virtualenv==16.7.7 zipp==0.6.0 diff --git a/spec/v2/baselines.spec.json b/spec/v2/baselines.spec.json index 5f4fb4a2cf..3a8be9e6de 100644 --- a/spec/v2/baselines.spec.json +++ b/spec/v2/baselines.spec.json @@ -76,6 +76,26 @@ }, "splunk": { "properties": { + "lookups": { + "description": "A list of lookups in the search", + "examples": [ + "detection_search_lookup" + ], + "items": { + "type": "string" + }, + "type": "array" + }, + "macros": { + "description": "A list of macros in the search", + "examples": [ + "detection_search_output_filter" + ], + "items": { + "type": "string" + }, + "type": "array" + }, "schedule": { "description": "Various fields to assist in scheduling the search", "properties": { @@ -103,26 +123,6 @@ }, "type": "object" }, - "lookups": { - "description": "A list of lookups in the search", - "examples": [ - "detection_search_lookup" - ], - "items": { - "type": "string" - }, - "type": "array" - }, - "macros": { - "description": "A list of macros in the search", - "examples": [ - "detection_search_output_filter" - ], - "items": { - "type": "string" - }, - "type": "array" - }, "search": { "description": "The search (in SPL) executed within core Splunk for investgation.", "examples": [ @@ -198,7 +198,7 @@ "Certificates", "Change_Analysis", "Change", - "Cloud", + "Cloud_Infrastructure", "Malware", "Email", "Identity_Management", diff --git a/spec/v2/detections.spec.json b/spec/v2/detections.spec.json index a12a62ec7e..5a782485d2 100644 --- a/spec/v2/detections.spec.json +++ b/spec/v2/detections.spec.json @@ -572,7 +572,7 @@ "Certificates", "Change_Analysis", "Change", - "Cloud", + "Cloud_Infrastructure", "Malware", "Email", "Identity_Management", diff --git a/spec/v2/investigations.spec.json b/spec/v2/investigations.spec.json index 11f3aed3f1..f2b74debce 100644 --- a/spec/v2/investigations.spec.json +++ b/spec/v2/investigations.spec.json @@ -137,7 +137,7 @@ "Certificates", "Change_Analysis", "Change", - "Cloud", + "Cloud_Infrastructure", "Malware", "Email", "Identity_Management", @@ -248,6 +248,7 @@ "process", "recipient", "Region", + "region", "resourceId", "session_id", "src_ip", diff --git a/stories/cloud_cryptomining.yml b/stories/cloud_cryptomining.yml index e07c14fa62..186604ce30 100644 --- a/stories/cloud_cryptomining.yml +++ b/stories/cloud_cryptomining.yml @@ -35,18 +35,18 @@ narrative: 'Cryptomining is an intentionally difficult, resource-intensive busin Cryptojacking has attracted an increasing amount of media attention since its explosion in popularity in the fall of 2017. The attacks have moved from in-browser exploits and mobile phones to enterprise cloud services, such as Amazon Web Services (AWS), - Google Cloud Platform (GCP), or Azure. It''s difficult to determine exactly how + Google Cloud Platform (GCP), and Azure. It''s difficult to determine exactly how widespread the practice has become, since bad actors continually evolve their ability to escape detection, including employing unlisted endpoints, moderating their CPU usage, and hiding the mining pool''s IP address behind a free CDN. \ - hen malicious miners appropriate a cloud instance, often spinning up hundreds of - new instances, the costs can become astronomical for the account holder. So, it + When malicious miners appropriate a cloud instance, often spinning up hundreds of + new instances, the costs can become astronomical for the account holder. So it is critically important to monitor your systems for suspicious activities that could indicate that your network has been infiltrated. \ This Analytic Story is focused on detecting suspicious new instances in your cloud - environment to help prevent such a disaster. It contains detection searches that + environment to help prevent cryptominers from gaining a foothold. It contains detection searches that will detect when a previously unused instance type or AMI is used. It also contains support searches to build lookup files to ensure proper execution of the detection searches.' diff --git a/stories_categories.md b/stories_categories.md deleted file mode 100644 index e69de29bb2..0000000000