{"id":272,"date":"2007-05-29T03:20:00","date_gmt":"2007-05-29T03:20:00","guid":{"rendered":"https:\/\/defragged.org\/ossec\/?p=272"},"modified":"2020-07-03T03:22:03","modified_gmt":"2020-07-03T03:22:03","slug":"log-analysis-using-snort","status":"publish","type":"post","link":"https:\/\/defragged.org\/ossec\/2007\/05\/log-analysis-using-snort\/","title":{"rendered":"Log analysis using Snort?"},"content":{"rendered":"\n<p>In the&nbsp;<a href=\"http:\/\/www.snort.org\/\">snort<\/a>&nbsp;mailing list there was a thread about detecting authentication failures (on ssh, apache, ftp, etc) using Snort. I love Snort, but using a NIDS (Network-Based IDS) for this kind of stuff is trying to use the right tool for the wrong reasons (yes, we could even write a syslog parser using it).<\/p>\n\n\n\n<p>That\u2019s why we need&nbsp;<strong>LIDS<\/strong>&nbsp;(<em>Log-based Intrusion detection<\/em>). Check out my reply&nbsp;<a href=\"http:\/\/marc.info\/?l=snort-users&amp;m=117993072023222&amp;w=2\">to this thread<\/a>:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>That\u2019s what I would call using the right tool for the wrong reasons (or something like that).<\/p><p>The provided sshd signature does not detect brute force attacks, but multiple connections from the same<br>source ip (failed or not). The HTTP signature can easily generate false positivies since you are just<br>looking for the content \u201c404\u2033, and it would not work with SSL\u2026<\/p><p>My point is: why not use log analysis to detect failed logins (and brute force attacks)? Both sshd, apache,<br>apache-ssl, ftp, telnet, etc ,etc log every failed login attempt (and every successful login attempt)?<\/p><p>By using log analysis you can reliably detect every failure and you don\u2019t need to worry about encrypted<br>traffic. Plus, you can do more useful stuff, like detecting multiple failed login attempts followed<br>by a success (successful brute force attack) and monitoring every successful login to your systems.<\/p><p>I wrote a paper while back with some patterns that we can look in authentication logs:<\/p><p>http:\/\/www.ossec.net\/en\/loganalysis.html<\/p><p>And if you are looking for an open source tool to monitor all your logs (from Apache to sshd, proftpd,<br>Windows logs, etc, etc), with the ability to execute active responses based on them (blocking ips,<br>disabling users, etc), you can try ossec*:<\/p><p><blockquote class=\"wp-embedded-content\" data-secret=\"CNOtsELcun\"><a href=\"https:\/\/www.ossec.net\/\">Home<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Home&#8221; &#8212; OSSEC\" src=\"https:\/\/www.ossec.net\/embed\/#?secret=CNOtsELcun\" data-secret=\"CNOtsELcun\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p><p>http:\/\/www.ossec.net\/wiki\/index.php\/FAQ<\/p><p>*note that I am the author of this tool.<\/p><p>hope it helps.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>In the&nbsp;snort&nbsp;mailing list there was a thread about detecting authentication failures (on ssh, apache, ftp, etc) using Snort. I love Snort, but using a NIDS (Network-Based IDS) for this kind of stuff is trying to use the right tool for the wrong reasons (yes, we could even write a syslog parser using it). That\u2019s why [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[9],"_links":{"self":[{"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/posts\/272"}],"collection":[{"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/comments?post=272"}],"version-history":[{"count":1,"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/posts\/272\/revisions"}],"predecessor-version":[{"id":273,"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/posts\/272\/revisions\/273"}],"wp:attachment":[{"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/media?parent=272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/categories?post=272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/tags?post=272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}