mgeeky / msidump

MSI Dump - a tool that analyzes malicious MSI installation packages, extracts files, streams, binary data and incorporates YARA scanner.
https://mgeeky.tech/msi-shenanigans-part-1/
194 stars 18 forks source link

Requirements not installed: failed to find libmagic #5

Open rancho666 opened 1 year ago

rancho666 commented 1 year ago

I run the requirements.txt successfully but get the error message trying to run msidump.py:

[!] Requirements not installed: failed to find libmagic. Check your installation Install them with: cmd> pip install -r requirements.txt

So I install libmagic manually but still the error message persists when running msidump.py

Thanks in advance for any help on this!

skm248 commented 1 year ago

I think the issue is with below python-libmagic 0.4.0 depends on cffi==1.7.0

I was able to download cffi latest version separately without any issues. But when I try to run the below command still getting an issue pip install python-libmagic

error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe' failed with exit code 2 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cffi Running setup.py clean for cffi Failed to build cffi ERROR: Could not build wheels for cffi, which is required to install pyproject.toml-based projects

i128 commented 6 months ago

Long story short, use an older version of python3. Like 3.9

Ran into this same issue with 3.12. Got me to this post here: https://github.com/python-cffi/cffi/issues/48

Looks like its fixed in most recent release of cffi, but libmagic is hard locked on an older version of cffi. So until libmagic gets updated to use the most recent version of cffi, just use an older version of python

mcopjan commented 3 months ago

What helped me was downgrading to python 3.9 and then running this https://github.com/Yelp/elastalert/issues/1927#issuecomment-425040424

Ba4ck commented 1 week ago

I used python 3.11 It's helped me https://github.com/Yelp/elastalert/issues/1927#issuecomment-425040424