-
Notifications
You must be signed in to change notification settings - Fork 1
/
using-yara.yaml
29 lines (28 loc) Β· 5.96 KB
/
using-yara.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# cwd: recon/recon/src
#
# $ recon -q using-yara.yml -r ../tests
#
# βββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# β path β yara_match β
# βββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
# β ../tests/cmd/query-nonempty.in/test.txt β {"is_match":true,"on":"cmd/query-nonempty.in/test.txt","by":{"AsciiExample":true},"details":[{"identifier":"AsciiExample","metadatas":[],"namespace":"default","strings":[{"identifier":"$ascii_string","matches":[{"data":[104,101,108,108,111],"length":5,"offset":0}]}],"tags":[]}]} β
# βββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
# β ../tests/cmd/digests.in/test.txt β {"is_match":true,"on":"cmd/digests.in/test.txt","by":{"AsciiExample":true},"details":[{"identifier":"AsciiExample","metadatas":[],"namespace":"default","strings":[{"identifier":"$ascii_string","matches":[{"data":[104,101,108,108,111],"length":5,"offset":0}]}],"tags":[]}]} β
# βββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# 2 files in 39.895ms
#
source:
query: select path,yara_match from files where yara_match is not null
# to only run YARA on subset of files
before_computed_fields_query: "select * from files where ext = 'txt'"
computed_fields:
# match YARA rules against file content
yara_match: |
rule AsciiExample {
strings:
// A string to match -- default is ascii
$ascii_string = "hello"
condition:
// The condition to match
$ascii_string
}