Skip to content
Snippets Groups Projects
Commit eacc2606 authored by Tomáš Plesník's avatar Tomáš Plesník
Browse files

Merge branch 'master' of homeproj.cesnet.cz:warden

parents 59fa5883 f86bec60
No related branches found
No related tags found
No related merge requests found
Showing
with 302 additions and 175 deletions
...@@ -2,20 +2,18 @@ ...@@ -2,20 +2,18 @@
# #
# build-client.sh # build-client.sh
# #
# Copyright (C) 2011-2012 Cesnet z.s.p.o # Copyright (C) 2011-2015 Cesnet z.s.p.o
# #
# Use of this source is governed by a BSD-style license, see LICENSE file. # Use of this source is governed by a BSD-style license, see LICENSE file.
VERSION="1.2" VERSION="2.2"
#-------------------------------------------------------------------------------
# FUNCTIONS
#-------------------------------------------------------------------------------
err() err()
{ {
echo "FAILED!" echo "FAILED!"
cat $err echo -n "Error: " && cat "$err"
rm -rf $err $package $tar $sig rm -f "$err" "$tar" "$sig"
rm -rf "$package"
echo echo
echo "Build of $package package FAILED!!!" echo "Build of $package package FAILED!!!"
exit 1 exit 1
...@@ -26,73 +24,86 @@ err() ...@@ -26,73 +24,86 @@ err()
# MAIN # MAIN
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# edit when you build new package if [ -z "$1" ]; then
version="2.2-beta" echo "Usage: ${0##*/} <package_version_number>"
echo
echo "Example: ${0##*/} \"2.2\""
exit 1
fi
package_name="warden-client" package_name="warden-client"
package="${package_name}-${version}" package="${package_name}-$1"
doc="${package}/${package_name}/doc" bin="${package}/bin"
etc="${package}/${package_name}/etc" doc="${package}/doc"
lib="${package}/${package_name}/lib" etc="${package}/etc"
var="${package}/${package_name}/var" lib="${package}/lib"
sh="${package}/sh"
tar="${package}.tar.gz" tar="${package}.tar.gz"
sig="${tar}.sig" sig="${tar}.sig"
err="/tmp/${package}-err" err="/tmp/${package}-err"
# make directory structure # make directory structure
echo "Building $package_name package version $version ..." echo "Building $package package..."
echo echo
echo -n "Building 'base' directory ... " echo -n "Building 'base' directory ... "
mkdir -p $package 2> $err || err mkdir -p "$package" 2> "$err" || err
cp -R ../src/${package_name}/sh/* $package 2> $err || err cp "../src/${package_name}/sh/install.sh" "$package" 2> "$err" || err
cp ../src/${package_name}/doc/CHANGELOG $package 2> $err || err cp "../src/${package_name}/sh/update.sh" "$package" 2> "$err" || err
cp ../src/${package_name}/doc/INSTALL $package 2> $err || err #cp "../src/${package_name}/sh/updateCommon.pm" "$package" 2> "$err" || err
cp ../src/${package_name}/doc/LICENSE $package 2> $err || err cp "../src/${package_name}/doc/INSTALL" "$package" 2> "$err" || err
cp ../src/${package_name}/doc/README $package 2> $err || err cp "../src/${package_name}/doc/README" "$package" 2> "$err" || err
cp ../src/${package_name}/doc/README.cesnet $package 2> $err || err cp "../src/${package_name}/doc/UPDATE" "$package" 2> "$err" || err
echo "OK" echo "OK"
echo -n "Building '${bin}' directory ... "
mkdir -p "$bin" 2> "$err" || err
cp -R "../src/${package_name}/bin/"* "$bin" 2> "$err" || err
echo "OK"
echo -n "Building '${doc}' directory ... " echo -n "Building '${doc}' directory ... "
mkdir -p $doc 2> $err || err mkdir -p "$doc" 2> "$err" || err
cp -R ../src/${package_name}/doc/* $doc 2> $err || err cp -R "../src/${package_name}/doc/"* "$doc" 2> "$err" || err
echo "OK" echo "OK"
echo -n "Building '${etc}' directory ... " echo -n "Building '${etc}' directory ... "
mkdir -p $etc 2> $err || err mkdir -p "$etc" 2> "$err" || err
cp ../src/${package_name}/etc/package_version $etc 2> $err || err cp "../src/${package_name}/etc/"* "$etc" 2> "$err" || err
rm -f "${etc}/"*.conf 2> "$err" || err
echo "OK" echo "OK"
echo -n "Building '${lib}' directory ... " echo -n "Building '${lib}' directory ... "
mkdir -p $lib 2> $err || err mkdir -p "$lib" 2> "$err" || err
cp -R ../src/${package_name}/lib/*.pm $lib 2> $err || err cp -R "../src/${package_name}/lib/"* "$lib" 2> "$err" || err
rm -f "${lib}/"*.t 2> "$err" || err
echo "OK" echo "OK"
echo -n "Building '${sh}' directory ... "
mkdir -p "$sh" 2> "$err" || err
cp "../src/${package_name}/sh/uninstall.sh" "$sh" 2> "$err" || err
echo "OK"
echo -n "Building '${var}' directory ... " echo -n "Creating MANIFEST file ... "
mkdir -p $var 2> $err || err cd "$package" && find . -mindepth 2 -type f | grep -v tmpl | sed 's/.\///' | uniq > "doc/MANIFEST" && cd $OLDPWD || err
echo "OK" echo "OK"
# create tarball # create tarball
echo -n "Creating $tar tarball ... " echo -n "Creating $tar tarball ... "
tar czf $tar $package 2> $err || err tar czf "$tar" "$package" 2> "$err" || err
echo "OK" echo "OK"
# create sign of tarball # create sign of tarball
echo -n "Creating $sig file ... " echo -n "Creating $sig file ... "
sha1sum $tar > $sig 2> $err || err sha1sum "$tar" > "$sig" 2> "$err" || err
echo "OK" echo "OK"
echo echo
echo "Building of $package package was SUCCESSFULL" echo "Building of $package package was SUCCESSFULL!!!"
# cleanup section # cleanup section
rm -rf $package $err rm -rf "$package" "$err"
exit 0 exit 0
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# build-server.sh # build-server.sh
# #
# Copyright (C) 2011-2012 Cesnet z.s.p.o # Copyright (C) 2011-2015 Cesnet z.s.p.o
# #
# Use of this source is governed by a BSD-style license, see LICENSE file. # Use of this source is governed by a BSD-style license, see LICENSE file.
...@@ -11,7 +11,7 @@ VERSION="2.2" ...@@ -11,7 +11,7 @@ VERSION="2.2"
err() err()
{ {
echo "FAILED!" echo "FAILED!"
cat "$err" echo -n "Error: " && cat "$err"
rm -f "$err" "$tar" "$sig" rm -f "$err" "$tar" "$sig"
rm -rf "$package" rm -rf "$package"
echo echo
...@@ -84,7 +84,7 @@ cp "../src/${package_name}/sh/uninstall.sh" "$sh" 2> "$err" || err ...@@ -84,7 +84,7 @@ cp "../src/${package_name}/sh/uninstall.sh" "$sh" 2> "$err" || err
echo "OK" echo "OK"
echo -n "Creating MANIFEST file ... " echo -n "Creating MANIFEST file ... "
cd "$package" && find . -mindepth 2 -type f | sed 's/.tmpl*//' | sed 's/.\///' | uniq > "doc/MANIFEST" && cd $OLDPWD || err cd "$package" && find . -mindepth 2 -type f | grep -v tmpl | sed 's/.\///' | uniq > "doc/MANIFEST" && cd $OLDPWD || err
echo "OK" echo "OK"
......
File added
03c3a2f95cec4b27b083e839c14d7efe5edc514f warden-server-2.2-beta4.tar.gz
File added
e445ed5a225695c14f487b9f74fd4ea8b514e2e9 warden-server-2.2.tar.gz
#!/usr/bin/perl -w #!/usr/bin/perl
# #
# Copyright (C) 2011-2013 Cesnet z.s.p.o # Copyright (C) 2011-2015 Cesnet z.s.p.o
# #
# Use of this source is governed by a BSD-style license, see LICENSE file. # Use of this source is governed by a BSD-style license, see LICENSE file.
use strict; use strict;
use warnings;
use FindBin qw($RealBin);
FindBin::again();
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Warden 2.2 Client, Info, Example # Warden 2.2 Client, Info, Example
...@@ -17,13 +21,12 @@ use strict; ...@@ -17,13 +21,12 @@ use strict;
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# This code should developer add into his/her application. # This code should developer add into his/her application.
# Path to warden-client directory # Load Warden client library and use main module
my $warden_path = '/opt/warden-client/'; use lib "$RealBin/../lib";
use WardenClient;
# Inclusion of warden-client receiving functionality
require $warden_path . '/lib/WardenClientCommon.pm';
my @clients = WardenClientCommon::getClientsInfo($warden_path) or exit 1; # receive data or exit # obtain information about already registered clients
my @clients = WardenClient::getClientInfo() or exit 1; # receive data or exit
print "+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n"; print "+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n";
print "| Client ID | Hostname | Registered | Requestor | Service | CT | Type | ROE | Description tags | IP Net Client |\n"; print "| Client ID | Hostname | Registered | Requestor | Service | CT | Type | ROE | Description tags | IP Net Client |\n";
......
#!/usr/bin/perl -w #!/usr/bin/perl
# #
# Copyright (C) 2011-2013 Cesnet z.s.p.o # Copyright (C) 2011-2015 Cesnet z.s.p.o
# #
# Use of this source is governed by a BSD-style license, see LICENSE file. # Use of this source is governed by a BSD-style license, see LICENSE file.
use strict; use strict;
use warnings;
use FindBin qw($RealBin $RealScript);
FindBin::again();
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Warden 2.2 Client, Receiver, Example # Warden 2.2 Client, Receiver, Example
...@@ -17,11 +21,9 @@ use strict; ...@@ -17,11 +21,9 @@ use strict;
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# This code should developer add into his/her application. # This code should developer add into his/her application.
# Path to warden-client directory # Load Warden client library and use main module
my $warden_path = '/opt/warden-client/'; use lib "$RealBin/../lib";
use WardenClient;
# Inclusion of warden-client receiving functionality
require $warden_path . '/lib/WardenClientReceive.pm';
# Definition of requested event type. This attributes is also set on server # Definition of requested event type. This attributes is also set on server
# and must not change. # and must not change.
...@@ -35,7 +37,7 @@ print "| id | hostname | service | detected | type | source_type | source | targ ...@@ -35,7 +37,7 @@ print "| id | hostname | service | detected | type | source_type | source | targ
print "+------------------------------------------------------------------------------------------------------------------------------------------+\n"; print "+------------------------------------------------------------------------------------------------------------------------------------------+\n";
# Download of new evetns from Warden server # Download of new evetns from Warden server
while (my @new_events = WardenClientReceive::getNewEvents($warden_path, $requested_type)) { while (my @new_events = WardenClient::getNewEvents($requested_type)) {
foreach my $event_ref (@new_events) { foreach my $event_ref (@new_events) {
my @event = @$event_ref; my @event = @$event_ref;
print "| " . join(' | ', map { $_ || '' } @event) . " |" . "\n"; print "| " . join(' | ', map { $_ || '' } @event) . " |" . "\n";
......
#!/usr/bin/perl -w #!/usr/bin/perl
# #
# Copyright (C) 2011-2013 Cesnet z.s.p.o # Copyright (C) 2011-2015 Cesnet z.s.p.o
# #
# Use of this source is governed by a BSD-style license, see LICENSE file. # Use of this source is governed by a BSD-style license, see LICENSE file.
use strict; use strict;
use warnings;
use DateTime; use DateTime;
use Getopt::Long; use Getopt::Long;
use FindBin qw($RealBin $RealScript);
FindBin::again;
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Warden 2.2. Command-line Client, Sender # Warden 2.2. Command-line Client, Sender
...@@ -32,7 +36,6 @@ my $opt_a = ""; # attack scale ...@@ -32,7 +36,6 @@ my $opt_a = ""; # attack scale
my $opt_n = ""; # note my $opt_n = ""; # note
# Other attributes # Other attributes
my $opt_w = "../../warden-client"; # path to warden directory
my $opt_h; # display help my $opt_h; # display help
# Check whether mandatory fields are given. Otherwise print help and exit. # Check whether mandatory fields are given. Otherwise print help and exit.
...@@ -45,13 +48,10 @@ if (!GetOptions("service|s=s" => \$opt_s, ...@@ -45,13 +48,10 @@ if (!GetOptions("service|s=s" => \$opt_s,
"port|r=i" => \$opt_r, "port|r=i" => \$opt_r,
"attack-scale|a=i" => \$opt_a, "attack-scale|a=i" => \$opt_a,
"note|n=s" => \$opt_n, "note|n=s" => \$opt_n,
"warden-dir|w=s" => \$opt_w, "help|h" => \$opt_h) ||
"help|h" => \$opt_h) || !defined($opt_s) || !defined($opt_e) || !defined($opt_o) ||
!defined($opt_s) || !defined($opt_e) || !defined($opt_o) ||
$opt_h) { $opt_h) {
print "\nAbout command-line-sender.pl\n"; print "Usage: ./$RealScript -s <service> -e <event_type> -o <source_type> [-t <timestamp_of_detection>] [-v <source>] [-p <protocol>] [-r <port>] [-a <attack_scale>] [-n <note>] [-w <warden_directory>] [-h]\n";
print "\n Script is supposed to be used as a simple command-line warden client that can send one event to the warden server at a time. For more information about the Warden system and it's events' structure, please see warden-client/doc/README file.\n";
print "\nUsage:\n\n ./command-line-sender.pl -s <service> -e <event_type> -o <source_type> [-t <timestamp_of_detection>] [-v <source>] [-p <protocol>] [-r <port>] [-a <attack_scale>] [-n <note>] [-w <warden_directory>] [-h]\n";
print "\nArguments:\n\n"; print "\nArguments:\n\n";
print " -s SERVICE, --service=SERVICE - Name of detection service\n\n"; print " -s SERVICE, --service=SERVICE - Name of detection service\n\n";
print " -e EVENT_TYPE, --event-type=EVENT_TYPE - Type of detected event\n\n"; print " -e EVENT_TYPE, --event-type=EVENT_TYPE - Type of detected event\n\n";
...@@ -65,31 +65,27 @@ if (!GetOptions("service|s=s" => \$opt_s, ...@@ -65,31 +65,27 @@ if (!GetOptions("service|s=s" => \$opt_s,
print " -r PORT, --port=PORT - Port\n\n"; print " -r PORT, --port=PORT - Port\n\n";
print " -a ATTACK_SCALE, --attack-scale=ATTACK_SCALE - Scale of detected event\n\n"; print " -a ATTACK_SCALE, --attack-scale=ATTACK_SCALE - Scale of detected event\n\n";
print " -n NOTE, --note=NOTE - Note, comment or other data\n\n"; print " -n NOTE, --note=NOTE - Note, comment or other data\n\n";
print " -w WARDEN_DIR, --warden-dir=WARDEN_DIR - Path to the warden-client directory. Default is \'../../warden-client\'\n\n";
print " -h, --help - Print help\n\n"; print " -h, --help - Print help\n\n";
print "\nExample #1: ./command-line-sender.pl -s PhishTracker -e webattack -o URL -v 123.123.098.098 -p TCP -r 443 -a 100 -n \"important notice\"\n"; print "\nExample: ./$RealScript -s PhishTracker -e webattack -o URL -v 123.123.098.098 -p TCP -r 443 -a 100 -n \"important notice\"\n";
print "\nExample #2: ./command-line-sender.pl --service=ScanGuardian --event-type=portscan --source-type=IP --timestamp=\"2013-04-25T13:36:31\" --source-value=\"123.123.1.23\" --proto=TCP --port=25 --attack-scale=1234 --note=\"The very first run of ScanGuardian :)\" --warden-dir \"/opt/warden/warden-client\"\n"; print "\nExample: ./$RealScript --service=ScanGuardian --event-type=portscan --source-type=IP --timestamp=\"2013-04-25T13:36:31\" --source-value=\"123.123.1.23\" --proto=TCP --port=25 --attack-scale=1234 --note=\"The very first run of ScanGuardian :)\"\n";
print "\nNOTE: For more information how to use particular values see warden-client/doc/README file.\n\n"; print "\nNOTE: For more information see <warden-client_path>/doc/README file.\n\n";
exit 0; exit 0;
} }
my @event = ($opt_s, $opt_t, $opt_e, $opt_o, $opt_v, my @event = ($opt_s, $opt_t, $opt_e, $opt_o, $opt_v, $opt_p, $opt_r, $opt_a, $opt_n);
$opt_p, $opt_r, $opt_a, $opt_n);
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Use of warden-client sender. # Use of warden-client sender.
# Path to warden-client folder # Load Warden client library and use main module
my $warden_path = $opt_w; use lib "$RealBin/../lib";
use WardenClient;
# Inclusion of warden-client sender module
require $warden_path . '/lib/WardenClientSend.pm';
# Sending event to Warden server # Sending event to Warden server
WardenClientSend::saveNewEvent($warden_path, \@event); WardenClient::saveNewEvent(\@event);
exit 0; exit 0;
#!/usr/bin/perl -w #!/usr/bin/perl
# #
# Copyright (C) 2011-2013 Cesnet z.s.p.o # Copyright (C) 2011-2015 Cesnet z.s.p.o
# #
# Use of this source is governed by a BSD-style license, see LICENSE file. # Use of this source is governed by a BSD-style license, see LICENSE file.
use Switch;
use strict; use strict;
use warnings;
use Switch;
use DateTime; use DateTime;
use FindBin qw($RealBin);
FindBin::again();
my $warden_path = '/opt/warden-client'; use lib "$RealBin/../lib";
require $warden_path . '/lib/WardenClientSend.pm'; use WardenClient;
my $service = "test"; my $service = "test";
# service is needed in authorization process of the client,
# therefore it can not be set randomly
#switch (int(rand(3) + 0.5)) {
# case 1 { $service = 'ScanDetector'; }
# case 2 { $service = 'PhiGaro'; }
# case 3 { $service = 'HoneyScan'; }
# }
my $detected = DateTime->from_epoch(epoch => time()); my $detected = DateTime->from_epoch(epoch => time());
...@@ -35,7 +32,7 @@ switch (int(rand(10) + 0.5)) { ...@@ -35,7 +32,7 @@ switch (int(rand(10) + 0.5)) {
case 9 { $type = 'webattack'; } case 9 { $type = 'webattack'; }
case 10 { $type = 'other'; } case 10 { $type = 'other'; }
} }
my $source_type = ""; my $source_type = "";
switch (int(rand(3) + 0.5)) { switch (int(rand(3) + 0.5)) {
case 1 { $source_type = 'IP'; } case 1 { $source_type = 'IP'; }
...@@ -63,29 +60,26 @@ switch (int(rand(6) + 0.5)) { ...@@ -63,29 +60,26 @@ switch (int(rand(6) + 0.5)) {
my $attack_scale = (int(rand(100000) + 0.5) + 1000); my $attack_scale = (int(rand(100000) + 0.5) + 1000);
my $note = "tohle je takova normalni jednoducha poznamka"; my $note = "This is simple note only.";
my $priority = undef;
my $priority = int(rand(255) + 0.5); my $timeout = undef;
my $timeout = int(rand(255) + 0.5);
my @event = ( my @event = (
$service, # $service $service,
"$detected", # $detected $detected,
$type, # $type $type,
$source_type, # $source_type $source_type,
$source, # $source $source,
$target_proto, # $target_proto $target_proto,
$target_port, # $target_port $target_port,
$attack_scale, # $attack_scale $attack_scale,
$note, # $note $note,
$priority, # $priority $priority,
$timeout, # $timeout $timeout,
); );
WardenClientSend::saveNewEvent($warden_path, \@event); WardenClient::saveNewEvent(\@event);
#foreach (@event) { exit 0;
# print "$_\n";
#}
#!/usr/bin/perl -w #!/usr/bin/perl
# #
# Copyright (C) 2011-2013 Cesnet z.s.p.o # Copyright (C) 2011-2015 Cesnet z.s.p.o
# #
# Use of this source is governed by a BSD-style license, see LICENSE file. # Use of this source is governed by a BSD-style license, see LICENSE file.
use strict; use strict;
use warnings;
use DateTime; use DateTime;
use FindBin qw($RealBin);
FindBin::again();
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Warden 2.2. Client, Sender, Example # Warden 2.2. Client, Sender, Example
...@@ -32,8 +36,8 @@ my $target_proto = "TCP"; ...@@ -32,8 +36,8 @@ my $target_proto = "TCP";
my $target_port = "22"; my $target_port = "22";
my $attack_scale = "1234567890"; my $attack_scale = "1234567890";
my $note = "important note or comment"; my $note = "important note or comment";
my $priority = 1; my $priority = undef;
my $timeout = 20; my $timeout = undef;
my @event = ($service, $detected, $type, $source_type, $source, my @event = ($service, $detected, $type, $source_type, $source,
$target_proto, $target_port, $attack_scale, $note, $target_proto, $target_port, $attack_scale, $note,
...@@ -44,16 +48,14 @@ my @event = ($service, $detected, $type, $source_type, $source, ...@@ -44,16 +48,14 @@ my @event = ($service, $detected, $type, $source_type, $source,
# This code should developer add to his/her detection application # This code should developer add to his/her detection application
# (with corresponding paths appropriately changed). # (with corresponding paths appropriately changed).
# Path to warden-client folder # load Warden client library and main module
my $warden_path = '/opt/warden-client'; use lib "$RealBin/../lib";
use WardenClient;
# Inclusion of warden-client sender module
require $warden_path . '/lib/WardenClientSend.pm';
# Sending event to Warden server # Sending event to Warden server
for (my $i = 0; $i < 10; $i++) { for (my $i = 0; $i < 10; $i++) {
print "Sending $i-st event on server\n"; print "Sending $i-st event on server\n";
WardenClientSend::saveNewEvent($warden_path, \@event); WardenClient::saveNewEvent(\@event);
} }
exit 0; exit 0;
...@@ -23,3 +23,8 @@ Radomir Orkac <orkac@cesnet.cz> ...@@ -23,3 +23,8 @@ Radomir Orkac <orkac@cesnet.cz>
Daniel Studeny <Daniel.Studeny@cesnet.cz> Daniel Studeny <Daniel.Studeny@cesnet.cz>
Pavel Vachek <Pavel.Vachek@cesnet.cz> Pavel Vachek <Pavel.Vachek@cesnet.cz>
Martin Zadnik <izadnik@fit.vutbr.cz> Martin Zadnik <izadnik@fit.vutbr.cz>
--------------------------------------------------------------------------------
Copyright (C) 2011-2015 Cesnet z.s.p.o
2012-12-?? v.2.2-beta version 2015-??-?? v.2.2 stable
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
- Added support of connection timeout interval (#925) - Added support of connection timeout interval
- Added new getClientInfo() function allowing the client to see (#609) - Added new getClientInfo() function allowing the client to see information
information regarding other involved clients regarding other involved clients
- Enhanced handling of errors. Die() functions are removed from (#599) - Enhanced handling of errors. Die() functions are removed from the code, errors
the code, errors are handled using return values. are handled using return values.
2013-02-05 v.2.1 stable 2013-02-05 v.2.1 stable
----------------------- --------------------------------------------------------------------------------
- Minor changes in documentation - Minor changes in documentation
2012-11-05 v.2.1-beta version 2012-11-05 v.2.1-beta version
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
- Added WardenClientCommon.pm package containing error-handling and - Added WardenClientCommon.pm package containing error-handling and
connect-to-server functions connect-to-server functions
- Installation of Warden client does not require copying of certificates - Installation of Warden client does not require copying of certificates
and keys (#553) and keys
- Enhanced error messages (#552) - Enhanced error messages
- Reading of configuration file enhanced (#533) - Reading of configuration file enhanced
- Added protection from unexpected results in XML data returned from - Added protection from unexpected results in XML data returned from
server (#532) server
- Added support for error (debug) logging via STDERR and/or Syslog (#520,#522) - Added support for error (debug) logging via STDERR and/or Syslog
- Receiving of all types of messages now supported - Receiving of all types of messages now supported
- Unexpected errors does not crush the client application (#519) - Unexpected errors does not crush the client application
- Maximum number of events received ($MAX_RCV_EVENTS_LIMIT) in one - Maximum number of events received ($MAX_RCV_EVENTS_LIMIT) in one
batch can be set in etc/warden-client.conf. Default is 6000. (#504) batch can be set in etc/warden-client.conf. Default is 6000
- Added support for batch processing (#504) - Added support for batch processing
2012-07-27 v.2.0 stable version and bugfix release of warden-client-2.0.0-beta 2012-07-27 v.2.0 stable version and bugfix release of warden-client-2.0.0-beta
...@@ -70,3 +72,8 @@ ...@@ -70,3 +72,8 @@
- Initial package of warden client - Initial package of warden client
- SSL certificate authentication/authorization supported - SSL certificate authentication/authorization supported
- Automatized installation process - Automatized installation process
--------------------------------------------------------------------------------
Copyright (C) 2011-2015 Cesnet z.s.p.o
Installation process Installation process
-------------------- ====================
Content
A. Overview
B. Pre-installation step
C. Installation step
D. Post-installation steps
--------------------------------------------------------------------------------
A. Overview
-----------
For installation of warden-client package on local machine use install.sh. For installation of warden-client package on local machine use install.sh.
Default destination directory is /opt/warden-client/.
For more information about install.sh options run install.sh -h. For more information about install.sh options run install.sh -h.
You must be root for running this script.
B. Pre-installation step
------------------------
1) Install necessary packages
# aptitude install
C. Installation step
--------------------
1) Install Warden client package (example)
$ tar xzvf warden-client-2.2.tar.gz
$ cd warden-client-2.2
$ ./install.sh -d /opt/warden-client -k /etc/ssl/private/client.key -c /etc/ssl/certs/client.pem -a /etc/ssl/certs/bundle.pem
D. Post-installation steps
--------------------------
1) Warden client configuration
- configure warden-client.conf placed in <warden-client_path>/etc directory
Uninstallation process
----------------------
For uninstallation of warden-client package from local machine use uninstall.sh. --------------------------------------------------------------------------------
Default uninstallation directory is /opt/warden-client/.
For more information about uninstall.sh options run uninstall.sh -h.
You must be root for running this script. Copyright (C) 2011-2015 Cesnet z.s.p.o
BSD License BSD License
Copyright © 2011-2013 Cesnet z.s.p.o Copyright © 2011-2015 Cesnet z.s.p.o
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, Redistribution and use in source and binary forms, with or without modification,
...@@ -25,3 +25,8 @@ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ...@@ -25,3 +25,8 @@ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 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 OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
Copyright (C) 2011-2015 Cesnet z.s.p.o
...@@ -285,7 +285,10 @@ G. Registration ...@@ -285,7 +285,10 @@ G. Registration
of requested events, receiving of own events, description tags and CIDR of requested events, receiving of own events, description tags and CIDR
this client is allowed to communicate from. this client is allowed to communicate from.
Hostname hostname of client to be registered Hostname Hostname of client to be registered
Requestor E-mail address of organization or authorized person
who demands new client registration.
Service name Text string. Unique name of the service the client Service name Text string. Unique name of the service the client
is integrated in. is integrated in.
......
...@@ -37,6 +37,8 @@ B. Registration ...@@ -37,6 +37,8 @@ B. Registration
* For sender client: * For sender client:
- hostname of the machine, where client runs, - hostname of the machine, where client runs,
- e-mail address of organization or authorized person who demands
new client registration,
- client type = sender, - client type = sender,
- name of the detection service (for example 'ScanDetector'), - name of the detection service (for example 'ScanDetector'),
- description tags of sent events (see below) - description tags of sent events (see below)
...@@ -44,6 +46,8 @@ B. Registration ...@@ -44,6 +46,8 @@ B. Registration
* For receiver client: * For receiver client:
- hostname of the machine, where client runs, - hostname of the machine, where client runs,
- e-mail address of organization or authorized person who demands
new client registration,
- client type = receiver, - client type = receiver,
- whether client should receive all events, or type of requested - whether client should receive all events, or type of requested
events (for example 'portscan', see below) otherwise events (for example 'portscan', see below) otherwise
......
Uninstallation process
======================
Content
A. Overview
B. Uninstallation step
--------------------------------------------------------------------------------
A. Overview
-----------
For uninstallation of warden-client package from local machine use uninstall.sh.
For more information about uninstall.sh options run uninstall.sh -h.
B. Uninstallation step
----------------------
Uninstall Warden client package (example)
$ cd /opt/warden-client/
$ ./uninstall.sh -d /opt/warden-client
--------------------------------------------------------------------------------
Copyright (C) 2011-2015 Cesnet z.s.p.o
Update process
==============
Content
A. Overview
B. Update steps
--------------------------------------------------------------------------------
A. Overview
-----------
For update of warden-client package from local machine use update.sh.
For more information about update.sh options run update.sh -h.
B. Update steps
---------------
Update Warden client package (default destination path)
$ tar xzvf warden-client-2.2.tar.gz
$ cd warden-client-2.2
$ ./update.sh -d /opt/warden-client
--------------------------------------------------------------------------------
Copyright (C) 2011-2015 Cesnet z.s.p.o
# #
# warden-client.conf - configuration file for the warden sender/receiver client # warden-client.conf - configuration file for the Warden client
# #
# Copyright (C) 2011-2015 Cesnet z.s.p.o
#
# Use of this source is governed by a BSD-style license, see LICENSE file.
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# URI - URI address of Warden server # URI - URI address of Warden server
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
$URI = "https://warden-c.cesnet.cz:443/Warden"; $URI = "https://warden.cesnet.cz:443/Warden";
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# SSL_KEY_FILE - path to client SSL certificate key file # SSL_KEY - path to client SSL key
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
$SSL_KEY_FILE = "/opt/warden-client/etc/warden-client-key.pem"; $SSL_KEY = "/etc/ssl/private/warden.cesnet.cz.key";
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# SSL_CERT_FILE - path to client SSL certificate file # SSL_CERT - path to client SSL certificate
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
$SSL_CERT_FILE = "/opt/warden-client/etc/warden-client-cert.pem"; $SSL_CERT = "/etc/ssl/certs/warden.cesnet.cz.pem";
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# SSL_CA_FILE - path to CA certificate file # SSL_CA_CERT - path to CA certificate
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
$SSL_CA_FILE = "/opt/warden-client/etc/tcs-ca-bundle.pem"; $SSL_CA_CERT = "/etc/ssl/certs/tcs-ca-bundle.pem";
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# MAX_RCV_EVENTS_LIMIT - maximum number of events the client is allowd to get # MAX_RCV_EVENTS_LIMIT - maximum number of events the client is allowd to get
# from the Warden server in one batch # from the Warden server in one batch. 6000 events
# consumes app. 250 MB of memory
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
$MAX_RCV_EVENTS_LIMIT = 6000; #consumes app. 250 MB of memory $MAX_RCV_EVENTS_LIMIT = 6000;
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# CONNECTION_TIMEOUT - interval in seconds to timeout connection with Warden # CONNECTION_TIMEOUT - interval in seconds to timeout connection with Warden
# server. If your client timeouts, consider using higher # server. If your client timeouts, consider using higher
...@@ -37,23 +41,21 @@ $MAX_RCV_EVENTS_LIMIT = 6000; #consumes app. 250 MB of memory ...@@ -37,23 +41,21 @@ $MAX_RCV_EVENTS_LIMIT = 6000; #consumes app. 250 MB of memory
$CONNECTION_TIMEOUT = 60; $CONNECTION_TIMEOUT = 60;
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Log options # LOG_STDERR - enable/disable error reporting to stderr
#
# LOG_STDERR, LOG_SYSLOG - hide (0) or allow (1) error reporting on STDERR
# and/or to Syslog
# LOG_STDERR_VERBOSE, LOG_SYSLOG_VERBOSE - print only error message without
# a stack (0) or print debug info
# including err. message and stack (1)
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
$LOG_STDERR = 1; $LOG_STDERR = 1;
$LOG_SYSLOG = 0; #-------------------------------------------------------------------------------
$LOG_SYSLOG_FACILITY = "local7"; # LOG_VERBOSE - enable/disable logging in verbose mode (stack info added)
#-------------------------------------------------------------------------------
$LOG_VERBOSE = 1; $LOG_VERBOSE = 1;
#-------------------------------------------------------------------------------
# SYSLOG - enable/disable syslog logging
#-------------------------------------------------------------------------------
$SYSLOG = 1;
#-------------------------------------------------------------------------------
1; # SYSLOG_FACILITY - syslog facility
#-------------------------------------------------------------------------------
$SYSLOG_FACILITY = "local7";
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment