diff --git a/.gitignore b/.gitignore index df0b855..19e2df5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /clamav-unofficial-sigs-3.7.1.tar.gz /clamav-unofficial-sigs-3.7.2.tar.gz /5.6.2.tar.gz +/clamav-unofficial-sigs-6.1.1.tar.gz diff --git a/clamav-unofficial-sigs.cron b/clamav-unofficial-sigs.cron new file mode 100644 index 0000000..60b86d2 --- /dev/null +++ b/clamav-unofficial-sigs.cron @@ -0,0 +1,32 @@ +# https://eXtremeSHOK.com ###################################################### +# This file contains the cron settings for clamav-unofficial-sigs.sh +################### +# This is property of eXtremeSHOK.com +# You are free to use, modify and distribute, however you may not remove this notice. +# Copyright (c) Adrian Jon Kriel :: admin@extremeshok.com +################## +# +# Script updates can be found at: https://github.com/extremeshok/clamav-unofficial-sigs +# +# Originially based on: +# Script provide by Bill Landry (unofficialsigs@gmail.com). +# +# License: BSD (Berkeley Software Distribution) +# +################## +# Automatically Generated: dim. sept. 22 13:14:59 CEST 2019 +################## +# +# This cron file will execute the clamav-unofficial-sigs.sh script that +# currently supports updating third-party signature databases provided +# by Sanesecurity, SecuriteInfo, MalwarePatrol, OITC, etc. +# +# The script is set to run hourly, at a random minute past the hour, and the +# script itself is set to randomize the actual execution time between +# 60 - 600 seconds. To Adjust the cron values, edit your configs and run +# bash clamav-unofficial-sigs.sh --install-cron to generate a new file. +MAILTO=root +14 * * * * root [ -x /usr/sbin/clamav-unofficial-sigs.sh ] && /usr/bin/bash /usr/sbin/clamav-unofficial-sigs.sh + +# https://eXtremeSHOK.com ###################################################### + diff --git a/clamav-unofficial-sigs.logrotate b/clamav-unofficial-sigs.logrotate new file mode 100644 index 0000000..81c6e68 --- /dev/null +++ b/clamav-unofficial-sigs.logrotate @@ -0,0 +1,33 @@ +# https://eXtremeSHOK.com ###################################################### +# This file contains the logrotate settings for clamav-unofficial-sigs.sh +################### +# This is property of eXtremeSHOK.com +# You are free to use, modify and distribute, however you may not remove this notice. +# Copyright (c) Adrian Jon Kriel :: admin@extremeshok.com +################## +# +# Script updates can be found at: https://github.com/extremeshok/clamav-unofficial-sigs +# +# Originially based on: +# Script provide by Bill Landry (unofficialsigs@gmail.com). +# +# License: BSD (Berkeley Software Distribution) +# +################## +# Automatically Generated: dim. sept. 22 13:14:59 CEST 2019 +################## +# +# This logrotate file will rotate the logs generated by the clamav-unofficial-sigs.sh +# +# To Adjust the logrotate values, edit your configs and run +# bash clamav-unofficial-sigs.sh --install-logrotate to generate a new file. + +/var/log/clamav-unofficial-sigs/clamav-unofficial-sigs.log { + weekly + rotate 4 + missingok + notifempty + compress + create 0640 clamupdate clamupdate +} + diff --git a/clamav-unofficial-sigs.man8 b/clamav-unofficial-sigs.man8 new file mode 100644 index 0000000..ef85af2 --- /dev/null +++ b/clamav-unofficial-sigs.man8 @@ -0,0 +1,75 @@ + +.\" Manual page for eXtremeSHOK.com ClamAV Unofficial Signature Updater +.TH clamav-unofficial-sigs 8 "2019-09-02" "Version: 6.1.1" "SCRIPT COMMANDS" +.SH NAME +clamav-unofficial-sigs \- Download, test, and install third-party ClamAV signature databases. +.SH SYNOPSIS +.B clamav-unofficial-sigs +.RI [ options ] +.SH DESCRIPTION +\fBclamav-unofficial-sigs\fP provides a simple way to download, test, and update third-party signature databases provided by Sanesecurity, FOXHOLE, OITC, Scamnailer, BOFHLAND, CRDF, Porcupine, Securiteinfo, MalwarePatrol, Yara-Rules Project, etc. It will also generate and install cron, logrotate, and man files. +.SH UPDATES +Script updates can be found at: \fBhttps://github.com/extremeshok/clamav-unofficial-sigs\fP +.SH OPTIONS +This script follows the standard GNU command line syntax. +.LP +\fB Usage: clamav\-unofficial\-sigs.sh \fR [OPTION] [PATH|FILE] +.TP +\fB \-c, \-\-config \fR Use a specific configuration file or directory eg: '\-c /your/dir' or ' \-c /your/file.name' Note: If a directory is specified the directory must contain atleast: master.conf, os.conf or user.conf Default Directory: /etc/clamav\-unofficial\-sigs +.TP +\fB \-F, \-\-force \fR Force all databases to be downloaded, could cause ip to be blocked +.TP +\fB \-h, \-\-help \fR Display this script's help and usage information +.TP +\fB \-V, \-\-version \fR Output script version and date information +.TP +\fB \-v, \-\-verbose \fR Be verbose, enabled when not run under cron +.TP +\fB \-s, \-\-silence \fR Only output error messages, enabled when run under cron +.TP +\fB \-d, \-\-decode\-sig \fR Decode a third\-party signature either by signature name (eg: Sanesecurity.Junk.15248) or hexadecimal string. This flag will 'NOT' decode image signatures +.TP +\fB \-e, \-\-encode\-string \fR Hexadecimal encode an entire input string that can be used in any '*.ndb' signature database file +.TP +\fB \-f, \-\-encode\-formatted \fR Hexadecimal encode a formatted input string containing signature spacing fields '{}, (), *', without encoding the spacing fields, so that the encoded signature can be used in any '*.ndb' signature database file +.TP +\fB \-g, \-\-gpg\-verify \fR GPG verify a specific Sanesecurity database file eg: '\-g filename.ext' (do not include file path) +.TP +\fB \-i, \-\-information \fR Output system and configuration information for viewing or possible debugging purposes +.TP +\fB \-m, \-\-make\-database \fR Make a signature database from an ascii file containing data strings, with one data string per line. Additional information is provided when using this flag +.TP +\fB \-t, \-\-test\-database \fR Clamscan integrity test a specific database file eg: '\-t filename.ext' (do not include file path) +.TP +\fB \-o, \-\-output\-triggered \fR If HAM directory scanning is enabled in the script's configuration file, then output names of any third\-party signatures that triggered during the HAM directory scan +.TP +\fB \-w, \-\-whitelist \fR Adds a signature whitelist entry in the newer ClamAV IGN2 format to 'my\-whitelist.ign2' in order to temporarily resolve a false\-positive issue with a specific third\-party signature. Script added whitelist entries will automatically be removed if the original signature is either modified or removed from the third\-party signature database +.TP +\fB \-\-check\-clamav \fR If ClamD status check is enabled and the socket path is correctly specifiedthen test to see if clamd is running or not +.TP +\fB \-\-install\-all \fR Install and generate the cron, logroate and man files, autodetects the values based on your config files +.TP +\fB \-\-install\-cron \fR Install and generate the cron file, autodetects the values based on your config files +.TP +\fB \-\-install\-logrotate \fR Install and generate the logrotate file, autodetects the values based on your config files +.TP +\fB \-\-install\-man \fR Install and generate the man file, autodetects the values based on your config files +.TP +\fB \-\-remove\-script \fR Remove the clamav\-unofficial\-sigs script and all of its associated files and databases from the system +.TP +.SH SEE ALSO +.BR clamd (8), +.BR clamscan (1) +.SH COPYRIGHT +Copyright (c) Adrian Jon Kriel :: admin@extremeshok.com +.TP +You are free to use, modify and distribute, however you may not remove this notice. +.SH LICENSE +BSD (Berkeley Software Distribution) +.SH BUGS +Report bugs to \fBhttps://github.com/extremeshok/clamav-unofficial-sigs\fP +.SH AUTHOR +Adrian Jon Kriel :: admin@extremeshok.com +Originially based on Script provide by Bill Landry + + diff --git a/clamav-unofficial-sigs.spec b/clamav-unofficial-sigs.spec index 61871fc..5db192d 100644 --- a/clamav-unofficial-sigs.spec +++ b/clamav-unofficial-sigs.spec @@ -8,13 +8,16 @@ %global clamupdategrp clam-update %endif Name: clamav-unofficial-sigs -Version: 5.6.2 -Release: 8%{?dist} +Version: 6.1.1 +Release: 1%{?dist} Summary: Scripts to download unofficial clamav signatures Group: Applications/System License: BSD URL: https://github.com/extremeshok/%{name} Source0: https://github.com/extremeshok/%{name}/archive/%{version}.tar.gz +Source1: clamav-unofficial-sigs.cron +Source2: clamav-unofficial-sigs.logrotate +Source3: clamav-unofficial-sigs.man8 BuildArch: noarch BuildRequires: bind-utils BuildRequires: rsync @@ -22,6 +25,9 @@ BuildRequires: rsync BuildRequires: systemd %endif Requires: clamav clamav-update rsync gnupg diffutils curl bind-utils +%if %{with_systemd} +Requires(post): systemd-sysv +%endif %description This package contains scripts and configuration files @@ -34,26 +40,14 @@ INetMsg and ScamNailer. %setup -qn %{name}-%{version} sed -i -e '/user_configuration_complete/ s/^#//' config/user.conf sed -i -e '/ExecStart/ s^/usr/local/sbin^/usr/sbin^' systemd/clamav-unofficial-sigs.service -# Just for generating cron, logrotate and man files -grep version config/master.conf > build.conf -cat << EOF >> build.conf -clamscan_bin="/usr/bin/clamscan" -rsync_bin="/usr/bin/rsync" -clam_user=root -clam_group=root -work_dir="." -clam_dbs="." -man_dir="." -cron_filename="%{name}.cron" -cron_dir="." -logrotate_filename="%{name}.logrotate" -logrotate_dir="." -log_file_path="." -user_configuration_complete="yes" -EOF %build -bash clamav-unofficial-sigs.sh -c ./build.conf --install-all +cp %{SOURCE1} clamav-unofficial-sigs.cron +cp %{SOURCE2} clamav-unofficial-sigs.logrotate +cp %{SOURCE3} clamav-unofficial-sigs.man8 +%if 0%{?rhel} == 6 +sed -i -e '/create/ s/clamupdate/clam-update/g' clamav-unofficial-sigs.logrotate +%endif %if 0%{?rhel} <= 7 sed -i -e '/^#pkg_mgr/ s/^#//;s/""/"yum"/' config/master.conf %else @@ -61,9 +55,7 @@ sed -i -e '/^#pkg_mgr/ s/^#//;s/""/"dnf"/' config/master.conf %endif # Disable yara rules sed -i -e '/^enable_yararules/ s/yes/no/' config/master.conf -sed -i -e '/^clamd_restart_opt/ s/systemctl restart/systemctl try-restart/' config/os.centos7.conf -sed -i -e 's^%{_builddir}/%{name}-%{version}^%{_sbindir}^g' clamav-unofficial-sigs.cron -sed -i -e 's^\./^%{_localstatedir}/log/clamav-unofficial-sigs/*.log^' clamav-unofficial-sigs.logrotate +sed -i -e '/^clamd_restart_opt/ s/systemctl restart/systemctl try-restart/' config/os/os.centos7.conf %install rm -rf %{buildroot} @@ -78,9 +70,9 @@ install -d -p %{buildroot}%{_mandir}/man8 install -p -m0755 clamav-unofficial-sigs.sh %{buildroot}%{_sbindir}/clamav-unofficial-sigs.sh # config/os.centos7.conf file is for epel and fedora %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 -install -p -m0644 config/os.centos7.conf %{buildroot}%{_sysconfdir}/%{name}/os.conf +install -p -m0644 config/os/os.centos7.conf %{buildroot}%{_sysconfdir}/%{name}/os.conf %else -install -p -m0644 config/os.centos6.conf %{buildroot}%{_sysconfdir}/%{name}/os.conf +install -p -m0644 config/os/os.centos6.conf %{buildroot}%{_sysconfdir}/%{name}/os.conf %endif install -p -m0644 config/user.conf %{buildroot}%{_sysconfdir}/%{name}/user.conf install -p -m0644 config/master.conf %{buildroot}%{_sysconfdir}/%{name}/master.conf @@ -88,7 +80,7 @@ install -Dp -m 0644 systemd/clamav-unofficial-sigs.service %{buildroot}%{_unitdi install -Dp -m 0644 systemd/clamav-unofficial-sigs.timer %{buildroot}%{_unitdir}/clamav-unofficial-sigs.timer install -p -m0644 clamav-unofficial-sigs.cron %{buildroot}%{_sysconfdir}/cron.d/clamav-unofficial-sigs install -p -m0644 clamav-unofficial-sigs.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/clamav-unofficial-sigs -install -p -m0644 clamav-unofficial-sigs.8 %{buildroot}%{_mandir}/man8/clamav-unofficial-sigs.8 +install -p -m0644 clamav-unofficial-sigs.man8 %{buildroot}%{_mandir}/man8/clamav-unofficial-sigs.8 %clean rm -rf %{buildroot} @@ -112,10 +104,15 @@ rm -rf %{buildroot} %{_mandir}/man*/%{name}* %changelog +* Sat Sep 21 2019 Didier Fabert - 6.1.1-1 +- Update from upstream +- Add cron, logrotate and man from fixed files (upstream way is too difficult to maintain) +- Fix buggy date in changelog + * Wed Jul 24 2019 Fedora Release Engineering - 5.6.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild -* Sun Mar 30 2019 Didier Fabert - 5.6.2-7 +* Sat Mar 30 2019 Didier Fabert - 5.6.2-7 - Add patch proposal for RHEL/CentOS 6 to use /sbin/service from Robert Scheck * Sun Mar 17 2019 Didier Fabert 5.6.2-6 diff --git a/sources b/sources index d046216..7c7fbab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (5.6.2.tar.gz) = 79978db065a22d778490d0a2673f5a0bb7ab73e42de64563e7d26ac23459f7e5b2e73b0548e1ea6483e3c5f43eed65cdbc6814037cc0c46a339366a0150e5427 +SHA512 (clamav-unofficial-sigs-6.1.1.tar.gz) = 29f5f92d1a1a4d28ec44b91991df9c89fa2832bc1b059f593e9255bcc9554fe79da38dde9d56ebd150833195de717b2d6711958d44b183a49eccfb09ba911254