mirror of
https://github.com/mandiant/capa.git
synced 2025-12-22 07:10:29 -08:00
adding IDA extractor code to resolve nested data references for string and bytes features
This commit is contained in:
@@ -100,6 +100,13 @@ def test_string_features():
|
||||
assert capa.features.String("bcrypt.dll") not in features
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="IDA Pro tests must be run within IDA")
|
||||
def test_string_pointer_features():
|
||||
f = get_extractor().get_function(0x0044EDEF)
|
||||
features = extract_function_features(f)
|
||||
assert capa.features.String("INPUTEVENT") in features
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="IDA Pro tests must be run within IDA")
|
||||
def test_byte_features():
|
||||
f = get_extractor().get_function(0x40105D)
|
||||
@@ -109,6 +116,13 @@ def test_byte_features():
|
||||
assert wanted.evaluate(features) == True
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="IDA Pro tests must be run within IDA")
|
||||
def test_bytes_pointer_features():
|
||||
f = get_extractor().get_function(0x0044EDEF)
|
||||
features = extract_function_features(f)
|
||||
assert capa.features.Bytes("INPUTEVENT".encode("utf-16le")).evaluate(features) == True
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="IDA Pro tests must be run within IDA")
|
||||
def test_number_features():
|
||||
f = get_extractor().get_function(0x40105D)
|
||||
|
||||
Reference in New Issue
Block a user