当前位置:首页 > 黑客技术 > 正文内容

装置nginx+ngx_lua支撑WAF防护功用

访客4年前 (2021-04-15)黑客技术532

 

nginx lua模块淘宝开发的nginx第三方模块,它能将lua言语嵌入到nginx装备中,然后运用lua就极大增强了nginx的才能.nginx以高并发而闻名,lua脚本简便,两者的调配可谓完美.

用处: 避免sql注入,本地包括,部分溢出,fuzzing测验,xss,SSRF等web进犯

避免svn/备份之类文件走漏

避免ApacheBench之类压力测验东西的进犯

屏蔽常见的扫描黑客东西,扫描器

屏蔽反常的网络恳求

屏蔽图片附件类目录php履行权限

避免webshell上传

体系:centos 6.4_x64

需求的软件:LuaJIT-2.0.3.tar.gz

tengine-2.1.0.tar.gz (nginx)

ngx_devel_kit-master.zip (ngx_devel_kit)

lua-nginx-module-master.zip (nginx_lua模块)

ngx_lua_waf-master.zip (waf战略 web运用防火墙)

yum -y install gcc gcc-c++ ncurses-devel libxml2-devel openssl-devel curl-devel libjpeg-devel libpng-devel autoconf pcre-devel libtool-libs freetype-devel gd zlib-devel zip unzip wget crontabs iptables file bison cmake patch mlocate flex diffutils automake make readline-devel glibc-devel glibc-static glib2-devel bzip2-devel gettext-devel libcap-devel logrotate ntp libmcrypt-devel GeoIP*

装置LuaJIT 2.0

tar zxf LuaJIT-2.0.0.tar.gz

cd LuaJIT-2.0.0

make && make install

注:lib和include是直接放在/usr/local/lib和usr/local/include

再来设置环境变量(这是给后边nginx编译的时分运用的):

vi /etc/profile

export LUAJIT_LIB=/usr/local/lib

export LUAJIT_INC=/usr/local/include/luajit-2.0

export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH

source /etc/profile

装置nginx

tar zxvf tengine-2.1.0.tar.gz

cd tengine-2.1.0

./configure --user=www --group=www --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-pcre=/root/lnmp/pcre-8.20 --with-google_perftools_module --with-http_realip_module --with-poll_module --with-select_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_slice_module --with-http_mp4_module --with-http_gzip_static_module --with-http_concat_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_sysguard_module --with-http_browser_module=shared --with-http_user_agent_module=shared --with-http_upstream_ip_hash_module=shared --with-http_upstream_least_conn_module=shared --with-http_upstream_session_sticky_module=shared --with-http_addition_module=shared --with-http_xslt_module=shared --with-http_image_filter_module=shared --with-http_sub_module=shared --with-http_flv_module=shared --with-http_slice_module=shared --with-http_mp4_module=shared --with-http_concat_module=shared --with-http_random_index_module=shared --with-http_secure_link_module=shared --with-http_sysguard_module=shared --with-http_charset_filter_module=shared --with-http_userid_filter_module=shared --with-http_footer_filter_module=shared --with-http_trim_filter_module=shared --with-http_access_module=shared --with-http_autoindex_module=shared --with-http_map_module=shared --with-http_split_clients_module=shared --with-http_referer_module=shared --with-http_uwsgi_module=shared --with-http_scgi_module=shared --with-http_memcached_module=shared --with-http_limit_conn_module=shared --with-http_limit_req_module=shared --with-http_empty_gif_module=shared

make && make install

报过错请履行 error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory

ln -s /usr/local/lib/libluajit-5.1.so.2 /lib64/libluajit-5.1.so.2

然后创立下面文件夹

mkdir -p /data/logs/{client_body,hack}

chown -R www:www /data

chmod -R 755 /data

解压ngx lua waf-master.zip

unzip ngx_lua_waf-master.zip

mv ngx_lua_waf-master/* /usr/local/webserver/nginx/conf/

vi /usr/local/webserver/nginx/conf/config.lua

RulePath = waf的途径--规矩寄存目录

logdir = 日志记载地址--log存储目录,该目录需求用户自己新建,切需求nginx用户的可写权限

attacklog = "off" --是否敞开进犯信息记载,需求装备logdir

UrlDeny="on" --是否阻拦url拜访

Redirect="on" --是否阻拦后重定向

CookieMatch = "on" --是否阻拦cookie进犯

postMatch = "on" --是否阻拦post进犯

whiteModule = "on" --是否敞开URL白名单

[1] [2]  黑客接单网

扫描二维码推送至手机访问。

版权声明:本文由黑客接单发布,如需转载请注明出处。

本文链接:http://therlest.com/105961.html

分享给朋友:

“装置nginx+ngx_lua支撑WAF防护功用” 的相关文章

美团暗语「美团暗语2021」

 昨天,很多网友问小编美团暗语最好的方法是什么?有关美团暗语2021最好的方法是哪种?最新美团暗语2020?根据网民透露的审判细节这篇文章主要介绍了美团暗语,包括美团暗语 据大江网2021年10月20日17:01:48的最新消息,微博网友@ 爆料。 平安夜来临之际,事件,在网上炒得沸沸扬扬,引发全...

黑客了解,中国黑客越南网络apt,黑客网站密码破解工具

6.42 · hxxp[://]offlineearthquake[.]com/file//?id=&n=000 进程三:使命履行及实时数据剖析10.61 2019年6月19日,FireEye Endpoint Security设备上收到了缝隙检测警报。 违规应用程序被辨认为Microso...

安宫牛黄丸现在价格 - 天地和堂安宫牛黄丸多少钱

一丸280元左右.装同仁堂安宫牛黄丸,那个年代的这个玩意,中医说法多少,体外培育牛黄。 两丸,字[2000]201号\制定安宫牛黄丸等药品价格的批复,到正规的同仁堂自己品牌的药店购买,价格不一样,希望懂得.天然牛黄天然麝香。北京同仁堂牛黄解毒丸的市场价格在2005年。 绿色木盒这三种包装的价格一样,...

宏观经济学价格效应 「经济学传递效应」

饮水机效应,价格效应可分解为替代效应和收入效应。通货膨胀的经济效应主要有两个方面,中提出了著名的“节约悖论,比如买切糕,1元钱买了一块切糕,2,利息和货币通论,微观经济学中的价格效应中的一个问题。 “挤出”效应,政府购买和转移支付对我们经济的影响,加剧了收入分配的不均等化进一步加剧。微观经济学,即不...

Webshell安全检测篇

0x00 依据流量的检测办法 1.概述 笔者一直在重视webshell的安全剖析,最近就这段时刻的心得体会和咱们做个共享。 webshell一般有三种检测办法: 依据流量方法 依据agent方法(本质是直接剖析webshell文件) 依据日志剖析方法 Webshell的分...

威海海景房房价走势 - 山东威海海景房骗局

我是在乳山银滩买房的,多谢啦!可能是真实情况。 晚上夕阳衬着大海格外美丽,石岛房子要比银滩强的多。骗局倒是谈不上,是一个新兴的旅游区的新城,一般购房者以外地居民多,估计也是房子价格的一部分吧,那收入会更高,我家刚在D区买了房子,环境以及二十多公里的原生态沙滩形成。 但都在下面县级市的镇的郊区.听老妈...

评论列表

夙世只酷
2年前 (2022-07-07)

evel_kit-master.zip (ngx_devel_kit)lua-nginx-module-master.zip (nginx_lua模块)ngx_lua_waf-master.zip (waf战

听弧猫爷
2年前 (2022-07-07)

_uwsgi_module=shared --with-http_scgi_module=shared --with-http_memcached_module=shared --with-http_limit_conn_module=sh

只酷西奺
2年前 (2022-07-07)

h-http_concat_module=shared --with-http_random_index_module=shared --with-http_secure_link_module=s

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。