2 Copyright (C) 2009 Trend Micro Inc.
7 Ossec can read nmap grepable output files to use as a
8 correlation tool and also to alert based on host information
9 changes. Follow the step by step below on how to configure
13 1- Add the nmap output file on ossec.conf (generally
14 at /var/ossec/etc/ossec.conf):
18 <log_format>nmapg</log_format>
19 <location>/var/log/nmap-out.log</location>
24 2- If the file does not exist, touch it:
26 ossec-test# touch /var/log/nmap-out.log
31 ossec-test# /var/ossec/bin/ossec-control restart
34 4- Run your nmap scans (example scanning 192.168.2.0/24 network):
36 ossec-test# nmap --append_output -sU -sT -oG /var/log/nmap-out.log 192.168.2.0-255
40 *** Example of alert when a new host is found:
42 ** Alert 1152058913.238: mail
43 2006 Jul 04 20:21:53 /var/log/nmap-out.log
44 Rule: 15 (level 8) -> 'New host information added.'
47 Host: 192.168.2.10, open ports: 21(tcp) 22(tcp) 80(tcp) 113(tcp) 514(udp) 1514(udp) 4500(udp)
50 *** Example of alert when a new a host information is changed:
52 ** Alert 1152058983.487: mail
53 2006 Jul 04 20:23:03 /var/log/nmap-out.log
54 Rule: 15 (level 8) -> 'Host information changed.'
57 Host: 192.168.2.1, open ports: 54(udp) 8080(tcp) 161(udp) 520(udp) 1025(udp) 1900(udp)
58 Previously open ports: 53(udp) 80(tcp) 161(udp) 520(udp) 1025(udp) 1900(udp)