airbus-seclab / bincat

Binary code static analyser, with IDA integration. Performs value and taint analysis, type reconstruction, use-after-free and double-free detection
1.66k stars 159 forks source link

IDA SDK invalid calling convention #133

Closed josephH00 closed 6 months ago

josephH00 commented 7 months ago

After a fresh install of BinCat on IDA 8.3 I receive the following:

Traceback (most recent call last):
  File "/root/.idapro/plugins/idabincat/gui.py", line 874, in _load_config
    self.s.edit_config = self.s.configurations.new_config(
  File "/root/.idapro/plugins/idabincat/analyzer_conf.py", line 967, in new_config
    return AnalyzerConfig.get_default_config(start_va, stop_va,
  File "/root/.idapro/plugins/idabincat/analyzer_conf.py", line 820, in get_default_config
    ConfigHelpers.get_call_convention())
  File "/root/.idapro/plugins/idabincat/analyzer_conf.py", line 160, in get_call_convention
    idaapi.CM_CC_MANUAL: "manual",
AttributeError: module 'idaapi' has no attribute 'CM_CC_MANUAL'

It looks like IDA changed the CM_CC_MANUAL field in their SDK at some point in time

af-airbus commented 7 months ago

Thank you for reporting this issue. I pushed some commits that should solve your issue, more precisely the commit e45e6013533ce863660aeaa3e8b1b978bb2896fa. Could you try this version?

josephH00 commented 7 months ago

I tried that commit but ran into a few issues: The main one was when running make install that Makefile in the ocaml directory was missing an install option, I'm not very familiar with building OCaml and wasn't able to go further. But before getting to that point, the Makefile in the ocaml directory was having some issues with curly brace expansion, this Stack Overflow article mentions that this happens due Make using the old /bin/sh and suggested adding SHELL=/usr/bin/bash to the top, which when I tried it worked. Also, just as a side note, I noticed that automatic build failed from the most recent commit because dune wasn't installed.

af-airbus commented 7 months ago

We are reworking the workflows to produce Linux and Windows installers in the dev branch before pushing to the master branch and finally publish a new release. If you are using Linux, you can find the last installer build there https://github.com/airbus-seclab/bincat/actions/runs/7831045287/artifacts/1230427242

af-airbus commented 6 months ago

We published a new pre-release https://github.com/airbus-seclab/bincat/releases/tag/v1.3-beta1 which should include all fixes for IDA 8.3.

af-airbus commented 6 months ago

Could you confirm here everything is fine with this version and close the issue accordingly?

josephH00 commented 6 months ago

Yes! Everything does seem to be working