I would like to know if we can count regex string in Yara?
I am not sure if Yara support this?
rule CountExample
{
strings:
$a = "dummy1"
$b = /dummy\d+/
condition:
#a == 6 and #b > 10
}
There only match condition $b but #b can not count
Using
#with a regex string should still count.Assuming these are the contents of the file:
data1.txt
data2.txt
data3.txt
you rule will only match
data1.txt.Try playing with the data in Cyberchef