Regole YARA

Esamina byte con regole YARA proprie; una corrispondenza non prova la natura malevola.

Input: Testo (UTF-8) / Un fileRisultato: Testo

Inserimento di testo

Opzioni

Esempi

Match a known marker in record 1

Input

release=2.1.0

Expected checks

Case-insensitive
Contains "public_record_1"
Regole
rule public_record_1 { strings: $marker = "release=2.1.0" condition: $marker }
Mostra stringhe
Off
Mostra lunghezze delle stringhe
Off
Mostra metadata
Off
Mostra conteggi
On
Mostra avvisi delle regole
On
Mostra messaggi del modulo console
On
Match a known marker in record 2

Input

owner=Ada
count=3

Expected checks

Case-insensitive
Contains "public_record_2"
Regole
rule public_record_2 { strings: $marker = "owner=Ada" condition: $marker }
Mostra stringhe
Off
Mostra lunghezze delle stringhe
Off
Mostra metadata
Off
Mostra conteggi
On
Mostra avvisi delle regole
On
Mostra messaggi del modulo console
On
Match a known marker in record 3

Input

sensor=west
celsius=-12

Expected checks

Case-insensitive
Contains "public_record_3"
Regole
rule public_record_3 { strings: $marker = "sensor=west" condition: $marker }
Mostra stringhe
Off
Mostra lunghezze delle stringhe
Off
Mostra metadata
Off
Mostra conteggi
On
Mostra avvisi delle regole
On
Mostra messaggi del modulo console
On
Match a known marker in record 4

Input

Hello, archive!

Expected checks

Case-insensitive
Contains "public_record_4"
Regole
rule public_record_4 { strings: $marker = "Hello, archive!" condition: $marker }
Mostra stringhe
Off
Mostra lunghezze delle stringhe
Off
Mostra metadata
Off
Mostra conteggi
On
Mostra avvisi delle regole
On
Mostra messaggi del modulo console
On
Match a known marker in record 5

Input

The Times 03/Jan/2009

Expected checks

Case-insensitive
Contains "public_record_5"
Regole
rule public_record_5 { strings: $marker = "The Times 03/Jan/2009" condition: $marker }
Mostra stringhe
Off
Mostra lunghezze delle stringhe
Off
Mostra metadata
Off
Mostra conteggi
On
Mostra avvisi delle regole
On
Mostra messaggi del modulo console
On
YARA Match: compile warnings

Input

CyberChef Yara

Expected answer

Warning on line 5: string "$s" may slow down scanning
Warning on line 12: string "$s" may slow down scanning
Input matches rule "a".
Input matches rule "b".
Regole
import "console" rule a { strings: $s=" " condition: $s and console.log("log rule a") } rule b { strings: $s=" " condition: $s and console.hex("log rule b: int8(0)=", int8(0)) }
Mostra stringhe
Off
Mostra lunghezze delle stringhe
Off
Mostra metadata
Off
Mostra conteggi
Off
Mostra avvisi delle regole
On
Mostra messaggi del modulo console
Off
YARA Match: console messages

Input

CyberChef Yara

Expected answer

log rule a
log rule b: int8(0)=0x43
Input matches rule "a".
Input matches rule "b".
Regole
import "console" rule a { strings: $s=" " condition: $s and console.log("log rule a") } rule b { strings: $s=" " condition: $s and console.hex("log rule b: int8(0)=", int8(0)) }
Mostra stringhe
Off
Mostra lunghezze delle stringhe
Off
Mostra metadata
Off
Mostra conteggi
Off
Mostra avvisi delle regole
Off
Mostra messaggi del modulo console
On
YARA Match: hashing rules

Input

Hello World!

Expected answer

Input matches rule "HelloWorldMD5".
Input matches rule "HelloWorldSHA256".
Regole
import "hash" rule HelloWorldMD5 { condition: hash.md5(0,filesize) == "ed076287532e86365e841e92bfc50d8c" } rule HelloWorldSHA256 { condition: hash.sha256(0,filesize) == "7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069" }
Mostra stringhe
On
Mostra lunghezze delle stringhe
On
Mostra metadata
On
Mostra conteggi
On
Mostra avvisi delle regole
Off
Mostra messaggi del modulo console
Off
YARA Match: simple foobar

Input

foobar foobar bar foo foobar

Expected answer

Rule "foo" matches (4 times):
Pos 0, length 3, identifier $re1, data: "foo"
Pos 7, length 3, identifier $re1, data: "foo"
Pos 18, length 3, identifier $re1, data: "foo"
Pos 22, length 3, identifier $re1, data: "foo"
Rule "bar" matches (4 times):
Pos 3, length 3, identifier $re1, data: "bar"
Pos 10, length 3, identifier $re1, data: "bar"
Pos 14, length 3, identifier $re1, data: "bar"
Pos 25, length 3, identifier $re1, data: "bar"
Regole
rule foo {strings: $re1 = /foo/ condition: $re1} rule bar {strings: $re1 = /bar/ condition: $re1}
Mostra stringhe
On
Mostra lunghezze delle stringhe
On
Mostra metadata
On
Mostra conteggi
On
Mostra avvisi delle regole
On
Mostra messaggi del modulo console
On

Parametri

ParametroValore predefinitoInput e opzioni
Regole""Testo
Mostra stringhefalseAttivo o disattivo
Mostra lunghezze delle stringhefalseAttivo o disattivo
Mostra metadatafalseAttivo o disattivo
Mostra conteggitrueAttivo o disattivo
Mostra avvisi delle regoletrueAttivo o disattivo
Mostra messaggi del modulo consoletrueAttivo o disattivo

Strumenti correlati

Analisi forense

Riferimento dell’operazione

Vedi la documentazione tecnica originale (English)