4. Host-Based Intrusion Detection Systems
After setting up these basics of OSSEC we then explored its power by looking at the many default rules and determining which we needed and if we should add any custom rules. Fortunately, since we used popular services such as MySQL, most of our services had premade rules in OSSEC. For MySQL we had to modify the agent’s ossec.conf file on the database to include monitoring on the mysql/error.log file. Similar additions were made for the other services. In addition, we added real time file integrity and new file alerting on the web server’s directories to see if any files in the web hosting directory have changed or if any have been added. This could alert us to any unintentional changes and possible “hacking” activity on our website.
Overall, OSSEC is extremely powerful and allows us to see all of the important activity that we would want to see as administrators. It shows us when users begin and end ssh sessions, root user sessions, access denied messages, file integrity, and more all send through easy email alerting and gives us lots of power to add new rules as necessary.