YARA · Mandiant red team tool countermeasures
FIREEYE_RT_Hacktool_MSIL_Sharpersist_2
No description has been set in the source file - FireEye-RT
- Author
- FireEye
- Date
- 2020-12-08
- Modified
- 2020-12-09
- Score / Quality
- 75 / 75
What this rule detects
No description has been set in the source file - FireEye-RT
Targets: Windows PE.
It defines 10 patterns (10 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule FIREEYE_RT_Hacktool_MSIL_Sharpersist_2 : FILE
{
meta:
= "No description has been set in the source file - FireEye-RT"
= "FireEye"
= "49d7891e-b97a-52a8-acfd-bbf986732d6c"
= "2020-12-08"
= "2020-12-09"
= "https://github.com/mandiant/red_team_tool_countermeasures/"
= "https://github.com/mandiant/red_team_tool_countermeasures//blob/3561b71724dbfa3e2bb78106aaa2d7f8b892c43b/rules/SHARPERSIST/production/yara/HackTool_MSIL_SharPersist_2.yar#L4-L23"
= "https://github.com/mandiant/red_team_tool_countermeasures//blob/3561b71724dbfa3e2bb78106aaa2d7f8b892c43b/LICENSE.txt"
= "98ecf58d48a3eae43899b45cec0fc6b7"
= "57387352f8fd08e8b859dffc1164d46370f248b337526c265634160010572a00"
= 75
= 75
= "FILE"
= 1
strings:
$a1 = "SharPersist.lib"
$a2 = "SharPersist.exe"
$b1 = "ERROR: Invalid hotkey location option given." ascii wide
$b2 = "ERROR: Invalid hotkey given." ascii wide
$b3 = "ERROR: Keepass configuration file not found." ascii wide
$b4 = "ERROR: Keepass configuration file was not found." ascii wide
$b5 = "ERROR: That value already exists in:" ascii wide
$b6 = "ERROR: Failed to delete hidden registry key." ascii wide
$pdb1 = "\\SharPersist\\"
$pdb2 = "\\SharPersist.pdb"
condition:
( uint16( 0 ) == 0x5A4D and uint32( uint32( 0x3C ) ) == 0x00004550 ) and ( ( @pdb2 [ 1 ] < @pdb1 [ 1 ] + 50 ) or ( 1 of ( $a* ) and 2 of ( $b* ) ) )
}
Strings (10 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $a1 | text | "SharPersist.lib" | |
| $a2 | text | "SharPersist.exe" | |
| $b1 | text | "ERROR: Invalid hotkey location option given." | ascii wide |
| $b2 | text | "ERROR: Invalid hotkey given." | ascii wide |
| $b3 | text | "ERROR: Keepass configuration file not found." | ascii wide |
| $b4 | text | "ERROR: Keepass configuration file was not found." | ascii wide |
| $b5 | text | "ERROR: That value already exists in:" | ascii wide |
| $b6 | text | "ERROR: Failed to delete hidden registry key." | ascii wide |
| $pdb1 | text | "\\SharPersist\\" | |
| $pdb2 | text | "\\SharPersist.pdb" |
Condition
( uint16( 0 ) == 0x5A4D and uint32( uint32( 0x3C ) ) == 0x00004550 ) and ( ( @pdb2 [ 1 ] < @pdb1 [ 1 ] + 50 ) or ( 1 of ( $a* ) and 2 of ( $b* ) ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 1 patterns in ( $a* ) must match.
- At least 2 patterns in ( $b* ) 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.
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- 98ecf58d48a3eae43899b45cec0fc6b7
Licence & attribution
Author: FireEye
Source repository: Mandiant red team tool countermeasures @ 3561b71724
Licence: BSD 2-Clause License (repository licence)
Copyright notice: Copyright (c) 2023, MANDIANT
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 49d7891e-b97a-52a8-acfd-bbf986732d6c
Metadata
| rev | 1 |
|---|
Tags:FILE
Related rules
- Hack toolMandiant red team tool countermeasures· FireEye· 2020-12-08
- Hack toolMandiant red team tool countermeasures· FireEye· 2020-11-25
- Hack toolMandiant red team tool countermeasures· FireEye· 2020-12-08
- Hack toolMandiant red team tool countermeasures· FireEye· 2020-12-01
- Hack toolMandiant red team tool countermeasures· FireEye· 2020-12-01
- Hack toolMandiant red team tool countermeasures· FireEye· 2020-11-25
- Hack toolMandiant red team tool countermeasures· FireEye· 2020-11-25
- Hack toolMandiant red team tool countermeasures· FireEye· 2020-12-08