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

IDA 7.5 compatibility #2371

Closed
h4rdee opened this issue Sep 17, 2024 · 4 comments · Fixed by #2373
Closed

IDA 7.5 compatibility #2371

h4rdee opened this issue Sep 17, 2024 · 4 comments · Fixed by #2373

Comments

@h4rdee
Copy link

h4rdee commented Sep 17, 2024

Description

I've used capa ida plugin and decided to update it
I've uninstalled previous flare-capa package, then installed it again
I also removed old rules and pulled new ones
Then when i tried to use plugin, i got following error:

  File "C:\Users\...\AppData\Local\Programs\Python\Python38\lib\site-packages\capa\features\extractors\ida\helpers.py", line 32, in find_byte_sequence
    patterns = ida_bytes.compiled_binpat_vec_t()
AttributeError: module 'ida_bytes' has no attribute 'compiled_binpat_vec_t'

Which i'm assuming is because IDA 7.5 SDK doesn't have such thing as compiled_binpat_vec_t

Can be related to #2011

Steps to Reproduce

Pretty much described above

Expected behavior:

Plugin works properly (IDA 7.5 should be supported by capa plugin afaik (?))

Actual behavior:

AttributeError: module 'ida_bytes' has no attribute 'compiled_binpat_vec_t'

Versions

IDA Pro 7.5
Latest capa version (7.2.0)
Python 3.8.10

Additional Information

Can be fixed by adding backward-compatibility layer to an API described above

@h4rdee
Copy link
Author

h4rdee commented Sep 17, 2024

Fixed it by downgrading code to previous version, seems to be working now
image

@h4rdee
Copy link
Author

h4rdee commented Sep 17, 2024

image
I'm kinda curious hows this left unchecked @s-ff (feels like breaking change tbh)

@mr-tz
Copy link
Collaborator

mr-tz commented Sep 17, 2024

Good find, we'll have to add a compat layer to support the older IDA API here.

@s-ff
Copy link
Collaborator

s-ff commented Sep 20, 2024

@mr-tz, since we don't have automated CI tests for IDA yet, I'd recommend adding an information header to test_ida_features.py that clearly displays the timestamp, IDA and IDAPython versions used and other params to be linked to pull requests by contributers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants