Skip to content
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

tighten rule pre-selection #2080

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
8b0076b
features: mark format as a global feature
williballenthin May 14, 2024
8858537
pep8
williballenthin May 14, 2024
9c0c662
rules: optimize rule pre-filtering, first revision
williballenthin May 14, 2024
07f347b
Merge branch 'feat/1755' into perf-rule-pre-selection
williballenthin May 22, 2024
2d9c82f
lints
williballenthin May 22, 2024
0dc0c51
rules: add documentation for optimized match routine
williballenthin May 22, 2024
f86a60c
bytes: log length of bytes evaluations
williballenthin May 22, 2024
6e50f48
ruleset: document optimized match behavior
williballenthin May 22, 2024
b7d0734
changelog
williballenthin May 22, 2024
f853214
ruleset: infrastructure to test optimized matcher
williballenthin May 22, 2024
0bc9cb5
Merge branch 'feat/1755' into perf-rule-pre-selection
williballenthin Jun 1, 2024
d25d74f
Merge branch 'feat/1755' into perf-rule-pre-selection
williballenthin Jun 3, 2024
6f9c34b
Merge branch 'perf-rule-pre-selection' of github.com:mandiant/capa in…
williballenthin Jun 3, 2024
9b7fb4e
pep8
williballenthin Jun 3, 2024
e8ef897
linters
williballenthin Jun 3, 2024
e49d47d
rules: match: handle namespace match statements
williballenthin Jun 3, 2024
a4f4f0b
rules: more tests for logic edge cases
williballenthin Jun 3, 2024
bff7f0a
rules: match paranoid true
williballenthin Jun 3, 2024
d20f040
rules: document logic edge cases
williballenthin Jun 3, 2024
ad3643b
Merge branch 'feat/1755' into perf-rule-pre-selection
williballenthin Jun 3, 2024
ced0226
Merge branch 'perf-rule-pre-selection' of github.com:mandiant/capa in…
williballenthin Jun 3, 2024
a7e24e6
pep8
williballenthin Jun 3, 2024
a66524a
rules: match: better debug paranoid matching
williballenthin Jun 3, 2024
61d01bb
rules: matcher: more doc
williballenthin Jun 3, 2024
4f00118
Merge branch 'feat/1755' into perf-rule-pre-selection
williballenthin Jun 3, 2024
62c4452
rules: match: disable paranoid mode by default
williballenthin Jun 3, 2024
376a9ac
Merge branch 'perf-rule-pre-selection' of github.com:mandiant/capa in…
williballenthin Jun 3, 2024
8ccae6e
add tests demonstrating optimized matching behavior
williballenthin Jun 3, 2024
12a78f3
rules: match: remove inline closure comment
williballenthin Jun 3, 2024
960ee86
typo
williballenthin Jun 3, 2024
e21a70f
rules: clarify the term "unstable" with longer comments
williballenthin Jun 4, 2024
e1252b0
Merge branch 'perf-rule-pre-selection' of github.com:mandiant/capa in…
williballenthin Jun 4, 2024
457cfe0
rules: more comments describing how features are scored
williballenthin Jun 4, 2024
b34667f
black
williballenthin Jun 4, 2024
1f1e142
rules: match: re-introduce default rule scores
williballenthin Jun 6, 2024
347619d
rules: match: remove trace comments
williballenthin Jun 6, 2024
b376a84
black
williballenthin Jun 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions capa/features/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,6 @@ def __init__(self, value: str, description=None):
def is_global_feature(feature):
"""
is this a feature that is extracted at every scope?
today, these are OS and arch features.
today, these are OS, arch, and format features.
"""
return isinstance(feature, (OS, Arch))
return isinstance(feature, (OS, Arch, Format))
2 changes: 1 addition & 1 deletion capa/features/extractors/binexport2/insn.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from capa.features.insn import API, Number, Mnemonic, OperandNumber
from capa.features.common import Bytes, String, Feature, Characteristic
from capa.features.address import Address, AbsoluteVirtualAddress
from capa.features.extractors.binexport2 import FunctionContext, ReadMemoryError, InstructionContext, AnalysisContext
from capa.features.extractors.binexport2 import AnalysisContext, FunctionContext, ReadMemoryError, InstructionContext
from capa.features.extractors.base_extractor import BBHandle, InsnHandle, FunctionHandle
from capa.features.extractors.binexport2.binexport2_pb2 import BinExport2

Expand Down
Loading
Loading