Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

WSLv1 + Windows IDA Pro Path Issues #738

Open
SaifRushdHadad opened this issue Mar 2, 2021 · 1 comment
Open

WSLv1 + Windows IDA Pro Path Issues #738

SaifRushdHadad opened this issue Mar 2, 2021 · 1 comment

Comments

@SaifRushdHadad
Copy link

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.

  1. 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.
  2. 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.
export PYTHONPATH="/mnt/c/mcsema/mcsema/lib/python3/site-packages"
export IDA_PATH="/mnt/c/idapro"
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.
@Frankenstein-bit
Copy link

hi,have you solved the problem?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants