-
Notifications
You must be signed in to change notification settings - Fork 385
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
Yara analyzer doesn't recognize 'sha1' field name from Yara-rules #62
Comments
@3c7 can you please look into it? Thanks. |
Didn't forgot this one. Will check it in the next days, lot's of things to do right now. This issue has nothing to do with the analyzer itself, but with yara-python and the static linked library (I suppose, at least...): >>> import yara
>>> rule = yara.compile('F:\\_work\\MALW_mirai.yar') # Yeah, windows, I know...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
yara.SyntaxError: F:\_work\MALW_mirai.yar(166): invalid field name "sha1" A possible solution could be compiling YARA from source and using the shared lib when installing the yara analyzer - I'll check that. |
The lib needs to get built with crypto support, so building yara itself from src is necessary: VirusTotal/yara-python#27 |
Fresh Ubuntu 16.04.2user@ubuntu:~$ git clone https://github.com/Yara-Rules/rules
Cloning into 'rules'...
remote: Counting objects: 5536, done.
remote: Compressing objects: 100% (73/73), done.
remote: Total 5536 (delta 55), reused 79 (delta 35), pack-reused 5427
Receiving objects: 100% (5536/5536), 3.62 MiB | 938.00 KiB/s, done.
Resolving deltas: 100% (3396/3396), done.
Checking connectivity... done.
user@ubuntu:~$ python3 -c "import yara;yara.compile('rules/index.yar')"
Traceback (most recent call last):
File "<string>", line 1, in <module>
yara.SyntaxError: rules/./malware/MALW_Mirai.yar(166): invalid field name "sha1" Fresh Ubuntu 16.04.2 with libssl-devuser@ubuntu:~$ git clone https://github.com/Yara-Rules/rules
Cloning into 'rules'...
remote: Counting objects: 5536, done.
remote: Compressing objects: 100% (73/73), done.
remote: Total 5536 (delta 55), reused 79 (delta 35), pack-reused 5427
Receiving objects: 100% (5536/5536), 3.62 MiB | 938.00 KiB/s, done.
Resolving deltas: 100% (3396/3396), done.
Checking connectivity... done.
user@ubuntu:~$ python3 -c "import yara;yara.compile('rules/index.yar')"
user@ubuntu:~$ So, the solution is installing openssl dev libs before: |
Thanks, just tested your proposed solution, it's working |
You're welcome. Glad it works. |
Request Type
Bug
Work Environment
Problem Description
On fresh install of TheHive + Cortex I've tried to use Yara analyzer on https://github.com/Yara-Rules/rules, however, it gives me following report error:
Steps to Reproduce
git clone https://github.com/Yara-Rules/rules /opt/rules
application.conf
for cortexThe text was updated successfully, but these errors were encountered: