LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
LinkBack Search this Thread
Old 03-08-2010, 04:57 AM   #1
jarvis823
LQ Newbie
 
Registered: Mar 2010
Distribution: Centos, Ubuntu, Debian
Posts: 5

Rep: Reputation: 0
Snort issue


Hi all,

http://ilikewordpress.com/278/cleani...hacker-attack/
I would like to know whether snort can log such attack.
It seems most of attack of web application are using base64 encode and most of scanner can not detect it. It would be great if snort or any rule set can solve this issue.

Any reply are appreciated.

Thanks,
Frankie
 
Old 03-08-2010, 02:33 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 21,576
Blog Entries: 47

Rep: Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402
Sure Snort can handle encoding. Just list a Base64 string like 'content:"8FI0MxBcdcOwU0QzEFL0MwBXBDMQWsS2wFIkMxBcdcOgUqQz";' (Netsky: SID 2001283). However the attack isn't in Base64. That's just planted there for decoding Javascript. Look for other entry points. Start with your WP version. IDS deployment comes with a performance penalty. Not all tools suit all situations. Stacking tools covers risks best. So I wonder if Snort on its own would be such a good idea: 0) there must have been a vulnerability in WP or an installation or administration failure to begin with which should have been fixed timely, 1) you could have gotten your "early warning" well in advance by using say Logwatch for reading logs and reporting (it would have shown the probes resulting in 40[0-9]s), 2) the Snort rule sets need tweaking, 3) and Snort is "just" one class of IDS. While not IDS solutions in your case hashing and checking hashes files could show changes ('sha1deep -r /var/www/html'), as could checking your database for '%<(iframe|noscript|display)%', iptables could help limit traffic ('iptables -m recent') and mod_security could help detect other web stack probing and attacks.
 
1 members found this post helpful.
Old 03-09-2010, 03:14 AM   #3
jarvis823
LQ Newbie
 
Registered: Mar 2010
Distribution: Centos, Ubuntu, Debian
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by unSpawn View Post
Sure Snort can handle encoding. Just list a Base64 string like 'content:"8FI0MxBcdcOwU0QzEFL0MwBXBDMQWsS2wFIkMxBcdcOgUqQz";' (Netsky: SID 2001283). However the attack isn't in Base64. That's just planted there for decoding Javascript. Look for other entry points. Start with your WP version. IDS deployment comes with a performance penalty. Not all tools suit all situations. Stacking tools covers risks best. So I wonder if Snort on its own would be such a good idea: 0) there must have been a vulnerability in WP or an installation or administration failure to begin with which should have been fixed timely, 1) you could have gotten your "early warning" well in advance by using say Logwatch for reading logs and reporting (it would have shown the probes resulting in 40[0-9]s), 2) the Snort rule sets need tweaking, 3) and Snort is "just" one class of IDS. While not IDS solutions in your case hashing and checking hashes files could show changes ('sha1deep -r /var/www/html'), as could checking your database for '%<(iframe|noscript|display)%', iptables could help limit traffic ('iptables -m recent') and mod_security could help detect other web stack probing and attacks.
Thank You for your reply.
However in my case, we have quite a number of web server and each of them has around 300 virtual hosting on it, it is difficult to use sw like tripwire or checksum for the file integrity and file may change often since client may upload some files. Besides wordpress, some of clients are using osc and joolma and client's default behavior is change to 777 permission and it leads many injection or attack on it.
our web server has mod_sec running, however in the base64 decode attack, mod_sec can not detect it.
We are planning to have some IDS to protect our web server, but can snort can detect these attack with random pattern like the above base64 attack?
Do snort has some rule set specially for osc, wp and joolma?
We are also consider for the web application firewall, are there any brand name are reliable?

Thanks,
Frankie
 
Old 03-09-2010, 10:06 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 21,576
Blog Entries: 47

Rep: Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402
Quote:
Originally Posted by jarvis823 View Post
However in my case, we have quite a number of web server and each of them has around 300 virtual hosting on it,
Thanks for pointing that out in your original post...


Quote:
Originally Posted by jarvis823 View Post
it is difficult to use sw like tripwire or checksum for the file integrity
Make it the responsibility of and mandatory for your clients to deploy and use something along those lines? Like the WP plug-in for checking default installation file hashes there's a similar thing for Joomla.


Quote:
Originally Posted by jarvis823 View Post
client's default behavior is change to 777 permission and it leads many injection or attack on it.
That means some of your clients lack the knowledge to admin a web stack properly. You'll have to invest time and teach them.


Quote:
Originally Posted by jarvis823 View Post
our web server has mod_sec running, however in the base64 decode attack, mod_sec can not detect it. We are planning to have some IDS to protect our web server, but can snort can detect these attack with random pattern like the above base64 attack?
Like I told you before this is not, I repeat NOT, a "base64 attack".


Quote:
Originally Posted by jarvis823 View Post
Do snort has some rule set specially for osc, wp and joolma?
Not that I'm aware of.


Quote:
Originally Posted by jarvis823 View Post
We are also consider for the web application firewall, are there any brand name are reliable?
I don't know. Best start at http://www.owasp.org/index.php/Web_Application_Firewall.
 
Old 03-09-2010, 10:46 AM   #5
Jim Bengtson
Member
 
Registered: Feb 2009
Location: Iowa
Distribution: Ubuntu 9.10
Posts: 164

Rep: Reputation: 38
Is there some way to have your HTTP server evaluate the input URI before it acts on that URI? If you could tell it to always strip out certain characters, like %7B (ASCII for "{"), so that attacks of this nature would fail? Surely there's something in PHP ("HyperText PreProcessor" has to mean something) that would do the job...
 
Old 03-09-2010, 10:27 PM   #6
retired1af
LQ Newbie
 
Registered: Mar 2005
Distribution: VectorLinux 6 Standard
Posts: 8

Rep: Reputation: 0
I use CSF and mod_security and they work quite well together. Both are extremely configurable, and so far, it's worked very well for us.
 
Old 03-16-2010, 07:19 PM   #7
unixfool
Member
 
Registered: May 2005
Location: Northern VA
Distribution: Slackware, FreeBSD, OpenBSD, Mac OS X , Backtrack, Ubuntu on a Dell Mini 9
Posts: 780
Blog Entries: 8

Rep: Reputation: 155Reputation: 155
Yeah, I second mod_security. It will see and block such activity if that is what you want. Note that mod_security isn't something you can install in one day. It requires some time to set up and tune. It may well block legitimate traffic out-of-the-box, but even IPSs run into this issue.

You can also use Snort inline but I believe mod_security is the better tool. With Snort, it is trivial to customize your own rules to detect this type of traffic (it is easier to create rules in Snort than it is with mod_scurity, IMO).
 
Old 03-16-2010, 09:19 PM   #8
retired1af
LQ Newbie
 
Registered: Mar 2005
Distribution: VectorLinux 6 Standard
Posts: 8

Rep: Reputation: 0
Quote:
Originally Posted by unixfool View Post
Yeah, I second mod_security. It will see and block such activity if that is what you want. Note that mod_security isn't something you can install in one day. It requires some time to set up and tune. It may well block legitimate traffic out-of-the-box, but even IPSs run into this issue.

You can also use Snort inline but I believe mod_security is the better tool. With Snort, it is trivial to customize your own rules to detect this type of traffic (it is easier to create rules in Snort than it is with mod_scurity, IMO).
Ugh.. Tell me about it. I've been running it for about 6 months now, and I still have to go in and fine tune every now and then. Lately, I've been having issues when someone tosses up a new proxy server and doesn't have it playing nicely with the rest of the Internet.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snort] Understanding Snort Rules Fracker Linux - Security 3 04-13-2009 09:34 AM
[HELP]SNORT PROBLEMS(IDS)-service snort start JayCool Linux - Software 5 03-15-2009 12:34 PM
Snort - no portscan and tcp alerts in snort av.dubey Linux - Software 6 07-11-2008 09:56 PM
snort logs issue rajat83 Linux - Server 3 04-21-2008 04:36 AM
Error when starting up snort: bash:!/bin/sh/usr/local/bin/snort :Eent not found cynthia_thomas Linux - Software 1 11-11-2005 02:59 PM


All times are GMT -5. The time now is 02:04 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration