modsec_vendor: The /usr/local/cpanel/scripts/modsec_vendor update failed

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,241
2,217
363
cPanel Access Level
Root Administrator
You'll want to run this command to get the vendor_id field for each provider:

Code:
/usr/local/cpanel/scripts/modsec_vendor list
That will give you output similar to this:

Code:
[[email protected] ~]# /usr/local/cpanel/scripts/modsec_vendor list
[OWASP3] OWASP CRS v3.x for ModSec 2.9
         configs   (33)
 cpanel_provided   1
     description   OWASP ModSecurity 2.9 Core Rule Set v3.3.4
         enabled   1
          in_use   33
       installed   1
  installed_from   https://httpupdate.cpanel.net/fake-URL-to-show-vendor-correctly-with-pkg/with-pkgs-this-field-is-irrelevant/meta_OWASP3.yaml
          is_pkg   ea-modsec2-rules-owasp-crs
            name   OWASP CRS v3.x for ModSec 2.9
            path   /etc/apache2/conf.d/modsec_vendor_configs/OWASP3
supported_versions   (0)
          update   1
       vendor_id   OWASP3
      vendor_url   https://go.cpanel.net/modsecurityowasp
Then, take that vendor_id and run the update command and see if there is any helpful output. Here is an example:

Code:
# /usr/local/cpanel/scripts/modsec_vendor update OWASP3
Dependencies resolved.
Nothing to do.
Complete!
 
  • Like
Reactions: yatesf

jeffschips

Well-Known Member
Jun 5, 2016
286
40
78
new york
cPanel Access Level
Root Administrator
Thank you. Results below:

[[email protected] ~]# /usr/local/cpanel/scripts/modsec_vendor update OWASP3
No packages marked for update

[[email protected] ~]# /usr/local/cpanel/scripts/modsec_vendor update comodo_apache
warn [modsec_vendor] The system could not add the vendor: The vendor metadata does not contain an entry for your version of ModSecurity, “2.9.6”. The only versions of ModSecurity this rule set supports are “2.7.5”, “2.7.7”, “2.8.0”, “2.9.0”, “2.9.1”, “2.9.2”, and “2.9.3”.

info [modsec_vendor] Restored modsec_cpanel_conf_datastore backup
The system failed to update the vendor from the URL “https://waf.comodo.com/doc/meta_comodo_apache.yaml”: The vendor metadata does not contain an entry for your version of ModSecurity, “2.9.6”. The only versions of ModSecurity this rule set supports are “2.7.5”, “2.7.7”, “2.8.0”, “2.9.0”, “2.9.1”, “2.9.2”, and “2.9.3”.
warn [modsec_vendor] The system failed to update the vendor from the URL “https://waf.comodo.com/doc/meta_comodo_apache.yaml”: The vendor metadata does not contain an entry for your version of ModSecurity, “2.9.6”. The only versions of ModSecurity this rule set supports are “2.7.5”, “2.7.7”, “2.8.0”, “2.9.0”, “2.9.1”, “2.9.2”, and “2.9.3”.
 

jeffschips

Well-Known Member
Jun 5, 2016
286
40
78
new york
cPanel Access Level
Root Administrator
I see. But wouldn't disabling it affect security because although the server hasn't received updates, there are still threats out there which could still be caught nevertheless by keeping it enabled?
 

quietFinn

Well-Known Member
Feb 4, 2006
1,833
422
438
Finland
cPanel Access Level
Root Administrator
What vendors do you have in WHM -> Security Center -> ModSecurity Vendors ?
 

jeffschips

Well-Known Member
Jun 5, 2016
286
40
78
new york
cPanel Access Level
Root Administrator
Comodo and on their website they say they have an updated rules set. They advertise on their website: "Modsecurity Rules - Free from Comodo. Sign up free." So I login in with my previous account credentials. They show - correctly - that my current rule set has expired. Great - glad ot know they are on top of that - but they don't offer any way to get the *new* rules set. At least I couldn't find it.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,833
422
438
Finland
cPanel Access Level
Root Administrator
cPanel has nothing to do with Comodo ModSecurity rules, but it allows you to install 3rd party rules.
cPanel provides OWASP ModSecurity rules.
 

jeffschips

Well-Known Member
Jun 5, 2016
286
40
78
new york
cPanel Access Level
Root Administrator
Okay thanks for that. I guess what I'm asking is it redundant to have two rule sets - the OWASP's and Comodo? Are either one of them acting on different attack surfaces or are they both all about web interactions with the server, albeit with code that fills in where the other one lacks?
 

quietFinn

Well-Known Member
Feb 4, 2006
1,833
422
438
Finland
cPanel Access Level
Root Administrator
You can have more than one rule set installed, but as far as I know you must not have more than one enabled.
Comodo and OWASP ModSecurity rules & ModSecurity itself are doing the same job, as a Web Application Firewall.