Avatar of Amin El-Zein
Amin El-Zein

asked on 

modsec custome rule

Hello,
i have a apache with mod security enable
i want to create a rule that block any page contain when open  for example c:\windows
thanks,
SecurityApache Web Server

Avatar of undefined
Last Comment
Amin El-Zein
Avatar of David Favor
David Favor
Flag of United States of America image

You asked...

"i want to create a rule that block any page contain when open"

which sounds like you're trying to block all page accesses.

Easy way to do this is just to stop Apache.

Likely I've just misunderstood your question.

Clarify what you're asking a bit + likely someone can assist you.
Avatar of Amin El-Zein
Amin El-Zein

ASKER

i have some applications on behind server name app02
my server is working as reverse proxy+ mod sec name rp-srv
some applications show an errors when request some pages that contain some information about system like  c:\windows etc....
i want to block the pages that could contains this words if the client try to request it or the page show an error that contain c:\windows
thanks.
Avatar of Dr. Klahn
Dr. Klahn

Using mod_security for this purpose is overkill - it's swatting a mosquito with a nuclear weapon.  Further (imo) mod_security log entries are incomprehensible when a rule engages.  Use mod_rewrite instead.

RewriteCond \windows [NC,OR]
(stick in more rules here as required)
RewriteRule .* [F,L]

Open in new window


Do be aware that this won't stop clever URLs where the URL is hexified.
Avatar of Amin El-Zein
Amin El-Zein

ASKER

i cant use rewrite mode becuse i am mot talking about url i am talking about page content....
Avatar of Dr. Klahn
Dr. Klahn

Such a rule would make it impossible to discuss anything related to Windows in the web pages on that system.
Avatar of Amin El-Zein
Amin El-Zein

ASKER

let say anyword for example "error"
Avatar of Amin El-Zein
Amin El-Zein

ASKER

the mean any page will load and have a "error" in content it will be blocked
ASKER CERTIFIED SOLUTION
Avatar of Amin El-Zein
Amin El-Zein

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Security
Security

Security is the protection of information systems from theft or damage to the hardware, the software, and the information on them, as well as from disruption or misdirection of the services they provide. The main goal of security is protecting assets, and an asset is anything of value and worthy of protection. Information Security is a discipline of protecting information assets from threats through safeguards to achieve the objectives of confidentiality, integrity, and availability or CIA for short. On the other hand, disclosure, alteration, and disruption (DAD) compromise the security objectives.

32K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo