Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Nplusminer

Detects PowerShell based NPlusMiner

MalwareNplusminerditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekSHen
Date
2020-11-06
Modified
2024-11-01
Score / Quality
75 / 75

What this rule detects

Detects PowerShell based NPlusMiner

Associated malware family: Nplusminer.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-nplusminer.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Nplusminer
{
	meta:
		description = "Detects PowerShell based NPlusMiner"
		author = "ditekSHen"
		id = "a16b504f-e69a-5abb-8e37-01bf7c2df6ef"
		date = "2020-11-06"
		modified = "2024-11-01"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L9051-L9064"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "f6b81c2276765455d46e20ed81e19caa3ae36a31827568486a09bc1619ec478c"
		score = 75
		quality = 75
		tags = ""
		snort_sid = "920284"

	strings:
		$s1 = "$Core | Add-Member @{IsReadOnly = $((Get-ItemProperty -Path \".\\Includes\\Core.ps1\").IsReadOnly)} -Force" fullword ascii
		$s2 = "$Core | Add-Member @{MinerCustomConfig = $((Get-Content \".\\Config\\MinerCustomConfig.json\" -Raw))} -Force" fullword ascii
		$s3 = "If ($Variables.CheatGuy -and $Core.corehash -in $Hashes -and $Core.ScriptStartDate -le (Get-Date)" ascii
		$s4 = "Try{(Get-ItemProperty -Path \".\\Includes\\Core.ps1\").IsReadOnly = $false} catch {}" fullword ascii
		$s5 = " NPlusMiner/" ascii

	condition:
		3 of them
}

Strings (5 patterns)

IdentifierTypeValueModifiers
$s1text"$Core | Add-Member @{IsReadOnly = $((Get-ItemProperty -Path \".\\Includes\\Core.ps1\").IsReadOnly)} -Force"fullword ascii
$s2text"$Core | Add-Member @{MinerCustomConfig = $((Get-Content \".\\Config\\MinerCustomConfig.json\" -Raw))} -Force"fullword ascii
$s3text"If ($Variables.CheatGuy -and $Core.corehash -in $Hashes -and $Core.ScriptStartDate -le (Get-Date)"ascii
$s4text"Try{(Get-ItemProperty -Path \".\\Includes\\Core.ps1\").IsReadOnly = $false} catch {}"fullword ascii
$s5text" NPlusMiner/"ascii

Condition

3 of them

In plain words (Heuristic)

  • At least 3 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: 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: a16b504f-e69a-5abb-8e37-01bf7c2df6ef

Metadata

snort_sid920284