Hi all,
after playing a while with my own auto updater, finally, I decided to make it public so you can update your modsec rules from GotRoot.com payed or not.
HOW TO USE IT:
1. Download GotRoot rules from Welcome : Got Root and save it in your /tmp file.
2. Save the script in its own folder and make the script executable (chmod u+x)
3. At running time the script will ask you for the file version, nothing else, then it will do everything automatically for you.
So, for example, if the rule file is called modsec-201001121214.tar.gz, you will have to write "201001121214".
The script will test Apache to check everything was fine, if it is, you could restart apache from there or do it later manually.
4. Read any text inside the file for any last minute update.
The script will save a backup with your actual rules before it does the update, if Apache gives any error, you can manually restore everything on its place.
How the script works:
1. The script checks that the rule file is already saved on the /tmp directory.
2. It unpacks everything in a temporary folder.
3. Modifies some rules to be 100% compatible with CPanel.
4. Saves the actual rules in a directory, just in case needed to do a manual restore.
5. Replaces all the modsec_rule files with the new ones.
6. Checks that Apache runs with the new rules.
7. Deletes all the temporary files used.
8. The script ends.
If you use this script is at your own risk and we don't assume any responsibility.
To use the script, you need to download it from my web site PuntaPirata Home Page, if you have any comments, please use this thread.
Hope you save a lot of time as I have done with it.
Regards,
Sergio
HOW TO UNINSTALL THE UPDATE
If you have any troubles updating your rules and need to set everything back, you can do it very easily, just do the following steps:
1. Enter as root into your server.
2. Delete all the rules inside the directory /usr/local/apache/conf/modsec_rules/
3. Go to your /tmp file and look for any directory called "MODSECOLD" or that starts with that name.
4. Copy the rules that are inside the MODSECOLD directory to your /usr/local/apache/conf/modsec_rules/
5. Restart APACHE and thats all to do.
If you have done any modifications to your MODSEC2.CONF or MODSEC2.USER.CONF files just delete the lines that you added before restarting APACHE.
NEW MOD SECURITY 2.5.12 ISSUED BY CPANEL
If you have already installed 2.5.12 chances are that you will have the following error in your MODSEC:
1. Add to your PHP.INI the following commands:
AUTOUPDATER ver 1.03: (April 9, 2010 - 09:30)
New version 1.03 is realeased.
It fixes a mynor bugs.
NEW SECTION IN WEB SITE (July, 19, 2010 - 12:31)
We have added a new section called "ModSec Rules", in there we will adding rules that can be used in your modsecurity.
If you have any rule that you want to share, you are welcome.
PUNTAPIRATA-BADOMAINS 2,100 domains (April 11, 2010 - 23:30)
PUNTAPIRATA-BADOMAINS 2,400 domains (April 18, 2010 - 20:45)
PUNTAPIRATA-BADOMAINS 2,620 domains (April 25, 2010 - 22:18)
PUNTAPIRATA-BADOMAINS 2,965 domains (May 09, 2010 - 09:06)
PUNTAPIRATA-BADOMAINS 3,543 domains (May 16, 2010 - 21:26)
PUNTAPIRATA-BADOMAINS 6,533 domains (July 19, 2010 - 12:31)
Last file contains more than 6,500 blacklisted domains used to spam blogs, forums, any type of posts.
after playing a while with my own auto updater, finally, I decided to make it public so you can update your modsec rules from GotRoot.com payed or not.
Please note, this script is an "UPDATER" not an "installer",
if you are installing GotRoot rules for the first time you
will need to do that before using my script, thanks.
if you are installing GotRoot rules for the first time you
will need to do that before using my script, thanks.
HOW TO USE IT:
1. Download GotRoot rules from Welcome : Got Root and save it in your /tmp file.
2. Save the script in its own folder and make the script executable (chmod u+x)
3. At running time the script will ask you for the file version, nothing else, then it will do everything automatically for you.
So, for example, if the rule file is called modsec-201001121214.tar.gz, you will have to write "201001121214".
The script will test Apache to check everything was fine, if it is, you could restart apache from there or do it later manually.
4. Read any text inside the file for any last minute update.
The script will save a backup with your actual rules before it does the update, if Apache gives any error, you can manually restore everything on its place.
How the script works:
1. The script checks that the rule file is already saved on the /tmp directory.
2. It unpacks everything in a temporary folder.
3. Modifies some rules to be 100% compatible with CPanel.
4. Saves the actual rules in a directory, just in case needed to do a manual restore.
5. Replaces all the modsec_rule files with the new ones.
6. Checks that Apache runs with the new rules.
7. Deletes all the temporary files used.
8. The script ends.
If you use this script is at your own risk and we don't assume any responsibility.
To use the script, you need to download it from my web site PuntaPirata Home Page, if you have any comments, please use this thread.
Hope you save a lot of time as I have done with it.
Regards,
Sergio
HOW TO UNINSTALL THE UPDATE
If you have any troubles updating your rules and need to set everything back, you can do it very easily, just do the following steps:
1. Enter as root into your server.
2. Delete all the rules inside the directory /usr/local/apache/conf/modsec_rules/
3. Go to your /tmp file and look for any directory called "MODSECOLD" or that starts with that name.
4. Copy the rules that are inside the MODSECOLD directory to your /usr/local/apache/conf/modsec_rules/
5. Restart APACHE and thats all to do.
If you have done any modifications to your MODSEC2.CONF or MODSEC2.USER.CONF files just delete the lines that you added before restarting APACHE.
NEW MOD SECURITY 2.5.12 ISSUED BY CPANEL
If you have already installed 2.5.12 chances are that you will have the following error in your MODSEC:
To fix this error you need to do the following:Rule execution error - PCRE limits exceeded (-8): (null).
1. Add to your PHP.INI the following commands:
2. Add to your MODSEC2.USER.CONF file the following commands:pcre.backtrack_limit = 10000000
pcre.recursion_limit = 10000000
This will fix any issues with the new 2.5.12SecPcreMatchLimit 50000
SecPcreMatchLimitRecursion 5000
AUTOUPDATER ver 1.03: (April 9, 2010 - 09:30)
New version 1.03 is realeased.
It fixes a mynor bugs.
NEW SECTION IN WEB SITE (July, 19, 2010 - 12:31)
We have added a new section called "ModSec Rules", in there we will adding rules that can be used in your modsecurity.
If you have any rule that you want to share, you are welcome.
PUNTAPIRATA-BADOMAINS 2,100 domains (April 11, 2010 - 23:30)
PUNTAPIRATA-BADOMAINS 2,400 domains (April 18, 2010 - 20:45)
PUNTAPIRATA-BADOMAINS 2,620 domains (April 25, 2010 - 22:18)
PUNTAPIRATA-BADOMAINS 2,965 domains (May 09, 2010 - 09:06)
PUNTAPIRATA-BADOMAINS 3,543 domains (May 16, 2010 - 21:26)
PUNTAPIRATA-BADOMAINS 6,533 domains (July 19, 2010 - 12:31)
Last file contains more than 6,500 blacklisted domains used to spam blogs, forums, any type of posts.
Last edited: