# cd /usr/local/src
# wget http://www.prelude-ids.org/download/releases/prelude-lml-latest.tar.gz
# tar xvzf prelude-lml-latest.tar.gz
# cd prelude-lml-0.9.5
# ./configure
~ 省略 ~
*** Dumping configuration ***
- Enable FAM support : yes
- Enable unsupported rulesets: : yes
# make
# make install
# vi /usr/local/etc/prelude-lml/prelude-lml.conf
/usr/local/etc/prelude-lml/prelude-lml.conf
##############################################
# Configuration for the Prelude LML Sensor #
##############################################
include = /usr/local/etc/prelude/default/idmef-client.conf
# Address where the Prelude Manager Server is listening on.
# if value is "127.0.0.1", the connection will occur throught
# an UNIX socket.
#
# This entry is disabled. The default is to use the entry
# located in the Prelude system wide clients.conf. You may
# overwrite the default address for this sensor by uncommenting
# this entry.
#
# server-addr = 127.0.0.1
#
# Files to monitor
#
# You should define the log message prefix-regex and time-format within a
# [format] section. If not specified, the default syslog format will be used.
#
# The prefix-regex should contain PCRE named subpatterns to pick out the
# information available in your syslog's prefix.
#
# The available field names are:
# - hostname
# - program
# - pid
# - timestamp
#
# Please see pcrepattern(3) manpage for help writing the prefix-regex
# In order to set the time-format, please have a look at the strptime(3) manpage.
#
# Example configuration for syslog output:
#
# Each [format] section might have several file entry.
# Each [format] section might have several udp-server entry.
#
# The same file entry / udp-server entry might be duplicated accross
# differents formats.
[format=syslog]
time-format = "%b %d %H:%M:%S"
prefix-regex = "^(?P<timestamp>.{15}) (?P<hostname>\S+) (?:(?P<process>\S+?)(?:\[(?P<pid>[0-9]+)\])?: )?"
file = /var/log/messages
file = /var/log/secure
# udp-server = 0.0.0.0
#
# Example configuration for metalog output:
#
#[format=metalog]
#prefix-regex = "^(?P<timestamp>.{15}) \[(?P<program>\S+)\] "
#time-format = "%b %d %H:%M:%S"
#file = /var/log/everything/current
# udp-server = 0.0.0.0
#
# Example configuration for apache output:
#
#[format=apache]
#time-format = "%d/%b/%Y:%H:%M:%S"
#prefix-regex = "^(?P<hostname>\S+) - - \[(?P<timestamp>.{20}) \+.{4}\] "
#file = /var/log/apache2/access_log
#
# Specifies the maximum difference, in seconds, between
# the interval of two logfiles' rotation. If this difference
# is reached, a high severity alert will be emited
#
#max-rotation-size-offset = 1024
#max-rotation-time-offset = 300
#
# Maximum number of warning a given source should emit in case it can not
# parse log entry with the provided prefix_regex and time_format.
#
# -1 == unlimited number of warning
# 0 == no warning at all
# X == print at most X warnings.
#
# warning-limit = -1
####################################
# Here start plugins configuration #
####################################
[Pcre]
ruleset=/usr/local/etc/prelude-lml/ruleset/pcre.rules
# [Debug]
#
# This plugin issue an alert for each packet.
# Carefull to the loging activity it generate.
#
# Triger Report to the console.
# stderr
[term01]# prelude-adduser registration-server prelude-manager
- Using default TLS settings from /usr/local/etc/prelude/default/tls.conf:
- Generated key size: 1024 bits.
- Authority certificate lifetime: unlimited.
- Generated certificate lifetime: unlimited.
- Using analyzer prelude-manager.
- Using /usr/local/etc/prelude/profile/prelude-manager...
- Using already allocated ident for prelude-manager: 3867103799399940.
- Using /usr/local/var/spool/prelude/prelude-manager...
- Starting registration server.
- generated one-shot password is "auowxshu". ※登録のためのパスワード
This password will be requested by "prelude-adduser" in order to connect.
Please remove the first and last quote from this password before using it.
- Generating 1024 bits Diffie-Hellman key for anonymous authentication...
- Waiting for peers install request on 0.0.0.0:5553...
[term02]# prelude-adduser register prelude-lml "idmef:w admin:r" localhost --uid prelude --gid prelude
- Using default TLS settings from /usr/local/etc/prelude/default/tls.conf:
- Generated key size: 1024 bits.
- Authority certificate lifetime: unlimited.
- Generated certificate lifetime: unlimited.
- Creating analyzer prelude-lml.
- Creating /usr/local/etc/prelude/profile/prelude-lml...
- Allocated ident for prelude-lml: 1721540001784225.
- Generating RSA private key... This might take a very long time.
[Increasing system activity will speed-up the process.]
- Generating 1024 bits RSA private key... Done.
- Creating /usr/local/var/spool/prelude/prelude-lml...
- Registering analyzer idmef:w admin:r to localhost:5553.
You now need to start "prelude-adduser" on the server host where
you need to register to:
use: "prelude-adduser registration-server <analyzer profile>"
example: "prelude-adduser registration-server prelude-manager"
This is used in order to register the 'sending' analyzer to the 'receiving'
analyzer. <analyzer profile> should be set to the profile name of the
'receiving' analyzer, the one where 'sending' analyzer will register to.
Please remember that "prelude-adduser" should be used to register
every server used by this analyzer.
Enter the one-shot password provided by the "prelude-adduser" program:
- enter registration one-shot password: レジストレーションサーバで表示されたパスワードを入力
- confirm registration one-shot password: レジストレーションサーバで表示されたパスワードを入力
- connecting to registration server (localhost:5553)...
- Anonymous authentication to registration-server successful.
- Sending certificate request.
- Receiving signed certificate.
レジストレーションサーバを起動しているターミナルに移動すると
登録確認画面になっているので「y」を入力する
- Connection from 127.0.0.1:32952.
- Anonymous authentication one-shot password check successful.
- Waiting for client certificate request.
- Analyzer with ID="1721540001784225" ask for registration with permission="idmef:w admin:r".
Approve registration [y/n]: y ※y を入力
Registering analyzer "1721540001784225" with permission "idmef:w admin:r".
- Generating signed certificate for client.
- Sending server certificate to client.
- 127.0.0.1:32952 successfully registered.
- Receiving CA certificate. - prelude-lml registration to localhost successful.