store | blogs | forums | twitter | facebook | wiki | mailing lists | downloads | support portal
Atomic Secure Linux
It is currently Wed May 22, 2013 9:03 pm

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic Share/Bookmark  [ 77 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Re: Listening ports status has changed
Unread postPosted: Fri Jun 29, 2012 3:11 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
User avatar

Joined: Thu Feb 07, 2008 7:49 pm
Posts: 3245
Location: Chantilly, VA
Thanks, we've got enough data from .27 builds. We've changed the system completely in .28 and it works differently now. If you want to try .28 its in testing now:

yum --enablerepo=asl-3.0-testing upgrade asl asl-web asl-waf-module

And you'll need to download the new ossec rules for this:

https://www.atomicorp.com/mike/50_asl_ossec_rules.xml

And put them in this directory:

/var/ossec/etc/rules.d/

Then restart ossec:

/etc/init.d/ossec-hids restart

The system will now report the application thats listening (which is what we really need), will ignore rpc, java, ldap and other services that dont reveal what process is holding the port open (and other services hidden by the kernel by portreserve), and will ignore the destination.

Thats the only change in .28 as of right now, so if you want to try it it shouldn't change anything else. Typical caveats apply, this is a testing build and has not been fully tested, so you should try it out on a test box first.

If you get a false positive from .28, please tar up your /var/ossec/queue/diff/<servername>/<integer> directory. We need that information to debug these.

_________________
Michael Shinn
Atomicorp - Security For Everyone

Co-Author of Troubleshooting Linux Firewalls.


Top
 Profile  
 
 Post subject: Re: Listening ports status has changed
Unread postPosted: Tue Jul 03, 2012 4:51 pm 
Offline
Forum Regular
Forum Regular

Joined: Tue Nov 23, 2010 7:30 am
Posts: 247
Location: Glasgow, UK
Updated to the stable .28 release and still getting alerts - the report does show a new "process" column though, so I'm presuming the update has came through OK.

Sending the report data now...


Top
 Profile  
 
 Post subject: Re: Listening ports status has changed
Unread postPosted: Tue Jul 03, 2012 5:52 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
User avatar

Joined: Thu Feb 07, 2008 7:49 pm
Posts: 3245
Location: Chantilly, VA
You might be missing the updated OSSEC rules that go along with this release, so just run "asl -u" again.

OSSEC should restart on this, but just in case, do a force on it with this:

asl -s -f

/etc/init.d/ossec-hids

The command is totally different now, we dont use netstat anymore. So if you see an output like this:

ossec: output: 'netstat -nltp | grep LISTEN | egrep -v "127.0.0.1|\[1-9][0-9][0-9][0-9].*(ftp|-)" | awk -f /var/asl/lib/ports.awk':

You're missing the new rules. Just run "asl -u" to make sure your rules are up to date, and rekick ossec to make sure its using the right config.

What you should see is this:

ossec: output: '/var/asl/bin/asl-port-check':

_________________
Michael Shinn
Atomicorp - Security For Everyone

Co-Author of Troubleshooting Linux Firewalls.


Top
 Profile  
 
 Post subject: Re: Listening ports status has changed
Unread postPosted: Wed Jul 04, 2012 3:51 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Nov 23, 2010 7:30 am
Posts: 247
Location: Glasgow, UK
Thanks - was a partial upgrade then.

Got the processes listed now.

Time to investigate them...


Top
 Profile  
 
 Post subject: Re: Listening ports status has changed
Unread postPosted: Thu Jul 05, 2012 2:20 pm 
Offline
Forum Regular
Forum Regular

Joined: Tue Jul 15, 2008 2:38 pm
Posts: 704
Location: Sweden
The problem is back. i updated to the newest version this morning, and now I get notications a few times an hour again.

Code:
OSSEC HIDS Notification.
2012 Jul 05 17:33:27

Received From: server7->/var/asl/bin/asl-port-check
Rule: 533 fired (level 7) -> "(null)"
Portion of the log(s):

ossec: output: '/var/asl/bin/asl-port-check':
Protocol    IP:port            Process Name
tcp        0.0.0.0:8443            httpsd
tcp        0.0.0.0:443            httpd
tcp        0.0.0.0:8445            tortixd
tcp        0.0.0.0:993            couriertcpd
tcp        0.0.0.0:10050            zabbix_agentd
tcp        0.0.0.0:3306            mysqld
tcp        0.0.0.0:106            xinetd
tcp        0.0.0.0:587            xinetd
tcp        0.0.0.0:110            couriertcpd
tcp        0.0.0.0:143            couriertcpd
tcp        0.0.0.0:30000            tortixd
tcp        0.0.0.0:8880            httpsd
tcp        0.0.0.0:80            httpd
tcp        0.0.0.0:465            xinetd
tcp        0.0.0.0:21            xinetd
tcp        0.0.0.0:22            sshd
tcp        0.0.0.0:25            xinetd
Previous output:



--END OF NOTIFICATION


Top
 Profile  
 
 Post subject: Re: Listening ports status has changed
Unread postPosted: Thu Jul 05, 2012 2:32 pm 
Offline
Forum Regular
Forum Regular

Joined: Tue Nov 23, 2010 7:30 am
Posts: 247
Location: Glasgow, UK
Sorry, I should have posted too... I'm getting plenty of notifications now and I have submitted a report.

On mine, port 30000 keeps changing process from tortixd to others (sudo being one I can remember).

Anyone else got the same?


Top
 Profile  
 
 Post subject: Re: Listening ports status has changed
Unread postPosted: Thu Jul 05, 2012 4:30 pm 
Offline
Forum Regular
Forum Regular

Joined: Tue Jul 15, 2008 2:38 pm
Posts: 704
Location: Sweden
Here is my yum.log:

Code:
Jul 03 20:58:35 Updated: 1:asl-3.0.28-1.el5.art.i386
Jul 03 20:58:36 Updated: 1:asl-waf-module-3.0.28-1.el5.art.i386
Jul 03 20:58:38 Updated: 1:asl-web-3.0.28-1.el5.art.i386
Jul 05 11:03:07 Updated: 1:asl-3.0.28-3.el5.art.i386
Jul 05 11:03:07 Updated: 1:asl-waf-module-3.0.28-3.el5.art.i386
Jul 05 11:03:09 Updated: 1:asl-web-3.0.28-3.el5.art.i386


After the 3.0.28-1 update the notifications disappeared. With the 3.0.28-3 update they came back...


Top
 Profile  
 
 Post subject: Re: Listening ports status has changed
Unread postPosted: Thu Jul 05, 2012 7:22 pm 
Offline
Forum Regular
Forum Regular

Joined: Sat Dec 11, 2004 2:33 pm
Posts: 195
Location: South Africa
On my PLESK 10.4.4 server, I have enabled ID 533
Have not had any notifications for the past couple of days.

asl -v
ASL Version 3.0.28-3.el6.art: CentOS 6 (SUPPORTED)

On my new PLESK 11.0.9 #3 I have received a few
5 were 2 odd minutes apart and then a couple of hours 2:49 & 17:46
Those were the last two i have seen.

asl -v
ASL Version 3.0.28-3.el6.art: CentOS 6 (SUPPORTED)

Code:
ossec: output: `/var/asl/bin/asl-port-check`:
Protocol IP:port Process Name
tcp 0.0.0.0:3306 mysqld
tcp 197.221.32.35:80 nginx
tcp 197.221.32.34:80 nginx
tcp 0.0.0.0:9022 sshd
tcp :::993 couriertcpd
tcp :::995 couriertcpd
tcp :::7080 httpd
tcp :::7081 httpd
tcp :::106 xinetd
tcp :::110 couriertcpd
tcp :::143 couriertcpd
tcp :::30000 tortixd
tcp :::465 xinetd
tcp :::53 named
tcp :::21 xinetd
tcp :::25 xinetd
tcp :::9022 sshd
Previous output:

_________________
Mark Brindley
2Large Networks - Web solutions that work


Top
 Profile  
 
 Post subject: Re: Listening ports status has changed
Unread postPosted: Fri Jul 06, 2012 4:16 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
User avatar

Joined: Thu Feb 07, 2008 7:49 pm
Posts: 3245
Location: Chantilly, VA
A new update is a available to ASL. Please install it and see if that resolves this for you.

If after installing the newest ASL (3.0.28-4) if you experience a false positive please do not post the OSSEC alert (that will not help us to help you), instead what we need is the contents (the actual files, not a listing of the files) of this directory:

/var/ossec/queue/diff/<yourservername>/<integer>

For example:

/var/ossec/queue/diff/www/533/

_________________
Michael Shinn
Atomicorp - Security For Everyone

Co-Author of Troubleshooting Linux Firewalls.


Top
 Profile  
 
 Post subject: Re: Listening ports status has changed
Unread postPosted: Fri Jul 06, 2012 5:46 pm 
Offline
Forum Regular
Forum Regular

Joined: Sat Dec 11, 2004 2:33 pm
Posts: 195
Location: South Africa
@mikeshinn - Thanks I have installed the latest version, will report back in a few hours.

_________________
Mark Brindley
2Large Networks - Web solutions that work


Top
 Profile  
 
 Post subject: Re: Listening ports status has changed
Unread postPosted: Fri Jul 06, 2012 8:01 pm 
Offline
Forum Regular
Forum Regular

Joined: Sat Dec 11, 2004 2:33 pm
Posts: 195
Location: South Africa
@mikeshinn,

Here are the last three from /var/ossec/queue/diff/sa5/533/ as requested.

-rw-r----- 1 ossec ossec 446 Jul 6 23:18 state.1341609531
ossec: output: '/var/asl/bin/asl-port-check':
Protocol IP:port Process Name
tcp 0.0.0.0:3306 mysqld
tcp 197.221.32.35:80 nginx
tcp 197.221.32.34:80 nginx
tcp 197.221.32.34:443 nginx
tcp 0.0.0.0:9022 sshd
tcp :::993 couriertcpd
tcp :::995 couriertcpd
tcp :::106 xinetd
tcp :::110 couriertcpd
tcp :::143 couriertcpd
tcp :::465 xinetd
tcp :::53 named
tcp :::21 xinetd
tcp :::25 xinetd
tcp :::9022 sshd^@

-rw-r----- 1 ossec ossec 488 Jul 6 23:18 state.1341609539
ossec: output: '/var/asl/bin/asl-port-check':
Protocol IP:port Process Name
tcp 0.0.0.0:3306 mysqld
tcp 197.221.32.35:80 nginx
tcp 197.221.32.34:80 nginx
tcp 197.221.32.34:443 nginx
tcp 0.0.0.0:9022 sshd
tcp :::993 couriertcpd
tcp :::995 couriertcpd
tcp :::7080 httpd
tcp :::7081 httpd
tcp :::106 xinetd
tcp :::110 couriertcpd
tcp :::143 couriertcpd
tcp :::465 xinetd
tcp :::53 named
tcp :::21 xinetd
tcp :::25 xinetd
tcp :::9022 sshd^@

-rw-r----- 1 ossec ossec 514 Jul 7 01:34 state.1341617655
ossec: output: '/var/asl/bin/asl-port-check':
Protocol IP:port Process Name
tcp 0.0.0.0:1763 clamd
tcp 0.0.0.0:3306 mysqld
tcp 197.221.32.35:80 nginx
tcp 197.221.32.34:80 nginx
tcp 197.221.32.34:443 nginx
tcp 0.0.0.0:9022 sshd
tcp :::993 couriertcpd
tcp :::995 couriertcpd
tcp :::7080 httpd
tcp :::7081 httpd
tcp :::106 xinetd
tcp :::110 couriertcpd
tcp :::143 couriertcpd
tcp :::465 xinetd
tcp :::53 named
tcp :::21 xinetd
tcp :::25 xinetd

_________________
Mark Brindley
2Large Networks - Web solutions that work


Top
 Profile  
 
 Post subject: Re: Listening ports status has changed
Unread postPosted: Sat Jul 07, 2012 4:07 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Nov 23, 2010 7:30 am
Posts: 247
Location: Glasgow, UK
Updated to -4 and still showing alerts.

Will create a new report on the portal.


Top
 Profile  
 
 Post subject: Re: Listening ports status has changed
Unread postPosted: Sat Jul 07, 2012 8:24 am 
Offline
Forum Regular
Forum Regular

Joined: Sat Dec 11, 2004 2:33 pm
Posts: 195
Location: South Africa
Update -

I have not had any notices in the logs over the last 12 hours.

_________________
Mark Brindley
2Large Networks - Web solutions that work


Top
 Profile  
 
 Post subject: Re: Listening ports status has changed
Unread postPosted: Mon Jul 09, 2012 6:58 pm 
Offline
Forum Regular
Forum Regular

Joined: Sat Dec 11, 2004 2:33 pm
Posts: 195
Location: South Africa
kram wrote:
Update -

I have not had any notices in the logs over the last 12 hours.


Oops, they are back @ 2 + 10 min intervils

_________________
Mark Brindley
2Large Networks - Web solutions that work


Top
 Profile  
 
 Post subject: Re: Listening ports status has changed
Unread postPosted: Tue Jul 10, 2012 1:57 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Jul 15, 2008 2:38 pm
Posts: 704
Location: Sweden
I'm getting several every hour. I'm starting to think this check was released into production too quickly.


Last edited by biggles on Tue Jul 10, 2012 2:43 pm, edited 1 time in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic Share/Bookmark  [ 77 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group