-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nterl0k - T1219 - RMM Detection for Registry locations. #3257
Nterl0k - T1219 - RMM Detection for Registry locations. #3257
Conversation
detections/endpoint/detect_remote_access_software_usage_registry.yml
Outdated
Show resolved
Hide resolved
detections/endpoint/detect_remote_access_software_usage_registry.yml
Outdated
Show resolved
Hide resolved
detections/endpoint/detect_remote_access_software_usage_registry.yml
Outdated
Show resolved
Hide resolved
detections/endpoint/detect_remote_access_software_usage_registry.yml
Outdated
Show resolved
Hide resolved
Can do, will make some commits shortly.
Regards,
Steven.
-------- Original message --------
From: Bhavin Patel ***@***.***>
Date: 1/6/25 4:43 PM (GMT-05:00)
To: splunk/security_content ***@***.***>
Cc: Steven Dick ***@***.***>, Mention ***@***.***>
Subject: Re: [splunk/security_content] Nterl0k - T1219 - RMM Detection for Registry locations. (PR #3257)
@patel-bhavin commented on this pull request.
________________________________
In detections/endpoint/detect_remote_access_software_usage_registry.yml<#3257 (comment)>:
+description: The following analytic detects when a known remote access software is added to common persistence locations on a device within the environment. Adversaries use these utilities to retain remote access capabilities to the environment. Utilities in the lookup include AnyDesk, GoToMyPC, LogMeIn, TeamViewer and much more. Review the lookup for the entire list and add any others.
+data_source:
+- Sysmon EventID 12
+- Sysmon EventID 13
+search: '| tstats `security_content_summariesonly` latest(Registry.process_guid) as process_guid count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where (Registry.registry_path="*\\Microsoft\\Windows\\CurrentVersion\\Run*" OR (Registry.registry_path="*\\SYSTEM\\CurrentControlSet\\Services\\*" AND Registry.registry_value_name="ImagePath")) by Registry.dest Registry.user Registry.registry_path Registry.registry_value_name Registry.registry_value_data Registry.registry_key_name
+| `drop_dm_object_name(Registry)`
+| `security_content_ctime(firstTime)`
+| `security_content_ctime(lastTime)`
+| rex field=registry_value_data "(\")?.+\\\(?<file_name_1>[^\"=]+\.[^\" ]{1,5})(\")?"
+| rex field=registry_value_data "(?<file_name_2>[^\.]+\.[^\" ]{1,5}$)"
+| eval file_name = coalesce(file_name_1,file_name_2)
+| lookup remote_access_software remote_utility AS file_name OUTPUT isutility, description as signature, comment_reference as desc, category
+| search isutility = TRUE
+| `remote_access_software_usage_exception_filter`
+| `detect_remote_access_software_usage_registry_filter`'
+how_to_implement: The detection is based on data that originates from Endpoint Detection and Response (EDR) agents. These agents are designed to provide security-related telemetry from the endpoints where the agent is installed. To implement this search, you must ingest logs that contain the file path, file name, and the user that created the file. These logs must be processed using the appropriate Splunk Technology Add-ons that are specific to the EDR product. The logs must also be mapped to the `Filesystem` node of the `Endpoint` data model. Use the Splunk Common Information Model (CIM) to normalize the field names and speed up the data modeling process. The "exceptions" macro leverages both an Assets and Identities lookup, as well as a KVStore collection called "remote_software_exceptions" that lets you track and maintain device-based exceptions for this set of detections.
update Filesystem to Registry. Can you also ship a lookup yaml file for the remote_software_exceptions KV store configuration?
—
Reply to this email directly, view it on GitHub<#3257 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJIYP7TZEII2JTP676KZVKL2JL2IFAVCNFSM6AAAAABUJ674CSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKMZTGAZDGOBQGM>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@nterl0k : Thank you for making those prompt changes. Now we also need two drill down as defaults in our yamls for TTP, Anomaly and Correlation detections . Can you add these two drilldowns? We will look into automating these drilldowns in a future release! Here is the CI error : https://github.com/splunk/security_content/actions/runs/12641453140/job/35223884630?pr=3257 from the build stage
|
Oh very cool.
Most of my detections have drill downs, I just omit them in my submissions... Lemme add those.
I can update the other RMM detections as well.
Regards,
Steven.
…-------- Original message --------
From: Bhavin Patel ***@***.***>
Date: 1/6/25 5:39 PM (GMT-05:00)
To: splunk/security_content ***@***.***>
Cc: Steven Dick ***@***.***>, Mention ***@***.***>
Subject: Re: [splunk/security_content] Nterl0k - T1219 - RMM Detection for Registry locations. (PR #3257)
@nterl0k<https://github.com/nterl0k> : Thank you for making those prompt changes. Now we also need two drill down as defaults in our yamls for TTP, Anomaly and Correlation detections . Can you add these two drilldowns? We will look into automating these drilldowns in a future release!
eg:
https://github.com/splunk/security_content/blob/d69dcf35a45a8b7fecfd23b457ac00fdb5026d1a/detections/endpoint/add_or_set_windows_defender_exclusion.yml#L42
—
Reply to this email directly, view it on GitHub<#3257 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJIYP7ROKYPPVNV4LQJCGQ32JMAY7AVCNFSM6AAAAABUJ674CSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNZUGA2DSNJSG4>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@patel-bhavin Let me ask a few clarifying questions. Do you want me to just add the generic drill downs similar to security_content/detections/endpoint/add_or_set_windows_defender_exclusion.yml or Would the inclusion of my targeted drill downs be acceptable? How many drill downs are allowed 2+ or 2 exactly? Thanks |
@nterl0k : we would need the two generic ones and we can/should add the targeted drill downs after the first two! Thank you |
add drilldowns
Alright I added the generics + my own to the yaml on this and my other current PRs. Hopefully that allows it to pass smoother. |
Ok looks like this one is hanging because the lookup "asset_lookup_by_str" isn't in the testing environment (which is part of ES). The macro 'remote_access_software_usage_exceptions' contains a reference to the lookup asset_lookup_by_str, same as all the other RMM detections I submitted previously with it. |
yeah, Looks like we have added "manual_test: This detection uses A&I lookups from Enterprise Security." for the other RMM detections! I will test the detection locally and add that flag! Thanks @nterl0k |
Details
An update for common registry auto-start locations used by RMMs, to flush out existing RMM monitoring detection.
Pending splunk/attack_data#924
Checklist
<platform>_<mitre att&ck technique>_<short description>
nomenclatureNotes For Submitters and Reviewers
build
CI job when it fails will likely show an error about what is failing. You may have a very descriptive error of the specific field(s) in the specific file(s) that is causing an issue. In some cases, its also possible there is an issue with the YAML. Many of these can be caught with the pre-commit hooks if you set them up. These errors will be less descriptive as to what exactly is wrong, but will give you a column and row position in a specific file where the YAML processing breaks. If you're having trouble with this, feel free to add a comment to your PR tagging one of the maintainers and we'll be happy to help troubleshoot it.