IBM
QRadar は、Sun Solaris BSM から直接バイナリー・ファイルを処理しません。 監査ログ・データを QRadarで取得するには、その前に praudit を使用して、監査ログを既存のバイナリー形式から人間が理解できるログ形式に変換する必要があります。
手順
- 以下のコマンドを入力して、Sun Solaris コンソールでスクリプトを新規作成します。
vi /etc/security/newauditlog.sh
- 以下の情報を newauditlog.sh スクリプトに追加します。
#!/bin/bash
#
# newauditlog.sh - Start a new audit file and expire the old logs
#
AUDIT_EXPIRE=30
AUDIT_DIR="/var/audit"
LOG_DIR="/var/log/"
/usr/sbin/audit -n
cd $AUDIT_DIR
# Get a listing of the files based on creation date that are not current in use
FILES=$(ls -lrt | tr -s " " | cut -d" " -f9 | grep -v "not_terminated")
# We created a new audit log so that the last file in the list is the latest archived binary log file.
lastFile=""
for file in $FILES; do
lastFile=$file
done
# Extract a human-readable file from the binary log file
echo "Beginning praudit of $lastFile"
praudit -l $lastFile > "$LOG_DIR$lastFile.log"
echo "Done praudit, creating log file at: $LOG_DIR$lastFile.log"
/usr/bin/find . $AUDIT_DIR -type f -mtime +$AUDIT_EXPIRE \ -exec rm {} > /dev/null 2>&1 \;
# End script
The script outputs log files in the <starttime>.<endtime>.<hostname>.log format.
例えば、/var/log のログ・ディレクトリーには、以下の名前のファイルが格納されます。
20111026030000.20111027030000.qasparc10.log
- オプション: スクリプトを編集して、ログ・ファイルのデフォルト・ディレクトリーを変更します。
- AUDIT_DIR="/var/audit" -監査ディレクトリーは、 Solaris 10 での基本セキュリティー・モードの有効化で構成した監査制御ファイルによって指定された場所と一致している必要があります。
- LOG_DIR="/var/log/" -ログ・ディレクトリーは、 QRadarによって取得する準備ができている、Sun Solaris システムの人間が理解できるログ・ファイルの場所です。
- 変更内容を newauditlog.sh スクリプトに保存します。
- オプション: スクリプトを実行可能にする場合は、コマンド を入力します。
chmod +x /etc/security/newauditlog.sh
次に実行するタスク
このスクリプトが実行可能であれば、CRON を使用して自動化し、Sun Solaris 基本セキュリティー・モジュール・ログを人が認識できる形式に変換できます。