Tuesday, February 5, 2013

ModSecurity Log Auditing System in PHP (MSLA Project)

Light MSLA is a "Light Mod Security Log Auditing" tools that i wrote in PHP , it will import the log of Mod Security to a MySQL database and then using Google API's draw charts from the log file.
This project was part of Mod_Security Project that i did before.
The heart of this script is the "patterns.php" that include few regular expressions command , it will find parts that we need inside the log file and extract them.

You can download the Project from this link : DOWNLOAD (Inside the Google Drive Press Ctrl+S to download)


  • Copy all the files inside the zip package into your server path.
  • Create a database and import the "modsec_db.sql" file into your database.
  • open config.php in a text editor and change the Database name,username,password,host and the Mod_security log path.
  • run the Parser.php from your browser ( it might take some times it depends on how big is your log file)
  • after the parser.php fully loaded and page become Done , open the index.php
  • input the username and password as following for going into the dashboard.
  • For drawing the graphs it need some times. 

IMPORTANT: This script need internet access for drawing the charts because i use Google API's for the charts.
As i mentioned before this was a student project , so you can change any parts based on your own need.
the hardest part and heart of this script are the patterns inside the "patterns.php" that will help to
find and extract specific parts from the log.
"useragent.php" will extract the details of os and browser from the user-agent information in the log.

This video is also show you how to install and an example of the project.

This is the post about the "How to install Mod Security on Apache Step by Step for Beginners"
This is the post about the "How to implement Reverse Proxy & Mod Security"


  1. Further, free diversion of a copyrighted work would not establish encroachment. In this manner if a similar bit of code were freely evolved by two distinct organizations, neither would have a case against the other. https://www.apkmacpc.com/itools-crack/

  2. Incredible blog here! It's mind boggling posting with the checked and genuinely accommodating data. Purple Aladdin Vest

  3. Incredible blog here! It's mind boggling posting with the checked and genuinely accommodating data.
    elon musk leather jacket

  4. Our the purpose is to share the reviews about the latest Jackets,Coats and Vests also shre the related Movies,Gaming, Casual,Faux Leather and Leather materials available Undercover Varsity Jacket

  5. Pretty good post. I have really enjoyed reading your blog posts.Any way Here I am Specialist in Manufacturing of Movies, Gaming, Casual, Faux Leather Jackets, Coats And Vests See 4th Hokage Cloak

  6. fabulous post. i have excited reading enjoying your article posts. thanks for sharing these post with all of us. Kinemaster Lite

  7. Nice post. Thank you to provide us this useful information. Hooper Jacket


Social Networks Sharing