Skip to content

YARA · ditekSHen detection

DITEKSHEN_INDICATOR_RMM_Meshagent

Detects MeshAgent. Review RMM Inventory

Suspicious / huntingditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekSHen
Date
2023-08-22
Modified
2024-10-04
Score / Quality
75 / 75

What this rule detects

Detects MeshAgent. Review RMM Inventory

Targets: Windows PE.

It defines 12 patterns (12 text, 0 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

indicator-rmm-meshagent.yarBSD 2-Clause License
rule DITEKSHEN_INDICATOR_RMM_Meshagent : FILE
{
	meta:
		description = "Detects MeshAgent. Review RMM Inventory"
		author = "ditekSHen"
		id = "3d0baa87-22c9-569d-ba84-37ccaac577b8"
		date = "2023-08-22"
		modified = "2024-10-04"
		reference = "https://www.cisa.gov/sites/default/files/2023-08/JCDC_RMM_Cyber_Defense_Plan_TLP_CLEAR_508c_1.pdf"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_rmm.yar#L3-L27"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "f36c0e23b20e4466100cf4ea2a91515bf1d54505e7b1f0926a4e416a04e0dbcf"
		score = 75
		quality = 75
		tags = "FILE"
		clamav1 = "INDICATOR.Win.RMM.MeshAgent"

	strings:
		$x1 = "\\MeshAgent" wide
		$x2 = "Mesh Agent" wide
		$x3 = "MeshDummy" wide
		$x4 = "MeshCentral" wide
		$x5 = "ILibRemoteLogging.c" ascii
		$x6 = "AgentCore/MeshServer_" wide
		$s1 = "var _tmp = 'Detected OS: ' + require('os').Name;" ascii
		$s2 = "console.log(getSHA384FileHash(process.execPath).toString('hex'))" ascii
		$s3 = "ScriptContainer.Create(): Error spawning child process, using [%s]" fullword ascii
		$s4 = "{\"agent\":\"" ascii
		$s6 = "process.versions.commitHash" fullword ascii
		$s7 = "console.log('Error Initializing script from Zip file');process._exit();" fullword ascii

	condition:
		uint16( 0 ) == 0x5a4d and ( 3 of ( $x* ) or ( 1 of ( $x* ) and 3 of ( $s* ) ) or 6 of ( $s* ) )
}

Strings (12 patterns)

IdentifierTypeValueModifiers
$x1text"\\MeshAgent"wide
$x2text"Mesh Agent"wide
$x3text"MeshDummy"wide
$x4text"MeshCentral"wide
$x5text"ILibRemoteLogging.c"ascii
$x6text"AgentCore/MeshServer_"wide
$s1text"var _tmp = 'Detected OS: ' + require('os').Name;"ascii
$s2text"console.log(getSHA384FileHash(process.execPath).toString('hex'))"ascii
$s3text"ScriptContainer.Create(): Error spawning child process, using [%s]"fullword ascii
$s4text"{\"agent\":\""ascii
$s6text"process.versions.commitHash"fullword ascii
$s7text"console.log('Error Initializing script from Zip file');process._exit();"fullword ascii

Condition

uint16( 0 ) == 0x5a4d and ( 3 of ( $x* ) or ( 1 of ( $x* ) and 3 of ( $s* ) ) or 6 of ( $s* ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 3 patterns in ( $x* ) must match.
  • At least 1 patterns in ( $x* ) must match.
  • At least 3 patterns in ( $s* ) must match.
  • At least 6 patterns in ( $s* ) must match.

Test this rule in your browser

Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.

Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.

Open in editor

References

Licence & attribution

Author: ditekSHen

Source repository: ditekSHen detection @ e76c93dcde

Licence: BSD 2-Clause License (repository licence)

Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: 3d0baa87-22c9-569d-ba84-37ccaac577b8

Metadata

clamav1INDICATOR.Win.RMM.MeshAgent

Tags:FILE