initial commit of file from CVS for smeserver-clamav-unofficial-sigs on Sat Sep 7 20:14:15 AEST 2024
This commit is contained in:
@@ -0,0 +1 @@
|
||||
enabled
|
@@ -0,0 +1 @@
|
||||
service
|
@@ -0,0 +1,8 @@
|
||||
{
|
||||
my $clamav_unof = $DB->get("clamav-unofficial-sigs") ||
|
||||
$DB->new_record("clamav-unofficial-sigs", { type => "service" });
|
||||
|
||||
$clamav_unof->delete_prop($_) for ( qw(honeynet.hdb jurlbl.ndb phish.ndb sanesecurity.ftm securiteinfobat.hdb securiteinfoelf.hdb securiteinfohtml.hdb securiteinfopdf.hdb spamimg.hdb winnow_malware_links.ndb
|
||||
junk.ndb mbl.ndb rogue.hdb scam.ndb securiteinfodos.hdb securiteinfo.hdb securiteinfooffice.hdb securiteinfosh.hdb winnow_malware.hdb) );
|
||||
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# create missing folder to avoid error
|
||||
# see https://github.com/extremeshok/clamav-unofficial-sigs/pull/390 https://github.com/extremeshok/clamav-unofficial-sigs/pull/400
|
||||
mkdir -p /var/lib/clamav-unofficial-sigs/dbs-uh
|
||||
mkdir -p /var/lib/clamav-unofficial-sigs/dbs-yara
|
||||
chown clamupdate:clamupdate /var/lib/clamav-unofficial-sigs/*
|
@@ -0,0 +1,20 @@
|
||||
# This file contains os configuration 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
|
||||
# License: BSD (Berkeley Software Distribution)
|
||||
##################
|
||||
#
|
||||
# Script updates can be found at: https://github.com/extremeshok/clamav-unofficial-sigs
|
||||
#
|
||||
##################
|
||||
#
|
||||
################################################################################
|
||||
# SEE MASTER.CONF FOR CONFIG EXPLANATIONS
|
||||
################################################################################
|
||||
# Rename to os.conf to enable this file
|
||||
################################################################################
|
||||
|
||||
# Recommended Options for Packaging, this example applies to RHEL/CentOS
|
||||
|
@@ -0,0 +1,2 @@
|
||||
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
|
||||
export PATH
|
@@ -0,0 +1,2 @@
|
||||
clam_user="clamupdate"
|
||||
clam_group="clamupdate"
|
@@ -0,0 +1 @@
|
||||
clam_dbs="/var/lib/clamav"
|
@@ -0,0 +1 @@
|
||||
clamd_pid="/var/run/clamd/clamd.pid"
|
@@ -0,0 +1 @@
|
||||
clamd_socket="/var/run/clamd/clamd.socket"
|
@@ -0,0 +1,15 @@
|
||||
# Recommended Options for Packaging, this example applies to RHEL/CentOS
|
||||
|
||||
# Disable Upgrades
|
||||
allow_upgrades="no"
|
||||
|
||||
# Disable Update Checks
|
||||
allow_update_checks="no"
|
||||
|
||||
# Provided two variables that package and port maintainers can use in order to
|
||||
# prevent the script from removing itself with the '-r' flag
|
||||
# If the script was installed via a package manager like yum, apt, pkg, etc.
|
||||
# The script will instead provide feedback to the user about how to uninstall the package.
|
||||
pkg_mgr="yum" #the package manager name
|
||||
pkg_rm="yum erase clamav-unofficial-sigs" #the package manager command to remove the script
|
||||
|
@@ -0,0 +1,2 @@
|
||||
reload_dbs="yes"
|
||||
reload_opt="clamdscan --config-file=/etc/clamd.d/scan.conf --reload"
|
@@ -0,0 +1 @@
|
||||
clamd_restart_opt="/usr/bin/systemctl try-restart clamd"
|
@@ -0,0 +1,4 @@
|
||||
enable_random="yes"
|
||||
min_sleep_time="60"
|
||||
max_sleep_time="600"
|
||||
|
@@ -0,0 +1,104 @@
|
||||
{
|
||||
|
||||
my %db = $DB->get('clamav-unofficial-sigs')->props;
|
||||
|
||||
my @ss = ();
|
||||
my @si = ();
|
||||
my @mbl = ();
|
||||
|
||||
if ((${'clamav-unofficial-sigs'}{'status'} || 'disabled') eq 'enabled'){
|
||||
while (my ($param,$value) = each(%db)){
|
||||
if ($value eq 'ss'){
|
||||
push @ss, $param;
|
||||
}
|
||||
elsif ($value eq 'si'){
|
||||
push @si, $param;
|
||||
}
|
||||
elsif ($value eq 'mbl'){
|
||||
push @mbl, $param;
|
||||
}
|
||||
}
|
||||
# $OUT .= "ss_dbs=\"\n " . join("\n ", @ss) . "\n\"\n" if (scalar @ss > 0);
|
||||
# $OUT .= "si_dbs=\"\n " . join("\n ", @si) . "\n\"\n" if (scalar @si > 0);
|
||||
# $OUT .= "mbl_dbs=\"\n " . join("\n ", @mbl) . "\n\"\n" if (scalar @mbl > 0);
|
||||
}
|
||||
$OUT ="\n";
|
||||
}
|
||||
# securiteinfo
|
||||
securiteinfo_premium={((${'clamav-unofficial-sigs'}{'securiteinfo_premium'}|| "no" ) eq '"yes"' )? "yes" : '"no"' }
|
||||
securiteinfo_authorisation_signature={my $key=${'clamav-unofficial-sigs'}{'securiteinfo_authorisation_signature'}|| 'YOUR-SIGNATURE-NUMBER'; $OUT="\"$key\""; }
|
||||
|
||||
#malwareexpert
|
||||
malwareexpert_serial_key={my $key=${'clamav-unofficial-sigs'}{'malwareexpert_serial_key'}||'YOUR-SERIAL-KEY'; $OUT="\"$key\""}
|
||||
|
||||
#malwarepatrol
|
||||
malwarepatrol_receipt_code={my $key=${'clamav-unofficial-sigs'}{'malwarepatrol_receipt_code'}||'YOUR-RECEIPT-NUMBER'; $OUT="\"$key\"";}
|
||||
malwarepatrol_product_code="8"
|
||||
malwarepatrol_list={((${'clamav-unofficial-sigs'}{'malwarepatrol_list'}||"clamav_basic") eq "clamav_basic") ? "\"clamav_basic\"" : "\"clamav_ext\"";}
|
||||
|
||||
|
||||
# ========================
|
||||
# Enabled Databases
|
||||
# ========================
|
||||
# Set to no to disable an entire database, if the database is empty it will also be disabled.
|
||||
additional_enabled={((${'clamav-unofficial-sigs'}{'additional_enabled'} || "yes") eq "yes") ? "\"yes\"" : "\"no\"";}
|
||||
interserver_enabled={((${'clamav-unofficial-sigs'}{'interserver_enabled'} || "yes") eq "yes") ? "\"yes\"" : "\"no\"";}
|
||||
linuxmalwaredetect_enabled={((${'clamav-unofficial-sigs'}{'linuxmalwaredetect_enabled'} || "yes") eq "yes") ? "\"yes\"" : "\"no\"";}
|
||||
# if serial_key YOUR-SERIAL-KEY will be forced to disabled in script
|
||||
malwareexpert_enabled={((${'clamav-unofficial-sigs'}{'malwareexpert_enabled'} || "yes") eq "yes") ? "\"yes\"" : "\"no\"";}
|
||||
# if receipt_code YOUR-RECEIPT-NUMBER will be forced to disabled in script
|
||||
malwarepatrol_enabled={((${'clamav-unofficial-sigs'}{'malwarepatrol_enabled'} || "yes") eq "yes") ? "\"yes\"" : "\"no\"";}
|
||||
sanesecurity_enabled={((${'clamav-unofficial-sigs'}{'sanesecurity_enabled'} || "yes") eq "yes") ? "\"yes\"" : "\"no\"";}
|
||||
# if authorisation_signature YOUR-SIGNATURE-NUMBER will be forced to disabled in script
|
||||
securiteinfo_enabled=={((${'clamav-unofficial-sigs'}{'securiteinfo_enabled'} || "yes") eq "yes") ? "\"yes\"" : "\"no\"";}
|
||||
urlhaus_enabled={((${'clamav-unofficial-sigs'}{'urlhaus_enabled'} || "yes") eq "yes") ? "\"yes\"" : "\"no\"";}
|
||||
# Yara-Rule Project, automatically disabled if clamav is older than 0.100 and enable_yararules is disabled
|
||||
yararulesproject_enabled={((${'clamav-unofficial-sigs'}{'yararulesproject_enabled'} || "yes") eq "yes") ? "\"yes\"" : "\"no\"";}
|
||||
|
||||
#Enables yararules in the various databases, automatically
|
||||
enable_yararules={((${'clamav-unofficial-sigs'}{'enable_yararules'} || "no") eq "yes") ? "\"yes\"" : "\"no\"";}
|
||||
|
||||
|
||||
# valid rating: LOW, MEDIUM, HIGH, DISABLE
|
||||
{
|
||||
my $defaultDBR = (( ${'clamav-unofficial-sigs'}{'default_dbs_rating'} || "NOP") ~~ ['LOW', 'MEDIUM', 'HIGH', 'DISABLE']) ? ${'clamav-unofficial-sigs'}{'default_dbs_rating'} : 'MEDIUM' ;
|
||||
|
||||
$OUT .= "default_dbs_rating=\"$defaultDBR\"\n";
|
||||
|
||||
$OUT .= "# Per Database
|
||||
# These ratings will override the global rating for the specific database
|
||||
# valid ratings: LOW | MEDIUM | HIGH | DISABLE\n";
|
||||
|
||||
my $lmd = (( ${'clamav-unofficial-sigs'}{'linuxmalwaredetect_dbs_rating'} || "NOP") ~~ ['LOW', 'MEDIUM', 'HIGH', 'DISABLE']) ? ${'clamav-unofficial-sigs'}{'linuxmalwaredetect_dbs_rating'} : 'NOP' ;
|
||||
$OUT .= "linuxmalwaredetect_dbs_rating=\"$lmd\"\n" unless $lmd eq 'NOP';
|
||||
my $ss = (( ${'clamav-unofficial-sigs'}{'sanesecurity_dbs_rating'} || "NOP") ~~ ['LOW', 'MEDIUM', 'HIGH', 'DISABLE']) ? ${'clamav-unofficial-sigs'}{'sanesecurity_dbs_rating'} : 'NOP' ;
|
||||
$OUT .= "sanesecurity_dbs_rating=\"$ss\"\n" unless $ss eq 'NOP';
|
||||
my $si = (( ${'clamav-unofficial-sigs'}{'securiteinfo_dbs_rating'} || "NOP") ~~ ['LOW', 'MEDIUM', 'HIGH', 'DISABLE']) ? ${'clamav-unofficial-sigs'}{'securiteinfo_dbs_rating'} : 'NOP' ;
|
||||
$OUT .= "securiteinfo_dbs_rating=\"$si\"\n" unless $si eq 'NOP';
|
||||
my $uhd = (( ${'clamav-unofficial-sigs'}{'urlhaus_dbs_rating'} || "NOP") ~~ ['LOW', 'MEDIUM', 'HIGH', 'DISABLE']) ? ${'clamav-unofficial-sigs'}{'urlhaus_dbs_rating'} : 'NOP' ;
|
||||
$OUT .= "urlhaus_dbs_rating=\"$uhd\"\n" unless $uhd eq 'NOP';
|
||||
my $yrp = (( ${'clamav-unofficial-sigs'}{'yararulesproject_dbs_rating'} || "NOP") ~~ ['LOW', 'MEDIUM', 'HIGH', 'DISABLE']) ? ${'clamav-unofficial-sigs'}{'yararulesproject_dbs_rating'} : 'NOP' ;
|
||||
$OUT .= "yararulesproject_dbs_rating=\"$yrp\"\n" unless $yrp eq 'NOP';
|
||||
|
||||
}
|
||||
|
||||
# ========================
|
||||
# Additional Databases
|
||||
# ========================
|
||||
{
|
||||
return "# additional disabled\n" unless ((${'clamav-unofficial-sigs'}{'additional_enabled'} || "yes") eq "yes");
|
||||
|
||||
my $additionnal = ${'clamav-unofficial-sigs'}{'additional'} or return "# additional list empty\n";
|
||||
|
||||
$OUT = "declare -a additional_dbs=(\n";
|
||||
my @values = split(/;,/, $additionnal);
|
||||
for ( @values ) {
|
||||
$OUT .= " $_ \n";
|
||||
}
|
||||
|
||||
$OUT .= ") #END ADDITIONAL DATABASES
|
||||
";
|
||||
|
||||
#TODO
|
||||
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
si_update_hours="4"
|
||||
mbl_update_hours="6"
|
@@ -0,0 +1 @@
|
||||
keep_db_backup="no"
|
@@ -0,0 +1,3 @@
|
||||
enable_logging="yes"
|
||||
log_file_path="/var/log/clamav-unofficial-sigs"
|
||||
log_file_name="clamav-unofficial-sigs.log"
|
@@ -0,0 +1,2 @@
|
||||
rsync_proxy=""
|
||||
curl_proxy=""
|
@@ -0,0 +1 @@
|
||||
user_configuration_complete="yes"
|
Reference in New Issue
Block a user