Articles of mod security

Apache 2.4上的mod_security:我可以禁用特定请求元素的所有规则吗?

我有一个由Apache服务的应用程序,在这个应用程序上启用了mod_security,并且我已经成功地调整了exception,以避免错误的使用类似于: SecRuleUpdateTargetById 981260 !ARGS:'/^PD-.*/' 但是现在我正面临着请求参数带有密码的情况,该密码可能包含mod_security将标记为误报的所有可能的字符组合。 所以我天真的解决scheme将是禁用所有规则的特定论点,像这样的: SecRuleUpdateTargetById * !ARGS:'/^PD-.*/' 这样的事情可能吗?

Apache LocationMatch不匹配

我试图设置请求限制某些敏感的URI在apache(v2.2)虚拟主机与mod_security ,但find使用LocationMatch麻烦。 到目前为止,configuration如下: <VirtualHost *:80> ServerName www.example.com RewriteEngine On DocumentRoot "/var/www/html/www.example.com" <Directory "/var/www/html/www.example.com"> Options None AllowOverride None Order allow,deny Allow from all </Directory> SecRuleEngine On # ignore requests from localhost or some other IP SecRule REMOTE_ADDR "^127\.0\.0\.2$" "phase:1,id:'1',nolog,allow" <LocationMatch "^\/RESTv2\/auth\..+"> SecRule REQUEST_FILENAME ".*" "phase:1,nolog,pass,initcol:ip=%{REMOTE_ADDR},setvar:ip.requests.auth=+1,id:'3',expirevar:ip.requests.auth=1" SecRule ip:requests.auth "@gt 2" "phase:1,pass,log,logdata:'blocking auth %{REMOTE_ADDR} req/sec: %{ip.requests}',setvar:ip.block.auth=1,expirevar:ip.block.auth=5,id:'4'" SecRule ip:block.auth […]

Mod安全性例外不起作用

我想从mod安全性中排除一个目录。 我已经尝试了在每个configuration文件在太阳下的一切无济于事。 我已经把东西放在vhost文件,crs-setup文件,modsecurity.conf文件,规则目录中的例外文件,无论我把它放在什么地方。 我已经尝试了以下代码的一百万个变体: <Directory /www/html/directory/> SecRuleInheritance Off SecRuleEngine Off </Directory> 如果我删除目录标签,它将禁用mod安全性,但是在目录标签内没有任何工作。 我试过Location和LocationMatch – 什么都没有。 我也不能排除文件名! 编辑:这是我添加到各个地方的规则。 我已经将它添加到/ rules /目录中的httpd.conf,crs-setup.conf,modsecurity.conf 000.conf的顶部。 它解除阻止目录,但不在该目录中的所有图像和CSS都被剥离。 SecRule REQUEST_URI“@beginsWith / directory”“phase:1,id:12345,允许” 还试过: SecRule REQUEST_URI“@beginsWith / directory”“phase:1,id:12345,ctl:ruleEngine = off” 示例url:domain.com/directory/javascript.php?sqlinectioncode

Mod_security排除不完全工作,仍然阻止CSS和图像

我已经把我的规定放在下面的任何一个: SecRule REQUEST_URI "@beginsWith /directory" "phase:1,id:12345,allow" SecRule REQUEST_URI "@beginsWith /directory" "phase:1,id:12345,ctl:ruleEngine=off" 当我浏览/directory/javascript.php?sqlinjection时,将允许显示/目录中的HTML,但不显示驻留在根目录/ css /和/ images /中的CSS和图像。 看起来他们被阻止,因为在页面上有SQL注入,但没有排除这些目录。 我如何configuration它来完全closures/目录下的mod_security并显示所有图像和CSS?

审计日志和常规日志(在mod_security的上下文中)有什么区别?

我正在使用mod_security 审计日志(audit trail)和正常日志有什么区别? 我在维基百科上读到,审计日志是用户活动的日志,如果是这种情况,你会需要另一个日志 – 是基于系统的问题吗?

Web应用程序防火墙:替代mod_security

mod_security似乎已经不在Debian版本库中了。 安装看起来相当复杂。 我唯一能find的是Zorp ,看起来更复杂。 因此,我想问最新的mod_security howto的或替代解决scheme。 非常感谢!

在OWA前端的mod_security

当使用mod_security(从EPEL安装)和apache 2在一个centos盒子上时,有时用户不能发送消息 – 即时追踪规则有困难,唯一的地方是“入站exception分数太高” 任何人都知道我应该寻找什么,如何跟踪mod_security的东西,或者更好的具体是什么OWA在2003年做的不喜欢?

Apache2 mod_security简单的默认拒绝特定目录的规则

如何为mod_securityconfiguration最简单有用的默认拒绝规则集? 我想configurationmod_security 只允许非常具体的查询单个目录: 简而言之:我使用Apache作为目录/web_app/的反向代理,在这个目录中将是一个名为get.php的单个php文件。 我想传递给这个脚本只有匹配下面的正则expression式的查询: get \ .php \?ver = 1&id = [af \ d] {16,16}&v = [ – 。az \ d \] {1,20} 换句话说,只有三个字段的查询: id , ver和v 。 首先是数字1,第二个是16位hex,第三个是至多20个字符的string,数字,点,连字符和空格。 它必须拒绝或从查询中除去POST和GET值,即:file upload,cookies,所有非必需的标题,除3以外的值等。 我不想改变任何其他目录的工作方式,只是/web_app/ 。 过滤掉错误的UTF或URL转义/编码不是一个问题,所以启用mod_security本身不应该是一个问题。

安装导致Apache服务启动失败的mod_security

我使用这个教程http://www.linuxmaza ….安装了mod安全。 安装后,我得到了错误描述,并按照步骤来解决它。 我做的唯一不同的是从回购更新Apache,而不是先卸载。 Apache重启失败,错误日志告诉我这个: 更新:我卸载了Apache并做了一个干净的安装。 仍然收到相同的错误。 [Mon Feb 20 16:45:24 2012] [notice] caught SIGTERM, shutting down [Mon Feb 20 16:45:35 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Mon Feb 20 16:45:35 2012] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "astinf" Configuration Failed

apt-get update错误

input时出现以下错误: # apt-get update W: Failed to fetch http://etc.inittab.org/~agi/debian/libapache-mod-security2/etch/Packages 404 Not Found [IP: 80.28.139.208 80] E: Some index files failed to download. They have been ignored, or old ones used instead. 有谁知道我可以解决这个问题? 操作系统:Debian 7 Wheezy Linux localhost 3.2.0-1-amd64#1 SMP星期二Jan 24 05:01:45 UTC 2012 x86_64 GNU / Linux