Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running on Centos 7 w/ Sensors having ModSec 2.9.2 on Apache 2.4.6 #66

Open
stefanp2803 opened this issue Apr 27, 2018 · 1 comment
Open

Comments

@stefanp2803
Copy link

Issues identified:

1. Alert uniqueid issued by Centos are 27 chars long instead of 24; throwing error

IPV6 not supported by now, sorry

Actions taken to fix:

  • updated DB events.a_uniqid to support 27 chars
  • modified /controller/index.php regex in phaseA from {24} to {27}

Solution suggested:

  • modify waffle.sql definition for events.a_uniqid to CHAR(27) NOT NULL
  • modify controller regex to either match 27 chars or to relax to any number of chars for compatibility with other OS (not sure on other types of systems what the length of the unique alert ID will be)

2. Missing default values for events.preserve and events.false_positive

Actions taken to fix:

  • Alter DB fields to have default value 0

Solution suggested:

  • modify waffle.sql to include DEFAULT '0' for the two fields under events table definition

3. For alerts which have no scoring (i.e. 400 Bad Request) the controller throws error that h_score_total, h_score_SQLi and h_score_XSS cannot be set to ""

Actions taken to fix:

  • modify controller/index.php (around line 568) to set score to 0 instead of ""

if (!isset($PhaseH['Score']['In_Total']) || is_null($PhaseH['Score']['In_Total'])) {
$PhaseH['Score']['In_Total'] = "0"; //was ""
};
if (!isset($PhaseH['Score']['In_SQLi']) || is_null($PhaseH['Score']['In_SQLi'])) {
$PhaseH['Score']['In_SQLi'] = "0"; //was ""
};
if (!isset($PhaseH['Score']['In_XSS']) || is_null($PhaseH['Score']['In_XSS'])) {
$PhaseH['Score']['In_XSS'] = "0"; //was ""
};

Solution suggested:

  • modify /controller/index.php to have defaults set to 0 instead of ""

After making the above changes the sensors started to correctly upload data to the Server.
Still getting some more 500 Internal Server Error messages but I did not identify what the reasons are.

In general, after probing with some sql injection, xss, etc, I am satisfied that I see the events in the waffle dashboard.

@ygotame
Copy link

ygotame commented May 3, 2019

@stefanp2803 can you share detais of your configuration how you manage to install on Apache 2.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants