security/maltrail: new plugin (#1257)

This commit is contained in:
Michael
2019-03-19 14:29:33 +01:00
committed by Franco Fichtner
parent 0498c2247f
commit b957d12253
34 changed files with 1019 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
PLUGIN_NAME= maltrail
PLUGIN_VERSION= 0.1
PLUGIN_COMMENT= Malicious traffic detection system
PLUGIN_DEPENDS= maltrail
PLUGIN_MAINTAINER= m.muenz@gmail.com
PLUGIN_DEVEL= yes
.include "../../Mk/plugins.mk"
+8
View File
@@ -0,0 +1,8 @@
Maltrail is a malicious traffic detection system, utilizing publicly
available (black)lists containing malicious and/or generally suspicious
trails, along with static trails compiled from various AV reports and
custom user defined lists, where trail can be anything from domain name,
URL, IP address or HTTP User-Agent header value. Also, it uses advanced
heuristic mechanisms that can help in discovery of unknown threats.
WWW: https://github.com/stamparm/maltrail
@@ -0,0 +1,64 @@
<?php
/**
* Copyright (C) 2019 Michael Muenz <m.muenz@gmail.com>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
function maltrail_services()
{
global $config;
$services = array();
if (isset($config['OPNsense']['maltrail']['general']['enabled']) && $config['OPNsense']['maltrail']['general']['enabled'] == 1) {
$services[] = array(
'description' => gettext('maltrail sensor'),
'configd' => array(
'restart' => array('maltrailsensor restart'),
'start' => array('maltrailsensor start'),
'stop' => array('maltrailsensor stop'),
),
'name' => 'maltrailsensor',
'pidfile' => '/var/run/maltrailsensor.pid'
);
}
if (isset($config['OPNsense']['maltrail']['server']['enabled']) && $config['OPNsense']['maltrail']['server']['enabled'] == 1) {
$services[] = array(
'description' => gettext('maltrail server'),
'configd' => array(
'restart' => array('maltrailserver restart'),
'start' => array('maltrailserver start'),
'stop' => array('maltrailserver stop'),
),
'name' => 'maltrailserver',
'pidfile' => '/var/run/maltrailserver.pid'
);
}
return $services;
}
@@ -0,0 +1,23 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: opnsense-maltrailsensor
# REQUIRE: SERVERS
# KEYWORD: shutdown
#
. /etc/rc.subr
name=maltrailsensor
rcvar=maltrailsensor_enable
pidfile=/var/run/${name}.pid
command=/usr/sbin/daemon
command_args="-f -P /var/run/maltrailsensor.pid python2.7 /usr/local/share/maltrail/sensor.py"
load_rc_config opnsense-maltrailsensor
: ${maltrailsensor_enable="NO"}
run_rc_command $1
@@ -0,0 +1,23 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: opnsense-maltrailserver
# REQUIRE: SERVERS
# KEYWORD: shutdown
#
. /etc/rc.subr
name=maltrailserver
rcvar=maltrailserver_enable
pidfile=/var/run/${name}.pid
command=/usr/sbin/daemon
command_args="-f -P /var/run/maltrailserver.pid python2.7 /usr/local/share/maltrail/server.py"
load_rc_config opnsense-maltrailserver
: ${maltrailserver_enable="NO"}
run_rc_command $1
@@ -0,0 +1,37 @@
<?php
/*
* Copyright (C) 2019 Michael Muenz <m.muenz@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace OPNsense\Maltrail\Api;
use OPNsense\Base\ApiMutableModelControllerBase;
class GeneralController extends ApiMutableModelControllerBase
{
protected static $internalModelClass = '\OPNsense\Maltrail\General';
protected static $internalModelName = 'general';
}
@@ -0,0 +1,37 @@
<?php
/*
* Copyright (C) 2019 Michael Muenz <m.muenz@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace OPNsense\Maltrail\Api;
use OPNsense\Base\ApiMutableModelControllerBase;
class SensorController extends ApiMutableModelControllerBase
{
protected static $internalModelClass = '\OPNsense\Maltrail\Sensor';
protected static $internalModelName = 'sensor';
}
@@ -0,0 +1,37 @@
<?php
/*
* Copyright (C) 2019 Michael Muenz <m.muenz@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace OPNsense\Maltrail\Api;
use OPNsense\Base\ApiMutableModelControllerBase;
class ServerController extends ApiMutableModelControllerBase
{
protected static $internalModelClass = '\OPNsense\Maltrail\Server';
protected static $internalModelName = 'server';
}
@@ -0,0 +1,39 @@
<?php
/*
* Copyright (C) 2019 Michael Muenz <m.muenz@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace OPNsense\Maltrail\Api;
use OPNsense\Base\ApiMutableServiceControllerBase;
class ServerserviceController extends ApiMutableServiceControllerBase
{
protected static $internalServiceClass = '\OPNsense\Maltrail\Server';
protected static $internalServiceTemplate = 'OPNsense/Maltrail';
protected static $internalServiceEnabled = 'enabled';
protected static $internalServiceName = 'maltrailserver';
}
@@ -0,0 +1,39 @@
<?php
/*
* Copyright (C) 2019 Michael Muenz <m.muenz@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace OPNsense\Maltrail\Api;
use OPNsense\Base\ApiMutableServiceControllerBase;
class ServiceController extends ApiMutableServiceControllerBase
{
protected static $internalServiceClass = '\OPNsense\Maltrail\Sensor';
protected static $internalServiceTemplate = 'OPNsense/Maltrail';
protected static $internalServiceEnabled = 'enabled';
protected static $internalServiceName = 'maltrailsensor';
}
@@ -0,0 +1,40 @@
<?php
/**
* Copyright (C) 2019 Michael Muenz <m.muenz@gmail.com>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\Maltrail;
class GeneralController extends \OPNsense\Base\IndexController
{
public function indexAction()
{
$this->view->generalForm = $this->getForm("general");
$this->view->pick('OPNsense/Maltrail/general');
}
}
@@ -0,0 +1,40 @@
<?php
/**
* Copyright (C) 2019 Michael Muenz <m.muenz@gmail.com>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\Maltrail;
class SensorController extends \OPNsense\Base\IndexController
{
public function indexAction()
{
$this->view->sensorForm = $this->getForm("sensor");
$this->view->pick('OPNsense/Maltrail/sensor');
}
}
@@ -0,0 +1,40 @@
<?php
/**
* Copyright (C) 2019 Michael Muenz <m.muenz@gmail.com>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\Maltrail;
class ServerController extends \OPNsense\Base\IndexController
{
public function indexAction()
{
$this->view->serverForm = $this->getForm("server");
$this->view->pick('OPNsense/Maltrail/server');
}
}
@@ -0,0 +1,26 @@
<form>
<field>
<id>general.heuristics</id>
<label>Use Heuristics</label>
<type>checkbox</type>
<help>Whether to enable or disable the usage or heuristic detection.</help>
</field>
<field>
<id>general.updateperiod</id>
<label>Update Period</label>
<type>text</type>
<help>Time in seconds how often to refresh trails.</help>
</field>
<field>
<id>general.adminpassword</id>
<label>SHA256 Admin Password</label>
<type>text</type>
<help>Set the SHA256 password for user admin here. For ways to generate it, please consult the plugin documentation.</help>
</field>
<field>
<id>general.monitorinterface</id>
<label>Monitor Interface</label>
<type>select_multiple</type>
<help>List of interface to listen on, none means listen on all interfaces.</help>
</field>
</form>
@@ -0,0 +1,26 @@
<form>
<field>
<id>sensor.enabled</id>
<label>Enable Maltrail Sensor</label>
<type>checkbox</type>
<help>This will activate the Sensor. Do not forget to enable the local server mode or send the logs to a remote server.</help>
</field>
<field>
<id>sensor.captureall</id>
<label>Capture All</label>
<type>checkbox</type>
<help>This will look into all IPv4 and IPv6 traffic. If disabled it will only look for traffic for icmp, udp, tcp syn packets and on known HTTP ports.</help>
</field>
<field>
<id>sensor.remoteserver</id>
<label>Remote Server</label>
<type>text</type>
<help>IP address of the remote logging server.</help>
</field>
<field>
<id>sensor.remoteport</id>
<label>Remote Port</label>
<type>text</type>
<help>Port of the logging server. Leave empty when sensor and server run on the same system.</help>
</field>
</form>
@@ -0,0 +1,32 @@
<form>
<field>
<id>server.enabled</id>
<label>Enable Maltrail Server</label>
<type>checkbox</type>
<help>This will activate the Maltrail server. You can use this service to also collect data from remote Maltrail sensors.</help>
</field>
<field>
<id>server.listenaddress</id>
<label>UI Listen Address</label>
<type>text</type>
<help>IP address the server UI listens on.</help>
</field>
<field>
<id>server.listenport</id>
<label>UI Listen Port</label>
<type>text</type>
<help>TCP port of the server UI.</help>
</field>
<field>
<id>server.loglistenaddress</id>
<label>Log Listen Address</label>
<type>text</type>
<help>IP address to listen to where sensors should send log. Leave blank if you run server and sensor on the same machine.</help>
</field>
<field>
<id>server.loglistenport</id>
<label>Log Listen Port</label>
<type>text</type>
<help>The UDP port of the log server. Leave blank if you run server and sensor on the same machine. The default when in use should be set to 8337.</help>
</field>
</form>
@@ -0,0 +1,9 @@
<acl>
<page-services-maltrail>
<name>Services: Maltrail</name>
<patterns>
<pattern>ui/maltrail/*</pattern>
<pattern>api/maltrail/*</pattern>
</patterns>
</page-services-maltrail>
</acl>
@@ -0,0 +1,37 @@
<?php
/**
* Copyright (C) 2019 Michael Muenz <m.muenz@gmail.com>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\Maltrail;
use OPNsense\Base\BaseModel;
class General extends BaseModel
{
}
@@ -0,0 +1,23 @@
<model>
<mount>//OPNsense/maltrail/general</mount>
<description>Maltrail general configuration</description>
<version>0.0.1</version>
<items>
<heuristics type="BooleanField">
<default>1</default>
<Required>Y</Required>
</heuristics>
<updateperiod type="IntegerField">
<default>86400</default>
<Required>Y</Required>
</updateperiod>
<adminpassword type="TextField">
<default>9ab3cd9d67bf49d01f6a2e33d0bd9bc804ddbe6ce1ff5d219c42624851db5dbc</default>
<Required>Y</Required>
</adminpassword>
<monitorinterface type="InterfaceField">
<multiple>Y</multiple>
<Required>N</Required>
</monitorinterface>
</items>
</model>
@@ -0,0 +1,9 @@
<menu>
<Services>
<Maltrail cssClass="fa fa-eye-slash">
<General url="/ui/maltrail/general/index" order="10"/>
<Sensor url="/ui/maltrail/sensor/index" order="20"/>
<Server url="/ui/maltrail/server/index" order="30"/>
</Maltrail>
</Services>
</menu>

Some files were not shown because too many files have changed in this diff Show More