#  This software was derived from SATAN 1.1.1 by Dan Farmer and Wietse Venema
#  (http://www.porcupine.org/satan).
#
#
# Rules that classify hosts by service. These are applied to every 'a' SARA
# record. Basically, they translate the cryptic SARA record data to something
# that is more suitable for reports.
#
# Format of this file is:
#
#	class_name
#	condition TABs service_name TABS host
#
# The class_name is SERVERS or CLIENTS.
# 
# The condition is a PERL expression, with full access to the global
# $target..$text variables.
#
# The service_name field specifies a name such as "anonymous FTP" or
# "NFS (diskless)".
#
# The host field specifies the host that takes or provides the service.
# When no host is specified, $target is assumed.
#
# Empty lines and text after a "#" character are ignored. Long lines may
# be broken with backslash-newline.
#

SERVERS

$service eq "nntp"					NNTP (Usenet news)
$service eq "ftp" && /ANONYMOUS/ && $severity eq "g"	FTP (with Anonymous)
$service eq "ftp" && $severity eq "m"			FTP (wrapped)
$service eq "ftp" && $severity eq "g"			FTP
$service eq "ssh" && $severity eq "g"			SSH
$service eq "ssh" && $severity eq "m"			SSH (wrapped)
/NIS server/						NIS
/runs NFS| exports \S+ to /				NFS
/mounts \S+ from (\S+)/					NFS	$1
$service eq "login" && $severity eq "g"			R Series
/offers domain/ && $severity eq "g"			DNS
/\/root\/\S+ to \S+/					NFS (diskless)
/offers gopher/						Gopher
/offers simap/ && $severity eq "g"			IMAP (SSL)
/offers imap/ && $severity eq "g"			IMAP	
/offers pop/ && $severity eq "g"			POP
$service eq "telnet" && $severity eq "g"		Telnet
$service eq "telnet" && $severity eq "m"		Telnet (wrapped)
$service eq "netbios-ssn" && /Name/			SMB 
$service eq "smtp" && $severity eq "g"			SMTP
/offers http on/ && $severity eq "g" && $service ne "https"	WWW ($service)
$service eq "http" && $severity eq "g"			WWW
/offers https/						WWW (Secure)
$service eq xhost && $severity eq "g"			X Windows
$service eq "xdmcp"					XDM (X login)
/telnet on port (\d+)/					Telnet on port $1
/0'QUIT'/ && $service ne "gopher"			Gopher (non-standard port)
/220.*ftp server/i && $service ne "ftp"			FTP (non-standard port)
/offers ldaps/						LDAP over SSL

CLIENTS

/NIS client/				NIS
/\/root\/\S+ to (\S+)/			NFS (diskless)		$1
/exports \S+ to \(\S+\)/		NFS			$1
/([^| ]+) mounts \S+ from \S+/		NFS			$1
