Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Implant_Win_Incontroller

Detect the INCONTROLLER implant

MalwareSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X (with warnings)
Author
Sekoia.io
Date
2022-04-14
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detect the INCONTROLLER implant

Targets: Windows PE.

It defines 12 patterns (12 text, 0 hex, 0 regex). YARA modules used: pe, hash.

YARA-X says: warning[deprecated_field]: field `number_of_sections` is deprecated

Summary generated from the rule's metadata and condition.

Rule source

Includes the imports needed to compile it on its own.

implant-win-incontroller.yarDetection Rule License 1.1
import "pe"
import "hash"

rule SEKOIA_Implant_Win_Incontroller : FILE
{
	meta:
		description = "Detect the INCONTROLLER implant "
		author = "Sekoia.io"
		id = "c346c6ea-c5c0-4e9f-a632-1e8ed0286fbc"
		date = "2022-04-14"
		modified = "2024-12-19"
		reference = "https://www.mandiant.com/resources/incontroller-state-sponsored-ics-tool"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/implant_win_incontroller.yar#L4-L49"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		hash = "69296ca3575d9bc04ce0250d734d1a83c1348f5b6da756944933af0578bd41d2"
		logic_hash = "988e3004169817758a38dc7cd621ed351dac4de41e6dad03ab1cdfc07b8a6cac"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "AsRockDrv.sys" ascii
		$ = "C:\\Users\\User1\\Desktop\\dev projects\\SignSploit1\\x64\\Release\\AsrDrv_exploit.pdb" ascii
		$ = "found map in %.3f sec physical address : %016I64x" ascii
		$ = "get physical regions error : %x!"
		$ = "Device AsrDrv103 was opened successefuly!" ascii
		$ = "Ioctl handler AsrDrv103 was found successefuly!" ascii
		$ = "cant open the AsrDrv103!" ascii
		$ = "can't read a unsigned driver ! " ascii
		$ = "cant drop and load exploatable driver ! " ascii
		$ = "please set unsigned driver as argument to program!" ascii
		$ = "\\DosDevices\\AsrDrv103" wide
		$t = "This program cannot be run in DOS mode."

	condition:
		( uint16( 0 ) == 0x5A4D and 4 of them and filesize < 800KB and #t == 2 ) or pe.imphash ( ) == "f139e860bc959a7e65a008399425c090" or for any i in ( 0 .. pe.number_of_sections -1 ) : ( hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "a2fe4d32d74354c391a283178f0291e6" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "c33f9caa68fe46c6996a928ba5a38fd6" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "d9a1f1a4d48906da1d9f33eae0f0eaef" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "76426b0209a87fa32ca28e9f2361be67" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "9e63a5064b755925598b8d72ace52dc9" ) or hash.md5 ( pe.rich_signature.clear_data ) == "140d7fb360dbebb03edab903b5d08285"
}

Strings (12 patterns)

IdentifierTypeValueModifiers
$text"AsRockDrv.sys"ascii
$text"C:\\Users\\User1\\Desktop\\dev projects\\SignSploit1\\x64\\Release\\AsrDrv_exploit.pdb"ascii
$text"found map in %.3f sec physical address : %016I64x"ascii
$text"get physical regions error : %x!"
$text"Device AsrDrv103 was opened successefuly!"ascii
$text"Ioctl handler AsrDrv103 was found successefuly!"ascii
$text"cant open the AsrDrv103!"ascii
$text"can't read a unsigned driver ! "ascii
$text"cant drop and load exploatable driver ! "ascii
$text"please set unsigned driver as argument to program!"ascii
$text"\\DosDevices\\AsrDrv103"wide
$ttext"This program cannot be run in DOS mode."

Condition

( uint16( 0 ) == 0x5A4D and 4 of them and filesize < 800KB and #t == 2 ) or pe.imphash ( ) == "f139e860bc959a7e65a008399425c090" or for any i in ( 0 .. pe.number_of_sections -1 ) : ( hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "a2fe4d32d74354c391a283178f0291e6" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "c33f9caa68fe46c6996a928ba5a38fd6" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "d9a1f1a4d48906da1d9f33eae0f0eaef" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "76426b0209a87fa32ca28e9f2361be67" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "9e63a5064b755925598b8d72ace52dc9" ) or hash.md5 ( pe.rich_signature.clear_data ) == "140d7fb360dbebb03edab903b5d08285"

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be smaller than 800KB (a cheap guard that skips large files).
  • At least 4 patterns in the rule must match.
  • Pattern $t must occur == 2 times.
  • A for-loop checks a property over several matches or items.
  • Uses the pe module.
  • Uses the hash module.
  • Compares a hash of the file or a part of it.
  • Checks the PE import hash (imphash).
  • Checks PE sections (names, count or properties).

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

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • 69296ca3575d9bc04ce0250d734d1a83c1348f5b6da756944933af0578bd41d2

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: c346c6ea-c5c0-4e9f-a632-1e8ed0286fbc

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE