Xumeiquer / yara-forensics

Set of Yara rules for finding files using magics headers
GNU General Public License v3.0
134 stars 24 forks source link

Updated png.yar for raw files #3

Closed joanbono closed 7 years ago

joanbono commented 7 years ago

Info

Added png.yar into raw/png.yar

/*
    Author: Joan Bono <@joan_bono>
*/

rule png_magic: PNG
{
    meta:
        author = "Joan Bono"

    strings:
        $a = { 89 50 4E 47 0D 0A 1A 0A }
    $b = { 49 48 44 52 }
    $c = { 49 44 41 54 }
    $d = { 49 45 4E 44 }

    condition:
       $a and for any of ($b, $c): (@ > @a) and $d
}

rule mng_magic: PNG
{
    meta:
        author = "Joan Bono"

    strings:
    $a = { 8A 4D 4E 47 0D 0A 1A 0A }
    $b = { 49 45 4E 44 }

    condition:
       $a and $b: (@ > @a)
}

rule jng_magic: PNG
{
    meta:
        author = "Joan Bono"

    strings:
    $a = { 8B 4A 4E 47 0D 0A 1A 0A }
    $b = { 49 45 4E 44 }

    condition:
       $a and $b: (@ > @a)
}