{"id":142,"date":"2008-11-26T21:53:21","date_gmt":"2008-11-26T21:53:21","guid":{"rendered":"https:\/\/defragged.org\/ossec\/?p=142"},"modified":"2020-07-02T21:54:37","modified_gmt":"2020-07-02T21:54:37","slug":"ossec-reports-v1-7-preview","status":"publish","type":"post","link":"https:\/\/defragged.org\/ossec\/2008\/11\/ossec-reports-v1-7-preview\/","title":{"rendered":"OSSEC Reports (v1.7 preview)"},"content":{"rendered":"\n<p>One of the most asked features in&nbsp;<a href=\"http:\/\/www.ossec.net\/\">OSSEC<\/a>&nbsp;is some kind of built-in reporting mechanism. For v1.7, we plan to have that included and we need some comments and ideas on what kind of features and formats would be most useful.<\/p>\n\n\n\n<p>To get started, we created a standalone reporting tool so we can get the ideas flying. If you want to try it out, download the latest&nbsp;<a href=\"http:\/\/www.ossec.net\/files\/snapshots\/\">snapshot<\/a>&nbsp;and look at the&nbsp;<strong>ossec-reportd<\/strong>&nbsp;tool. Here are some of the reports I am doing:<\/p>\n\n\n\n<p><em>*the html is messing up with the output of the reports, so they will look a bit better in the terminal.<\/em><\/p>\n\n\n\n<h3>1-Show all IP addresses\/users that logged in during the day<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><strong># cat \/var\/ossec\/logs\/alerts\/alerts.log | .\/src\/monitord\/ossec-reportd -n \u201cLogins summary\u201d -f group authentication_success<\/strong><\/p><p>Report \u2018Logins summary\u2019 completed.<br>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>-&gt;Processed alerts: 145557<br>-&gt;Post-filtering alerts: 401<br>-&gt;First alert: ..<br>-&gt;Last alert: ..<\/p><p>Top entries for \u2018Source ip\u2019:<br>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>127.0.0.1 |280 |<br>192.168.2.10 |88 |<br>192.168.2.15 |16 |<br>192.168.2.26 |6 |<br>192.168.2.17 |2 |<\/p><p>Top entries for \u2018Username\u2019:<br>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>dcid |336 |<br>aabbcxx |46 |<br>root |9 |<br>__vmware_user__ |4 |<br>vpxuser |2 |<br>Administrator |1 |<br>lac |1 |<\/p><\/blockquote>\n\n\n\n<h3>2-Show all IP addresses\/users that logged in during the day and related srcips locations for each user<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><strong># cat \/var\/ossec\/logs\/alerts\/alerts.log | .\/src\/monitord\/ossec-reportd -n \u201cLogins summary\u201d -f group authentication_success -r user srcip -r user location<\/strong><\/p><p>Top entries for \u2018Source ip\u2019:<br>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>127.0.0.1 |280 |<br>192.168.2.10 |88 |<br>192.168.2.15 |16 |<br>192.168.2.26 |6 |<br>192.168.2.17 |2 |<\/p><p>Top entries for \u2018Username\u2019:<br>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>dcid |336 |<br>aabbcxx |46 |<br>root |9 |<br>__vmware_user__ |4 |<br>vpxuser |2 |<br>Administrator |1 |<br>lac |1 |<\/p><p>Related entries for \u2018Username\u2019:<br>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>dcid |336 |<br>location: \u2018enigma-&gt;\/var\/log\/authlog\u2019<br>srcip: \u2019192.168.2.15\u2032<br>srcip: \u2019192.168.2.10\u2032<br>srcip: \u2019127.0.0.1\u2032<br>srcip: \u2019192.168.2.17\u2032<br>srcip: \u2019192.168.2.26\u2032<br>aabbcxx |46 |<br>location: \u2018enigma-&gt;\/var\/log\/authlog\u2019<br>srcip: \u2019192.168.2.10\u2032<br>root |9 |<br>location: \u2018enigma-&gt;\/var\/log\/authlog\u2019<br>srcip: \u2019127.0.0.1\u2032<br>srcip: \u2019192.168.2.15\u2032<br>srcip: \u2019192.168.2.26\u2032<br>srcip: \u2018(none)\u2019<br>__vmware_user__ |4 |<br>location: \u2018(lili3win) 192.168.2.0-&gt;WinEvtLog\u2019<br>srcip: \u2018(none)\u2019<br>vpxuser |2 |<br>location: \u2018(vmesx51) any-&gt;\/var\/log\/messages\u2019<br>location: \u2018(vmesx51) any-&gt;\/var\/log\/vmware\/hostd.log\u2019<br>srcip: \u2019127.0.0.1\u2032<br>Administrator |1 |<br>location: \u2018(win2003-tbv4) any-&gt;WinEvtLog\u2019<br>srcip: \u2018(none)\u2019<br>lac |1 |<br>location: \u2018(lili3win) 192.168.2.0-&gt;WinEvtLog\u2019<br>srcip: \u2018(none)\u2019<\/p><\/blockquote>\n\n\n\n<h3>3-Show all multiple authentication failures (brute force attacks)<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>#&nbsp;<strong># cat \/var\/ossec\/logs\/alerts\/alerts.log | .\/src\/monitord\/ossec-reportd -n \u201cFailures summary\u201d -f group authentication_failures<\/strong><\/p><p>Top entries for \u2018Source ip\u2019:<br>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>127.0.0.1 |5 |<br>218.56.61.114 |5 |<br>117.36.192.75 |2 |<br>219.90.103.44 |2 |<br>121.22.8.148 |1 |<br>122.141.177.51 |1 |<br>203.171.227.18 |1 |<br>211.156.250.179 |1 |<br>222.73.0.101 |1 |<br>85.24.137.233 |1 |<\/p><p>Top entries for \u2018Username\u2019:<br>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>root |7 |<br>dcid |5 |<\/p><p>Top entries for \u2018Rule\u2019:<br>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>5720 \u2013 Multiple SSHD authentication failures. |12 |<br>5712 \u2013 SSHD brute force trying to get access.. |8 |<\/p><\/blockquote>\n\n\n\n<h3>4-Show a summary for the month (or day)<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>#&nbsp;<strong># zcat \/var\/ossec\/logs\/alerts\/2008\/Nov\/*.gz | .\/src\/monitord\/ossec-reportd -n \u201cMonth Summary\u201d<\/strong><\/p><p>Report \u2018Month Summary\u2019 completed.<br>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>-&gt;Processed alerts: 274744<br>-&gt;Post-filtering alerts: 274744<br>-&gt;First alert: 2008 Nov 01 00:00:03<br>-&gt;Last alert: 2008 Nov 25 21:00:03<\/p><p>Top entries for \u2018Level\u2019:<br>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>Severity 4 |236552 |<br>Severity 10 |33194 |<br>Severity 3 |2219 |<br>Severity 7 |1649 |<br>Severity 5 |999 |<br>Severity 8 |57 |<br>Severity 6 |42 |<br>Severity 2 |25 |<br>Severity 12 |5 |<br>Severity 9 |2 |<\/p><p>Top entries for \u2018Group\u2019:<br>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>windows |270107 |<br>syslog |2694 |<br>ossec |1798 |<br>syscheck |1624 |<br>pam |1339 |<br>authentication_success |1321 |<br>sshd |953 |<br>errors |378 |<br>system_error |318 |<br>authentication_failed |161 |<br>invalid_login |120 |<br>vmware |117 |<br>recon |42 |<br>authentication_failures |32 |<br>win_authentication_failed |25 |<br>account_changed |24 |<br>stats |17 |<br>time_changed |17 |<br>service_availability |16 |<br>accesslog |10 |<br>web |10 |<br>su |9 |<br>access_control |8 |<br>access_denied |8 |<br>rootcheck |5 |<br>attacks |4 |<br>policy_changed |4 |<br>low_diskspace |3 |<br>sudo |3 |<br>logs_cleared |2 |<br>postgresql_log |1 |<br>system_shutdown |1 |<\/p><p>Top entries for \u2018Location\u2019:<br>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>(lili3win) 192.168.2.0-&gt;WinEvtLog |269806 |<br>(esqueleto2) 192.168.2.99-&gt;\/var\/log\/auth.log |1338 |<br>(lili3win) 192.168.2.0-&gt;syscheck |1301 |<br>enigma-&gt;\/var\/log\/authlog |960 |<br>enigma-&gt;\/var\/log\/messages |321 |<br>(lili3win) 192.168.2.0-&gt;syscheck-registry |281 |<br>(win2003-tbv4) any-&gt;WinEvtLog |279 |<br>(vmesx51) any-&gt;\/var\/log\/vmware\/hostd.log |100 |<br>enigma-&gt;ossec-logcollector |80 |<br>(vmesx51) any-&gt;\/var\/log\/messages |53 |<br>(win2003-tbv3) any-&gt;WinEvtLog |39 |<br>enigma-&gt;ossec-monitord |29 |<br>(win2003-tbv4) any-&gt;syscheck-registry |26 |<br>(esqueleto2) 192.168.2.99-&gt;\/var\/log\/messages |24 |<br>(lili3win) 192.168.2.0-&gt;ossec |22 |<br>(esqueleto2) 192.168.2.99-&gt;ossec-logcollector |15 |<br>(vmesx51) any-&gt;ossec-logcollector |15 |<br>(esqueleto2) 192.168.2.99-&gt;\/var\/log\/syslog |10 |<br>enigma-&gt;\/var\/www\/logs\/access_log |10 |<br>enigma-&gt;syscheck |7 |<br>(win2003-tbv4) any-&gt;syscheck |6 |<br>(vmesx51) any-&gt;\/var\/log\/secure |4 |<br>(vmesx51) any-&gt;ossec |3 |<br>(win2003-tbv4) any-&gt;ossec |3 |<br>(lili3win) 192.168.2.0-&gt;rootcheck |2 |<br>(vmesx51) any-&gt;syscheck |2 |<br>(esqueleto2) 192.168.2.99-&gt;\/var\/log\/postgres.. |1 |<br>(esqueleto2) 192.168.2.99-&gt;ossec |1 |<br>(esqueleto2) 192.168.2.99-&gt;rootcheck |1 |<br>(win2003-tbv3) any-&gt;ossec |1 |<br>(win2003-tbv4) any-&gt;rootcheck |1 |<br>enigma-&gt;\/var\/log\/secure |1 |<br>enigma-&gt;dcid@127.0.0.1-&gt;syscheck |1 |<br>enigma-&gt;rootcheck |1 |<\/p><p>Top entries for \u2018Rule\u2019:<br>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>18105 \u2013 Windows audit failure event. |236165 |<br>18153 \u2013 Multiple Windows audit failure events. |33140 |<br>550 \u2013 Integrity checksum changed. |1484 |<br>5501 \u2013 Login session opened. |666 |<br>5502 \u2013 Login session closed. |666 |<br>5715 \u2013 SSHD authentication success. |580 |<br>18108 \u2013 Failed attempt to perform a privileg.. |354 |<br>18103 \u2013 Windows error event. |318 |<br>1005 \u2013 Syslogd restarted. |313 |<br>5716 \u2013 SSHD authentication failed. |155 |<br>551 \u2013 Integrity checksum changed again (2nd .. |121 |<br>5710 \u2013 Attempt to login using a non-existent.. |119 |<br>591 \u2013 Log file rotated. |110 |<br>19104 \u2013 VMware ESX warning message. |47 |<br>5706 \u2013 SSH insecure connection attempt (scan). |42 |<br>503 \u2013 Ossec agent started. |29 |<br>19110 \u2013 VMWare ESX authentication success. |28 |<br>5704 \u2013 Timeout while logging in (sshd). |28 |<br>1002 \u2013 Unknown problem somewhere in the syst.. |25 |<br>1006 \u2013 Syslogd restarted. |25 |<br>18130 \u2013 Logon Failure \u2013 Unknown user or bad .. |25 |<br>504 \u2013 Ossec agent disconnected. |25 |<br>18111 \u2013 User account changed. |24 |<br>18151 \u2013 Multiple failed attempts to perform .. |19 |<br>552 \u2013 Integrity checksum changed again (3rd .. |19 |<br>11 \u2013 Excessive number of events (above norma.. |17 |<br>18107 \u2013 Windows Logon Success. |17 |<br>18140 \u2013 System time changed. |17 |<br>19112 \u2013 VMWare ESX user login. |17 |<br>5720 \u2013 Multiple SSHD authentication failures. |17 |<br>1004 \u2013 Syslogd exiting (logging stopped). |12 |<br>19120 \u2013 Virtual machine state changed to OFF. |12 |<br>5712 \u2013 SSHD brute force trying to get access.. |12 |<br>31101 \u2013 Web server 400 error code. |10 |<br>5303 \u2013 User successfully changed UID to root. |9 |<br>2503 \u2013 Connection blocked by Tcp Wrappers. |8 |<br>18147 \u2013 Application Installed. |6 |<br>18149 \u2013 Windows User Logoff. |6 |<br>5503 \u2013 User login failed. |6 |<br>18113 \u2013 Windows Audit Policy changed. |4 |<br>19103 \u2013 VMware ESX error message. |4 |<br>40112 \u2013 Multiple authentication failures fol.. |4 |<br>502 \u2013 Ossec server started. |4 |<br>510 \u2013 Host-based anomaly detection event (ro.. |4 |<br>1007 \u2013 File system full. |3 |<br>18152 \u2013 Multiple Windows Logon Failures. |3 |<br>19121 \u2013 Virtual machine being turned ON. |3 |<br>19122 \u2013 Virtual machine state changed to ON. |3 |<br>19150 \u2013 Multiple VMWare ESX warning messages. |3 |<br>18118 \u2013 Windows audit log was cleared. |2 |<br>18119 \u2013 First time this user logged in this .. |2 |<br>18126 \u2013 Remote access login success. |2 |<br>5402 \u2013 Successful sudo to ROOT executed |2 |<br>18109 \u2013 Session reconnected\/disconnected to .. |1 |<br>18117 \u2013 Windows is shutting down. |1 |<br>18146 \u2013 Application Uninstalled. |1 |<br>501 \u2013 New ossec agent connected. |1 |<br>50521 \u2013 Database shutdown messge. |1 |<br>512 \u2013 Windows Audit event. |1 |<br>5403 \u2013 First time user executed sudo. |1 |<br>5504 \u2013 Attempt to login with an invalid user. |1 |<\/p><\/blockquote>\n\n\n\n<p>Comments and suggestions are welcome. We plan to make it a part of monitord to be able to do daily or hourly reports for certain options.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the most asked features in&nbsp;OSSEC&nbsp;is some kind of built-in reporting mechanism. For v1.7, we plan to have that included and we need some comments and ideas on what kind of features and formats would be most useful. To get started, we created a standalone reporting tool so we can get the ideas flying. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,4],"tags":[],"_links":{"self":[{"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/posts\/142"}],"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=142"}],"version-history":[{"count":1,"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/posts\/142\/revisions"}],"predecessor-version":[{"id":143,"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/posts\/142\/revisions\/143"}],"wp:attachment":[{"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/media?parent=142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/categories?post=142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/defragged.org\/ossec\/wp-json\/wp\/v2\/tags?post=142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}