我目前正在尝试运行Volatility3,但是我遇到了一个错误,它是由yara导入失败造成的。
主要问题是,即使在CMD上输入python然后import yara,也无法导入yara,这样做会得到如下错误:
FileNotFoundError: Could not find module 'C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3312.0_x64__qbz5n2kfra8p0\DLLs\libyara.dll' (or one of its dependencies). Try using the full path with constructor syntax。
全误差
Failed to import 'C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3312.0_x64__qbz5n2kfra8p0\DLLs\libyara.dll'
PATH = (***other programs within the path such as git***);C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3312.0_x64__qbz5n2kfra8p0\DLLs
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\yara\__init__.py", line 7, in <module>
from yara.rules import compile
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\yara\rules.py", line 17, in <module>
from yara.libyara_wrapper import *
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\yara\libyara_wrapper.py", line 315, in <module>
libyaradll = cdll.LoadLibrary(library)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3312.0_x64__qbz5n2kfra8p0\lib\ctypes\__init__.py", line 452, in LoadLibrary
return self._dlltype(name)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3312.0_x64__qbz5n2kfra8p0\lib\ctypes\__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3312.0_x64__qbz5n2kfra8p0\DLLs\libyara.dll' (or one of its dependencies). Try using the full path with constructor syntax.,这是我尝试过的一些东西,
在没有任何errors
一些其他注意事项:
基于我收到的错误,我相信libyara库丢失了,我已经在网上查找了许多其他的解决方案,但是没有找到解决这个问题的方法。如能就此事提供任何帮助,我们将不胜感激。
发布于 2022-09-13 16:37:12
虽然这不是最好的解决方案,但我对这个问题的解决方案是不要将Windows用于Volatility3。
如果您在windows机器上,只需使用VM并将任何Linux发行版插入其中,它就会立即工作(当时我正在使用Kali)。这或多或少地解决了我面临的问题,并在Volatility3上从内存中得到了我想要的东西。
编辑:这似乎是python3的一个特定问题,如果通过Microsoft安装,我尝试用Scoop.sh之类的东西重新安装Python3,我已经修复了这个问题。
发布于 2022-05-10 03:50:48
pip uninstall yara
pip install yara-pythonhttps://stackoverflow.com/questions/71709425
复制相似问题