-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module PE Not Functioning Correctly #28
Comments
Looks like you didn't build YARA with crypto support. |
I don't think that is it. I built YARA with everything, and I can use yarac from command line without any issues to compile this rule. I cannot, however, compile when using yara-python. I did not explicitly pass --with-crypto, but based on docs it should have been detected. Here are relevant pieces from ansible script used to compile. It should have openssl on the system.
|
"A" * 32 is not a valid syntax for YARA. I think that is playing into this. Unfortunately I'm catching a long flight right now so I can't fully debug. |
My earlier comment about "A" * 32 not being valid is still true but the error you're seeing is actually caused by something entirely different, which is a valid issue AFAICT. I think I ran into this when someone brought up an issue to me privately. Essentially here is what I'm seeing:
It seems like when the yara-python package builds the version of YARA to link with it doesn't find the OpenSSL bits and doesn't define HAVE_LIBCRYPTO properly. So I then generated a verbose build log which looks like this:
So yeah, it looks like if you use pip to install yara-python it doesn't properly recognize OpenSSL stuff and ends up disabling various features of some modules (at least the PE module). I then spent some time trying to get pip to pass "--dynamic-linking" to setup.py during the build but couldn't get it to work. I don't know where to go from here but can confirm this is a real bug (IMO). A workaround, for now, is to build yara-python from source, possibly using the --dynamic-linking option. |
I'm running into this issue as well, even with a build from source and using --dynamic-linking
|
These lines make me think you never cleaned the build from the first time you built and it had this failure?
Can you try it after you clean? Particularly you should rm the |
That worked, however, apparently
|
I can confirm that this is a real bug as well. My solution was to replace the
|
I resolved it using and worked for me: |
Phew.. i spent so much time trying to get this to work, i will never forget the link of this thread. thank you all so much! @cgupta6 gave me the last hint :) |
The
|
I am having an issue using the PE module within yara-python, although it works fine from command line yara.
Using yara 3.5.0 and yara-python 3.5.0. It looks somewhat related to #8 but in this case I don't have an issue on the import, but I can't use the functions.
(env) vagrant@web:/opt$ yara --version
yara 3.5.0
(env) vagrant@web:/opt$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
The text was updated successfully, but these errors were encountered: