Skip to content

Commit

Permalink
insn.py: Get the symtab api extractor to yield FunctionName features …
Browse files Browse the repository at this point in the history
…as well
  • Loading branch information
yelhamer committed Apr 23, 2023
1 parent b766d95 commit b32a8ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions capa/features/extractors/viv/insn.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import capa.features.extractors.helpers
import capa.features.extractors.viv.helpers
from capa.features.file import FunctionName
from capa.features.insn import API, MAX_STRUCTURE_SIZE, Number, Offset, Mnemonic, OperandNumber, OperandOffset
from capa.features.common import MAX_BYTES_FEATURE_SIZE, THUNK_CHAIN_DEPTH_DELTA, Bytes, String, Feature, Characteristic
from capa.features.address import Address, AbsoluteVirtualAddress
Expand Down Expand Up @@ -148,6 +149,7 @@ def extract_insn_api_features(fh: FunctionHandle, bb, ih: InsnHandle) -> Iterato
STT_FUNC = 0x2
if sym_value == target and sym_info & STT_FUNC != 0:
yield API(sym_name), ih.address
yield FunctionName(sym_name), ih.address

for _ in range(THUNK_CHAIN_DEPTH_DELTA):
if target in imports:
Expand Down

0 comments on commit b32a8ca

Please sign in to comment.