Step1:To Install YARA on Ubuntu we need the PCRE and some libraries first:
sudo apt-get install libpcre3 libpcre3-dev
Then we start downloading the YARA source code:
$ wget http://yara-project.googlecode.com/files/yara-1.4.tar.gz
$ wget http://yara-project.googlecode.com/files/yara-python-1.4.tar.gz
Step2: Compile and install yara on your linux box.
a) cd yara-1.4
chmod +x -R /root/Desktop/yara-1.4/*
./configure
make
make check
make install
b)cd ..
cd yara-python-1.4
python setup.py install
Step 3: Convert clamav database to yara
http://code.google.com/p/malwarecookbook/source/browse/trunk/3/3/clamav_to_yara.py?r=5
sigtool -u /var/lib/clamav/main.cvd //decompress the database
python clamav_to_yara.py -f main.ndb -o clamav.yara //convert clamav to yara
Step 4:For packing signature(PEID tool uses these signature to detect type of packing) go to this site and copy packer signatures in a file .Now with the help of this file we can detect packed malware using yara.
yara -r packersrule infected-file
Step2: Compile and install yara on your linux box.
a) cd yara-1.4
chmod +x -R /root/Desktop/yara-1.4/*
./configure
make
make check
make install
b)cd ..
cd yara-python-1.4
python setup.py install
Step 3: Convert clamav database to yara
http://code.google.com/p/malwarecookbook/source/browse/trunk/3/3/clamav_to_yara.py?r=5
sigtool -u /var/lib/clamav/main.cvd //decompress the database
python clamav_to_yara.py -f main.ndb -o clamav.yara //convert clamav to yara
Step 4:For packing signature(PEID tool uses these signature to detect type of packing) go to this site and copy packer signatures in a file .Now with the help of this file we can detect packed malware using yara.
yara -r packersrule infected-file
This comment has been removed by the author.
ReplyDelete