-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YARA patterns in the static-code directory are very large #3
Comments
|
As I laid out here, shipping uncompiled files and compiling them as-needed would be a good compromise. I'm not sure if it is better to keep the discussion here or there.
Is that possible right now without changes to the retdec source? That could be a reasonable alternative to just stripping the files altogether, which is what we currently do by default. |
I closed this but forgot to write an explanation, so here it goes. From now on, YARA rules in the support package are in a text form. They are compiled at installation step by default. You can disable the compilation by setting We will release the Btw, even in the text form, YARA rules are probably much bigger than they need to be. Most of this is caused by Delphi signatures. The current solution is kind of an experiment on how to use YARA to this purpose. Maybe the rules do not have too be so long - it could work just as well with much shorter rules. It could be investigated further, but we do not have resources at the moment, maybe some university student will explore this in the future. |
Sounds neat, thank you! So if |
If FYI, runtime cost of parsing YARA rules on my machine (Linux, 3 runs):
So as you can see, it is nothing terrible, but it is a little bit annoying - especially for Delphi. |
Awesome! Thanks for the benchmarks. The even-nicer-to-have feature request would be caching of the just-in-time compilation, but it is perfectly workable as it is now :) |
- Bumps vendored dependencies and remove ones no longer needed. - Since 3.3, compiled patterns are not shipped in the support file, obviating the postFetch strip. (avast/retdec-support#3) - Now, patterns may be compiled at build time and an argument is provided to control this (on by default). - As such, retdec-full is no longer needed and removed. The 60MB increase seems more preferred than duplicating the 500MB size. - We use cmake _URL variables to insert dependencies and we are able to use nixpkgs googletest. - Fix build with current gcc 13. - Remove i686 from platforms, as derivation needs to specify lib64. - Maintainers: remove timokau, add katrinafyi.
The
static-code
directory in the compiled archive is 3.9 GiB big (most of that is instatic-code/pe/32/le/x86/delphi
). In comparison thestatic-code
directory from the uncompiled yara archive is only 710MiB.Is that to be expected or is there some kind of issue causing this blowup?
If I understand the wiki correctly, those files are non-essential and only used for statically-linked code removal correct? And it sounds like retdec could even use the uncompiled patterns with some performance penalty?
The text was updated successfully, but these errors were encountered: