From 852b632742f4e63b6b19dda52cee8294e2f778ca Mon Sep 17 00:00:00 2001 From: divious1 Date: Mon, 25 Feb 2019 12:56:55 -0500 Subject: [PATCH 1/5] added phantom skeleton --- escu/searches/detection_dns_record_changed.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/escu/searches/detection_dns_record_changed.json b/escu/searches/detection_dns_record_changed.json index ee129e8dd4..f59ca3568a 100644 --- a/escu/searches/detection_dns_record_changed.json +++ b/escu/searches/detection_dns_record_changed.json @@ -75,6 +75,16 @@ "name": "Jose Hernandez" } ], + "phantom_playbooks": [ + { + "phantom_server": "automation (hostname)", + "playbook_display_name": "DNS record change investigation", + "playbook_name": "community/excessive_account_lockouts_enrichment_and_response", + "playbook_url": "https://my.phantom.us/4.1/playbook/excessive-account-lockouts-enrichment-and-response/", + "sensitivity": "green", + "severity": "medium" + } + ], "scheduling": { "cron_schedule": "0 * * * *", "earliest_time": "-70m@m", From dd3f20a9e2815d9bc36847306a766a0fd7a8f188 Mon Sep 17 00:00:00 2001 From: divious1 Date: Mon, 25 Feb 2019 18:07:05 -0500 Subject: [PATCH 2/5] updating search from a bug that rico found --- escu/searches/detection_dns_record_changed.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escu/searches/detection_dns_record_changed.json b/escu/searches/detection_dns_record_changed.json index f59ca3568a..530eb924e9 100644 --- a/escu/searches/detection_dns_record_changed.json +++ b/escu/searches/detection_dns_record_changed.json @@ -90,7 +90,7 @@ "earliest_time": "-70m@m", "latest_time": "-10m@m" }, - "search": "| inputlookup discovered_dns_records.csv | rename answer as discovered_answer | join domain[|tstats summariesonly=true count values(DNS.record_type) as type, values(DNS.answer) as current_answer values(DNS.src) as src from datamodel=Network_Resolution where DNS.message_type=RESPONSE DNS.answer!=\"unknown\" DNS.answer!=\"\" by DNS.query | rename DNS.query as query | where query!=\"unknown\" | rex field=query \"(?\\w+\\.\\w+?)(?:$|/)\"] | makemv delim=\" \" answer | makemv delim=\" \" type | sort -count | table count,src,domain,type,query,current_answer,discovered_answer | where current_answer!=discovered_answer", + "search": "| inputlookup discovered_dns_records.csv | rename answer as discovered_answer | join domain[|tstats summariesonly=true count values(DNS.record_type) as type, values(DNS.answer) as current_answer values(DNS.src) as src from datamodel=Network_Resolution where DNS.message_type=RESPONSE DNS.answer!=\"unknown\" DNS.answer!=\"\" by DNS.query | rename DNS.query as query | where query!=\"unknown\" | rex field=query \"(?\\w+\\.\\w+?)(?:$|/)\"] | makemv delim=\" \" answer | makemv delim=\" \" type | sort -count | table count,src,domain,type,query,current_answer,discovered_answer | makemv current_answer | mvexpand current_answer | makemv discovered_answer | eval n=mvfind(discovered_answer, current_answer) | where isnull(n)", "search_description": "The search takes the DNS records and their answers results of the discovered_dns_records lookup and finds if any records have changed by searching DNS response from the Network_Resolution datamodel across the last day.", "search_id": "44d3a43e-dcd5-49f7-8356-5209bb369065", "search_name": "DNS record changed", From 5264fa352a9eaffcf81d25e65b5800224c1bd87b Mon Sep 17 00:00:00 2001 From: divious1 Date: Tue, 26 Feb 2019 16:04:21 -0500 Subject: [PATCH 3/5] fixing ci error for wrong datamodel --- escu/searches/support_discover_dns_records.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escu/searches/support_discover_dns_records.json b/escu/searches/support_discover_dns_records.json index a474fb6325..0829cf8dca 100644 --- a/escu/searches/support_discover_dns_records.json +++ b/escu/searches/support_discover_dns_records.json @@ -3,7 +3,7 @@ "creation_date": "2019-02-14", "data_metadata": { "data_models": [ - "Network_Traffic" + "Network_Resolution" ], "data_source": [ "Network Communication" From 8b456720a9e77c1a880d0562c5d34e32deb3ee9c Mon Sep 17 00:00:00 2001 From: divious1 Date: Wed, 27 Feb 2019 15:34:09 -0500 Subject: [PATCH 4/5] updating the how to implement --- escu/searches/detection_dns_record_changed.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/escu/searches/detection_dns_record_changed.json b/escu/searches/detection_dns_record_changed.json index 530eb924e9..1cb5983e47 100644 --- a/escu/searches/detection_dns_record_changed.json +++ b/escu/searches/detection_dns_record_changed.json @@ -34,7 +34,7 @@ ] }, "eli5": "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\".", + "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 Investigation\" 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.1/playbook/dns-hijack-investigation/).

\"", "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.", "maintainers": [ { @@ -79,8 +79,8 @@ { "phantom_server": "automation (hostname)", "playbook_display_name": "DNS record change investigation", - "playbook_name": "community/excessive_account_lockouts_enrichment_and_response", - "playbook_url": "https://my.phantom.us/4.1/playbook/excessive-account-lockouts-enrichment-and-response/", + "playbook_name": "community/dns_hijack_investigation", + "playbook_url": "https://my.phantom.us/4.1/playbook/dns-hijack-investigation/", "sensitivity": "green", "severity": "medium" } From f228adf7ad9cc8d49223b6a3aa951cb877924381 Mon Sep 17 00:00:00 2001 From: bpatel Date: Wed, 27 Feb 2019 12:46:51 -0800 Subject: [PATCH 5/5] updating the search --- escu/searches/investigative_get_emails_from_source.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escu/searches/investigative_get_emails_from_source.json b/escu/searches/investigative_get_emails_from_source.json index 9603a45507..9201703461 100644 --- a/escu/searches/investigative_get_emails_from_source.json +++ b/escu/searches/investigative_get_emails_from_source.json @@ -31,7 +31,7 @@ "name": "Rico Valdez" } ], - "search": "| tstats `summariesonly` min(_time) as firstTime max(_time) as lastTime count from datamodel=Email.All_Email by All_Email.src | `drop_dm_object_name(\"Email\")` | `ctime(firstTime)` | `ctime(lastTime)` | sort -count | rename All_Email.src as source firstTime as \"First Time\", lastTime as \"Last Time\"", + "search": "|tstats `summariesonly` values(All_Email.dest) as dest values(All_Email.recipient) as recepient min(_time) as firstTime max(_time) as lastTime count from datamodel=Email.All_Email by All_Email.src |`drop_dm_object_name(All_Email)` | `ctime(firstTime)` | `ctime(lastTime)`", "search_description": "This search returns a list of all email sources seen in the 48 hours prior to the notable event to 24 hours after, and the number of emails from each source.", "search_id": "ddc7af28-c34d-4392-af93-7f29a4e8806c", "search_name": "Get History Of Email Sources",