YARA · SEKOIA.IO Community
SEKOIA_Tool_Win_Blackfly_Proxy_Config
Detect Blackfly proxy configuration tool
- Author
- Sekoia.io
- Date
- 2023-02-28
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detect Blackfly proxy configuration tool
Targets: Windows PE.
It defines 3 patterns (3 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.
import "pe"
import "hash"
rule SEKOIA_Tool_Win_Blackfly_Proxy_Config : FILE
{
meta:
= "Detect Blackfly proxy configuration tool"
= "Sekoia.io"
= "c8a8be5d-bd28-4306-9466-ad582e53fede"
= "2023-02-28"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/tool_win_blackfly_proxy_config.yar#L4-L29"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "a421d933209f3a81f7430f1b933074701a1fc965c1b4bc321cc7b4e89802f483"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$ = "c:\\ProgramData\\l.dat"
$ = "C:\\ProgramData\\b.dat"
$ = "winmm_DotNetfile.dll"
condition:
pe.imphash( ) == "ff47f65286cc51a1328bc94efbf4007f" 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 ) == "f5923d4331f7e84fbbbd6fd84b6d3e6a" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "56acc10233c711a4eba9ca9aeab47e30" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "824dcebe93ac83bf5c95c781a60b3578" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "ec716a08b5e647f5c00c5dfc079dfa62" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "5cb63f7392c9e05c22e89cd86bd7f718" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "ee04e245066e25edd3062d823f15deda" ) or ( uint16( 0 ) == 0x5A4D and 1 of them )
}
Strings (3 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $ | text | "c:\\ProgramData\\l.dat" | |
| $ | text | "C:\\ProgramData\\b.dat" | |
| $ | text | "winmm_DotNetfile.dll" |
Condition
pe.imphash( ) == "ff47f65286cc51a1328bc94efbf4007f" 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 ) == "f5923d4331f7e84fbbbd6fd84b6d3e6a" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "56acc10233c711a4eba9ca9aeab47e30" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "824dcebe93ac83bf5c95c781a60b3578" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "ec716a08b5e647f5c00c5dfc079dfa62" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "5cb63f7392c9e05c22e89cd86bd7f718" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "ee04e245066e25edd3062d823f15deda" ) or ( uint16( 0 ) == 0x5A4D and 1 of them )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 1 patterns in the rule must match.
- 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.
References
Licence & attribution
Author: Sekoia.io
Source repository: SEKOIA.IO Community @ a438a5901a
Licence: Detection Rule License 1.1 (repository licence)
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: c8a8be5d-bd28-4306-9466-ad582e53fede
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- Hack toolSEKOIA.IO Community· Sekoia.io· 2024-09-06
- Hack toolSEKOIA.IO Community· Sekoia.io· 2024-02-29
- Hack toolSEKOIA.IO Community· Sekoia.io· 2023-12-05
- Hack toolSEKOIA.IO Community· Sekoia.io· 2023-11-15
- Hack toolSEKOIA.IO Community· Sekoia.io· 2023-08-23
- Hack toolSEKOIA.IO Community· Sekoia.io· 2022-02-08
- Hack toolSEKOIA.IO Community· Sekoia.io· 2022-07-22
- Hack toolSEKOIA.IO Community· Sekoia.io· 2022-09-09