edis0n0

有什么开源工具能自动分析 nginx 日志,发现 sqlmap 这类漏洞扫描工具构造的 payload 就自动调 iptables 拉黑 IP 吗?

  •  
  •   edis0n0 · Sep 10, 2022 · 4229 views
    This topic created in 1516 days ago, the information mentioned may be changed or developed.
    14 replies  •  2022-09-11 03:46:09 +08:00
    0TSH60F7J2rVkg8t
    0TSH60F7J2rVkg8t
    Sep 10, 2022❤️1
    1
    Fail2ban 应该可以
    seers
    seers
    Sep 10, 2022
    2
    fail2ban 可以监控 nginx log
    yidinghe
    yidinghe
    PRO
    Sep 10, 2022 via Android
    3
    直接返回 2
    edis0n0
    edis0n0
    OP
    Sep 10, 2022
    4
    @ahhui
    @seers 怎么识别漏洞扫描工具构造的 payload 呢
    yidinghe
    yidinghe
    PRO
    Sep 10, 2022 via Android
    5
    日,上个回复没写完就发送了。一个 IP 背后可能很多用户,建议遇到这种请求,nginx 返回 200 空内容就好,对方只是探测漏洞而非 DDOS 。
    edis0n0
    edis0n0
    OP
    Sep 10, 2022
    6
    @yidinghe #5 问题是我没办法精准识别哪些是漏洞扫描工具探测漏洞的 payload ,肯定会有漏的
    seers
    seers
    Sep 10, 2022
    7
    @edis0n0 正则+白名单呗,没必要识别
    eason1874
    eason1874
    Sep 10, 2022
    8
    用 ngx_lua 可以通过 lua 代码处理 nginx 请求

    在 log_by_lua 记录异常 IP 写入一个文本文件,开个定时 shell 把文件里的 IP 加入 iptables
    ZeroClover
    ZeroClover
    Sep 10, 2022
    9
    问题是为什么要让 fail2ban 去识别 payload ,这是 WAF 应该干的事情。

    我用的 nginx ModSecurity 去识别异常请求,然后输出一条日志,fail2ban 根据日志去 BAN 掉请求来源 IP 。
    MilkShake
    MilkShake
    Sep 10, 2022
    10
    可以上 waf ,或者自己研究免费的 NGINX waf 策略。
    cloudsigma2022
    cloudsigma2022
    Sep 10, 2022
    11
    elk,
    zhsj
    zhsj
    Sep 10, 2022 via Android
    12
    crowdsec
    yanwen
    yanwen
    Sep 10, 2022
    13
    貌似 宝塔 就有这个功能。宝塔也有开源版。
    ByteCat
    ByteCat
    Sep 11, 2022
    14
    waf ?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2420 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 15:36 · PVG 23:36 · LAX 07:36 · JFK 10:36
    ♥ Do have faith in what you're doing.