Habr•July 23, 2026•🇷🇺Translated from Russian

YARA Style Guide: Comprehensive Best Practices for Naming, Structuring and Maintaining Detection Rules

Florian Roth’s YARA Style Guide has been translated and adapted by security specialist Maxim Motikov of the Russian company Garda to help teams maintain large, consistent collections of detection rules. The guide addresses the common problem that YARA lacks a strict naming or formatting standard, causing rulebases to become disorganized over time.

Rule Naming Conventions

Rule names should combine threat category, context, target platform and creation date so that analysts can understand the purpose of a rule without opening the file. Recommended category prefixes include MAL for malware, HKTL for hacktools, WEBSHELL, EXPL for exploits, VULN for vulnerabilities, SUSP for suspicious patterns and PUA for potentially unwanted applications.

Context tags such as APT, CRIME, RANSOM and ANOMALY can be added, followed by malware type indicators like RAT, Implant, Stealer, Loader or Crypter. Platform and technology suffixes cover operating systems (WIN, LNX, MacOS), architectures (X64, X86, ARM) and file formats or languages (PE, ELF, PS1, VBS, JS, NET, Go, Rust, PHP and others).

Packers such as UPX, Themida and NSIS should be noted when relevant, and specific threat actor or family names (Lazarus, CozyBear, CobaltStrike, PlugX, QakBot) are written in full. Unique suffixes such as May23 or _1 help prevent naming collisions.

Rule Structure and Metadata

Every rule follows a consistent layout with meta, strings and condition sections. Mandatory metadata fields are description (starting with “Detects …”), author, reference and date in YYYY-MM-DD format. Optional but recommended fields include score (0–100), hash (preferably SHA256), modified date and license.

The score helps prioritize alerts: values above 85 indicate high-confidence detections, while lower scores flag generic or low-severity indicators. Additional tags can be stored in a dedicated meta field when they are not central enough for the rule name.

String Organization and Readability

Strings are categorized into three groups: high-specificity strings prefixed with $x*, group strings prefixed with $s* and preliminary filter strings prefixed with $a*. False-positive indicators receive the $fp* prefix so that matches on legitimate patterns can suppress alerts.

Hexadecimal byte sequences should be accompanied by ASCII comments when possible, and long values may be split into 16-byte segments. Simple text strings must never be written as hex unless they contain control characters.

Condition Formatting

Conditions should follow a logical order: header checks, file-size limitations, other constraints, string combinations and finally false-positive filters. Each “and” clause is placed on a new line, and “or” groups are indented for clarity.

By adopting these conventions, teams can create self-documenting rules that remain understandable months or years after creation and reduce the time required to triage large numbers of alerts.

Related articles

AntiMalware•Malware & Botnets

uCreator Spyware Infiltrates Modified Telegram, WeChat and GCash Builds on Android

Security researcher Ovi has published a detailed analysis of uCreator, also known as YingGai, a commercial Android spyware platform designed for surveillance and remote app control. The malware intercepts messages, verification codes and account data directly inside legitimate applications without requiring root privileges. Infection vectors include tampered Telegram, WeChat and GCash APKs distributed through unofficial sources, as well as the Onion Box container that launches the target app inside a controlled environment. Once active, uCreator hooks into the host process, reads Telegram’s local message database through client interfaces, captures two-factor authentication passwords and hides its own session from the user. The operation is supported by cloud-based command panels and exposed GitLab repositories that revealed server-side code and development history. Compatibility problems have been noted on Android 17, and the total number of victims remains unknown.

Habr•Malware & Botnets

Researchers Deploy Cowrie Honeypot Disguised as NVIDIA H100 Server to Study SSH Botnet Tactics

A cybersecurity team set up a realistic Cowrie honeypot on a fake server equipped with four NVIDIA H100 GPUs, 128 AMD EPYC cores, and terabytes of storage to observe what SSH brute-force bots actually do after gaining access. The trap used a custom StickyAuth module that allowed entry only after several failed attempts and locked in the successful credential pair per IP address. Over the first 12.5 hours the system recorded 1,846 connections from 126 unique IPs, 175 successful logins, and 1,524 commands executed, with the majority of activity traced to a single botnet linked to the Outlaw group. The attackers deployed SSH keys signed mdrfckr, changed the root password, killed competing processes, installed cron jobs, and downloaded a mining archive called dota3 containing an IRC backdoor and its own SSH scanner. The researchers also identified three realism issues in the base Cowrie setup—limited grep flags, outdated filesystem paths in Debian 12, and inconsistent hostname reporting—and patched them to keep sophisticated bots engaged longer. An auxiliary LLM service later summarized each session in Telegram for easier analysis.

BoletimSec•Malware & Botnets

Hirudo Android Banking Trojan Uninstalls Legitimate Bank Apps and Installs Attacker-Controlled Fakes

Researchers at ThreatFabric have detailed Hirudo, a sophisticated Android banking trojan that also serves as a remote access tool and replaces genuine bank applications with attacker-controlled copies. The malware spreads through decoy apps themed around shopping, adult video, and short series, including Shopora, 1V1 X, ZoyaTV, and KoiShort. Once installed, it uses accessibility services to detect target banking apps, verify their signatures, display a fake update prompt, and force uninstallation of the real application before installing a malicious replica signed with a publicly known test key. The trojan employs components from the open-source YAHFA and Dobby projects to intercept signature checks, hide accessibility services, bypass screenshot restrictions, and forward Play Integrity attestations to the attacker’s server. Eight ready-made replicas target seven Indonesian banks, while credential theft focuses on users in China, India, Mexico, Morocco, and Thailand. Server logs collected in August 2026 contained thousands of credentials, device data, and financial profiles, with the attestation key set confirmed as publicly leaked and partially revoked by Google.

AntiMalware•Malware & Botnets

Over 300 Tor Exit Nodes Hijacked to Intercept SSH Passwords and Deploy Ebury Backdoor

Attackers compromised hundreds of Tor exit nodes and repurposed them to perform man-in-the-middle attacks against SSH connections. Instead of reaching the intended server, users were redirected to attacker-controlled infrastructure where they could be tricked into accepting a forged host key and revealing their credentials. Researcher kaba identified 333 malicious exit nodes routing traffic through the same 12 interception servers after noticing an unexpected host-key warning on October 2. The campaign also attempted to install the Ebury Linux backdoor designed to steal authentication data. The Tor Project confirmed that operators' servers had their configurations altered and some middle relays were converted into exit nodes. The initial access vector remains unknown, but the activity window was limited to October 1-5. Users who connected via Tor during this period, accepted an unfamiliar key, and entered a password should treat their credentials as compromised.