Skip to content

New rules: MeshAgent arguments #5426

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

norbert791
Copy link

@norbert791 norbert791 commented May 19, 2025

Summary of the Pull Request

This Pull Request adds two new sigma rules that might prove useful for detecting usage of renamed MeshCentral Agent (MeshAgent) binaries. Additionally, a typo from an already present rule is fixed.

Changing

new: Remote Access Tool - Potential MeshAgent Usage - MacOS
new: Remote Access Tool - Potential MeshAgent Usage - Windows
new: Remote Access Tool - Suspicious MeshAgent Usage - MacOS
new: Remote Access Tool - Suspicious MeshAgent Usage - Windows
update: Remote Access Tool - MeshAgent Command Execution via MeshCentral - typo fixed

Example Log Event

Fixed Issues

SigmaHQ Rule Creation Conventions

  • If your PR adds new rules, please consider following and applying these conventions

@github-actions github-actions bot added Rules Windows Pull request add/update windows related rules MacOS Pull request add/update macos related rules labels May 19, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome @norbert791 👋

It looks like this is your first pull request on the Sigma rules repository!

Please make sure to read the SigmaHQ conventions document to make sure your contribution is adhering to best practices and has all the necessary elements in place for a successful approval.

Thanks again, and welcome to the Sigma community! 😃

product: windows
detection:
selection:
CommandLine|windash|contains: --meshServiceName
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CommandLine|windash|contains: --meshServiceName
CommandLine|contains|windash: --meshServiceName

to keep the logic with the rest of the repo

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't windash meant to be used for a single '-' or '/'?
if the intention to use windash is to also watch for '/meshServiceName', the windash won't do it because here is the pysigma conversion of this rule to SPL
CommandLine="*--meshServiceName*" OR CommandLine="*-/meshServiceName*" OR CommandLine="*-–meshServiceName*" OR CommandLine="*-—meshServiceName*" OR CommandLine="*-―meshServiceName*" | table CommandLine,ParentImage,Image

I'm also not sure if /meshServiceName works instead of --meshServiceName

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, it's not a use case for windash.
I've verified that neither /meshServiceName nor -meshServiceName does not work instead of --meshServiceName so it can be just removed.

- https://www.security.com/threat-intelligence/medusa-ransomware-attacks
author: Norbert Jaśniewicz (AlphaSOC)
date: 2025-05-19
modified: 2025-05-19
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
modified: 2025-05-19

You don't need the field 'modified' for newly added rule

modified: 2025-05-19
tags:
- attack.command-and-control
- attack.t1219
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- attack.t1219
- attack.t1219.002

- https://www.security.com/threat-intelligence/medusa-ransomware-attacks
author: Norbert Jaśniewicz (AlphaSOC)
date: 2025-05-19
modified: 2025-05-19
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
modified: 2025-05-19

modified: 2025-05-19
tags:
- attack.command-and-control
- attack.t1219
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- attack.t1219
- attack.t1219.002

product: windows
detection:
selection:
CommandLine|windash|contains: --meshServiceName
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't windash meant to be used for a single '-' or '/'?
if the intention to use windash is to also watch for '/meshServiceName', the windash won't do it because here is the pysigma conversion of this rule to SPL
CommandLine="*--meshServiceName*" OR CommandLine="*-/meshServiceName*" OR CommandLine="*-–meshServiceName*" OR CommandLine="*-—meshServiceName*" OR CommandLine="*-―meshServiceName*" | table CommandLine,ParentImage,Image

I'm also not sure if /meshServiceName works instead of --meshServiceName

product: macos
detection:
selection:
CommandLine|contains: --meshServiceName
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CommandLine|contains: --meshServiceName
CommandLine|contains: '--meshServiceName'

product: windows
detection:
selection:
CommandLine|contains: --meshServiceName
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CommandLine|contains: --meshServiceName
CommandLine|contains: '--meshServiceName'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving it but adding the quotes for uniformity

@phantinuss
Copy link
Collaborator

We could add a level: high rule to match when the command line is found but the executable is not named with its default name i.e. was renamed. In addition the Windows rule can look for the OriginalFileName.

@norbert791
Copy link
Author

We could add a level: high rule to match when the command line is found but the executable is not named with its default name i.e. was renamed. In addition the Windows rule can look for the OriginalFileName.

I have added two new rules. I assume, judging by this file, that MacOS also has OriginalFileName field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MacOS Pull request add/update macos related rules Rules Windows Pull request add/update windows related rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants