Archive for the 'enregistrement' catégorie

Combinant Logwatch et OSSEC - Partie 4

18 février 2010

Dans mon dernier post, nous avons installé Logwatch ainsi que OSSEC. Il est maintenant temps de Logwatch et OSSEC jouer ensemble dans le même sandbox. Dans ce post, je vais discuter de la façon d'obtenir Logwatch pour résumer l'information générée par OSSEC.

Options de déploiement

Nous avons deux chemins que nous pouvons suivre pour le mettre en place:

  1. Avez Logwatch analyser les logs OSSEC directement.
  2. Avez OSSEC envoyer ses alertes à un serveur de type Syslog, puis exécutez Logwatch sur le serveur Syslog.

L'avantage pour l'option # 1 est que nous besoin d'un seul système. Logwatch sera exécuté sur le système hébergeant le serveur OSSEC. Le problème que nous allons courir en revanche implique le fichier OSSEC alerte. Les entrées du journal ne sont pas normalisées. Cela signifie que le format peut changer d'entrée à l'entrée, et peut même étalée sur plusieurs lignes. Il va être un véritable cauchemar pour créer un script qui va Logwatch filtre et résumer les informations d'alerte.

Si nous passons avec l'option # 2, nous aurons besoin d'une autre boîte d'agir comme notre serveur de journalisation centralisée. Afin d'avoir le serveur OSSEC accepter les entrées du journal de la non-agents, il a pour écouter sur UDP/514. C'est le même port utilisé par un serveur de journalisation centralisée, et vous ne pouvez pas avoir deux applications partagent le même port (sauf avec Windows, mais l'accès est extrêmement salissant prise). Sur le plan positif, les entrées d'alerte aura normalisés quand ils sont transmis au serveur Syslog afin de créer un script de synthèse Logwatch sera beaucoup plus facile. En outre, Logwatch sait déjà sur les fichiers Syslog standard, donc nous aurons moins de travail de personnalisation à faire.

Enfin, je l'ai mentionné dans un précédent poste que OSSEC n'est pas conçu pour être une carte SIM. C'est parce qu'il n'a pas tout enregistrer, les événements qui génèrent une alerte. Donc nous allons probablement vouloir un serveur centralisé de toute façon, et il est logique d'avoir le stocker les informations générées par OSSEC.

Donc, si ça sonne comme je vous orienter vers l'option # 2, vous avez absolument raison. Cela dit, je vais encore pour couvrir l'option # 1 car c'est une configuration beaucoup plus complexe.

Traiter avec date / heure

Jetez un oeil sur le fichier de log principal OSSEC et vous devriez voir semblable à la suivante:

[Root @ fubar logs] # tail -3 / var / ossec / logs / ossec.log

18/02/2010 12:32:05 ossec-rootcheck: INFO: fin de balayage rootcheck.

18/02/2010 14:27:06 ossec-syscheckd: INFO: Démarrage syscheck numérisation.

18/02/2010 14:39:21 ossec-syscheckd: INFO: Fin syscheck numérisation.

Notez la façon dont le timbre à date / heure actuelle est formaté. Ceci est différent de la plupart des applications, donc la première chose que nous devons faire est de dire Logwatch façon de traiter avec ce format. Nous aurons besoin de créer un script que nous pouvons appeler en cas de besoin qui comprend le format indiqué ci-dessus.

Commencez par déplacer dans le répertoire partagé des scripts:

cd / usr / share / logwatch / scripts / partagé

En utilisant votre éditeur favori, créez un fichier nommé "applylongdate":

vi applylongdate

Voici ce dont vous avez besoin à l'intérieur de ce fichier. N'hésitez pas à copier / coller à partir de cette page:

l'utilisation Logwatch ': Les dates';

my $ Debug = $ ENV {'LOGWATCH_DEBUG'} | | 0;

$ SearchDate = TimeFilter ('% Y /% m /% d% H:% M:% S');

if ($ Debug> 5) {

print STDERR "DEBUG: ApplyLongDate intérieur ... \ n";

print STDERR "DEBUG: Looking for:". $ SearchDate. "\ N";

}

while (defined ($ thisline = <STDIN>)) {

if ($ thisline = ~ m / ^ $ SearchDate / o) {

Imprimer thisline $ = ~ s / ^ .... \ / .. \ / .. ..:..:.. / /;

print $ thisline;

}

}

# Vi: shiftwidth = 3 = la syntaxe perl tabstop = 3 et

Une fois que vous enregistrez le fichier, il nous faut maintenant définir les autorisations appropriées:

chmod 755 applylongdate

Configurer les fichiers Log

Ensuite, nous devons dire à Logwatch où les fichiers journaux sont situés OSSEC. Chaque fois que vous ajoutez de nouveaux fichiers journaux ou de créer de nouveaux services à surveiller dans Logwatch, vous devez placer vos modifications sous le répertoire / etc / logwatch. Nous allons créer deux fichiers de configuration. La première sera de gérer les messages OSSEC, et le second traitera des alertes et des changements OSSEC réponse active.

Commençons par créer le fichier de configuration pour le fichier journal principal OSSEC:

cd / etc / logwatch / conf / logfiles

ossec.conf vi

Le contenu du fichier doit être aussi suivies:

LogFile = / var / ossec / logs / ossec.log

* = ApplyLongDate

Vous pouvez maintenant sauvegarder et quitter le fichier. Ensuite, nous allons créer le fichier de configuration pour les fichiers journaux restants:

vi ossec-alert.conf

Le contenu de ce fichier doit être aussi suivies:

LogFile = / var / ossec / logs / active-responses.log

LogFile = / var / ossec / logs / alertes / alerts.log

LogFile = / var / ossec / logs / firewall / firewall.log

Une fois terminé, sauvegarder et quitter. Les autorisations par défaut devrait être acceptable pour notre configuration.

Configuration des services OSSEC

Ensuite, nous avons besoin de définir les services OSSEC et d'identifier ce que nous voulons utiliser comme un titre lorsque les rapports sont générés. Voici comment faire pour créer le premier fichier:

cd / etc / logwatch / conf / services

ossec.conf vi

Le contenu de ce fichier est assez simple:

Titre = "OSSEC Messages"

LogFile = ossec

Une fois terminée, vous pouvez sauvegarder et quitter. Nous avons besoin de créer un autre fichier dans ce répertoire:

vi ossec-alert.conf

Le contenu de ce fichier doit être:

Titre = "Alertes OSSEC"

LogFile = ossec alerte

Une fois terminé, enregistrer et quitter comme d'habitude.

Parsing Les Entrées

Ensuite, nous devons dire à Logwatch comment formater les entrées du journal dans le rapport. Nous aurons besoin de créer un script de personnalisation pour chaque ensemble de services. Nous allons commencer par utiliser un script de test Logwatch fourni; juste pour que tout fonctionne bien sûr.

Commencez par déplacer dans le répertoire approprié:

cd / etc / logwatch / scripts / services

Utilisez votre éditeur favori pour créer votre premier script:

vi ossec

Le contenu du script doit être aussi suivies:

#! / Bin / bash

# Ceci est un script aussi beau que vous montrera les lignes que vous allez

# Être le traitement et les rapports sur. Il va d'abord afficher les

# Variables d'environnement standard et ensuite il prend STDIN et

# Dump it de retour vers STDOUT.

# Ce sont les variables d'environnement standard. Vous pouvez définir

# Plus dans votre fichier de configuration du service (voir ci-dessus).

echo "Date Range: $ LOGWATCH_DATE_RANGE"

echo "Niveau de détail: $ LOGWATCH_DETAIL_LEVEL"

echo "Temp dir: $ LOGWATCH_TEMP_DIR"

echo "Niveau de débogage: $ LOGWATCH_DEBUG"

# Maintenant, prenez STDIN et STDOUT c'est de vidage

cat

Maintenant créez votre second script:

vi ossec alerte

et comprennent le contenu exact même:

#! / Bin / bash

# Ceci est un script aussi beau que vous montrera les lignes que vous allez

# Être le traitement et les rapports sur. Il va d'abord afficher les

# Variables d'environnement standard et ensuite il prend STDIN et

# Dump it de retour vers STDOUT.

# Ce sont les variables d'environnement standard. Vous pouvez définir

# Plus dans votre fichier de configuration du service (voir ci-dessus).

echo "Date Range: $ LOGWATCH_DATE_RANGE"

echo "Niveau de détail: $ LOGWATCH_DETAIL_LEVEL"

echo "Temp dir: $ LOGWATCH_TEMP_DIR"

echo "Niveau de débogage: $ LOGWATCH_DEBUG"

# Maintenant, prenez STDIN et STDOUT c'est de vidage

cat

Enfin, nous avons besoin de définir les autorisations appropriées:

chmod 755 ossec *

Test de la configuration

La meilleure façon de tester notre nouvelle configuration est d'exécuter la commande suivante:

logwatch | less

Si vous voulez seulement voir vos modifications, vous pouvez exécuter un rapport sur chaque service, un à la fois:

logwatch service ossec | less

logwatch service d'alerte ossec | less

Une personnalisation plus poussée

Une fois que vous obtenez tous les travailler au-dessus, vous pouvez vous concentrer sur l'obtention Logwatch de filtrer et de résumer les entrées du journal. Logwatch est assez flexible, et vous pouvez personnaliser la sortie comme vous le souhaitez. Une des choses gentilles sur le script de test ci-dessus est supérieure à celle qu'il vous montre exactement ce que vous avez à travailler avec. Donc, avec une magie expression régulière peu, vous pouvez résumer les entrées que vous jugez appropriée. Pour quelques idées, consultez les fichiers situés sous:

/ Usr / share / logwatch / scripts / services

Ce sont les scripts de synthèse par défaut inclus avec Logwatch. Plus précisément, ont un regard sur les fichiers "pam" et "sshd". Ils sont d'excellents exemples de la fois simple et un ensemble complexe de filtres de synthèse.

Comme vous développer vos scripts, une attention particulière à l'$ LOGWATCH_DETAIL_LEVEL «variable. Cela vous permettra de personnaliser le niveau de sortie du rapport en fonction de combien de verbosité l'utilisateur est à la recherche d'. Par exemple, lorsque vous êtes encore dans le répertoire ci-dessus les services, exécutez la commande suivante:

moins sshd

Lorsque la première page du contenu du fichier est affiché, tapez:

/ Détail <Enter key>

La barre oblique inverse nous permet de rechercher dans le fichier pour une chaîne de texte particulier. Dans ce cas, nous sommes à la recherche pour le mot "détail". Une fois que vous appuyez sur Entrée à la recherche va sauter dans le fichier jusqu'à ce qu'il trouve la première occurrence de la chaîne de texte. Il mettra également en lumière la chaîne de recherche. Dans le premier match, vous remarquerez que l'auteur assigné la variable "$ Détail" pour être la même que la variable $ LOGWATCH_DETAIL_LEVEL ". C'est pour leur faire économiser quelques frappes.

Maintenant, appuyez sur la touche antislash nouveau suivi par la touche Entrée. Ce sera un saut dans le dossier à la prochaine occurrence de "Détail". Vous devriez voir:

if ($ Détail> = 20) {

Utilisateurs $ {$ utilisateur} {$ host} {$ Méthode} + +;

} Else {

if ($ Host! ~ / $ IgnoreHost /) {

Utilisateurs $ {$ utilisateur} {} {$ Host "(tous )"}++;

Remarque de l'auteur fournit de plus amples informations, si le niveau de détail est fixé à 20 (mi-chemin entre basse et moyenne) ou supérieure. Gardez sauter à travers le fichier et vous verrez d'autres exemples où l'auteur de cette technique à effet de levier.

Maintenant la page jusqu'à la fin du fichier et vous devriez voir cette déclaration:

if (keys% autreliste) {

print "\ n ** Entrées ** inégalée \ n";

print "$ _: $ autreliste {$ _} heure (s) \ n" foreach autreliste keys%;

}

Cette section est extrêmement important, car il est un fourre-finale. Pensez à une politique de pare-feu pour un moment. La plupart d'entre nous de créer une règle définitive qui dit: «Si je n'avais pas spécifiquement permettre à un modèle de trafic à travers, le nier". En d'autres termes, si quelque chose d'inattendu arrive, voilà comment je veux que vous pour y faire face.

La déclaration ci-dessus a le même objectif lors de l'analyse du fichier journal. Toutes les précédentes instructions "if" tenter de faire correspondre une chaîne de texte spécifique dans l'entrée du journal, afin de le formater correctement. Cette entrée indique «Si vous n'avez pas adapté et imprimé une entrée de journal spécifique encore, l'imprimer dans une section intitulée« Entrées ** ** incomparable ". Cette étape est extrêmement importante parce que sans elle nous ne verrons jamais les entrées inattendues. Il est des entrées inattendues qui sont probablement les plus importantes et plus intéressantes.

Résumé Exec

Les deux OSSEC et Logwatch sont d'excellents outils gratuits. OSSEC excelle à vous avertir quand un modèle d'attaque connus a lieu. Logwatch est un outil formidable pour résumer un morceau de temps de grumes afin humains peuvent réellement donner un sens à ce qui se passe. En combinant les deux outils, vous pouvez créer une défense beaucoup plus robustes en profondeur la posture. L'ensemble devient supérieure à la somme des parties.

Combinant Logwatch et OSSEC - Partie 3

17 février 2010

Dans mes deux derniers messages j'ai discuté Logwatch et OSSEC, ainsi que la façon dont ils peuvent être un levier pour augmenter votre posture de sécurité. Dans cet épisode, je vais discuter comment installer ces deux outils.

Installation Logwatch

Logwatch est assez facile à installer. En fait, il est installé par défaut sur de nombreuses distributions Linux que vous pouvez déjà en avoir une copie sur votre système. Pour vérifier, ouvrez une session en tant que root et essayez d'exécuter Logwatch avec le "-v". Si vous voyez:

[Root @ fubar logwatch] # logwatch-v

Logwatch 7.3.6 (publié 19.05.07)

Logwatch est installé et vous avez une copie de la dernière version. Si vous ne possédez pas la dernière version, vous pouvez le saisir de la page de téléchargement Logwatch .

Il ya trois saveurs de Logwatch qui peuvent être téléchargés; Binaires au format RPM, la source au format RPM, ou de la source dans une boule de goudron. Si votre système supporte la gestion de paquets RPM, le RPM binaire est votre meilleur choix. Il est simple à installer et RPM mettra à jour automatiquement le logiciel lorsque de nouvelles versions sont disponibles.

Installation Logwatch De RPM

Pour installer la version binaire du RPM, il suffit de connecter en tant que root et naviguez vers le répertoire où vous avez téléchargé le fichier RPM. Maintenant exécutez la commande:

rpm-U-7.3.6-logwatch 1.noarch.rpm

N'oubliez pas que vous pouvez utiliser la touche de tabulation pour compléter automatiquement le nom du fichier plutôt que d'avoir à taper dans l'ensemble.

Installation Logwatch De la source

Installation à partir de la source est un peu plus considérable. Rappelez-vous que pour pouvoir installer le code source, vous devez déjà disposer d'un compilateur (comme gcc) installé sur votre système. Connexion en tant que root et naviguez vers le répertoire où vous avez téléchargé l'archive tar. Pour extraire l'archive, exécutez la commande suivante:

tar xvzf logwatch-7.3.6.tar.gz

Vous verrez une structure de répertoire en dessous de votre emplacement actuel sont créées et beaucoup de fichiers copiés en jeu. Nous devons maintenant passer à l'annuaire le plus haut qui a été créé:

cd logwatch-7.3.6

Pour Logwatch de courir, il ya un tas de répertoires qui doivent être créés sur votre système. Ces fonctions sont documentées dans le fichier README dans le répertoire courant. Heureusement, Logwatch inclut un script d'installation qui peut faire tout le travail pour vous. Malheureusement, le script a les autorisations mauvais jeu de sorte qu'il ne sera pas lancé par défaut. C'est assez facile à corriger mais avec la commande chmod:

chmod 500 install_logwatch.sh

Maintenant, nous pouvons exécuter le script pour l'installation de notre système:

. / Install_logwatch.sh

Ne pas oublier la période au début de la ligne.

Test Logwatch

Pour tester votre configuration Logwatch, exécutez la commande suivante:

logwatch | less

Vous verrez l'écran de votre terminal de se vide, mais c'est normal. Vous allez finir par voir un rapport Logwatch obtenir imprimée à l'écran que vous pouvez naviguer à travers l'aide la «Page Up» et «Page Down» clés. Comment connecter qu'il faut pour que le rapport d'apparaître sur l'écran dépendra de combien d'informations du journal a besoin d'obtenir analysée. Elle pourrait prendre quelques secondes ou quelques minutes. De toute façon, il vous donnera une chance de vous familiariser avec le format du rapport.

Installation OSSEC

Comme je le mentionnais dans mon dernier post, vous avez deux options d'installation avec OSSEC, local ou client / serveur. Dans ce post, je vais me concentrer sur la configuration client / serveur, car il est un peu plus complexe. Si vous effectuez une installation locale, il suffit de sélectionner l'option "local" au cours du processus d'installation et de sauter la section sur la mise en place d'un canal sécurisé entre l'agent et le serveur.

Commencez avec le serveur

OSSEC utilise le cryptage Blowfish pour sécuriser la communication entre le client et le serveur. Blowfish est basée clé symétrique, donc les deux côtés doivent savoir quelle est la valeur clé à utiliser pour communiquer. Le serveur est chargé de générer la clé symétrique, nous devons donc installer le logiciel serveur en premier. Au cours de l'installation du client, nous serons amené pour une valeur de clé de toute évidence, nous devons avoir cette pratique à l'avance.

Voici une astuce gain de temps. La valeur de la clé est longue et presque impossible à retenir. La meilleure façon de déplacer la valeur de la clé du système de serveur pour le système d'agent est d'utiliser SSH. Créer une connexion sécurisée avec le serveur OSSEC, et extraire la clé appropriée (instructions fournies ci-dessous). Dans une seconde fenêtre de terminal, de créer une session SSH sur le système où vous allez installer l'agent. Lorsque l'installation du client vous demande la valeur de clé, vous pouvez simplement copier / coller entre les deux terminaux.

Installation du serveur OSSEC

Le logiciel serveur est disponible comme une boule de goudron, de sorte que vous pouvez récupérer une copie de la dernière version de la page de téléchargement OSSEC . Vous aurez alors besoin d'extraire le contenu de la boule de goudron:

tar xvzf OSSEC-HIDS-2.3.tar.gz

Ensuite, déplacez dans la structure de répertoire que vous venez de créer:

cd-OSSEC HIDS-2.3

OSSEC fournit un script d'installation qui vous guidera dans le processus d'installation du serveur. Pour lancer le script, tapez:

. / Install.sh

Ne pas oublier la période au début de la commande. Vous allez maintenant être invité par un certain nombre d'options d'installation:

  • Langue - La valeur par défaut est l'anglais. Changer si nécessaire.
  • Confirmation de l'installation - Appuyez sur Entrée une fois que vous avez lu l'écran.
  • Installez le type - Tapez "serveur" sans les guillemets et appuyez sur Entrée.
  • Emplacement d'installation - Acceptez la valeur par défaut.
  • E-mail de notification - par défaut est oui, choisissez si vous voulez des alertes e-mail. Si vous sélectionnez oui, vous serez invité à entrer une adresse e-mail et votre serveur de messagerie.
  • Contrôle d'intégrité - par défaut est oui. Sélectionnez si vous voulez que le système local vérifiés périodiquement pour les intrusions.
  • Détection de root kit - par défaut est oui. Bonne option puisque nous devons maintenir un haut niveau d'intégrité de ce système.
  • Réponse active - par défaut est oui. Sélectionnez cette option si vous souhaitez être en mesure de réagir aux événements.
  • Baisse de pare-feu - permet au serveur OSSEC pour défendre l'auto, si une attaque directe est détecté.
  • Liste blanche - Cela vous permettra d'ajouter des adresses IP à partir desquelles d'éventuelles attaques seront ignorés. Soyez prudent avec cette option. Si vous n'avez pas accès à la console sur le serveur OSSEC, il pourrait être sage d'identifier une adresse IP qui peut toujours y entrer simplement veiller à l'adresse IP source est un système fiable.
  • Activer Syslog - par défaut est oui. Sélectionnez cette option si vous voulez collecter des journaux à partir du système qui ne peut pas exécuter un agent OSSEC (comme les pare-feu, commutateurs, routeurs, points d'accès, etc.)
  • Les fichiers journaux à surveiller - Cet écran identifie l'ensemble des fichiers journaux OSSEC locale suivra. Il est purement d'informations, tout ce que vous pouvez faire est appuyez sur Entrée pour passer devant elle. Si vous remarquez un ou plusieurs fichiers journaux manquants de la liste, vous pouvez les ajouter plus tard pour le fichier ossec.conf.

À ce point d'accès sera OSSEC le compilateur locales et d'installer tous les fichiers nécessaires sur le système. Une fois terminée, vous pouvez démarrer le serveur OSSEC en exécutant la commande:

/ Var / ossec / bin / ossec-commande de démarrage

Définir les agents OSSEC

Nous ne sommes pas fait avec le serveur OSSEC juste encore. Ensuite, nous avons besoin de pré-définir tous les systèmes qui seront exécute l'agent OSSEC (client) de logiciels. Ceci est réalisé en utilisant la commande manage_agents. D'abord cependant, nous devons faire un peu de devoirs. Faites une liste de tous les systèmes qui seront exécutant le logiciel de l'agent OSSEC. Pour chaque système, vous aurez besoin d'un nom descriptif ainsi que l'adresse IP de ce système.

Maintenant, exécutez la commande suivante depuis la ligne de commande:

/ Var / ossec / bin / manage_agents

Ceci va produire le menu Gestionnaire principal agent. Appuyez sur "A" suivie de la touche Entrée pour définir votre premier système. Entrez un nom descriptif pour le premier système, suivie par l'adresse IP du système. Ne vous inquiétez pas pour le numéro d'agent. Il suffit d'accepter la valeur par défaut et OSSEC sera automatiquement attribuer le numéro d'identification suivant disponible. Une fois que vous confirmez les informations que vous avez entré, vous serez renvoyé au menu principal du gestionnaire d'agents. Répétez le processus ci-dessus pour chaque système qui sera exécutant un agent OSSEC.

Génération de clés

Une fois que vous avez ajoutés dans tous vos systèmes, il est temps de générer des clés de chiffrement. Cette étape est aussi réalisée avec l'utilitaire manage_agents. Si vous avez fermé l'outil après la dernière étape, il relance aujourd'hui.

Appuyez sur la touche "E" suivi par Enter pour sélectionner la «clé Extrait d'un agent" dans le menu. Vous serez alors invité à entrer le numéro d'identification de la clé que vous souhaitez extraire. Les noms descriptifs et les adresses IP sont répertoriés avec chaque numéro, donc il doit être trivial d'identifier celui que vous voulez. Commencez avec le système que vous envisagez d'installer le logiciel agent sur la première.

OSSEC agent installer sous Linux

Lorsque vous installez le logiciel agent sur un client Linux ou UNIX, vous utilisez la boule de goudron exactement la même, nous avons utilisé pour installer le logiciel serveur. Exécuter le script d'installation même, mais cette fois-ci lorsque vous êtes invité pour le type d'installation que vous souhaitez effectuer, le type de «mandataire» suivi par la touche Entrée.

L'installation du client a plusieurs des mêmes invites comme l'installation du serveur. Utilisez les informations ci-dessus pour vous guider dans le processus. L'invite de commande qui varie cependant, c'est que vous serez invité à fournir l'adresse IP du serveur OSSEC. Une fois terminé, aura accès à OSSEC le compilateur locales et d'installer tous les fichiers requis sur le système.

Ensuite, nous devons importer la clé Blowfish à partir du serveur OSSEC. Alors qu'il était encore sur le système d'agent, exécutez la commande:

/ Var / ossec / bin / manage_agents

Lorsque le menu d'Agent Manager apparaît, sélectionnez «I» pour importer la clé Blowfish.

Lorsque l'invite suivante s'affiche, vous devez entrer manuellement la clé appropriée Blowfish. Encore une fois, si vous utilisez SSH pour les deux systèmes en même temps, vous pouvez simplement copier / coller entre les deux terminaux. Assurez-vous que la clé semble correct, appuyez sur la touche Entrée, puis sélectionnez "Y" pour confirmer que la clé semble correct. Vous serez renvoyé au menu du gestionnaire de l'agent. Sélectionnez "q" pour revenir à la ligne de commande.

Maintenant nous avons simplement besoin de démarrer l'agent OSSEC. Vous pouvez le faire en exécutant la commande suivante:

/ Var / ossec / bin / ossec-commande de démarrage

Vous devriez voir l'ensemble des composants de l'agent OSSEC démarrage, suivi par un message «Terminé».

OSSEC agent installé sur Windows

OSSEC a un exécutable auto-extractible qui vous permettra d'installer le logiciel agent sur un système Windows. Il suffit de double cliquer sur l'exécutable pour démarrer le processus d'installation. Vous serez invité à accepter la licence ainsi que les composants que vous souhaitez installer. Il suffit de suivre les instructions jusqu'à la fenêtre du gestionnaire d'agents OSSEC apparaît.

La fenêtre Gestionnaire d'agents OSSEC vous invite à l'adresse IP du serveur OSSEC. Il sera également vous invite à la valeur de clé Blowfish à utiliser, afin d'extraire les clés appropriées sur le serveur et entrez la valeur dans ce domaine. Assurez-vous supprimer l'invite dans ce domaine avant que vous collez dans la clé Blowfish. Sinon la communication avec le serveur peut échouer.

Ensuite, sélectionnez "Gérer" dans le menu du gestionnaire d'agents OSSEC, suivi par "Démarrer OSSEC". Vous devriez maintenant voir le "Status:" Le changement indicateur pour "Running ...".

Test OSSEC

Une fois que vous avez le serveur et le logiciel de l'agent installé, lancé et configuré les touches appropriées, il est maintenant temps de vérifier notre configuration. Exécutez la commande suivante sur le serveur OSSEC:

cd / var / ossec / logs

Et extraire le fichier ossec.log:

moins ossec.log

Vérifiez le fichier journal de toute erreur. Une erreur courante est que les rapports OSSEC il ne peut pas envoyer un courrier électronique. Assurez-vous que le serveur de messagerie est en marche et qu'il accepte les connexions. Une fois que vous êtes satisfait de la configuration du serveur, il est maintenant temps de vérifier les agents. Descendre à la "alertes" répertoire:

alertes cd

Et extraire le fichier alerts.log:

moins alerts.log

Plus précisément, vous êtes à la recherche d'entrées semblables aux suivantes:

17 février 2010 16:09:16 (bureau) 192.168.1.10-> ossec

Règle: 501 (niveau 3) -> 'Nouveau ossec agents connectés.

IP Src: (aucun)

Utilisateur: (aucun)

OSSEC: Agent commencé: «test_system-> 192.168.1.10.

Vous devriez voir une entrée pour chaque système sur lequel vous avez installé le logiciel de l'agent.

Plus à venir

Ouf! C'est plus que suffisant pour un poste! Dans mon prochain post je vais entrer s'appuyant Logwatch pour analyser toutes les informations d'alerte générés par OSSEC.

Combinant Logwatch et OSSEC - Partie 2

16 février 2010

Dans mon dernier message j'ai décrit comment Logwatch pourrait être utilisé pour simplifier le processus d'examen du journal. Dans ce post nous allons voir OSSEC et ce qu'elle apporte à la table.

Qu'est-ce que OSSEC?

OSSEC , abréviation de «sécurité Open Source", est un hôte système basé détection d'intrusion (HIDS). En d'autres termes, il est conçu pour détecter des attaques ou des violations de politique, si et quand ils se produisent. Bien qu'il ne possède pas la capacité de protéger contre les attaques inconnues ou 0-Day (ce qui serait la prévention d'intrusion basée sur l'hôte), il inclut un large éventail d'outils qui peuvent vous aider à identifier une intrusion quand elle survient, ainsi que dans la mesure des dommages qui ont été causés.

Plates-formes supportées

Pour profiter de toutes les fonctionnalités de OSSEC a à offrir, vous devez exécuter un agent sur le système à protéger. Agents OSSEC peut fonctionner sur Windows, Mac OS X, Linux, et un large éventail de systèmes UNIX. Si vous êtes simplement intéressé à la partie analyse des journaux cependant, une gamme encore plus large de systèmes peuvent être pris en charge. Cela comprend le matériel à la fois de Cisco et Juniper. Un certain nombre de produits spécifiques sont également pris en charge comme les firewalls Checkpoint, Symantec Anti-Virus, Snort, Squid, et Arpwatch, pour n'en nommer que quelques-uns.

Lorsque vous installez OSSEC vous avez deux options de configuration, local ou client / serveur. Une installation locale est utilisée lorsque vous devez tout faire sur un seul système. L'installation du client / serveur vous permet d'exécuter un environnement distribué protection des systèmes multiples dans le même temps. Alors que la plupart des déploiements sont client / serveur basée, si vous voulez donner un tour OSSEC vous pouvez facilement lancer le tout sur un système de test unique en utilisant une installation locale.

Connexion Analyse

OSSEC comprend un système basé sur le journal de détection d'intrusion (couvercles). Cela a la possibilité de consulter les fichiers journaux en quasi temps réel, tout en les scrutant des schémas d'attaque connus. Quand un journal est généré sur un système protégé, l'agent prend soin de transmettre en toute sécurité le journal (Cryptage Blowfish avec un secret pré-partagé) vers le serveur. Le serveur se charge ensuite d'effectuer l'analyse.

La plupart des outils d'analyse de journaux traitent leurs règles dans un format linéaire. J'entends par là que si nous avons 500 règles, seule règle est vérifiée, alors la règle des deux, alors la règle de trois et ainsi de suite jusqu'à une correspondance est trouvée, ou nous rejoindre à la fin du jeu de règles. OSSEC fonctionne un peu différemment car il met en œuvre une structure hiératique aux règles. Les entrées du journal sont d'abord classés et ensuite vérifié que contre celui règles sont appropriées. Le résultat est que plutôt que de devoir traiter tous les 500 règles, la plupart des événements auront vérifié contre 10 règles ou moins. Cela réduit considérablement le montant des frais généraux nécessaires au traitement de l'ensemble de règles.

Vérification de l'intégrité

OSSEC inclut un outil appelé syscheck pour effectuer la vérification d'intégrité de fichier et de répertoire. Si vous utilisez un agent de Windows, vous pouvez également inclure des touches spécifiques dans le registre de Windows pour être surveillés aussi bien. Modifications de fichiers peuvent être détectés en utilisant les deux MD-5 et SHA-1 algorithmes de hachage. Le système est extrêmement personnalisable. Vous pouvez inclure ou exclure des fichiers uniques, ou des structures de répertoires entières. Vous pouvez même définir un indicateur pour détecter la création du nouveau fichier.

Le logiciel agent est conçu pour utiliser une quantité minimale de CPU lors de la vérification d'intégrité. Tout cela signifie que le chèque sera plus long, il contribue également à minimiser la perte de performance du système. Hash informations sont transmises au serveur. Le serveur se charge ensuite d'effectuer la comparaison de hachage pour voir si l'un des fichiers critiques du système ont été modifiés. Le serveur stocke également une copie de la politique de contrôle d'intégrité, de sorte que si des changements de politiques sont faites sur l'agent, ils peuvent être détectés et signalés ainsi.

Détection des anomalies

OSSEC va beaucoup plus loin log vérifiant pour vérifier l'intégrité du système. Politiques d'utilisation peuvent être gérés de manière centralisée depuis le serveur, puis poussé vers les agents appropriés. Par exemple vous pouvez définir une politique concernant les applications Windows qui sont acceptables (Office, Firefox, etc) et celles qui ne sont pas (client de messagerie instantanée, Skype, etc.) Vous pouvez même définir des options de configuration acceptable, comme vérifier que les hachages NT sont utilisés pour mot de passe stocké mais pas hachages LanMan.

OSSEC comprend un certain nombre d'autres goodies afin d'aider à vérifier l'intégrité d'un système. Par exemple OSSEC a la capacité d'exécuter des commandes de l'agent et de surveiller la sortie qui est généré. Par exemple vous pourriez avoir l'agent Linux d'exécuter le "df" commande à intervalles réguliers et générer une alerte si l'utilisation du disque dépasse 90%. Un exemple de Windows peut être d'avoir OSSEC générer une alerte à chaque fichier d'informations sont écrites dans le flux de données alternatif domaine de NTFS.

Active Response

Enfin, OSSEC inclut la capacité à réagir lorsqu'une activité suspecte est détectée. Les réponses peuvent être générés à partir du serveur ou de l'agent, qui jamais vous spécifiez. Les réponses peuvent être aussi bénin que générer une alerte e-mail, d'être aussi proactif que le blocage d'une adresse IP distante d'une quantité limitée de temps. Il ya un certain nombre de scripts inclus réponse active vous pouvez dessiner sur, ou vous pouvez facilement écrire le vôtre.

Une architecture sécurisée

Les auteurs ont OSSEC fait de grands efforts pour sécuriser l'ensemble des composants dans le produit. Les tâches telles que la vérification de l'intégrité sont effectués sur le serveur, plutôt que de l'agent, donc la fiabilité du hash ne peuvent pas être compromises lors d'une attaque. Les processus sont exécutés avec le plus bas niveau d'autorisations possibles, et les différents comptes sont utilisés pour faire fonctionner chaque composant OSSEC. Cela signifie qu'un compromis d'une demande unique au OSSEC ne sera pas immédiatement conduire à un compromis sur le paquet complet. En outre, la plupart des composants sont gérés au sein d'une prison chrooté afin de leur accès au système est encore plus restreint.

Final Words

While OSSEC is a powerful tool, it is important to remember that it is a HIDS and not a log management solution. OSSEC can review log entries looking for suspicious patterns, but it will only save alert information. So while OSSEC will not replace your Security Information Management (SIM) solution, it can most certainly augment it. You can easily setup OSSEC to forward all alerts it generates to a central logging server .

While OSSEC is open source software, Trend Micro is primarily developing it. If you need commercial support, you can purchase a support contract through them at a reasonable fee.

More To Come

In my next installment we'll look at installing OSSEC and Logwatch. After that, we'll move into integrating the two together.

Combinant Logwatch et OSSEC

February 15th, 2010

I recently had a student ask me a question regarding the integration of Logwatch with OSSEC. I felt like this was a complex and yet cool enough idea that it warranted a series of posts to cover it in full. So over the next few days I'll talk about each of these tools, how to integrate them together, as well as what additional security visibility can be gained once the process is complete.

What Is Logwatch?

Logwatch is an excellent open source tool for generating daily human readable log reports. Log entries tend to fall into one of three categories:

  • Stuff you know is evil
  • Stuff you know is normal and can be safely ignored
  • Everything else

It is that “everything else” category where Logwatch really shines. For the stuff we know is evil, we will setup some form of alerting system. For example we may write an alert signature that warns the security analyst when an account is being brute forced. But what about the attacks we don't know about or are not sure what they look like? This would be a clear example of that “everything else” category. The traffic is not normal, but we have not seen it before to have a signature waiting to generate an alert. Since we will be unable to catch the attack in real time, we will need to catch it during a daily log review.

Of course the problem with doing daily log reviews is that it is tedious and time consuming. I mean let's be honest, who really wants to spend their day reviewing one million plus log entries? Even if you did, are you sure you would actually catch the out of the ordinary traffic?

Comment ça marche?

What Logwatch does very well is permit you to reorganize your data into a format that is easier for humans to follow. Its real strength is that it permits you to move the stuff you understand out of the way (normal or evil), so that the unexpected log entries stand out like a sore thumb. In other words, Logwatch lets you summarize your log entries so the unusual stuff is easier to spot.

What I really love about Logwatch is that you don't lose anything. Many log review tools will only show you the stuff that has been pre-defined as being evil. The problem they all share is that when something evil but unexpected happens, it flies right under the wire. Because Logwatch lets you see everything, you no longer miss the unexpected.

Logwatch In Action

Lets discuss how Logwatch works using the SSH server service as an example. The scripts to deal with SSH have already been defined within Logwatch, so you do not need to do any tweaking to receive the features we are going to discuss.

When reviewing a log file, the first thing Logwatch does is reorganize log entries based on their message types. For example all Successful SSH logons are grouped together, as well as too many logon failures, refused connections, locked accounts, accounts without a proper shell, protocol mis-matches, etc. etc. etc. Once all the SSH messages are grouped by their type, the data is then summarized to reduce the amount of information being reported.

For example, the default is to summarize failed logon attempts by account and source IP. So a typical failed logon report section might look like this:

Failed logins from these:

bsmith/password from 1.2.3.4: 637 time(s)

jsmith/password from 1.2.3.5: 2 time(s)

So rather than having to review 639 log entries reporting a bad logon attempt, we have all the pertinent information summarized into three lines (if you include the title). Continue this process for all of the other SSH messages, and we have dramatically reduced the amount of time required to review our logs.

But what if something happens that Logwatch is not pre-programmed to recognize? When an unexpected log entry is found, Logwatch adds a section to the end of the service report called “Unmatched Entries”. So if we see this title in the SSH server section, we know some event has occurred that is either abnormal or unexpected for the SSH service. This could very well be some form of attack that we are not aware is making the rounds.

By focusing in on the unmatched entries section, we can quickly identify unexpected activity. As I stated earlier, this is really the main goal of doing daily log reviews. To find the stuff we don't expect which will sneak past our alerting system. Logwatch makes this process as quick and as painless as possible.

Feature Summary

In the above example I talked about doing daily log reviews, but to be honest Logwatch is highly customizable. You can specify any range you wish to use down to an interval of one second. For example let's say I'm investigating an intrusion rather than performing a daily log review. I could specify a range such as “2010/02/14 17:05:00 for that hour” to focus right in on the information that interest me. I can also focus in on one specific log file or service.

The detail level of the report is also customizable. Typically when you deal with security you get in the habit of always wanting the highest detail level of reporting. To be honest, with Logwatch a high level of detail is probably more than you will ever need. Personally I typically stick with “med” for medium and that works out nicely. You can also specify the reporting level as “low” or “high” or use a numeric range of 0-10 for a higher level of granularity (low =0, med=5, high=10).

Logwatch can be run automatically or as a manual process. Typically you will want to set it up to run automatically each day and summarize one day's worth of log entries. If you ever need to expand or focus the report, you can always run Logwatch from the command line while specifying exactly what you want to see. You can then use the “–save” option to specify a report name and directory location for storage.

More To Come

The above should give you a good idea as to the features Logwatch can bring to the table. In the next post I'll discuss OSSEC in the same level of detail. After that, I'll get into how to install each tool as well as how to integrate them together.

Setting Up A Security Information Management System-Part 6

August 20th, 2009

So far in this series we have covered:

  • Defining a scope and focus for your SIM
  • Importance of building instead of buying your first system
  • Architecture and capacity planning
  • Recommended phases of deployment
  • Selecting a centralized logging server platform
  • How to accept remote log entries
  • Facility, severity and priority
  • How to sort log messages
  • Configuration des appareils et systèmes d'exploitation à soumettre des entrées de journal

Cool. Nous avons donc des entrées de journal pour un certain nombre de systèmes sont recueillies sur un serveur centralisé. Maintenant vient la tâche la plus importante, en s'appuyant sur cette information. Les entrées du journal seront regroupées en deux catégories; les messages critiques que nous voulons connaître tout de suite, et les entrées de journal qui sera pris dans le cadre d'un processus d'examen régulier.

Vs liste noire. Liste blanche

Lors de l'examen messages du journal, nous avons deux postures possibles, nous pouvons utiliser. La première est appelée liste noire. Avec la méthode de mise à l'index, nous définissons ce qui rend un événement assez intéressant pour justifier des rapports. Ceci est similaire à la façon logiciel anti-virus détecte les logiciels malveillants ou le processus que nous utilisons pour filtrer les spams.

Comme la plupart des choses dans la vie, une liste noire a certains aspects positifs et négatifs. Sur le plan positif, il est généralement assez facile d'écrire une signature, si nous savons ce que nous voulons regarder. Les signatures peuvent être étroitement définie pour aider à minimiser le nombre de faux positifs que nous rencontrons. Le problème avec une liste noire est que nous devons savoir ce que nous recherchons. Si une nouvelle attaque génère une signature unique que nous avons jamais rencontré dans le passé, un système de liste noire sera probablement manquer l'événement, car aucune signature n'a été défini.

Avec whitelisting nous définissons les événements que nous comprenons, et ensuite se concentrer notre attention sur les messages du journal de nouvelles et uniques qui sont rencontrées. Sur le plan positif, nous sommes beaucoup plus susceptibles d'attraper la coupe des attaques de pointe. Liste blanche a tendance à être relativement bruyant cependant, puisque nous sommes tenus de rencontrer des messages journal unique qui ne sont pas le signe d'un événement de sécurité.

Alors, qui devons-nous utiliser? Bonne défense en profondeur les pratiques de nous dire d'utiliser les deux. ;)

Alerte en temps réel

Nous pouvons tirer parti pour réaliser une liste noire en temps réel d'alertes d'événement que nous voulons être informés de dès qu'elles se produisent. Liste noire doit être utilisé uniquement pour les types à faible bruit des événements. En d'autres termes, nous voulons coller avec l'écriture des signatures pour des événements qui ont une forte probabilité d'être un problème de sécurité véritable. De bons exemples sont:

  • Différents échecs nom de connexion tous de la même adresse IP dans un court laps de temps
  • De multiples erreurs HTTP 403 étant généré par une adresse IP unique dans un court laps de temps
  • Les systèmes internes reçoivent de nombreuses erreurs ICMP ou TCP réinitialise dans un court laps de temps

Afin d'effectuer en temps réel d'alerte, nous avons besoin d'un logiciel qui va surveiller les journaux en temps réel. Les entrées du journal doit être vérifié contre des signatures définies, qui indiquent également ce qu'il faut faire lorsque l'événement survient.

Swatch

Un des outils les plus simples, vous pouvez utiliser les entrées du journal de suivi est de Swatch . Swatch is based on Perl. This means that while it is designed for UNIX and Linux systems, you can get it running on Windows if you have Perl installed. Simplicity is both Swatch's biggest strength and weakness. While Swatch is relatively easy to deploy, it is also somewhat limited in its functionality. Still, if you are new to logging, Swatch makes an excellent first tool for real time alerting.

To deploy Swatch, you will need to create a unique configuration file for every log file you wish to monitor. In the configuration file we will tell Swatch what to look for in that particular log file, and what to do when the event is detected.

For example, let's say we are going to have Swatch monitor the Web server's error log. We may wish to create an entry similar to the following in Swatch's configuration file for the error log:

# Look out for buffer overflows

watchfor /client denied by server configuration|File name too long/

mail=noc@fubar.org:webmaster@fubar.org,subject=Web server overflow attempt

The line beginning with a “#” is simply commentary on the signature. The watchfor line identifies which character string(s) we want to define as being interesting. In this particular rule we have defined two different strings, “client denied by server configuration” and “File name too long” as interesting. The pipe character between the strings acts as a logical “or”. If either string is encountered, the mail parameter defines two different e-mail addresses we should contact. The subject line of the e-mail will be “Web server overflow attempt”, while the body of the e-mail will be the actual log entry.

If there are other patterns we wish to detect, we could add additional watchfor and mail statements. If we want to do more than send an e-mail, the exec parameter can be used to execute any application located on the local system. The threshold parameter can also be used to rate limit the reporting of events.

Simple Event Coordinator (SEC)

SEC is an amazing alerting tool you can download from the main Web site . It supports BSD and Linux, and ships with a number of popular Linux flavors. SEC fully supports regular expressions and allows you to create extremely granular signatures.

The rule format is as followed:

type= Method of detection

ptype= Pattern type (regular expression, string match)

pattern= What to search for

desc= Description (can be a variable)

action= What to do when detected

There is an excellent archive of pre-written rules you can use that is well worth looking at. You can match on multiple patterns, define multiple thresholds, all while processing hundreds of log messages per second. About the only drawback of SEC is that you need a good understanding of regular expressions to use the tool effectively. Still, the tool can be far more powerful and flexible than Swatch.

Where can I get more alerting ideas?

I was involved with the creation of the original SANS Top 5 Log Reports . For the April, 2009 Log Summit I updated my presentation to break up report examples into low noise and high noise categories. Anything on the low noise list would make a good candidate for alerting. Anything in the high noise section is better monitored through daily reports.

Daily Reports

So we leveraged blacklisting to generate our real time alerts. We'll now leverage whitelisting to help highlight unknown but interesting traffic patterns within our daily reports.

When it comes to daily reports, we tend to gravitate towards the big numbers. What are the top 5 IPs transferring data? Which e-mail address sent the most messages? While the big numbers are certainly important, it has been my experience that the security events you need to worry about the most generate the fewest log entries. The smart attackers try very hard to remain hidden within the noise. So the only way to find them is to lower the signal to noise ratio.

I author the Perimeter Security track for SANS. One of the labs I have my students perform is to parse a 200,000 line log file. The goal is to spot the interesting patterns as well as formulate the review into an automated process. Most folks find the port scanner as it is pretty noisy. Some even spot the IP address performing application layer attacks against the Web server. What most people miss however, are the six lines that are a pretty clear indication that an internal system is already compromised and calling home for marching orders. How do you find those 6 lines? By whitelisting everything you understand and focusing on what ever is left.

So it is OK for our daily reports to give us pretty charts with big numbers. One of the reports however has to be able to move all the crud to the side so we can better spot the interesting patters.

Logwatch

One of the best tools for doing a daily log review is Logwatch . Logwatch will summarize all of the log patterns it understands, while highlighting anything without a predefined signature. Best way to understand this feature is to look at an example.

SSHD Killed: 2 Time(s)

SSHD Started: 1 Time(s)

Connexions:

Failed logins from these:

msmith/password from 1.3.247.11: 6 time(s)

jsmith/password from 1.3.247.11: 5 time(s)

psmith/password from 1.3.247.11: 4 time(s)

Users logging in through sshd:

jjones logged in from sundown (1.3.247.9) using publickey: 146 Times(s)

jsmith logged in from dialup5533.wnskvtao.sover.net (216.114.181.200) using password: 1 Times(s)

jsmith logged in from dialup984.wnskvtao.sover.net (216.114.163.223) using password: 1 Times(s)

bjones logged in from charlie (1.3.247.11) using publickey: 444 Times(s)

jsmith logged in from 192.168.1.173 using password: 2 Times(s)

djones logged in from charlie (1.3.247.11) using password: 47 Times(s)

**Unmatched Entries**

Received disconnect from 148.64.147.168: 3: Key exchange failed.

Received disconnect from 216.114.160.132: 11: All open channels closed

scanned from 146.87.114.150 with SSH-1.0-SSH_Version_Mapper. Ne paniquez pas.

scanned from 211.184.226.99 with SSH-1.0-SSH_Version_Mapper. Ne paniquez pas.

In the above example Logwatch is being used to summarize SSH activity. It understands the service being stopped and started, failed logon attempts as well as successful logons. All this information is displayed in summary format so it is easier to digest. For example we do not know exactly when msmith incorrectly entered their password, but we see it happened six times, all from IP address 1.3.247.11. So instead of having six lines to digest, we only need to look at one. If we want to see each specific log entry, we can always refer back to the original logs.

Now look at the “Unmatched Entries” section. Each of these is an event that Logwatch does not have a signature for. Rather than ignore them, which would happen with a blacklist based system, they are summarized here for us to review. We then have the option to generate a signature for a specific entry so it will get categorized in a similar fashion to the process and logon sections.

Clearly this gives us the best of both worlds. The above report represents a bit over 650 lines worth of log entries, summarized down into an easy to read report. Most importantly, none of the log entries had to be ignored in order to produce this summary report.

Beyond daily reporting

You may also find it useful to perform long-term trend analysis and data mining on your log data. This may help to reveal patterns that normally go undetected when logs for a small snapshot in time (like 24 hours) is reviewed. Arguably one of the best tools available for dealing with lots of data is Splunk .

Splunk

Splunk is available as a free version that is limited to processing 500 MB per day, or you can invest in the commercial version that supports unlimited data processing. Splunk is extremely flexible at accepting data. It can act as a centralized logging server, or you can transfer files via a number of methods including FTP and HTTP. Once the data is received, Splunk indexes every field in each log file. This gives you unparalleled sorting and searching capability.

The full features are Splunk are too numerous to get into in this post. Check their site for a full list of supported features. What Splunk is extremely good at is manipulating and reporting on a huge number of log entries. It can index, search and report on billions of log entries per second. This makes it extremely useful for generating long-term trend reports or running saved searches for data mining purposes.

Résumé Exec

We'll we've reached the end of the trail. Hopefully you feel like you have a better handle on how to deploy a centralized logging solution, as well as how to leverage it to better secure your environment. If you have any questions, please feel free to drop a comment. :)

Setting Up A Security Information Management System-Part5

14 août 2009

In my last post I discussed how a logging server uses a message's priority value to sort incoming log messages. In this installment I'll talk about testing connectivity, as well as how to get various gear on the wire to submit their log entries to a centralized server.

Besoins

In order for a system to submit log entries, it has to have support for Syslog. Log entries need to be transmitted in clear text to port UDP/514 on the logging server. If you are using rsyslog on the server, TCP/514 is acceptable as well.

Submitted long entries should include the following info:

  • A priority value (in <PRI> format) at the beginning of the payload
  • The name of the application submitting the log entry
  • The process ID used by the application
  • The body of the log messages

But to be honest, Syslog is not very fussy. It will attempt to record anything sent to its listening port as a long entry. If a priority value is not present, it will record the entry to whatever file is used for facility 1. Typically this is /var/log/messages.

Testing Connectivity

When deploying a new setup, I like to verify connectivity between the first few clients and the logging server. If logging is not working, you will want to be able to isolate the problem area. Typical problems include:

  • Client incorrectly configured
  • Firewall in the way (on the client, the wire, or the logging server)
  • Server incorrectly configured

You will want to monitor the messages file on the logging server to ensure the test log entry is received. On the logging server, run the following command:

tail -f /var/log/messages

Tail will open the log file read only and print the last five lines. As new log entries are received, they will get printed to the screen as well.

To generate a test log entry, I like to use Netcat . Netcat can be used from any Windows, Linux or UNIX system. From the test system, run the command:

echo 'this is a UDP test log entry' | nc -u -w 1 <IP address of logging server> 514

You should see the echoed portion of the command show up in the /var/log/messages file on the logging server. If not, launch a packet sniffer and see if you can determine where the failure is occurring. If you wish to test TCP connectivity as well, simply run the command again leaving out the Netcat “-u” switch:

echo 'this is a TCP test log entry' | nc -w 1 <IP address of logging server> 514

If both entries are received, we are ready to start pointing devices at our logging server.

Network hardware

Most network hardware supports Syslog via UDP/514. It is just a matter of going through the documentation and determining the proper command set for sending log entries to a remote server.

If you are using Cisco IOS, run the following from global configuration mode:

logging <IP address of logging server>

If you wish to change the logging facility from “local use 7” to something else, the command is:

logging facility <facility short name>

So to change logging facility to “local use 3”, the command would be:

logging facility local3

Linux and UNIX systems

There are a number of Syslog alternatives available for Linux and UNIX. In this section I'll cover how to get Syslog and rsyslog to forward their log messages to a remote server.

Syslog

If the client is running Syslog, you will need to edit the /etc/syslog.conf file. Add the following line to the bottom of the file:

*.* @<IP address of logging server>

So an example would be:

*.* @192.168.1.150

Note the white space between the wild card match and the remote IP address MUST BE TAB CHARACTERS . If you use spaces, Sysylog will not be able to parse the file. Save and exit the file, then restart Syslog to activate the changes.

rsyslog

With rsyslog we have the option of forwarding our log messages via UDP or TCP. In either case we will need to edit the /etc/rsyslog.conf file. To forward long entries using UDP, add the following line to the end of the file:

*.* @<IP address of logging server>:<port>

So an example would be:

*.* @192.168.1.150:514

If we wish to use TCP instead, we simply use two “@” symbols:

*.* @@192.168.1.150:514

Once complete save and exit the file. You will need to restart rsyslog to activate your changes.

Windows systems

As mentioned in a previous post, Windows does not include support for Syslog. This means you will need third party software to convert your logs in real time and submit them to a logging server. The Loganalysis Web site has a list of possible solutions.

For the purposes of this post, I'll cover Snare . It is free for use, can be commercially licensed, and have a very simple deployment process.

Once you download the software, you need to configure it for the system. This is shown in Figure #1. Snare needs to know the location of the logging server as well as what facility and severity level to use. Once complete, click the “Latest Events” menu potion to see which specific Event Viewer log entries Snare is forwarding to the logging server.

snare-config

Résumé Exec

In this post I discussed testing connectivity to a logging server, as well as how to configure clients to centralize their logs. In the next post I'll talk about what to look for in a daily reporting tool, as well as real time alerting.

Setting Up A Security Information Management System-Part4

August 12th, 2009

In the last post I talked about how to setup a logging server that will accept remote log entries. In this installment I'll talk about how to sort log entries into specific files.

Facility, severity and priority

Let's talk about how logging servers figure out which file to store a log entry in when it gets received. Log messages contain two descriptive parameters, facility and severity. When these two parameters are combined, the value is referred to as the priority of the log message.

Facilité

Facility defines the type of process that generated the log entry. For example all mail servers are expected to identify that their log entries are part of the “mail” facility. FTP processes should use the FTP facility, NTP processes should use the NTP facility, and so on. RFC 3164 defines the valid facilities, but here's the list:

Numerical Facility

Code de

0 kernel messages (kern)

1 user-level messages (user) – default if not specified

2 mail system (mail)

3 system daemons (daemon)

4 security/authorization messages (auth)

5 internal syslogd (syslog)

6 line printer subsystem (lpr)

7 network news subsystem (news)

8 UUCP subsystem (uucp)

9 clock daemon

10 security/authorization messages (authpriv)

11 FTP daemon (ftp)

12 NTP subsystem (ntp)

13 log audit

14 log alert

15 clock daemon (cron)

16 local use 0 (local0)

17 local use 1 (local1)

18 local use 2 (local2)

19 local use 3 (local3)

20 local use 4 (local4)

21 local use 5 (local5)

22 local use 6 (local6)

23 local use 7 (local7)

The “local use” facilities are similar to private addresses in the IP world. These facilities are not reserved, and are available for anyone to use as they see fit.

Facility problems

There are a couple of problems here. To start, where is the Web server facility? This list was generated back in 1987 before Web servers (or Gopher for that matter) existed. So some of the services we use today (VoIP, SQL, etc.) are missing. Also, some of the listed services typically go unused in a corporate environment. UUCP and Network News (NNTP) are excellent examples.

The lack of current services has caused many vendors to rely heavily of the local use facilities. This can cause potential conflicts when we get into sorting our log entries. For example Linux uses local use 7 to identify its boot time log entries. Apache also uses local use 7 for Web server errors. So down the road it may be difficult for us to sort Web errors and boot messages into different log files.

Another problem is that there is no verbose description about each of these facilities. This can make it a bit difficult for a programmer to identify which one to use. For example, let's say we've written a program that authenticates a user for network access. Which facility should we use? Facility 4 and 10 seem the most likely, but their descriptions are identical. How do we choose? If our program runs as a background process should we actually choose facility 3 instead?

Vous avez l'idée. The list is not as clear-cut as it could be. It is not uncommon to see vendors use a different facility than you would expect. For example I've seen VPN vendors undecided as to the differences between facilities 4 and 10, so they simply send some percentage of log entries to each.

Severity

Severity defines the importance of the log entry. The same RFC 3164 defines the severity levels as:

Numerical Severity

Code de

0 Emergency: system is unusable (emerg)

1 Alert: action must be taken immediately (alert)

2 Critical: critical conditions (crit)

3 Error: error conditions (error)

4 Warning: warning conditions (warn)

5 Notice: normal but significant condition (notice)

6 Informational: informational messages (info)

7 Debug: debug-level messages (debug)

Luckily the severity levels are far less vague than the facility descriptions. This means they are much less confusing to work with. The higher numbered severity levels tend to be very verbose. This means saying you want to send debug level messages to your logging server could easily flood the network. Use the higher numbered severity levels with caution.

Priorité

When a log entry gets transmitted to a log server, the first value contained within it is the priority of the message. The priority is the facility and severity values combined per the following math formula:

( Facility x 8 ) + Severity = Priority

So lets say our mail server needs to send a warning message. What would the priority be? The mail facility has a value of 2, while warnings have a severity of 4. So the math would be:

( 2 x 8 ) + 4 = 20

If a print server (facility 6) needed to send a log entry saying it is currently on fire (severity 0), the priority value in the message would be:

( 6 x 8 ) + 0 = 48

When a log entry gets transmitted, the priority value needs to be encapsulated in less than and greater than signs. So the priority value in the above mail server message would be “<20>” while the print server would use “<48>”. Again, this needs to be the first piece of information transmitted in the log message.

Sorting log entries

The priority value is used by logging servers to sort the incoming messages. For example if we wanted all mail messages to go to the same file, we would tell our logging server that all messages with a priority of 16 (2×8+0) through 23 (2×8+7) should go to the “maillog” file. Most logging servers (like rsyslog) will let you do this numerically or by using the short description names.

rsyslog.conf example

Here are two lines out of the rsyslog.conf file that ships with Fedora. Let's talk about what they are actually doing:

authpriv.* /var/log/secure

*.info;mail.none;authpriv.none;cron.none /var/log/messages

These lines define two of the rules for determining which log entries should go to which log files. The syntax for sorting is:

facility.severity

So the first line says all facility 10 (authpriv) log entries, regardless of severity (“*” is a wild card match) should be sent to the file /var/log/secure.

The second line is a bit more complex as it has multiple conditions separated by semi-colons. These conditions state:

  • *.info = All facilities, so long as the severity level is info
  • mail.none = No mail facility log entries, regardless of severity
  • authpriv.none = No authprive facility log entries, regardless of severity
  • cron.none = No cron facility log entries, , regardless of severity

Or, to translate this to English, the line says “Send all severity “info” messages to /var/log/messages, except those that contain a facility of “mail”, “authpriv” or “cron”.

So with these rules we can define any combination of facility and severity values and which log file we would like to direct it. When you first set this up, stick with the defaults. As you start collecting log entries you can tweak the rules as you see fit.

Bending the RFCs

In an ideal world, the RFCs would be a perfect fit for everyone's needs. Unfortunately this is not always the case. A good example is the logging facilities. As mentioned we are missing facilitates for modern day services, while at the same time have facilitates that we will never use. An obvious answer is to recycle the outdated facilities in order to support modern services.

For example, UUCP ( facility 8 ) is not even supported by modern operating systems. With this in mind, I like to use it as my Windows facility. That way I can sort all Windows log entries into their own file. For network hardware, I use the network news facility (facility 7). If you are unsure if a facility is currently in use, modify your logging server's configuration file to send all log entries for that facility to a unique file:

ftp.* /var/log/facility-test

If no entries arrive, you are in good shape. Just keep in mind that a legitimate service may use it at a later date. For example if three months from now someone sets up an FTP server, we may have problems if we are already using the FTP facility (facility 11). If you are unsure you can always stick with the local use facilities, as that is what they are intended for. Local use 0 and 7 seem to be the most heavily used, so avoid them when possible.

Other sorting options

While its not part of the RFC, some logging servers give you the ability to sort log entries based on patterns within the message. A good example is Syslog-NG . Syslog-NG will sort based on facility and severity, but you can also sort based on source IP, the application that generated the log entry, etc. This gives you far more flexible sorting options and it may be something to consider if facility/severity is not granular enough for your needs.

Résumé Exec

In this installment we talked about how facility and severity is used to sort log entries. In my next post I'll talk about how to get each of our systems to submit log messages to our centralized server.

Setting Up A Security Information Management System-Part3

August 11th, 2009

In the last post I covered some of the architecture concerns with rolling out a centralized security information system. In this post I'll cover deploying a basic log server, and verifying that it is ready to accept log entries.

Selecting a logging server

The first thing we need to do is select a platform for our logging server. If we are simply setting up a test lab, Windows, UNIX or Linux will all make great choices. Choosing Windows might be helpful for a Windows administrator, as they will not have to cut the curve on a new operating system while attempting to test out logging. While Windows does not support Syslog out of the box, there are some excellent packages like Kiwi Syslog Server and WinSyslog that will add Syslog support. Both have evaluation versions and are relatively inexpensive to license.

If we are talking about setting up a production server however, we will want to stay away from Windows. Windows is notorious for having a horrible IP stack. If fact previous “patches” have crippled it even further in the interest of slowing worm propagation and increasing the speed of the GUI. While many of these limitations have been removed in 2008 server and Windows 7, IP performance is still sub-par when compared to a Linux or UNIX system deployed on identical hardware.

So that leaves Linux and UNIX as choices for a production system. Which to choose will depend on personal choice. Some like the stability of BSD while others like the flexibility of Linux. For the purpose of this document I'll be working with a Fedora based Linux system. Installation and setup of the OS is relatively intuitive and straightforward.

Accepting remote logs

In order to accept log entries from remote systems, older versions of Fedora required you to initialize the Syslog daemon (syslogd) with the “-r” option. This was done by adding “-r” to the syslogd_options line of /etc/sysconfig/syslog file. Some versions of Linux still support legacy Syslog, and require you to add “-r” to the Syslog RC initialization file. Check the docs for your specific distribution.

New Fedora systems however support “Reliable Syslog” or rsyslog. Implementation is pretty similar to plain old Syslog, except rsyslog supports communications over TCP/514 as well as UDP/514. In the last post I described that running log entries over TCP can fix some of the reasons we loose log entries, but not all of them. If you want to play around with TCP support, go ahead and open both ports on the logging server.

To get rsyslog to accept remote log entries, we must edit the /etc/rsyslog.conf file. Towards the beginning of the file you should see the following:

# Provides UDP syslog reception

#$ModLoad imudp.so

#$UDPServerRun 514

# Provides TCP syslog reception

#$ModLoad imtcp.so

#$InputTCPServerRun 514

The “#” (pound) symbol at the beginning of the line tells the system not to process the rest of the line. We use this technique for commentary as well as “commenting out” commands we do not wish to have processed. By commenting out the ModLoad and port specification lines, we prevent rsyslog from opening a listening socket. The helps to keep the system in a more secure state.

Since we are setting up a centralized logging server, we will need to open those sockets to accept remote log entries. Modify the /etc/rsyslog.conf file to remove the appropriate pound symbols. The file should now look like this:

# Provides UDP syslog reception

$ModLoad imudp.so

$UDPServerRun 514

# Provides TCP syslog reception

$ModLoad imtcp.so

$InputTCPServerRun 514

If you know you will never use TCP, you can leave the last two lines commented out. Once complete save your changes and exit the file.

We now need to restart logging so our changes are implemented. This is done on Fedora by executing the following command:

service rsyslog restart

When you execute the command, you should see rsyslog stop and start with a status of “OK”. If the shutdown failed, it is because rsyslog is not being initialized at boot time. From the command line, execute the command “setup” and select “System services” from the main menu. When the services menu appears, scroll down the list till you find rsyslog. Check off the box to the left and then select “OK”. Quit the setup utility and rsyslog will now initialize whenever the system is booted.

Verifying the listening port

Next we need to ensure that our logging process is accepting remote log entries. From the command line, type “netstat -an | grep :514”. The output should look similar to the following:

[root@fubar ~]# netstat -an | grep :514

tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN

tcp 0 0 :::514 :::* LISTEN

udp 0 0 0.0.0.0:514 0.0.0.0:*

udp 0 0 :::514 :::*

The first line tells us that TCP/514 is listening via IPv4 on all network interfaces. Line two tells us the TCP port is also listening on any interface with an Ipv6 address. Lines three and four are the same information, except for UDP. If any of the entries state “127.0.0.1:514” instead of “0.0.0.0:514”, then the port is only bound to the loopback interface. Only the local system will be able to reach it. This can happen with legacy Syslog systems if you forgot to run them with the “-r” switch.

You should now have a logging server that is capable of receiving inbound log entries. In the next post I'll talk about how these log entries get sorted into specific files.

Setting Up A Security Information Management System-Part2

August 10th, 2009

In my last post we discussed defining your goals for a Security Information Management (SIM) system. In this post we'll talk about architecture concerns as well as capacity planning.

Network communications

The goal will be to have one or more SIM servers that will collect log entries from other systems. This will obviously have an impact on network utilization. How much of an impact will depend on the quantity and type of systems we collect log entries from.

UDP/514

Just about all systems support the original Syslog communication implementation which goes all the way back to the year 1988. The last description of this spec appeared in RFC 3164 . While this RFC has been obsoleted by RFC 5424 , RFC 3164 still represents the implementation supported by most vendors. Windows is a notable exception (proprietary, no Syslog support), but there is 3rd party software to rectify this.

Both RFCs specify the use of the UDP protocol when transmitting log entries. The well-known port to use is UDP/514. Where RFC 3164 and 5424 differ is in the format of the log message. I'll dig into these differences in a later post.

The love/hate of using UDP

On the positive side, UDP is connectionless. This means that it generates less traffic than if we used TCP. Also, log transmissions are a one-way process. The host generating a log entry sends a packet to the logging server, but the logging server never replies. This means we can control traffic flow with static filtering rather than stateful filtering which will place less overhead on the traffic control device. Also, the UDP header is typically 1/3 – 1/4 the size of a TCP header, which means smaller transmission packets, thus less network overhead.

On the negative side, UDP is connectionless. ;) This means that it has minimal error reporting capability. For example if we transmit a log entry and the frame goes missing (say a collision or a firewall dropping the packet), UDP does not have the ability to detect that a retransmission is required. This means its possible for log entries to go missing if we overflow the network. Further, UDP has no flow control ability. If the SIM server recognizes it is reaching capacity it has no way to slow down the incoming transmission of log entries. The SIM server's only option is to throw the packets away without processing them.

Needless to say, we need to ensure that we properly specify capacity. If the network or the SIM server becomes overloaded, we are going to lose log entries. Proper capacity planning starts with understanding the impact of logging on the network.

Network impact of logging

The maximum size of a UDP Syslog packet has different specifications in different RFC's. The outdated RFC 3164 defines the maximum message size as being 1,024 bytes. RFC 5426 drops this maximum size to 480 bytes. If a vendor is still following the old spec, its possible they may still think the 1,024 byte size is legitimate. It has been my experience however that most log entry packets range in size from 75 to 225 bytes, so the maximums are a non-issue.

Windows systems, firewalls and intrusion detection systems tend to generate the largest messages. Network hardware tends to generate the smallest messages. If we have a 100 Mb Ethernet network, the theoretical maximum would be somewhere around 50,000 to 130,000 frames per second. This assumes zero other traffic, which is rarely the case. For the purposes of capacity planning, assume you will be limited to 5,000 log entries per second. This number might even be less if you have a busy network. Taking some utilization measurements during the planning process is key.

Syslog over TCP

As mentioned above, UDP introduces the problem that log entries can become lost without us even knowing it. There are ways to validate capacity, which I will cover in a later post. Some feel running Syslog over TCP can rectify this problem. TCP can be leveraged for its reliability to insurie our log entries are properly received.

Unfortunately TCP support for Syslog is no were near standardized. Some vendors support TCP by simply listening on TCP/514. RFC 3195 defines Reliable Syslog as using port TCP/601, but its adoption has been extremely limited. RFC 5425 defines the use of TLS to secure Syslog transmission. This RFC specifies the use of port TCP/6514. This is a brand new specification and I'm unaware of anyone supporting it just yet.

So support for TCP is all over the board. Further, TCP does not completely fix the problem. While TCP will give us flow control and reliability on the wire, it cannot make up for the fact that Syslog at the application layer does not acknowledge the receipt of log entries. This was by design as it reduces overhead. The problem is that even by using TCP we can still lose messages within the IP stack and never know it is occurring.

So if you want to try and transmit logs via TCP, its only going to work between a specific vendor's client and server software. For example you may need to run Syslog-NG on both ends of the connection to leverage it's support for TCP. This is not always practical, as you cannot run the software client on appliances like access points, switches, routers, etc.

Where to place the logging server

When deciding where to place the logging server, we have to keep both network capacity and security in mind. Take a look at Figure #1. This is an ideal situation where the logging server has been isolated to a dedicated network operations network. This isolates it from the other security zones and makes it much easier to leverage the firewall to restrict access to the logging server.

sim-placement

The drawing assumes we only need one logging server for our entire environment. What if we have 100,000 nodes to keep track of? Large networks may need to look at aggregating the data. For example if I have 10 field offices, I may need to have a logging server located at each of them collecting local log info. Each of these logging servers would then relay summary information back to the corporate office for network wide trend reports. This way we maintain a high level of visibility while reducing network load. I'll cover some possible aggregation options in a later post.

How many systems can log to a single logging server?

There is no single answer to this question as each network is different. It is going to depend on how much capacity is available on your network and how many log entries each of these systems generate. For example I could probably point 50,000 switches at a single logging server, as switches tend to generate very few messages. Firewalls on the other hand are extremely chatty, so I might max out the network or SIM server with only 20-50 firewalls. So to answer the question we need to look at two metrics:

  • How much free capacity is there on the wire?
  • How many log entries will each host generate?

The second question is not as straightforward as it may seem. For example the average desktop may only generate 40-100 log entries per day. If we can push 1,000 log entries per second, the math says we should be able to point 86 million desktops at a single logging server. The problem is about 80% of those messages are generated at initial boot time. If everyone typically powers around 9:00 AM, the math changes to a more realistic 750 desktops (again, assuming we can push 1,000 log entries per second over the wire).

So we can't just look at quantity of long entries. We need to take time of day into account as well. This will identify the actual number of log entries per second we can expect under worse case conditions. Worse case is the capacity level we need to plan for.

Deploy centralized logging in phases

If you have tens of thousands of systems to deal with, it is easy to get overwhelmed with the work involved with deploying centralized logging. Rolling out the solution in phases makes it easier to wrap your brain around the whole process.

First, start with a single logging server. You may not be able to cover your whole network, but we have to start somewhere. Large networks should consider a deployment at the corporate office first, moving out to field offices once the corporate system is fully vetted and functional.

You will also want to phase in which devices you are collecting information from. I usually go with the following order:

  1. Network intrusion detection systems
  2. Firewalls
  3. Network hardware (routers, switches, access points, print servers, etc.)
  4. Internet facing servers
  5. Internal servers
  6. Internal desktops

Obviously you can tweak this list to fit your needs. For example if you do not plan on collecting info from desktops, simply leave that step out. I like to start with network intrusion systems first as their log entries are well suited for vetting both daily reports and real time alerting. Once we have a handle on alerting and reporting, adding additional devices becomes far easier.

Résumé Exec

In this post I covered all the things you need to consider when initially deploying a centralized logging solution. We covered how to predict the impact it will have on network utilization, how to calculate the number of hosts per logging server, and why it is important to deploy the solution in phases. In the next post we'll start talking about configuring the centralized logging server. Specifically, we'll look at how we are going to sort log entries.

Setting Up A Security Information Management (SIM) System – Part 1

August 8th, 2009

I get a lot of logging related questions. So much so that I decided to do a series on how to deploy log management. There are some excellent logging resources on the Internet, but they are fragmented in scope and/or vendor specific (usually written by the vendors). I wanted to create something vendor neutral that holds your hand through the entire process of deploying a log management solution.

Why should I deploy a security information management system?

Let's be candid, deploying log management is hard and painful. This is the reason why so many administrators avoid it like the plague. It is difficult to deploy and a wild buck for performing long term administration. Weekly trips to the dentist would probably be more pleasurable.

With all that said, log management is probably the single most effective security solution you can deploy. You can't drop it and forget it like a firewall, but log management can give you unrivaled visibility into the inner workings of your network. When its not providing insight into security events you might otherwise miss, it is doing double duty helping you troubleshoot communication and system issues. A logging system can be resource intensive, but it can also provide a very high rate of return.

Why do you want a SIM?

Before we begin, the first question you have to ask yourself is why do you want a SIM solution . Do you want to improve security or is there a compliance specification you need to adhere to? It might seem odd to want to distinguish between the two, but the requirements are drastically different. Standards are far easier (and cheaper) to meet than true security.

Standards such as PCI-DSS require you to log user, application and network activity. However they tend to be very vague in how that information gets processed. You can usually get away with dropping in a black box, generating some colorful management reports, and be considered “compliant”. It may not help you find that backdoored system that's calling home, but you've met the standard.

Standards tend to focus on the lowest common denominator. They need to be applicable for a wide range of audiences, including businesses without a lot of resources. Rather than evaluating a specific organization's risk and basing the requirements on that, we set the bar low so it is achievable by small and large organizations alike.

Also, to simplify the process, we tend to focus on checklists. Checklists are cool because they tell you exactly what needs to be done to be complaint. If an auditor can put a checkmark next to all the items, you pass the testing. The problem is checklists tend to focus on symptoms, not the actual problem.

I'll give you a great example. I had a client bring in a Qualified Security Assessor to certify them for PCI-DSS. This was one of my clients running a strict implementation of application control, so they could show a year and a half history of zero Malware infections. While they certainly received Malware over that time, we could prove that there were zero instances of actual infection as every Malware attack was immediately contained and eliminated. Not many businesses can claim a year+ with zero Malware infections.

The auditor failed them. PCI-DSS requirement #5 states: “anti-virus software must be used on all systems commonly effected by Malware”. Since they ran application control, not anti-virus, they were deemed non-compliant. If requirement 5 had been written to identify an acceptable threshold for Malware containment, they certainly would have met the specification. However risk evaluation and metrics do not make for easy checklist items.

So if you want to deploy a SIM to actually augment security in your environment, it is going to take longer and require more work than simply meeting a specification.

Should you build your own SIM?

I'ma firm believer that anyone considering a SIM solution should start by building his or her own. While there are some decent commercial SIM solutions out there, they isolate you from the inner works of the logging process. This can be a good thing in that it saves you time. The problem is you will not learn as much.

Also, log management deployment is a journey. You will find in the course of a rollout that your requirements may change. Information you initially thought was important, all of a sudden is not. Reports you didn't even think of, all of a sudden jump to the top of the list. By building your own system you will have more flexibility to make changes on the fly. If you later decide you want a commercial solution, you are now better informed of your requirements and can do a better job evaluating a potential purchase. This is important, as many log solutions are expensive. You don't want to drop a lot of money on a solution that will not meet your long-term needs.

I'll give you a good example. Most of the sites I've worked with initially think failed logons are important and want to see the reports. It does not take them long to figure out seeing all failed logons is a complete waste of time as everyone fat fingers the keyboard on occasion. They then realize they want some thresholds around the data. For example they only want to see failed logons if three or more failures are seen in five seconds (indicating an automated attack). Or only show failed logons when multiple logon names are used from the same source IP (indicating a password guessing attack). So by dealing with some information overload, they become better skilled at defining exactly what they wish to see.

Résumé

OK, so we've covered defining a focus (security Vs. standards requirement) as well as the importance of initially building your own system. In the next installment I'll get into architecture and capacity planning.