Missing Options Active Response

266 views
Skip to first unread message

Qasim Ijaz

unread,
Apr 6, 2012, 12:09:53 PM4/6/12
to ossec-list
When I enable active response in ossec.conf file I get following
error upon ossec restart:
ossec-config(1281) : ERROR: Missing options in the active response
configuration
ossec-config(1202) : ERROR: Configuration error at '/var/ossec/etc/
ossec.conf'. Exiting.
ossec-analysisd(1202): ERROR Configuration error at '/var/ossec/etc/
ossec.conf'. Exiting

Qasim Ijaz

unread,
Apr 6, 2012, 10:13:20 PM4/6/12
to ossec-list
Guys, am I missing something? My ossec.conf file looks good. I don't
understand why I'm getting missing options error.

dan (ddp)

unread,
Apr 6, 2012, 10:29:20 PM4/6/12
to ossec...@googlegroups.com

Your config isn't coming through on my phone, can you try sending it again?

Joe Gedeon

unread,
Apr 6, 2012, 10:54:22 PM4/6/12
to ossec...@googlegroups.com
Can you post a copy of your config so that we can review it?

--
Registered Linux User # 379282

Qasim Ijaz

unread,
Apr 7, 2012, 5:51:24 PM4/7/12
to ossec-list
Sorry for delay guys. I'll post config file on Monday (Office isn't
open over weekend)

On Apr 6, 10:54 pm, Joe Gedeon <joe.ged...@gmail.com> wrote:
> Can you post a copy of your config so that we can review it?
>

Qasim Ijaz

unread,
Apr 7, 2012, 6:17:09 PM4/7/12
to ossec-list
<ossec_config>

  <global>
    <email_notification>no</email_notification>
  </global>

  <syscheck>
    <!-- Frequency that syscheck is executed - default to every 22
hours -->
    <frequency>79200</frequency>

    <!-- Directories to check  (perform all possible verifications) --
>
    <directories check_all="yes">/etc,/usr/bin,/usr/sbin</directories>
    <directories check_all="yes">/bin,/sbin</directories>

    <!-- Files/directories to ignore -->
    <ignore>/etc/mtab</ignore>
    <ignore>/etc/mnttab</ignore>
    <ignore>/etc/hosts.deny</ignore>
    <ignore>/etc/mail/statistics</ignore>
    <ignore>/etc/random-seed</ignore>
    <ignore>/etc/adjtime</ignore>
    <ignore>/etc/httpd/logs</ignore>
    <ignore>/etc/utmpx</ignore>
    <ignore>/etc/wtmpx</ignore>
    <ignore>/etc/cups/certs</ignore>
    <ignore>/etc/dumpdates</ignore>
    <ignore>/etc/svc/volatile</ignore>

    <!-- Windows files to ignore -->
    <ignore>C:\WINDOWS/System32/LogFiles</ignore>
    <ignore>C:\WINDOWS/Debug</ignore>
    <ignore>C:\WINDOWS/WindowsUpdate.log</ignore>
    <ignore>C:\WINDOWS/iis6.log</ignore>
    <ignore>C:\WINDOWS/system32/wbem/Logs</ignore>
    <ignore>C:\WINDOWS/system32/wbem/Repository</ignore>
    <ignore>C:\WINDOWS/Prefetch</ignore>
    <ignore>C:\WINDOWS/PCHEALTH/HELPCTR/DataColl</ignore>
    <ignore>C:\WINDOWS/SoftwareDistribution</ignore>
    <ignore>C:\WINDOWS/Temp</ignore>
    <ignore>C:\WINDOWS/system32/config</ignore>
    <ignore>C:\WINDOWS/system32/spool</ignore>
    <ignore>C:\WINDOWS/system32/CatRoot</ignore>
  </syscheck>

  <rootcheck>
    <rootkit_files>/var/ossec/etc/shared/rootkit_files.txt</
rootkit_files>
    <rootkit_trojans>/var/ossec/etc/shared/rootkit_trojans.txt</
rootkit_trojans>
    <system_audit>/var/ossec/etc/shared/system_audit_rcl.txt</
system_audit>
    <system_audit>/var/ossec/etc/shared/cis_debian_linux_rcl.txt</
system_audit>
    <system_audit>/var/ossec/etc/shared/cis_rhel_linux_rcl.txt</
system_audit>
    <system_audit>/var/ossec/etc/shared/cis_rhel5_linux_rcl.txt</
system_audit>
  </rootcheck>

  <active-response>
    <disabled>no</disabled>
    <command>firewall-drop</command>
    <location>local</location>
    <level>6</level>
    <timeout>600</timeout>
  </active-response>

  <remote>
    <connection>syslog</connection>
  </remote>

  <remote>
    <connection>secure</connection>
  </remote>

  <alerts>
    <log_alert_level>1</log_alert_level>
    <email_alert_level>7</email_alert_level>
  </alerts>
  <!-- Files to monitor (localfiles) -->

  <localfile>
    <log_format>syslog</log_format>
    <location>/var/log/messages</location>
  </localfile>

  <localfile>
    <log_format>syslog</log_format>
    <location>/var/log/auth.log</location>
  </localfile>

  <localfile>
    <log_format>syslog</log_format>
    <location>/var/log/syslog</location>
  </localfile>

  <localfile>
    <log_format>syslog</log_format>
    <location>/var/log/mail.info</location>
  </localfile>

  <localfile>
    <log_format>syslog</log_format>
    <location>/var/log/dpkg.log</location>
  </localfile>

  <localfile>
    <log_format>apache</log_format>
    <location>/var/log/apache2/error.log</location>
  </localfile>

  <localfile>
    <log_format>apache</log_format>
    <location>/var/log/apache2/access.log</location>
  </localfile>
</ossec_config>


<ossec_config>  <!-- rules global entry -->
  <rules>
    <include>rules_config.xml</include>
    <include>pam_rules.xml</include>
    <include>sshd_rules.xml</include>
    <include>telnetd_rules.xml</include>
    <include>syslog_rules.xml</include>
    <include>arpwatch_rules.xml</include>
    <include>symantec-av_rules.xml</include>
    <include>symantec-ws_rules.xml</include>
    <include>pix_rules.xml</include>
    <include>named_rules.xml</include>
    <include>smbd_rules.xml</include>
    <include>vsftpd_rules.xml</include>
    <include>pure-ftpd_rules.xml</include>
    <include>proftpd_rules.xml</include>
    <include>ms_ftpd_rules.xml</include>
    <include>ftpd_rules.xml</include>
    <include>hordeimp_rules.xml</include>
    <include>roundcube_rules.xml</include>
    <include>wordpress_rules.xml</include>
    <include>cimserver_rules.xml</include>
    <include>vpopmail_rules.xml</include>
    <include>vmpop3d_rules.xml</include>
    <include>courier_rules.xml</include>
    <include>web_rules.xml</include>
    <include>apache_rules.xml</include>
    <include>nginx_rules.xml</include>
    <include>php_rules.xml</include>
    <include>mysql_rules.xml</include>
    <include>postgresql_rules.xml</include>
    <include>ids_rules.xml</include>
    <include>squid_rules.xml</include>
    <include>firewall_rules.xml</include>
    <include>cisco-ios_rules.xml</include>
    <include>netscreenfw_rules.xml</include>
    <include>sonicwall_rules.xml</include>
    <include>postfix_rules.xml</include>
    <include>sendmail_rules.xml</include>
    <include>imapd_rules.xml</include>
    <include>mailscanner_rules.xml</include>
    <include>dovecot_rules.xml</include>
    <include>ms-exchange_rules.xml</include>
    <include>racoon_rules.xml</include>
    <include>vpn_concentrator_rules.xml</include>
    <include>spamd_rules.xml</include>
    <include>msauth_rules.xml</include>
    <include>mcafee_av_rules.xml</include>
    <include>trend-osce_rules.xml</include>
    <include>ms-se_rules.xml</include>
    <!-- <include>policy_rules.xml</include> -->
    <include>zeus_rules.xml</include>
    <include>solaris_bsm_rules.xml</include>
    <include>vmware_rules.xml</include>
    <include>ms_dhcp_rules.xml</include>
    <include>asterisk_rules.xml</include>
    <include>ossec_rules.xml</include>
    <include>attack_rules.xml</include>
    <include>openbsd_rules.xml</include>
    <include>clam_av_rules.xml</include>
    <include>bro-ids_rules.xml</include>
    <include>dropbear_rules.xml</include>
    <include>local_rules.xml</include>
  </rules>
</ossec_config>  <!-- rules global entry -->

dan (ddp)

unread,
Apr 7, 2012, 7:12:57 PM4/7/12
to ossec...@googlegroups.com

Where is firewall-drop defined?

Qasim Ijaz

unread,
Apr 7, 2012, 10:50:57 PM4/7/12
to ossec-list
I see a firewall-drop.sh in ossec directy. Do I need to do something
else?

On Apr 7, 7:12 pm, "dan (ddp)" <ddp...@gmail.com> wrote:
> Where is firewall-drop defined?

dan (ddp)

unread,
Apr 7, 2012, 11:40:44 PM4/7/12
to ossec...@googlegroups.com

Yes, you need to define the command in the ossec.conf.

Qasim Ijaz

unread,
Apr 8, 2012, 6:57:38 PM4/8/12
to ossec-list
I will give it a try and will let you know how it goes. Thanks.

On Apr 7, 11:40 pm, "dan (ddp)" <ddp...@gmail.com> wrote:
> Yes, you need to define the command in the ossec.conf.

Qasim Ijaz

unread,
Apr 9, 2012, 10:41:19 AM4/9/12
to ossec-list
Okay guys, this is what I got. I"m still have problems. I have defined
commands in ossec.conf
<command>
<name>host-deny</name>
<executable>host-deny.sh</executable>
<expect>srcip</expect>
<timeout_allowed>yes</timeout_allowed>
</command>

<command>
<name>firewall-drop</name>
<executable>firewall-drop.sh</executable>
<expect>srcip</expect>
<timeout_allowed>yes</timeout_allowed>
</command>

<command>
<name>disable-account</name>
<executable>disable-account.sh</executable>
<expect>user</expect>
<timeout_allowed>yes</timeout_allowed>
</command>


<active-response>
<disabled>no</disabled>
</active-response>

<!-- Active Response Config -->
<active-response>
<!-- This response is going to execute the host-deny
- command for every event that fires a rule with
- level (severity) >= 7.
- The IP is going to be blocked for 600 seconds.
-->
<command>host-deny</command>
<location>local</location>
<level>7</level>
<timeout>600</timeout>
</active-response>

<active-response>
<!-- Firewall Drop response. Block the IP for
- 600 seconds on the firewall (iptables,
- ipfilter, etc).
-->
<command>firewall-drop</command>
<location>local</location>
<level>7</level>
<timeout>600</timeout>
</active-response>

<remote>
<connection>syslog</connection>
</remote>

<remote>
<connection>secure</connection>
</remote>

<alerts>
<log_alert_level>1</log_alert_level>
<email_alert_level>7</email_alert_level>
</alerts>

<!-- Files to monitor (localfiles) -->

<localfile>
<log_format>syslog</log_format>
<location>/var/log/messages</location>
#monitoring snort spooker
</localfile>
<localfile>
<log_format>syslog</log_format>
<location>/var/log/snort-spooker.log</location>
<localfile>
<log_format>syslog</log_format>
<location>/var/log/snort-spooker.log</location>

dan (ddp)

unread,
Apr 9, 2012, 11:19:10 AM4/9/12
to ossec...@googlegroups.com

What problems are you having with this config?

Qasim Ijaz

unread,
Apr 9, 2012, 11:28:50 AM4/9/12
to ossec-list
I get following
error upon ossec restart:
ossec-config(1281) : ERROR: Missing options in the active response
configuration
ossec-config(1202) : ERROR: Configuration error at '/var/ossec/etc/
ossec.conf'. Exiting.
ossec-analysisd(1202): ERROR Configuration error at '/var/ossec/etc/
ossec.conf'. Exiting

On Apr 9, 11:19 am, "dan (ddp)" <ddp...@gmail.com> wrote:
> What problems are you having with this config?

dan (ddp)

unread,
Apr 9, 2012, 5:00:47 PM4/9/12
to ossec...@googlegroups.com
Commenting out the following seems to have fixed it for me.

<active-response>
<disabled>no</disabled>
</active-response>

Qasim Ijaz

unread,
Apr 11, 2012, 12:44:43 PM4/11/12
to ossec...@googlegroups.com
Thanks Dan. I am not getting the error anymore. However, 7 failed ssh login attempts didn't put me in hosts.deny list.
Reply all
Reply to author
Forward
0 new messages