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

can not start with NpkParser.MenhirBasics.Error #84

Closed cbwang505 closed 5 years ago

cbwang505 commented 5 years ago

i can not start any analysis

bytes pages size description


262144 32 8192 allocating memory for b-tree... 352256 43 8192 allocating memory for virtual array... 262144 32 8192 allocating memory for name pointers...

876544 total memory allocated

Loading processor module C:\Program Files\IDA 7.0\procs\pc.dll for metapc...OK Loading type libraries... Autoanalysis subsystem has been initialized. Database for file 'ConsoleApplication1.exe' has been loaded. Hex-Rays Decompiler plugin has been loaded (v7.0.0.170914) License: 57-BF5F-7D44-11 Jiang Ying, Personal license (1 user) The hotkeys are F5: decompile, Ctrl-F5: decompile all. Please check the Edit/Plugins menu for more informaton. IDAPython Hex-Rays bindings initialized. WARNING:bincat.gui.pluginoptions:IDAUSR not defined, using C:\Users\lenovo\AppData\Roaming\Hex-Rays\IDA Pro INFO:bincat.plugin:Autostarting INFO:bincat.plugin:IDABinCAT ready. Note: FormToPyQtWidget: importing 'sip' module into <module 'main' from ''>

Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] IDAPython v1.7.0 final (serial 0) (c) The IDAPython Team idapython@googlegroups.com

INFO:bincat.gui:Launching the analyzer INFO:bincat.plugin:Current analyzer path: c:\users\lenovo\appdata\local\temp\tmpsov50rbincat ERROR:bincat.plugin.npkgen:Error encountered while running c2newspeak. --- start of c2newspeak output --- Fatal error: exception NpkParser.MenhirBasics.Error

--- end of c2newspeak output --- Traceback (most recent call last): File "C:/Program Files/IDA 7.0/plugins\idabincat\npkgen.py", line 135, in generate_tnpk "pre-processed.c"], stderr=subprocess.STDOUT) File "C:\python27-x64\lib\subprocess.py", line 219, in check_output raise CalledProcessError(retcode, cmd, output=output) CalledProcessError: Command '['c2newspeak', '--typed-npk', '-o', 'c:\users\lenovo\appdata\local\temp\tmptlbgukbincat-generate-header\pre-processed.no', 'pre-processed.c']' returned non-zero exit status 2 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. INFO:bincat.plugin:Analyzer: starting process INFO:bincat.plugin:Analyzer started. INFO:bincat.plugin:Analyzer process finished ERROR:bincat.plugin:analyzer returned exit code=2 INFO:bincat.plugin:---- stdout ---------------- INFO:bincat.plugin:BinCAT v1.0.1

INFO:bincat.plugin:---- stderr ---------------- INFO:bincat.plugin:EXCEPTION: Exceptions.Error("Interpreter not started as the entry point belongs to the cut off branches\n") Check log file for details [c:\users\lenovo\appdata\local\temp\tmpsov50rbincat\analyzer.log]

INFO:bincat.plugin:---- logfile --------------- INFO:bincat.plugin:[INFO] main: BinCAT version v1.0.1 INFO:bincat.plugin:[EXCEPTION] parser: failed to load header INFO:bincat.plugin:Sys_error(": No such file or directory") INFO:bincat.plugin:Raised by primitive operation at file "pervasives.ml", line 366, characters 28-54 INFO:bincat.plugin:Called from file "pervasives.ml" (inlined), line 374, characters 2-47 INFO:bincat.plugin:Called from file "c2newspeak/typedC.ml", line 345, characters 14-30 INFO:bincat.plugin:Called from file "frontend/parser.mly", line 144, characters 18-36 INFO:bincat.plugin:[ABORT] interpreter: Interpreter not started as the entry point belongs to the cut off branches INFO:bincat.plugin: INFO:bincat.plugin:Raised by primitive operation at file "utils/log.ml", line 157, characters 41-69 INFO:bincat.plugin:Called from file "fixpoint/interpreter.ml", line 564, characters 8-107 INFO:bincat.plugin:Called from file "main.ml", line 151, characters 25-60 INFO:bincat.plugin:Called from file "bincat.ml", line 36, characters 7-49 INFO:bincat.plugin:[EXCEPTION] main: Exception caught in main loop INFO:bincat.plugin:Exceptions.Error("Interpreter not started as the entry point belongs to the cut off branches\n") INFO:bincat.plugin:Raised at file "utils/log.ml", line 160, characters 4-32 INFO:bincat.plugin:Called from file "fixpoint/interpreter.ml", line 564, characters 8-107 INFO:bincat.plugin:Called from file "main.ml", line 151, characters 25-60 INFO:bincat.plugin:[STOP] nothing analyzed INFO:bincat.plugin:====== end of logfile ====== ERROR:bincat.plugin:Could not parse result file

szennou commented 5 years ago

Apparently the problem is in your configuration file. Se error "Interpreter not started as the entry point belongs to the cut off branches\n" above. You may have added a "cut" key entry in your ini file anf set this entry to be the entry point of your exec. Remove this entry and set the key "analysis_ep" instead. If you fail with it, let send us at least your .ini file (better coming along with your exec)