edis0n0

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

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

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

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