01 BitsOfBinary
Search
Posts / 100 Days of YARA

Series · 10 chapters · ~147 min read

100 Days of YARA

From YARA module internals and LNK parsing to AcidBox malware signaturing

A 10-part consolidated deep dive covering 100 consecutive days of YARA research: writing the official LNK parser module, string atom scoring, math and entropy performance, file format classification, and end-to-end rule engineering for the AcidBox framework.

Chapters

  1. 01 · Days 1–4 5 min

    Introduction to YARA & Modules

    Getting started with YARA rules, performance pitfalls to avoid, and clustering PE malware using imphash, Rich header hashes, and PDB paths.

  2. 02 · Days 5–30 39 min

    Deep Dive: The YARA LNK Module

    Comprehensive guide to parsing and signaturing malicious Windows Shell Link (.lnk) files—headers, timestamps, LinkInfo, StringData, CONSOLE_PROPS, tracker data, and overlays.

  3. 03 · Days 31–34 4 min

    Hex Values in Text Strings

    Combining hex escapes inside YARA text strings to unlock modifiers like wide, xor, and base64 that hexadecimal byte strings cannot use.

  4. 04 · Days 35–37 3 min

    Understanding YARA Atoms

    How YARA extracts and scores 4-byte atoms from strings for fast Aho-Corasick matching, and how to write high-scoring strings.

  5. 05 · Days 38–45 10 min

    The YARA Math Module & Entropy

    Measuring randomness and obfuscation with entropy, Monte Carlo Pi, and serial correlation, plus bounding loops safely for performance.

  6. 06 · Days 46–57 10 min

    YARA Command-Line Flags & Performance

    Practical tour of YARA CLI options for rule compilation, timeouts, fast-scan mode, file-size limits, multithreading, memory scanning, and debugging.

  7. 07 · Days 58–75 27 min

    File Classification by Offset & Structure

    Identifying and inspecting PE, ELF, Mach-O, ISO, and OneNote files using fixed-offset integer reads versus string scanning, including an embedded OneNote payload case study.

  8. 08 · Days 76–77 3 min

    YARA Rule-Writing Philosophy

    Balancing accessibility, simplicity, and redundancy across four detection facets: strings, metadata, code, and techniques.

  9. 09 · Days 78–99 45 min

    Case Study: Signaturing the AcidBox Framework

    End-to-end malware rule-writing walkthrough against AcidBox SSP and worker DLLs—covering format strings, PE rich/export metadata, custom crypto opcodes in Ghidra, unique error codes, and stack strings.

  10. 10 · Day 100 1 min

    Series Wrap-Up & Index of Coincidence

    Reflections on 100 Days of YARA and adding Index of Coincidence functions to YARA's math module to detect obfuscated strings.