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

two problems #134

Closed cctv130 closed 6 months ago

cctv130 commented 6 months ago

IDA 8.3 python10 1、 WARNING:bincat.plugin:Could not find bincat binary, will not be able to run local analysis INFO:bincat.plugin:IDABinCAT ready. INFO:bincat.gui:Launching the analyzer INFO:bincat.plugin:Current analyzer path: C:\Users\wang\AppData\Local\Temp\tmpi2dydcnsbincat INFO:bincat.plugin.npkgen:Generating TNPK file in C:\Users\wang\AppData\Local\Temp\tmpjpnamac9bincat-generate-header INFO:bincat.plugin.npkgen:Calling 'gcc -P -E C:\Users\wang\AppData\Local\Temp\tmpjpnamac9bincat-generate-header\ida-generated.h' ERROR:bincat.plugin.npkgen:Error encountered while running gcc. Is it installed in PATH? WARNING:bincat.plugin:Could not compile header file, types from IDB will not be used for type propagation WARNING:bincat.plugin:.no file containing type data for the file being analyzed could not be generated, continuing. The ida-generated header could be invalid. ERROR:bincat.plugin:Analyzer error: Failed to start INFO:bincat.plugin:---- stdout ---------------- INFO:bincat.plugin:b'' INFO:bincat.plugin:---- stderr ---------------- INFO:bincat.plugin:b'' INFO:bincat.plugin:---- logfile --------------- INFO:bincat.plugin:====== end of logfile ====== ERROR:bincat.plugin:Could not parse result file INFO:bincat.plugin:Analyzer started.

2、The configuration file cannot be found after the plugin is installed automatically and needs to be inserted manually C:\Users\wang\AppData\Roaming\Hex-Rays\IDA Pro\plugins\idabincat\conf

af-airbus commented 6 months ago

To help you solve this issue, could you provide the version you tried to install: was it an official release or pre-release and which one? did you manually build on Windows? From the few information I see, it seems like you installed a linux version of bincat on windows, or you manually build on windows using WSL/Ubuntu (which is not supported).

cctv130 commented 6 months ago

I use this to install,Just use your compiled version of win. I am also very depressed about this mistake. I don't know the specific reason, maybe it is because of cygwin.

https://github.com/airbus-seclab/bincat/releases/download/v1.3-beta1/bincat-win-v1.2-101-g94a3d6dd.zip

af-airbus commented 6 months ago

Ok, thank you for the information. I see that the documentation may not be up to date for the IDA plugin installation :/ We will need to update it.

In the mean time, could you reinstall the BinCAT IDA plugin by following these steps:

  1. unzip the release archive somewhere
  2. launch IDA and then click on File > Script file and select the install_plugin.py in the freshly unzipped archive
  3. copy the console output (for step 4)
  4. relaunch IDA and test if BinCAT is properly installed and if it is not the case paste the output of the console in reply
af-airbus commented 6 months ago

Could you follow exactly the steps described in our previous reply, especially steps 3 and 4 please? The installation process must have emitted some errors. We need the output log of the installation process, not a later one when you try to invoke bincat.

af-airbus commented 6 months ago

Thank you for this output. It seems everything went all right during the installation :/ Maybe could you try to empty your plugin directory C:\Users\botao\AppData\Roaming\Hex-Rays\IDA Pro\plugins and try to reinstall?

cctv130 commented 6 months ago

The reason for the problem you replied is a problem with the python virtual environment. The gcc error only occurs when I use the "bincat analyze from here" function.

af-airbus commented 6 months ago

Do you have the following package installed with cygwin?

cctv130 commented 6 months ago

My computer does not have a cygwin environment. Do you mean that I need to install gcc on cygwin?

af-airbus commented 6 months ago

Yes

cctv130 commented 6 months ago

I use cygwin, the environment variables in the virtual environment are easy to conflict with the local environment variables. I don't know how to avoid this problem.

af-airbus commented 6 months ago

I have some difficulties to follow: do you have cygwin installed or not?

af-airbus commented 6 months ago

You only need a working gcc command in your path actually.

cctv130 commented 6 months ago

Currently, cygwin is not installed. I installed it a few days ago. Because cygwin accesses the python of the physical system, the python in cygwin cannot be accessed, so I uninstalled cygwin. I don’t know how to solve this problem at the moment.

af-airbus commented 6 months ago

You only need a working gcc command in your path actually.

Could you managed to have any gcc in your path?

cctv130 commented 6 months ago

It would be great if there was a free Linux version of idapro, without the need for some complicated operations such as cygwin.

cctv130 commented 6 months ago

You only need a working gcc command in your path actually.

Could you managed to have any gcc in your path?

Is there a way to block cygwin from accessing Windows environment variables? If so, gcc and python can make bincat do the job.

af-airbus commented 6 months ago

Do not know. Could we close this issue because it is not a bincat problem actually?

cctv130 commented 6 months ago

okay