问题标签 [mod-security]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
820 浏览

filter - 针对特定国家/地区的 Mod 安全规则

我如何为 mod 安全制定规则以仅允许特定 IP 数据库访问文件名,例如我想阻止印度尼西亚 IP 之外的任何 IP 访问 register.php

以下是仅阻止的规则:

SecRule REQUEST_HEADERS:User-Agent "@pmFromFile china_ip.txt" "id:999999,rev:1,severity:2,deny,log,msg:'Block China'"

0 投票
2 回答
2198 浏览

php - 如何将网页访问限制为每个 ip 1 个用户?

是一种阻止多次登录网站到 1 个连接/IP 的方法吗?

假设我的网站是http://website.com,我只希望 1 个用户从 1 个 IP 浏览!

这可能使用 php、javascript 或 htaccess 吗?

我对 htaccess 做了很多测试,但都失败了

提前致谢

0 投票
1 回答
4997 浏览

windows - 使用 OWASP for Windows 安装 ModSecurity

我正在尝试在 Windows 中安装 ModSecurity,以帮助保护我的 Coldfusion/Railo 网站。我下载了 MSI 并安装了它,但是当我测试它以确保它正常工作时,它似乎并没有阻止 SQL 注入。

我的问题是,有人知道在 Windows 中安装它的分步方法吗?我找不到太多详细信息,但找到了很多关于如何在 Linux 中安装它的资源。

我什至在 Windows 安装页面下查看了 Ivan Ristic 的 ModSecurity 手册,但没有提供太多细节。

提前致谢。

0 投票
0 回答
727 浏览

apache - Secfilter 引擎打开时 Apache 服务器无法启动

我是 mod_security 的新手,我已经在 apache 服务器上安装了它。当我添加规则SecFilterEngine On时,modsecurity.conf服务器无法重新启动。

如果我评论SecFilterEngine On并添加另一条规则

SecAuditLog C:\Server\apache2\logs\mod_security.log

我能够启动服务器,并且在提到的路径中成功创建了安全日志文件。我希望过滤引擎打开,因为我需要添加过滤规则。

请让我知道我哪里出错了。apache 服务器安装在 Windows 7 机器上,error.log,httpd.conf,modsecurity.conf下面给出了 pastebin 链接。

  1. httpd.conf
  2. modsecurity.conf
  3. 错误日志
0 投票
0 回答
926 浏览

wordpress - 收到 Mod_Security 错误

当我在我的网站上安装验证码插件并尝试登录时,我收到错误:

在此服务器上找不到所请求资源的适当表示。此错误是由 Mod_Security 生成的。

0 投票
2 回答
2494 浏览

regex - specify a floating point range using regular expression

I need an regular expression to check whether a particular argument is in a floating point range.For ex i want the Param only in the range 0.01 to 999.9 . I have configured the below rule ,but it fails to work .

If the value of param is say 1000 it gets rejected which is correct , if the value of Param is 0 then its being accepted which should not be the case .Please let me know the exact way of configuring the regular expression for the same.

0 投票
4 回答
16731 浏览

apache - Ubuntu中的apt-get冲突

我试图安装 mod_security,但它有错误,所以我尝试了 aptitude:

我现在知道将以下软件包保持在当前版本的含义。

我想知道如果我按是会发生什么。它会取代我当前的 apache2 吗?在执行此操作之前我需要备份吗?

0 投票
0 回答
199 浏览

php - 在 ModSecurity 中查找 $_POST/$_GET 内容的排除关键字?

我们的客户有ModSecurity 2.0,但他在开发结束时Rule Set 2.0.5告诉我们这个小细节。

我需要审核所有应用程序代码并确保它不会干扰ModSecurity. (它已经这样做了)

我知道您不能POST使用 key提交表单'content''document'这会严重影响我们的应用程序。

鉴于版本/规则集的数量,ModSecurity我在哪里可以找到关于我不能用于键和/或禁止标头值的内容的可理解$_GET解释$_POST

我在网站上找到的文档太笼统了,或者我读错了。

谢谢

0 投票
1 回答
574 浏览

nginx - mod-security 只允许一个 set-cookie

有没有人遇到过 mod-security 的问题,只允许一个 set-cookie 通过代理请求响应?我们正在使用带有 mod-security 的 nginx,并且在我们的应用程序服务器的响应中看到除了最后一个 set-cookie 之外的所有内容都被 nginx 删除。我们正在位置部分应用 mod-security

0 投票
2 回答
13465 浏览

php - 如何在 .htaccess 中禁用 mod_security 和 mod_security2

我创建了一个流行的 Wordpress 插件,但我收到很多抱怨它不起作用。在登录到许多用户的 WP 网站后(在询问管理员密码后),我注意到我无法轻易解决的最后一个问题是 mod_security 和 mod_security2 阻止了一些 AJAX 请求或 .htaccess,这在某些配置上导致 500 错误。

所以首先为什么这段代码会导致一些服务器返回 500 错误

在其他服务器上通过 id 删除规则会导致 500 错误:

所以现在唯一不会导致任何服务器崩溃的工作是

但是对于带有 mod_security2 的服务器来说还不够!

如何编写跨服务器 .htaccess 文件,以及我应该添加哪些 IF 条件来禁用 mod_security 和 mod_security2 在任何适用的地方并且不会在其他配置上导致 500 错误?

编辑:不仅在 Apache 中。使用 .htaccess 的任何地方。