Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Infostealer_Win_Nekostealer

Detect the NekoStealer infostealer based on specific strings

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

What this rule detects

Detect the NekoStealer infostealer based on specific strings

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

infostealer-win-nekostealer.yarDetection Rule License 1.1
rule SEKOIA_Infostealer_Win_Nekostealer : FILE
{
	meta:
		description = "Detect the NekoStealer infostealer based on specific strings"
		author = "Sekoia.io"
		id = "8b7d2708-9d33-4855-8e02-f6afedb7dda8"
		date = "2023-01-24"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/infostealer_win_nekostealer.yar#L1-L20"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "f027775bebb48ceb128392040ec2ac8ad84f2a2009760c040e4d376c2f06b663"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$nek = "NekoStealer.Stealing" ascii
		$str01 = "\\Local Storage\\leveldb" wide
		$str02 = "======================= Discord Tokens =======================" wide
		$str03 = "======================== IP Information ========================" wide
		$str04 = "https://ipapi.co/" wide

	condition:
		uint16( 0 ) == 0x5A4D and ( #nek > 10 or all of ( $str* ) )
}

Strings (5 patterns)

IdentifierTypeValueModifiers
$nektext"NekoStealer.Stealing"ascii
$str01text"\\Local Storage\\leveldb"wide
$str02text"======================= Discord Tokens ======================="wide
$str03text"======================== IP Information ========================"wide
$str04text"https://ipapi.co/"wide

Condition

uint16( 0 ) == 0x5A4D and ( #nek > 10 or all of ( $str* ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $str* ) must match.
  • Pattern $nek must occur > 10 times.

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: 8b7d2708-9d33-4855-8e02-f6afedb7dda8

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE