CallsToQuery object provides flexible options for querying function calls in VulHunt rules. It supports querying by address, function name, or pattern matching.
Fields
| Field | Type | Description |
|---|---|---|
address | AddressValue | Address of the target function to find calls to |
named | string | Name of the target function to find calls to |
kind | string | Pattern type: "symbol" for regex on function names, or "bytes" for hex byte pattern |
matching | string | Pattern to match (required when using pattern matching) |
jumps_as_calls | boolean | When true, treats jump instructions as function calls |
Reference
address
The address field specifies the address of the target function to find calls to. Cannot be used together withnamed or pattern matching fields.
named
The named field specifies the name of the target function to find calls to. Cannot be used together withaddress or pattern matching fields. Names may be specified with an optional imp. prefix, which is used internally to disambiguate symbols with the same name referring to an imported and local function. The imported function will have the imp. prefix, while the local function will not. The matching engine will take care to follow a user’s intent and find all viable matches of either variant.
kind
The kind field specifies the type of pattern matching:"symbol": Matches function names using regular expressions. This is the default value."bytes": Matches functions containing the specified byte sequence.
matching
The matching field specifies the pattern to match. The interpretation depends on thekind field:
- For
kind = "symbol": A regular expression pattern to match against function names. - For
kind = "bytes": A hexadecimal byte sequence to find in function code.