1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
|
#####
#
# Copyright (C) 2002 Nicolas Delon <delon.nicolas@wanadoo.fr>
# All Rights Reserved
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#
#####
#####
#
# Started on Thu Oct 17 12:01:59 2002
# Last update Fri Oct 25 23:32:44 2002
#
# Version 0.1
#
# Comment: tested with OpenSSH 3.5
#
#####
###################
# Logging succeed #
###################
regex=sshd.+: Accepted (\S+) for root from (\S+) port (\d+)\s*(ssh2)?; \
class.name=SSH Remote root logging; \
impact.severity=low; \
impact.completion=succeeded; \
impact.type=admin; \
impact.description=Root logged in from $2:$3 using the $1 method; \
source.node.address; \
source.node.address.category=ipv4-addr; \
source.node.address.address=$2; \
source.service.port=$3; \
source.service.protocol=tcp; \
# target.node.address.category=ipv46-addr; \
target.service.port=22; \
target.service.protocol=tcp; \
last;
regex=sshd.+: Accepted (\S+) for (?!root)(\S+) from (\S+) port (\d+)\s*(ssh2)?; \
class.name=SSH Remote user logging; \
impact.severity=low; \
impact.completion=succeeded; \
impact.type=user; \
impact.description=User $2 logged in from $3:$4 using the $1 method; \
source.node.address; \
source.node.address.category=ipv4-addr; \
source.node.address.address=$3; \
source.service.port=$4; \
source.service.protocol=tcp; \
# target.node.address.category=ipv46-addr; \
target.service.port=22; \
target.service.protocol=tcp;
################
# Login failed #
################
regex=sshd.+: Failed (\S+) for root from ([\d\.]+) port (\d+)\s*(ssh2)?; \
class.name=SSH Remote root logging failed; \
impact.severity=medium; \
impact.completion=failed; \
impact.type=admin; \
impact.description=Someone tried to login as root from $2:$3 using the $1 method; \
source.node.address; \
source.node.address.category=ipv4-addr; \
source.node.address.address=$2; \
source.service.port=$3; \
source.service.protocol=tcp; \
# target.node.address.category=ipv4-addr; \
target.service.port=22; \
target.service.protocol=tcp;
regex=sshd.+: Failed (\S+) for (?!root)(\S+) from ([\d\.]+) port (\d+)\s*(ssh2)?; \
class.name=SSH Remote user logging failed; \
impact.severity=medium; \
impact.completion=failed; \
impact.type=user; \
impact.description=Someone tried to login as $2 from $3:$4 using the $1 method; \
source.node.address; \
source.node.address.category=ipv4-addr; \
source.node.address.address=$3; \
source.service.port=$4; \
source.service.protocol=tcp; \
# target.node.address.category=ipv4-addr; \
target.service.port=22; \
target.service.protocol=tcp;
##############################################
# Invalid (not existing) user tried to login #
##############################################
regex=sshd.+: Illegal user (\S+) from (\S+); \
class.name=SSH Remote logging failed with an invalid user; \
impact.severity = medium; \
impact.completion=failed; \
impact.type=user; \
impact.description=Someone tried to login with the invalid user "$1" from $2; \
source.node.address; \
source.node.address.category=ipv4-addr; \
source.node.address.address=$2; \
target.service.port=22; \
target.service.protocol=tcp;
##################################################################################
# User listed in DenyGroups or DenyUsers (sshd_config directives) tried to login #
##################################################################################
regex=sshd.+: User (\S+) not allowed because .*listed in (\w+); \
class.name=SSH Remote logging failed with a denied user; \
impact.severity = medium; \
impact.completion=failed; \
impact.type=user; \
impact.description=User $1 failed to login because he is listed in $2; \
target.service.port=22; \
target.service.protocol=tcp;
##################################################################
# Sshd did not receive the identification string from the client #
# (maybe a ssh server recognition) #
##################################################################
regex=sshd.+: Did not receive identification string from (\S+); \
class.name=SSH Server recognition; \
impact.severity = medium; \
impact.completion=failed; \
impact.type=recon; \
impact.description=$1 making probably a server recognition; \
source.node.address; \
source.node.address.category=ipv4-addr; \
source.node.address.address=$1; \
source.service.protocol=tcp; \
target.service.port=22; \
target.service.protocol=tcp;
#########################################################################
# Forbidden root logging #
# (directive PermitRootLogin and keyword "no" or "forced-commands-only" #
# of the sshd_config file) #
#########################################################################
regex=sshd.+: ROOT LOGIN REFUSED FROM (\w+); \
class.name=SSH Remote root logging forbidden; \
impact.severity = medium; \
impact.completion=failed; \
impact.type=admin; \
impact.description=Root tried to login while it is forbidden; \
source.node.address; \
source.node.address.category=ipv4-addr; \
source.node.address.address=$1; \
source.service.protocol=tcp; \
target.service.port=22; \
target.service.protocol=tcp;
|