You Are Here : Forums Friday, November 21, 2008
     
Activeworx.org Forums
 
  Forum  IDS Policy Mana...  IDS Policy Mana...  Rules update fails without any error
Previous Previous
 
Next Next
New Post 7/11/2008 3:48 PM
Resolved
  Jeremy
3 posts
No Ranking


Rules update fails without any error 

I've installed IDS PM ver. 2.2.0.23 on my MS XP Professional SP2 and I'm trying to manage a Snort sensor ver. 2.4.3 (Build 26) on a FreeBSD 6.0 enviroment. I've already :

- set the authentication parameters correctly as the connection test goes fine

- set the $RULE_PATH and the upload settings properly

but when I try to upload a policy it seems to fail as I don't see any change on the rules directory. From the following log I cannot see anything helpful.

Am I missing something? Has anyone had the SAME problem?Is there a way to enable a DEBUG feature to see what's the SFTP client doing (it seems to me that IDS PM fails to find the policy directory on my Windows machine...)?

Regards,

Jeremy

-----------------------------------------------------------------------------------------------------------------

Policy Log
----------

Gathering Information: Started
Gathering Information: Complete
Build Policy from Database: Started
Build Policy from Database: Complete

Upload Log
----------

Connect to Sensor: Started
Connect to Sensor: Complete
Uploading to Sensor Snort SGUIl FreeBSD using sftp.

Done Uploading to Sensor Snort SGUIl FreeBSD.

Restart Log
-----------

 
New Post 7/15/2008 1:45 PM
  Jeff Dell
237 posts
www.activeworx.com
1st Level Poster


Re: Rules update fails without any error 

I would make sure you have fast unchecked in the "Upload Policies to Servers" form when uploading a policy where you want to push every file. Fast upload means it doesn't upload policy files that have not changed. if you uploaded a file before.. it won't upload again until you uncheck this or change a rule in the group.

Once this is done the log file will show details of every file being uploaded and where it is being uploaded to.

 

Cheers,

Jeff

 
New Post 8/3/2008 3:26 PM
  Jeremy
3 posts
No Ranking


Re: Rules update fails without any error 

Thanks for the tip Jeff. I've tried what you said but nothing has changed. The log doesn't specify any file and most of all any signature is uploaded to the sensor's filesystem. Anyway the connection testing goes fine.

Is there a way to do a deeper troubleshoot in order to know what's happening?

Regards,

Jeremy

 
New Post 8/5/2008 8:33 PM
Accepted Answer 
  Ray
59 posts
6th Level Poster


Re: Rules update fails without any error 

Here are the instructions I wrote for configuring IDSPM to upload rules to a Red Hat ES sensor. Maybe they will help. Snort runs under the "snort" account, which is added into sudoers as allowed to restart the Snort daemon.

 

 

visudo

 

Comment out this line:

 

Default requiretty

 

Add this line:

 

%snort          ALL=(ALL)       NOPASSWD: /etc/init.d/snortd

 

HTH,

 

Ray

 

 

  • Change var RULE_PATH ../rules to var RULE_PATH rules

 

    • Although changing it to just rules doesn’t look right, this is correct when Activeworx’s IDS Policy Manager v2.2 is being used. If this variable is not set this way, IDSPM will put the snort.conf file into the rules folder.

 

Configuring Activeworx’s IDS Policy Manager v2.2

 

·        Copy the snort.conf file from /etc/snort and all of the files in the /etc/snort/rules folder into a single folder on your desktop. IDSPM will build the policy from these files.

 

Note: IDS Policy Manager is one-way only. Any manual changes you make on the Snort sensor will get overwritten on the next policy update from IDSPM.

 

·        Right-click on Snort Policies and click on Add Policy.

 

o       Policy Settings tab

o       Give it a name, usually the same name as the sensor, and a description.

o       Select the version of Snort and check Initialize Policy

 

o       Update Locations tab

o       Click the green + button

o       Click somewhere in the blank Update Location Name field. It will bring up a drop-down and you can select where we will be downloading the rules from. You can add multiple locations, such as Snort 2.8 and Emerging Threats.

o       Click OK

 

o       An Initialize Policy dialog box will appear. We want to initialize it from the desktop folder created previously, the one that holds the snort.conf file and all of the rules.

 

§         Click the Local File tab and the Browse button. Browse to the desktop folder and click on the snort.conf file.

 

§         Click Open and Start. This can take several few minutes.

 

o       After the policy is initialized, collapse the Snort Policies section and re-expand it if the new policy is not visible in the left pane.

 

o       Click on the Snort Policies and then right-click in the right-hand frame.

 

o       Click on Update Policies and check the policy you just added. Click Start and it will download the newest rules from the selected location.

 

o       After it completes, review the downloaded rules as needed.

 

·        If you imported Emerging Threats rules, go into Snort Policies - <sensor name> - Rule Groups and disable every rule that starts with bleeding and has BLOCK as part of its name.

 

If you don’t do this, the Snort sensor will fail to restart due to fwsam not being set up. You can select all rules with shift-click and you should disable them in all policies if you know fwsam is not being used at all.

 

·        In the Variables section, delete any extra HOME_NET or other duplicate variables.

 

·        Right-click on Snort Sensors and click Add. Add its name and a description.

 

o       Sensor Settings tab

o       Sensor Host = IP address

o       Sensor ID = Select the same as the Sensor name

o       Policy = the policy you just imported

o       Group = not used

o       Location = as appropriate

o       Snort Version = Select or type the entire version number

 

o       Upload Settings tab

o       Upload Protocol = SFTP port 22

o       Upload Directory = /etc/snort

o       Configuration File = snort.conf

o       Test Connectivity Command = uname –a;id (pre-filled in)

o        Use Compression – unchecked

 


o       Authentication tab

o       Username = snort

o       Authentication Mode = Password

o       (Enter the password twice)

 

o       Proxy Settings tab

o       Proxy Type = Disabled

 

o       Variables tab

o       (no changes needed)

 

o       Restart Settings tab

o       Restart after Upload = checked

o       Restart Method = Script via SSH

o       Script = sudo /etc/init.d/snortd restart

o       Click OK

 

 

After you install or update the policy on a sensor, you should SSH to it, su -l and run pidof snort to make sure it is running.

 
New Post 8/19/2008 6:53 PM
  Jeremy
3 posts
No Ranking


Re: Rules update fails without any error 

Hi Ray,

thanks a lot for the istructions. I've installed the snort sensor on a Red Hat enviroment as you suggested and the policy updating worked fine, but  I still don't know what is the matter with the Ubuntu and the FreeBSD enviroment but I'm trying to find it out.

Best regards,

Jeremy

 
New Post 8/25/2008 4:32 PM
  Ray
59 posts
6th Level Poster


Re: Rules update fails without any error 

Thanks for the follow-up. I'm glad it helped. Please report back if you do figure it out as I'm sure someone else will run into the same proble sooner or later.

 

Take care,

 

Ray

 
Previous Previous
 
Next Next
  Forum  IDS Policy Mana...  IDS Policy Mana...  Rules update fails without any error
 
 
Copyright 2000-2007 by Activeworx, Inc.
All trademarks and copyrights on this page are owned by their respective owners.