Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Yara Toolkit

Yara Toolkit

This talk was presented at Hack Sydney and Bsides Gold Coast.

Thomas Roccia

December 16, 2024
Tweet

More Decks by Thomas Roccia

Other Decks in Programming

Transcript

  1. Analysis similar binaries Identify unique patterns strings, code... Build the

    rule with your findings Test on a cleaned dataset Deploy to the service of choice Monitor everything
  2. Import Module pe, elf, hash, math, cuckoo, dotnet, time Rule

    Name Global rules, Private rules, Rule tags Metadata Author, Date, Description, Etc… Strings Text strings, Hexadecimal string, Regex Text Strings nocase, wide, fullword, xor(0x01-0xff), base64 Hexadecimal Wild-cards: { 00 ?2 A? }, Jump: { 3B [2-4] B4 }Alternatives: { F4 (B4 | 56) } REGEX Conditions Boolean operators, Arithmetic operators, Bitwise operators, Counting strings, Strings, offset https://blog.securitybreak.io/security-infographics-9c4d3bd891ef#18dd
  3. memset(key, fillValue, sizeof(key)); memset(permutedArray, fillValue_1, sizeof(permutedArray)); for ( i =

    0i64; i != 256; ++i ) { permutedArray[i] = i; key[i] = RC4key[(int)i % 12]; // '3jB(2bsG#@c7' } index1 = 0i64; index2 = 0; do { currentValue = permutedArray[index1]; index2 += key[index1] + currentValue; swapValue = permutedArray[index2]; permutedArray[index2] = currentValue; permutedArray[index1++] = swapValue; }
  4. Yara Documentation, Useful resources. Knowledge Base Embedding Retriever Putting the

    data in a multi dimensional vector Retrieve information from the database based on similarity RAG DocYara Help you understand how to use Yara Help you create your rule Help you refine your rule 👨‍⚕️ Retrieval Augmented Generation