Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Miner_Lin_Xmrig_Strings

Detects XMRig ELF

MalwareSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2022-09-08
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detects XMRig ELF

Targets: Linux ELF.

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

Summary generated from the rule's metadata and condition.

Rule source

miner-lin-xmrig-strings.yarDetection Rule License 1.1
rule SEKOIA_Miner_Lin_Xmrig_Strings : FILE
{
	meta:
		description = "Detects XMRig ELF"
		author = "Sekoia.io"
		id = "2f99020b-424c-4433-860c-5e9ab4e1f1de"
		date = "2022-09-08"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/miner_lin_xmrig_strings.yar#L1-L36"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "4946e5099d7d342c8cf6644146ffec8506e786a1d4de0b05ef039bcf2b0fdad2"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		modification_date = "2024-01-04"
		classification = "TLP:CLEAR"

	strings:
		$ = "XMRig "
		$ = "pool_wallet"
		$ = "IP Address currently banned"
		$ = "rigid"
		$ = "diff_current"
		$ = "shares_good"
		$ = "shares_total"
		$ = "avg_time"
		$ = "avg_time_ms"
		$ = "hashes_total"
		$ = "pool address"
		$ = "ping time"
		$ = "connection time"
		$ = "daemon+wss://"
		$ = "daemon+https://"
		$ = "daemon+http://"
		$ = "socks5://"
		$ = "stratum+ssl://"
		$ = "stratum+tcp://"

	condition:
		uint32be( 0 ) == 0x7f454c46 and filesize < 10MB and 7 of them
}

Strings (19 patterns)

IdentifierTypeValueModifiers
$text"XMRig "
$text"pool_wallet"
$text"IP Address currently banned"
$text"rigid"
$text"diff_current"
$text"shares_good"
$text"shares_total"
$text"avg_time"
$text"avg_time_ms"
$text"hashes_total"
$text"pool address"
$text"ping time"
$text"connection time"
$text"daemon+wss://"
$text"daemon+https://"
$text"daemon+http://"
$text"socks5://"
$text"stratum+ssl://"
$text"stratum+tcp://"

Condition

uint32be( 0 ) == 0x7f454c46 and filesize < 10MB and 7 of them

In plain words (Heuristic)

  • The file must start with the ELF header — a Linux/Unix executable.
  • The file must be smaller than 10MB (a cheap guard that skips large files).
  • At least 7 patterns in the rule 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: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

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

Rule id: 2f99020b-424c-4433-860c-5e9ab4e1f1de

Metadata

version1.0
modification_date2024-01-04
classificationTLP:CLEAR

Tags:FILE