The number of rules involved in the process memory scan increases the scan duration proportionally but it shouldn't. Scanning a process memory on Windows 10 with 500 rules takes a significant amount of time. (~250 seconds)
We've noticed this issue using the golang bindings but you can reproduce it with the public yara binaries as well.
@hillu who investigated that issue came to the conclusion that this is most likely caused by the high number of magic header checks in my rules, which are often in the form of uint16(0) == 0x5a4d.
We noticed a problem with the process memory scanning on Windows 10 when using the 64bit version of YARA. (also counts for Python and Golang bindings)
To reproduce:
YARA 3.7.x process memory scan on Windows 10 64bit
32bit yara – 1 Rule 0.03 sec 32bit yara – 100 Rules 0.03 sec
64bit yara – 1 Rule 0.5 sec 64bit yara – 100 Rules 12 sec <<<
The number of rules involved in the process memory scan increases the scan duration proportionally but it shouldn't. Scanning a process memory on Windows 10 with 500 rules takes a significant amount of time. (~250 seconds)
We've noticed this issue using the golang bindings but you can reproduce it with the public yara binaries as well.
Details Using yara32 on Windows 10
Using yara64 on Windows 10
To reproduce this, you could use my signature set https://github.com/Neo23x0/signature-base/blob/master/yara/apt_eqgrp_apr17.yar