<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Anti Virus &#8211; lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</title>
	<atom:link href="https://lifelinux.com/category/security/anti-virus/feed/" rel="self" type="application/rss+xml" />
	<link>https://lifelinux.com</link>
	<description>All About Linux !</description>
	<lastBuildDate>Sat, 20 Sep 2014 09:19:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.3</generator>
	<item>
		<title>How To Use ClamAV &#038; Cron Jobs To Run Daily And Hourly Virus Scans</title>
		<link>https://lifelinux.com/how-to-use-clamav-cron-jobs-to-run-daily-and-hourly-virus-scans/</link>
					<comments>https://lifelinux.com/how-to-use-clamav-cron-jobs-to-run-daily-and-hourly-virus-scans/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 20 Sep 2014 08:20:07 +0000</pubDate>
				<category><![CDATA[Anti Virus]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[clamav crontab]]></category>
		<category><![CDATA[clamav daily scan]]></category>
		<category><![CDATA[clamav hourly scan]]></category>
		<category><![CDATA[contab]]></category>
		<category><![CDATA[cronjob]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1935</guid>

					<description><![CDATA[<p>Clam AntiVirus (ClamAV) is a free and open-source, cross-platform antivirus software tool-kit able to detect many types of malicious software, including viruses. In the previous article, I shown you &#8220;How To Install/Compile ClamAV In CentOS 6&#8220;. In this article, I will continue to show you How to use ClamAV &#038; Cronjobs to run daily &#038; [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-use-clamav-cron-jobs-to-run-daily-and-hourly-virus-scans/">How To Use ClamAV &#038; Cron Jobs To Run Daily And Hourly Virus Scans</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>Clam AntiVirus (ClamAV) is a free and open-source, cross-platform antivirus software tool-kit able to detect many types of malicious software, including viruses. In the previous article, I shown you &#8220;<a href="http://www.lifelinux.com/how-to-installcompile-clamav-in-centos-6/">How To Install/Compile ClamAV In CentOS 6</a>&#8220;. In this article, I will continue to show you How to use ClamAV &#038; Cronjobs to run daily &#038; hourly virus scans.<span id="more-1935"></span></p>
<p>The first, I will create a new directory to store script &#038; log files of ClamAV</p>
<pre>
# mkdir -p /usr/local/clamav/script
# mkdir -p /usr/local/clamav/log
</pre>
<h2>Setting up hourly scans</h2>
<p>Creating a file called name <strong>clamscan_hourly</strong></p>
<pre>
# vi /usr/local/clamav/script/clamscan_hourly
</pre>
<p>And add the following code</p>
<pre>
#!/bin/bash
SUBJECT="`hostname` PASSED HOURLY SCAN"
EMAIL="admin@domain.com"
LOG=/usr/local/clamav/log/clamav.log
TMP_LOG=/tmp/clam.hourly
 
av_report() {
 
    if [ `cat ${TMP_LOG}  | grep Infected | grep -v 0 | wc -l` != 0 ]
    then
		SUBJECT="[WARNING] `hostname` PASSED HOURLY SCAN"
    fi
	
	EMAILMESSAGE=`mktemp /tmp/virus-alert.XXXXX`
    echo "To: ${EMAIL}" >>  ${EMAILMESSAGE}
    echo "From: alert@domain.com" >>  ${EMAILMESSAGE}
    echo "Subject: ${SUBJECT}" >>  ${EMAILMESSAGE}
    echo "Importance: High" >> ${EMAILMESSAGE}
    echo "X-Priority: 1" >> ${EMAILMESSAGE}
    echo "`tail -n 50 ${TMP_LOG}`" >> ${EMAILMESSAGE}
    sendmail -t < ${EMAILMESSAGE}
	
	cat ${TMP_LOG} >> ${LOG}
	rm -rf ${TMP_LOG}
}

av_scan() {
	touch ${TMP_LOG}
	find / -not -wholename '/sys/*' -and -not -wholename '/proc/*' -mmin -61 -type f -print0 | xargs -0 -r clamscan --exclude-dir=/proc/ --exclude-dir=/sys/ --quiet --infected --log=${TMP_LOG}
}

av_scan
av_report
freshclam
</pre>
<p>Save the file. Make sure it’s executable, type</p>
<pre>
# chmod +x /usr/local/clamav/script/clamscan_hourly
</pre>
<h2>Setting up daily scans</h2>
<p>Creating a file called name <strong>clamscan_daily</strong></p>
<pre>
# vi /usr/local/clamav/script/clamscan_daily
</pre>
<p>And add the following code</p>
<pre>
#!/bin/bash
SUBJECT="`hostname` PASSED DAILY SCAN"
EMAIL="admin@domain.com"
LOG=/usr/local/clamav/log/clamav.log
TMP_LOG=/tmp/clam.daily
 
av_report() {
 
    if [ `cat ${TMP_LOG}  | grep Infected | grep -v 0 | wc -l` != 0 ]
    then
	SUBJECT="[WARNING] `hostname` PASSED DAILY SCAN"
    fi
	
	EMAILMESSAGE=`mktemp /tmp/virus-alert.XXXXX`
    echo "To: ${EMAIL}" >>  ${EMAILMESSAGE}
    echo "From: alert@domain.com" >>  ${EMAILMESSAGE}
    echo "Subject: ${SUBJECT}" >>  ${EMAILMESSAGE}
    echo "Importance: High" >> ${EMAILMESSAGE}
    echo "X-Priority: 1" >> ${EMAILMESSAGE}
    echo "`tail -n 50 ${TMP_LOG}`" >> ${EMAILMESSAGE}
    sendmail -t < ${EMAILMESSAGE}
	
	cat ${TMP_LOG} >> ${LOG}
	rm -rf ${TMP_LOG}
}

av_scan() {
	touch ${TMP_LOG}
	clamscan -r / --exclude-dir=/sys/ --quiet --infected --log=${TMP_LOG}
}
 
av_scan
av_report
</pre>
<p>Save the file. Make sure it’s executable, type</p>
<pre>
# chmod +x /usr/local/clamav/script/clamscan_daily
</pre>
<h2>Setting Up Crontab to run ClamAV hourly &#038; daily scans </h2>
<p>Type the following command</p>
<pre>
# crontab -e
</pre>
<p>Add the following code</p>
<pre>
# ClamAV scan
01 * * * * /usr/local/clamav/script/clamscan_hourly
01 00 * * * /usr/local/clamav/script/clamscan_daily
</pre>
<h2>Setting up log rotation for ClamAV</h2>
<p>Creating a file called name <strong>clamav</strong>, type</p>
<pre>
# vi /etc/logrotate.d/clamav
</pre>
<p>Add the following code</p>
<pre>
/usr/local/clamav/log/*.log {
    daily
    dateext
    dateformat -%d%m%Y
    missingok
    rotate 90
    compress
    delaycompress
    notifempty
    create 600 root root
}
</pre>
<g:plusone href="https://lifelinux.com/how-to-use-clamav-cron-jobs-to-run-daily-and-hourly-virus-scans/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-use-clamav-cron-jobs-to-run-daily-and-hourly-virus-scans/">How To Use ClamAV &#038; Cron Jobs To Run Daily And Hourly Virus Scans</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-use-clamav-cron-jobs-to-run-daily-and-hourly-virus-scans/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How To Install/Compile ClamAV In CentOS 6</title>
		<link>https://lifelinux.com/how-to-installcompile-clamav-in-centos-6/</link>
					<comments>https://lifelinux.com/how-to-installcompile-clamav-in-centos-6/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Mon, 08 Sep 2014 01:26:33 +0000</pubDate>
				<category><![CDATA[Anti Virus]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[compile clamav]]></category>
		<category><![CDATA[install clamav]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1930</guid>

					<description><![CDATA[<p>Clam AntiVirus (ClamAV) is a free and open-source, cross-platform antivirus software tool-kit able to detect many types of malicious software, including viruses. It&#8217;s easy to use and best for Linux based Web &#038; Mail server. In this article, I will show you through the step by step installation of ClamAV on CentOS 6.x from source. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-installcompile-clamav-in-centos-6/">How To Install/Compile ClamAV In CentOS 6</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>Clam AntiVirus (ClamAV) is a free and open-source, cross-platform antivirus software tool-kit able to detect many types of malicious software, including viruses. It&#8217;s easy to use and best for Linux based Web &#038; Mail server. In this article, I will show you through the step by step installation of ClamAV on CentOS 6.x from source.<br />
<span id="more-1930"></span><br />
The first, You need to download ClamAV latest version at http://www.clamav.net. Login as root and type the following command</p>
<pre>
# wget http://downloads.sourceforge.net/project/clamav/clamav/0.98.4/clamav-0.98.4.tar.gz?r=http%3A%2F%2Fwww.clamav.net%2Fdownload.html&ts=1410062157&use_mirror=softlayer-sng -O clamav-0.98.4.tar.gz
</pre>
<p>The second, extracting clamav-0.98.4.tar.gz package</p>
<pre>
# tar zxvf clamav-0.98.4.tar.gz
# cd clamav-0.98.4
</pre>
<h2>Installing ClamAV</h2>
<p>Type the following command to Compile ClamAV from source</p>
<pre>
# ./configure --prefix=/usr/local --sysconfdir=/etc --with-xml=/usr/local --with-zlib=/usr
# make
# make install
</pre>
<h2>Configuring ClamAV</h2>
<p>Creating user for clamav, enter</p>
<pre>
useradd -s /sbin/nologin -d /dev/null clamav
</pre>
<p>Creating database folder of clamav, enter</p>
<pre>
# mkdir /usr/local/share/clamav
# chown clamav /usr/local/share/clamav
# chmod 700 /usr/local/share/clamav
</pre>
<p>Type these following commands to create ClamAV configuration files</p>
<pre>
mv /etc/freshclam.conf.sample /etc/freshclam.conf
mv /etc/clamd.conf.sample /etc/clamd.conf
</pre>
<p>Open and remove contains</p>
<pre>
# Comment or remove the line below.
Example
</pre>
<h2>Updating ClamAV</h2>
<pre>
# freshclam
</pre>
<h2>Configuring daily scan</h2>
<p>In this example, I will configure a cronjob to scan the /home/ directory every day. Creating a file called name scanav at /opt/, enter</p>
<pre>
# vi /opt/scanav
</pre>
<p>Add the following to the file above</p>
<pre>
#!/bin/bash

SCAN_DIR="/home"
SCAN_LOG="/var/log/clamav.log"

# Update CLAMAV
freshclam

# Scan AV
clamscan -i -r $SCAN_DIR >> $SCAN_LOG
</pre>
<p>Give our cron script executable permissions, enter</p>
<pre>
# chmod +x /opt/scanav
</pre>
<p>Configuring daily scan with crontab, type the following command</p>
<pre>
# crontab -e
</pre>
<p>Add the following</p>
<pre>
01 01 * * * /opt/scanav
</pre>
<g:plusone href="https://lifelinux.com/how-to-installcompile-clamav-in-centos-6/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-installcompile-clamav-in-centos-6/">How To Install/Compile ClamAV In CentOS 6</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-installcompile-clamav-in-centos-6/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Install Rootkit Hunter</title>
		<link>https://lifelinux.com/how-to-install-rootkit-hunter/</link>
					<comments>https://lifelinux.com/how-to-install-rootkit-hunter/#comments</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Fri, 03 Dec 2010 06:04:50 +0000</pubDate>
				<category><![CDATA[Anti Virus]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[anti rookit]]></category>
		<category><![CDATA[anti rootkit on linux]]></category>
		<category><![CDATA[install rkhunter]]></category>
		<category><![CDATA[rkhunter]]></category>
		<category><![CDATA[Rootkit Hunter]]></category>
		<category><![CDATA[rootkit on linux]]></category>
		<category><![CDATA[update rkhunter]]></category>
		<category><![CDATA[vi command]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=253</guid>

					<description><![CDATA[<p>Rootkit Hunter (rkhunter) is a Unix-based tool that scans for rootkits, backdoors and possible local exploits. It does this by comparing SHA-1 hashes of important files with known good ones in online database, searching for default directories (of rootkits), wrong permissions, hidden files, suspicious strings in kernel modules, and special tests for Linux and FreeBSD. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-install-rootkit-hunter/">How To Install Rootkit Hunter</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p><strong>Rootkit Hunter</strong> (rkhunter) is a Unix-based tool that scans for rootkits, backdoors and possible local exploits. It does this by comparing SHA-1 hashes of important files with known good ones in online database, searching for default directories (of rootkits), wrong permissions, hidden files, suspicious strings in kernel modules, and special tests for Linux and FreeBSD.<span id="more-253"></span></p>
<p>Installation rkhunter in 5 steps</p>
<h2>Step 1: Download rkhunter</h2>
<p>Login your server as root, and type the following command</p>
<pre>wget http://biznetnetworks.dl.sourceforge.net/project/rkhunter/rkhunter/1.3.8/rkhunter-1.3.8.tar.gz</pre>
<h2>Step 2: Extract rkhunter</h2>
<pre>tar -zxvf rkhunter-1.3.8.tar.gz</pre>
<h2>Step 3: Install rkhunter</h2>
<pre>cd rkhunter-1.3.8
sh installer.sh --install</pre>
<p>The screen as shown:</p>
<pre>Checking system for:
 Rootkit Hunter installer files: found
 A web file download command: wget found
Starting update:
 Checking installation directory "/usr/local": it exists and is writable.
 Checking installation directories:
  Directory /usr/local/share/doc/rkhunter-1.3.8: exists and is writable.
  Directory /usr/local/share/man/man8: exists and is writable.
  Directory /etc: exists and is writable.
  Directory /usr/local/bin: exists and is writable.
  Directory /usr/local/lib: exists and is writable.
  Directory /var/lib: exists and is writable.
  Directory /usr/local/lib/rkhunter/scripts: exists and is writable.
  Directory /var/lib/rkhunter/db: exists and is writable.
  Directory /var/lib/rkhunter/tmp: exists and is writable.
  Directory /var/lib/rkhunter/db/i18n: exists and is writable.
 Installing check_modules.pl: OK
 Installing filehashsha.pl: OK
 Installing stat.pl: OK
 Installing readlink.sh: OK
 Installing backdoorports.dat: OK
 Installing mirrors.dat: OK
 Installing programs_bad.dat: OK
 Installing suspscan.dat: OK
 Installing rkhunter.8: OK
 Installing ACKNOWLEDGMENTS: OK
 Installing CHANGELOG: OK
 Installing FAQ: OK
 Installing LICENSE: OK
 Installing README: OK
 Installing language support files: OK
 Installing rkhunter: OK
 Installing rkhunter.conf in no-clobber mode: OK
 &gt;&gt;&gt;
 &gt;&gt;&gt; PLEASE NOTE: inspect for update changes in "/etc/rkhunter.conf.24761",
 &gt;&gt;&gt; and apply to either "/etc/rkhunter.conf" or your local configuration
 &gt;&gt;&gt; file before running Rootkit Hunter.
 &gt;&gt;&gt;
Update complete
</pre>
<h2>Step 4: Update rkhunter</h2>
<p>At prompt type the following command</p>
<pre>rkhunter --update</pre>
<h2>Step 5:Adding daily cron job</h2>
<p>If you want get a mail daily with a status on your system, you need to do the following in steps:<br />
<strong>Create file rkhunter.sh</strong></p>
<pre>vi /etc/cron.daily/rkhunter.sh</pre>
<p><strong>Add the following code</strong></p>
<pre>#!/bin/sh
(
/usr/local/bin/rkhunter --versioncheck
/usr/local/bin/rkhunter --update
/usr/local/bin/rkhunter --cronjob --report-warnings-only
) | /bin/mail -s 'rkhunter Daily Run' yourname@example.com</pre>
<p>Replace yourname@example.com above with your email.<br />
<strong></strong></p>
<p><strong>Set execute permission for rkhunter.sh</strong></p>
<pre>chmod +x /etc/cron.daily/rkhunter.sh</pre>
<g:plusone href="https://lifelinux.com/how-to-install-rootkit-hunter/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-install-rootkit-hunter/">How To Install Rootkit Hunter</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-install-rootkit-hunter/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
