Merge clamAV with YARA and Python3
I want to merge clamAV python and YARA rules. The target is to, on demand, scan with YARA rules that i have made. I wrote this simple script and work just fine
Code:
import pyclamd |
A quick look at pyclamd documentation had no string of "yara" in it.
I would suggest examining the below links to see if there is some reference to using other sources or filing a bug report on bitbucket to see if the author could implement it? https://pypi.python.org/pypi/pyClamd https://bitbucket.org/xael/pyclamd http://xael.org/pages/pyclamd-en.html http://xael.org/pages/python-module-pyclamd.html |
Problem Solved
I figure out the answer. It seems that ClamAV can read *.yara files and search additionally to the existed virus database. The solution is to put a yara rule to the /var/lib/clamav directory. The code need a little modification just to reload the ClamdAgnostic() and voila.
Code:
import pyclamd Code:
{'/home/john/Desktop/workSpace/yara/2.pdf': ('FOUND', 'YARA.testFor2.UNOFFICIAL')} |
All times are GMT -5. The time now is 08:02 AM. |