To my understanding: the documentation for building McSema on windows natively is out of date, no documentation about cross compilation, and no precompiled windows binaries. I have a Windows IDA Pro license and am running McSema (v3.0.22) on WSLv1. Issues arise due to the mcsema-disass-3 script passing arguments to IDA Pro that contain 'Linux format' paths.
mcsema-disass-3 passes the path to get_cfg.py in Linux 'format' to a Windows native install of IDA Pro, due to pathing IDA is unable to locate the script.
mcsema-disass-3 also makes a temporary copy of the target binary in /tmp/tmp<> and passes the path in Linux 'format' to IDA, which due to pathing, is unable to locate it.
vagrant@vagrant:/mnt/c/mcsema-test$ /mnt/c/mcsema/mcsema/bin/mcsema-disass-3 \
> --disassembler "${IDA_PATH}/idat.exe" \
> --arch x86 \
> --os windows \
> --entrypoint wWinMain \
> --binary helloworld.exe \
> --output helloworld.cfg \
> --log_file log
Traceback (most recent call last):
File "/mnt/c/mcsema/mcsema/lib/python3/site-packages/mcsema_disass-3.1.3.6-py3.6.egg/mcsema_disass/ida7/disass.py", line 81, in execute
cwd=os.path.dirname(__file__))
File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/mnt/c/idapro/idat.exe -B -S"/mnt/c/mcsema/mcsema/lib/python3/site-packages/mcsema_disass-3.1.3.6-py3.6.egg/mcsema_disass/ida7/get_cfg.py --output /mnt/c/mcsema-test/helloworld.cfg --log_file /mnt/c/mcsema-test/log --arch x86 --os windows --entrypoint wWinMain" /tmp/tmpc802_hvj/helloworld.exe' returned non-zero
exit status 1.
Could not generate a CFG. Try using the --log_file option to see an error log.
To my understanding: the documentation for building
McSema
on windows natively is out of date, no documentation about cross compilation, and no precompiled windows binaries. I have a Windows IDA Pro license and am runningMcSema
(v3.0.22
) on WSLv1. Issues arise due to themcsema-disass-3
script passing arguments to IDA Pro that contain 'Linux format' paths.mcsema-disass-3
passes the path toget_cfg.py
in Linux 'format' to a Windows native install of IDA Pro, due to pathing IDA is unable to locate the script.mcsema-disass-3
also makes a temporary copy of the target binary in/tmp/tmp<>
and passes the path in Linux 'format' to IDA, which due to pathing, is unable to locate it.