Saltar al contenido

YARA · Mandiant red team tool countermeasures

FIREEYE_RT_Hacktool_MSIL_Sharpivot_3

This rule looks for .NET PE files that have the strings of various method names in the SharPivot code.

Herramienta ofensivaMandiant red team tool countermeasuresBSD 2-Clause LicenseCompila con YARA-X (con avisos)
Autor
FireEye
Fecha
2020-12-08
Modificada
2020-12-10
Puntuación / Calidad
75 / 75

Qué detecta esta regla

This rule looks for .NET PE files that have the strings of various method names in the SharPivot code.

Objetivos: PE de Windows.

Define 17 patrones (17 de texto, 0 hex, 0 regex).

YARA-X dice: warning[duplicate_pattern_value]: duplicate pattern value

Resumen generado a partir de los metadatos y la condición de la regla.

Código de la regla

hacktool-msil-sharpivot-3.yarBSD 2-Clause License
rule FIREEYE_RT_Hacktool_MSIL_Sharpivot_3 : FILE
{
	meta:
		description = "This rule looks for .NET PE files that have the strings of various method names in the SharPivot code."
		author = "FireEye"
		id = "616333fc-4075-5f04-823a-1164717a2b87"
		date = "2020-12-08"
		modified = "2020-12-10"
		reference = "https://github.com/mandiant/red_team_tool_countermeasures/"
		source_url = "https://github.com/mandiant/red_team_tool_countermeasures//blob/3561b71724dbfa3e2bb78106aaa2d7f8b892c43b/rules/SHARPIVOT/production/yara/HackTool_MSIL_SharPivot_3.yar#L4-L31"
		license_url = "https://github.com/mandiant/red_team_tool_countermeasures//blob/3561b71724dbfa3e2bb78106aaa2d7f8b892c43b/LICENSE.txt"
		hash = "e4efa759d425e2f26fbc29943a30f5bd"
		logic_hash = "ecf13e47e409efd68b508735a84be6a1627f5b0c0cea6b90434fc9ba5b1d8cf5"
		score = 75
		quality = 75
		tags = "FILE"
		rev = 3

	strings:
		$msil = "_CorExeMain" ascii wide
		$str1 = "SharPivot" ascii wide
		$str2 = "ParseArgs" ascii wide
		$str3 = "GenRandomString" ascii wide
		$str4 = "ScheduledTaskExists" ascii wide
		$str5 = "ServiceExists" ascii wide
		$str6 = "lpPassword" ascii wide
		$str7 = "execute" ascii wide
		$str8 = "WinRM" ascii wide
		$str9 = "SchtaskMod" ascii wide
		$str10 = "PoisonHandler" ascii wide
		$str11 = "SCShell" ascii wide
		$str12 = "SchtaskMod" ascii wide
		$str13 = "ServiceHijack" ascii wide
		$str14 = "commandArg" ascii wide
		$str15 = "payloadPath" ascii wide
		$str16 = "Schtask" ascii wide

	condition:
		( uint16( 0 ) == 0x5A4D and uint32( uint32( 0x3C ) ) == 0x00004550 ) and $msil and all of ( $str* )
}

Cadenas (17 patrones)

IdentificadorTipoValorModificadores
$msiltexto"_CorExeMain"ascii wide
$str1texto"SharPivot"ascii wide
$str2texto"ParseArgs"ascii wide
$str3texto"GenRandomString"ascii wide
$str4texto"ScheduledTaskExists"ascii wide
$str5texto"ServiceExists"ascii wide
$str6texto"lpPassword"ascii wide
$str7texto"execute"ascii wide
$str8texto"WinRM"ascii wide
$str9texto"SchtaskMod"ascii wide
$str10texto"PoisonHandler"ascii wide
$str11texto"SCShell"ascii wide
$str12texto"SchtaskMod"ascii wide
$str13texto"ServiceHijack"ascii wide
$str14texto"commandArg"ascii wide
$str15texto"payloadPath"ascii wide
$str16texto"Schtask"ascii wide

Condición

( uint16( 0 ) == 0x5A4D and uint32( uint32( 0x3C ) ) == 0x00004550 ) and $msil and all of ( $str* )

En palabras sencillas (Heurística)

  • El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
  • Deben coincidir todos los patrones de ( $str* ).
  • El patrón $msil debe estar presente.

Prueba esta regla en tu navegador

Arrastra un archivo para escanearlo con esta regla usando YARA-X compilado a WebAssembly. No se sube nada.

Arrastra un archivo aquí o haz clic para elegirSe escanea en local con YARA-X. Archivos de hasta 200 MB.

Abrir en el editor

Referencias

Hashes de muestras

Hashes de las muestras que el autor lista en los metadatos de la regla (búscalos en tu plataforma de threat intelligence).

  • e4efa759d425e2f26fbc29943a30f5bd

Licencia y atribución

Autor: FireEye

Repositorio de origen: Mandiant red team tool countermeasures @ 3561b71724

Licencia: BSD 2-Clause License (licencia del repositorio)

Aviso de copyright: Copyright (c) 2023, MANDIANT

Regla original

Obtenida a través de YARA Forge 20260927, que añade a los nombres el prefijo de la fuente y campos meta normalizados.

Id de la regla: 616333fc-4075-5f04-823a-1164717a2b87

Metadatos

rev3

Etiquetas:FILE