RFC: Lightweight Data-Flow Tracking for Cross-Instruction Capability Detection #2925
Replies: 2 comments
|
how does this differ from the existing |
|
@williballenthin From what I understand, the current So it lets us group things that occur around a specific API call, such as strings, constants, or other indicators observed during that call. What it doesn’t really capture is the exact value passed to a specific argument position. The idea behind dynamic argument-aware matching would be to allow rules to reason about those argument values directly. For example: api: CreateFileW and arg[1] == "C:\Windows\..." So the way I see the difference is: Current Argument-aware matching Because of that, it feels more like a larger feature or engine-level capability rather than just another scope option. |
Uh oh!
There was an error while loading. Please reload this page.
RFC: Argument-Aware Matching for Dynamic Analysis (Value-Semantic Call Features)
Motivation
Right now, many dynamic detections rely on the presence of API calls, but they can't easily express constraints on the actual argument values passed at runtime. In practice, the meaning of a capability often depends not just on which API is called, but also on how it is called.
For example:
Without argument-aware matching, rules may end up being either too broad (causing false positives) or require awkward workarounds.
This discussion proposes adding argument-aware matching so rules can match on meaningful runtime parameters observed in dynamic analysis.
Goals
The goal is to make detections more precise and allow rules to capture behaviors that are currently difficult to express using API presence alone.
Some high-level goals would be:
Possible Direction
One idea is to introduce a feature model that lets rules reference arguments of observed API calls.
Conceptually, this could allow rules to express things like:
Example (conceptual):
Or:
This could help model behaviors such as:
Cross-Provider Considerations
Since capa can work with different dynamic analysis providers (for example VMRay), some normalization may be required so argument values are represented consistently.
Some considerations might include:
Compatibility
Existing rules should continue to work exactly as they do today. Argument-aware matching would simply be an optional capability used in rules that need it.
Open Questions
A few questions that might be worth discussing:
What argument types should be supported initially?
How expressive should the rule syntax be while still remaining readable?
What kind of normalization layer might be needed for cross-provider consistency?
Are there performance concerns when extracting and matching arguments from large dynamic traces?
Should argument extraction be handled mostly by providers, or partially within capa itself?
Feedback
I'd be interested to hear thoughts from maintainers and the community on:
All reactions