Logo

dev-resources.site

for different kinds of informations.

Whitelisting Specific Paths on Modsecurity 3 with OWASP Rules

Published at
5/28/2024
Categories
modsecurity
owasp
nginx
Author
henri_sekeladi
Categories
3 categories in total
modsecurity
open
owasp
open
nginx
open
Author
14 person written this
henri_sekeladi
open
Whitelisting Specific Paths on Modsecurity 3 with OWASP Rules

Modsecurity with rule from OWASP rule set, make security very strict, sometimes modsecurity flag false positive in content that we post in form.

To whitelist the spesific path, we can add on modsecurity.conf to whitelist those path or spesific url.

We are on ubuntu server 22.04 with nginx and modsecurity installed and owasp rule in /etc/nginx/conf/owasp-crs/.

sudo nano /etc/nginx/conf/owasp-crs/rules/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf

and add this line in the bottom of the file

SecRule REQUEST_URI "@beginsWith /ptickets" "id:932130,phase:1,log,allow,ctl:ruleEngine=off

This mean :

Request URI begin with /ptickets will be ignored in modsecurity with rule id is 932130. Rule id 932130 is rule on OWASP for prevent Remote Code Execution on our website and it's need to be unique.

Don't forget to reload our nginx server to take effect :

sudo service nginx reload

Thank you very much, hope this post is useful and give us some love!

owasp Article's
30 articles in total
Favicon
Access Control Security: Learning from Major Data Breaches
Favicon
OWASP Kubernetes Top 10 Explained: Know About Risks & Mitigation
Favicon
Understanding Sequelize's 'escape' function and why ideally we should avoid using it manually
Favicon
OWASP Global AppSec SF 2024: Empowering Developer Security As A Community
Favicon
Why not underestimate the 'loose ends': Bridging Web Development with Cybersecurity
Favicon
OWASP Global AppSec SF 2024: Empowering Developer Security As A Community
Favicon
OWASP Broken Access Control Vulnerabilities
Favicon
Securing Your Web Applications (DAST): A Deep Dive into OWASP ZAP Scans with Docker
Favicon
API Security: Threats, Tools, and Best Practices
Favicon
Top 10 OWASP Vulnerabilities: What Every Developer Should Know!
Favicon
Ethical Hacking - This article is about discovering vulnerabilities in web applications.
Favicon
How to Explore an Exposed .git
Favicon
Compreendendo o SAMM
Favicon
🛡️🌐OWASP - Open Web Application Security Project
Favicon
Detailed Internet Security Analysis: Common Vulnerabilities and Best Practices
Favicon
Open Web Application Security Project OWASP Top Ten
Favicon
OWASP® Cornucopia 2.0
Favicon
WEB API VULNERABILITY THROUGH OTP
Favicon
Create your own card game with OWASP® Cornucopia
Favicon
Be a Part of OWASP Top 10 2024!
Favicon
SAST Scanning with SonarQube and Docker
Favicon
Whitelisting Specific Paths on Modsecurity 3 with OWASP Rules
Favicon
Threat Modeling
Favicon
Securing Self-Hosted Services with CF Tunnel Gate
Favicon
SnowFROC 2024: Securing The Future With OWASP Community In Denver
Favicon
Application Security - Bridging Frontend and Cybersecurity: What is Application Security?
Favicon
Application Security - Bridging Frontend and Cybersecurity: How do we identify what to protect by teams or companies?
Favicon
Security Awareness, Secure Coding, and Zero-Trust - Bridging Frontend and Cybersecurity
Favicon
Mastering Application Security: The Power of Rate Limiting
Favicon
How to setup the Dependency-Track? ( Dependency-Track : PART - 01 )

Featured ones: