zoukankan      html  css  js  c++  java
  • 使用naxsi

    naxsi简介

    naxsi 是一个nginx 防病毒,防跨站,sql 注入的一个模块。nginx的一个waf ,应用防火墙。非常好配置。

    naxsi 安装

    naxsi 在debina/ubuntu 上是直接被支持的,也就是说你只需要 apt-get 即可。

    apt-get install nginx-naxsi  
    centos 系统 

    naxsi 原理

    naxsi 会根据规则来检查get ,post 请求,http 的请求头。

    naxsi 使用,配置

    1 。加入naxsi 规则

    include /etc/nginx/naxsi_core.rules;
    2. 在虚拟主机中加入配置,加在location 中
    LearningMode;
    SecRulesEnabled;
    DeniedUrl "/RequestDenied";
    
    include "/etc/nginx/mynaxsi.rules";
    
    ## check rules
    CheckRule "$SQL >= 8" BLOCK;
    CheckRule "$RFI >= 8" BLOCK;
    CheckRule "$TRAVERSAL >= 4" BLOCK;
    CheckRule "$EVADE >= 4" BLOCK;
    CheckRule "$XSS >= 8" BLOCK;

    LearningMode 学习模式,规则匹配到的请求不会被屏蔽,而是放在白名单里面。

    SecRulesEnabled 规则启用,如果想关闭的话把他改成SecRulesDisabled 即可。

    DeniedURL  url 被屏蔽以后返回的地址。默认是在/RequestDenied下。

    CheckRule check的规则

    naxsi 原理

    naxsi 会根据规则来检查get ,post 请求,http 的请求头。

     
  • 相关阅读:
    centos安装odoo10及安装问题解决
    crontab实现定时任务
    pycharm发布代码
    centos下安装dblib
    windows安装face_recognition并进行人脸对比
    centos安装nginx1.9
    win10安装fast_client
    WIN10搭建python最新环境
    Linux常见命令
    centos安装python3.7
  • 原文地址:https://www.cnblogs.com/gqdw/p/4060083.html
Copyright © 2011-2022 走看看