mcsema
mcsema copied to clipboard
mcsema-disass failure
weiwang99@cs000061:~/mcsema-ve/remill$ mcsema-disass --disassembler ~/ida-7.2/idat64 --os linux --arch amd64 --output xz.cfg --binary xz --entrypoint main --log_file xz.log
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/mcsema_disass-2.0-py2.7.egg/mcsema_disass/ida7/disass.py", line 77, in execute
cwd=os.path.dirname(file))
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '/home/weiwang99/ida-7.2/idat64 -B -S"/usr/local/lib/python2.7/dist-packages/mcsema_disass-2.0-py2.7.egg/mcsema_disass/ida7/get_cfg.py --output /home/weiwang99/mcsema-ve/remill/xz.cfg --log_file /home/weiwang99/mcsema-ve/remill/xz.log --arch amd64 --os linux --entrypoint main" /tmp/tmpVs3NWU/xz' returned non-zero exit status 1
Could not generate a CFG. Try using the --log_file option to see an error log.
Traceback (most recent call last):
File "/usr/local/bin/mcsema-disass", line 9, in
For some reason IDA is having a problem before it can open the log file. Can you try running the script manually, something like:
This is the same command line as the log but without -B
.
/home/weiwang99/ida-7.2/idat64 -S"/usr/local/lib/python2.7/dist-packages/mcsema_disass-2.0-py2.7.egg/mcsema_disass/ida7/get_cfg.py --output /home/weiwang99/mcsema-ve/remill/xz.cfg --log_file /home/weiwang99/mcsema-ve/remill/xz.log --arch amd64 --os linux --entrypoint main" xz
The IDA screen should hopefully have some useful information for you in an error message or similar.
Thanks for posting. Were there any IDAPython messages? I didn't see any in your console. Does the console just exit after a bit? If yes, then it should have done something.
I also notice that your directory is ~/mcsema-ve
but you are using the system install of mcsema. If you installed to a virtualenv, don't forget to source ~/mcsema-ve/bin/activate
.
As a sidenote, I just tried with latest mcsema and IDA 7.1, and it works for me on xz
from 1604 and 1804.
Other things to try:
edit /usr/local/lib/python2.7/dist-packages/mcsema_disass-2.0-py2.7.egg/mcsema_disass/ida7/get_cfg.py
and comment out the last two lines, which are responsible for quitting IDA.
Then re-run using the QT IDA and see if you get any more useful error messages, via:
/home/weiwang99/ida-7.2/ida64 -S"/usr/local/lib/python2.7/dist-packages/mcsema_disass-2.0-py2.7.egg/mcsema_disass/ida7/get_cfg.py --output /home/weiwang99/mcsema-ve/remill/xz.cfg --log_file /home/weiwang99/mcsema-ve/remill/xz.log --arch amd64 --os linux --entrypoint main" xz
(edited to fix above command line)
when i use the mcsema,i met the same problems as above,but i use the IDA PRO(v6.4),whether this problems is caused by the version of IDA pro.
The 6.x series should still work (we test with 6.9 occasionally), although 6.4 is a bit ancient.
Thats a very odd error. Do you by chance have the IDA Student license? That one has a 1MB size limit for open files.
No. I used the pro version
Can you try launching the gui version (ida64
instead of idat64
) but with the same command line?
I get a error with the same question too (in docker vm)
Traceback (most recent call last): File "/opt/ida-6.8/python/init.py", line 14, in <module> import os zipimport.ZipImportError: can't decompress data; zlib not available Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/mcsema_disass-2.0-py2.7.egg/mcsema_disass/ida/disass.py", line 77, in execute cwd=os.path.dirname(__file__)) File "/usr/lib/python2.7/subprocess.py", line 190, in check_call raise CalledProcessError(retcode, cmd) CalledProcessError: Command '/opt/ida-6.8/idal64 -B -S"/usr/local/lib/python2.7/dist-packages/mcsema_disass-2.0-py2.7.egg/mcsema_disass/ida/get_cfg.py --output /home/user/local/test.cfg --log_file /home/user/local/log.txt --arch amd64 --os linux --entrypoint main --pie_mode" /tmp/tmp6VBGjG/xxxxx' returned non-zero exit status 1 Could not generate a CFG. Try using the --log_file option to see an error log. Traceback (most recent call last): File "/usr/local/bin/mcsema-disass", line 11, in <module> load_entry_point('mcsema-disass==2.0', 'console_scripts', 'mcsema-disass')() File "/usr/local/lib/python2.7/dist-packages/mcsema_disass-2.0-py2.7.egg/mcsema_disass/__main__.py", line 163, in main if 0 == os.path.getsize(args.output): File "/usr/lib/python2.7/genericpath.py", line 57, in getsize return os.stat(filename).st_size OSError: [Errno 2] No such file or directory: '/home/user/local/test.cfg'
I tried with ida 6.8 pro without -B like this :
/opt/ida-6.8/idal64 -S"/usr/local/lib/python2.7/dist-packages/mcsema_disass-2.0-py2.7.egg/mcsema_disass/ida/get_cfg.py --output /home/ToB/test.cfg --log_file /home/ToB/log.txt --arch x86 --os linux --entrypoint main"
same internal error occured, without log file generated
is there some suggestion or help?