capa
capa copied to clipboard
render: do not display lib rules (or make display optional)
We no longer filter library rules when rendering vverbose. This can be problematic because some library rules can have many matches, polluting the output and in some cases making it unreadable e.g.
...
contain loop (530 matches)
namespace
author [email protected]
scope function
...
and
...
contain loop (7054 matches)
namespace
author [email protected]
scope function
...
This is also problematic for capa explorer when trying to display, e.g. 7,054 rule matches, in a GUI.
Proposed alternatives:
- Do not display
lib
rule matches (as before) - Make it optional to display
lib
rule matches (off by default)
The following code supports rendering all rule matches, including lib
rules.
https://github.com/mandiant/capa/blob/5960f51f130284359de00eaedf1466da7dedb59b/capa/render/vverbose.py#L225-L233
This changed in 65552575f8f214a935162fdd4f8be6253c93ada1. I think lib rules add little value by themselves and we should not display them even in vverbose mode.
agree with moritz, lets not display them
capa explorer does not display lib
rules. If there are regular rules with too many hits, we could think about not displaying them all at once.